agentleFS
AWSKnown publisherawslabs/do-agent-aws/Container-Root/agent/skills/wrong-layer-debugging/SKILL.md

wrong-layer-debugging

Skill3 starsChanged 2 days agoApache-2.0View on GitHub

Use when debugging a multi-layer system where one code path works but another fails using shared infrastructure, when 3+ theories about shared code have been disproved, or when the working and broken paths differ only in execution order or data flow direction

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When path A works but path B fails using identical shared infrastructure, the bug is in what's DIFFERENT between A and B — not the shared …

    line 9
  2. Distinctive:

    Add diagnostic printf to the FIRST difference, not the shared path

    line 27
  3. Distinctive:

    When debugging a multi-path system, resist disabling parallelism (sharding, multi-NIC, multi-channel) to "simplify." Disabling changes the …

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Wrong Layer Debugging

Core Principle

When path A works but path B fails using identical shared infrastructure, the bug is in what's DIFFERENT between A and B — not the shared code.

When to Use

  • Function A works, function B fails, both use same RDMA/networking/IPC path
  • You've verified 3+ theories about shared infrastructure (all correct)
  • Hours spent debugging shared code that dispatch/combine/send/recv all use

The Pattern

STOP. Ask: "What is DIFFERENT between the working and broken case?"

NOT: "What's wrong with the shared infrastructure?"

Diagnostic Checklist

  1. List everything SHARED (same proxy, same NIC, same MR, same QP)
  2. List everything DIFFERENT (execution order, buffer regions, kernel roles, flow direction)
  3. Add diagnostic printf to the FIRST difference, not the shared path
  4. The bug is almost always in the difference list

Don't Simplify by Disabling Distribution

When debugging a multi-path system, resist disabling parallelism (sharding, multi-NIC, multi-channel) to "simplify." Disabling changes the execution topology and may REMOVE the bug-producing condition. Re-enabling sharding improved combine from 248ms to 2.3ms — the parallelism wasn't the bug.

Real-World Example

  • 8 hours debugging RDMA proxy, NIC workers, ibv_wr_rdma_write, MR coverage — all CORRECT
  • Actual bug: NVLink intra-node tail counter not updated (only affects combine, not dispatch)
  • The SHARED RDMA path was never broken. The DIFFERENT NVLink path was.
<!-- imported on 2026-10-31 by tools/import-skills.py from a native Claude Code instance's skill library; the source site's names, ids, hosts and paths are scrubbed to <placeholders>; its other files were not copied -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.