agentleFS
TradebaasTradebaas/Groundwork/.agents/skills/debug/SKILL.md

debug

Skill2 starsChanged 3 months agoMITView on GitHub

Systematic debugging when a failure's cause is unknown: reproduce first, isolate, fix the root cause once, prove it with a regression test. Use when a bug, crash, failing test or wrong output has no obvious cause, when a fix attempt did not work, or before claiming a stubborn bug fixed. For production incidents: stabilize first per `maintain`, then run this loop.

144 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-ollama-tool, add-slack and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    add-ollama-tool

    Add Ollama MCP server so the container agent can call local models and optionally manage the Ollama model library.

    Also in 6 projects that use this

  • MicrosoftSkill

    add-slack

    Add Slack channel integration via Chat SDK.

    Also in 6 projects that use this

  • sskarzSkill

    add-telegram-swarm

    Add Agent Swarm (Teams) support to Telegram. Each subagent gets its own bot identity in the group. Requires Telegram channel to be set up first (use /add-telegram). Triggers on "agent swarm", "agent teams telegram", "telegram swarm", "bot pool".

    Also in 5 projects that use this

  • +9 more from microsoft

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 127 edited versions we read keep these.

  • 1

    Distinctive

    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 the stack file's header declares a hosted platform, steps 2 and 3 keep their intent and change their instrument.

    line 38

“Common” is measured: kept by at least 6 in 10 of the 127 edited versions of this file we could read. “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

debug: from symptom to proven root cause

A fix you never saw fail is a guess (verify). This loop turns an unknown failure into a proven fix at the lowest cost. Production incident? Stabilize first per maintain (rollback beats diagnosis under fire), then run this loop calmly.

The loop

  1. Read the actual error. The message, the stack, the failing line. Capture expected vs actual behavior verbatim before touching anything: the error usually says more than the first theory about it.
  2. Reproduce before fixing. A failing automated test at the nearest seam is the goal; a minimal script is the fallback. Shrink the repro until removing anything makes the bug disappear. What you cannot reproduce you cannot fix, only disturb.
  3. Check what changed. Most bugs live in the newest diff: recent commits, dependency bumps, config or environment changes. git bisect beats rereading the whole system.
  4. Hypothesize, test one change at a time. Rank hypotheses by likelihood and cost of testing; each experiment changes exactly one thing and names its predicted outcome before running. Two simultaneous changes make the result unreadable. Read the evidence at arm's length: a failing suite or a log enters the context as its failures and counts (tail, grep, or a subagent), never whole, or the third experiment runs in a context the first two filled. Expect horses, not zebras: the common cause outranks the exotic one until evidence says otherwise.
  5. Fix the root cause, once. The fix goes where the cause lives, not where the symptom showed (decision ladder: understand, then fix the cause once). A symptom patch that leaves the cause in place is not progress, and per debug hygiene a change that demonstrably fixed nothing gets reverted, not left in.
  6. Prove and clean. The repro test passes and stays as the regression test; every debug shim (prints, sleeps, forced branches, commented-out calls) is removed; the full gate chain runs green.

On a platform stack

When the stack file's header declares a hosted platform, steps 2 and 3 keep their intent and change their instrument; the rest of the loop is unchanged. Reproduce in a real dev environment, against the platform's own record of the failure - run history, execution logs, the audit trail - and with its test tooling where the platform has any. For what changed, the platform keeps its own history: solution layers and version history, the audit log of who edited what, and the vendor's release notes for the change nobody in the project made. That is the bisect equivalent, and it reaches one thing bisect cannot - an edit made directly in the platform editor that never became a commit.

Record

A non-obvious cause is lesson material: one gotcha line in STATE.md's log, so the next session skips the dead end. For production incidents, the ten-line post-mortem belongs to maintain. ⚓

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.