agentleFS
michael-muirmichael-muir/agentic-dev-kit/skills/systematic-debugging/SKILL.md

systematic-debugging

Skill1 starsChanged 13 days agoMITView on GitHub

Use for any bug, flaky test or performance regression whose cause isn't obvious after one focused attempt, for a phase-gated loop that builds a reproducible signal before theorising and ends with a regression test.

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use chinese-git-workflow, chinese-code-review 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.
  • Leodorareluctant259Skill

    chinese-git-workflow

    适配国内 Git 平台和团队习惯的工作流规范——Gitee、Coding、极狐 GitLab 全覆盖

    Also in 9 projects that use this

  • Leodorareluctant259Skill

    chinese-code-review

    中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈

    Also in 8 projects that use this

  • SethGammonSkill

    ascii-diagram

    Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.

    Also in 4 projects that use this

  • mjunaidcaSkill

    building-chatgpt-apps

    Guides creation of ChatGPT Apps with interactive widgets using OpenAI Apps SDK and MCP servers. Use when building ChatGPT custom apps with visual UI components, embedded widgets, or rich interactive experiences. Covers widget architecture, MCP server setup with FastMCP, response metadata, and Developer Mode configuration. NOT when building standard MCP servers without widgets (use building-mcp-servers skill instead).

    Also in 4 projects that use this

  • mjunaidcaSkill

    building-chat-interfaces

    Build AI chat interfaces with custom backends, authentication, and context injection. Use when integrating chat UI with AI agents, adding auth to chat, injecting user/page context, or implementing httpOnly cookie proxies. Covers ChatKitServer, useChatKit, and MCP auth patterns. NOT when building simple chatbots without persistence or custom agent integration.

    Also in 4 projects that use this

  • +2 more from Leodorareluctant259
  • +5 more from mjunaidca

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 178 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write 3–5 ranked hypotheses.

    line 28
  2. Distinctive:

    Gate: every hypothesis has a prediction that can be tested.

    line 30
  3. Distinctive:

    Test one prediction at a time, changing one variable at a time.

    line 33
  4. Very specific:

    Remove all temporary logs, and delete throwaway harnesses (or move them to .agentic/research/).

    line 47

“Common” is measured: kept by at least 6 in 10 of the 178 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

Systematic debugging

Work through the phases in order. Each phase ends with a gate. If you skip a phase, write down why.

Redact first. Replace secrets in commands, logs and notes with <REDACTED>, and quote only the lines that carry the signal.

1. Signal

Build one command that goes red on this bug: a failing test, a script, a replayed request, a fuzz seed, or a bisect harness. Then make it faster, deterministic, and sharper. For intermittent bugs, aim for a high reproduction rate, such as a loop of 100 runs. Gate: you can name the command, you've run it, and it fails in seconds without anyone watching. Hold off reading code for theories until this exists. If you can't build it, say what you tried and ask the human for access, an artifact, or permission to add instrumentation.

2. Minimise

Confirm the failure matches the reported symptom, not a nearby one. Then cut the inputs, steps, configuration and callers one at a time. Gate: removing any remaining element makes the signal pass.

3. Hypothesise

Write 3–5 ranked hypotheses. Each one predicts something: "if X is the cause, then changing Y makes it pass, or changing Z makes it worse." Gate: every hypothesis has a prediction that can be tested. Sharpen or drop the rest.

4. Instrument

Test one prediction at a time, changing one variable at a time. Prefer a debugger or REPL, then targeted logs at boundaries. Tag every temporary log line with a unique marker such as DEBUG- plus 4 hex digits, so you can find and remove them all with one search. The gate's builtin:debug-tags check fails if any are left. For performance problems, measure a baseline first, then bisect. Gate: one hypothesis is confirmed by its prediction, and the others are ruled out or deprioritised.

5. Fix behind a regression test

Turn the minimised reproduction into a test at a seam that exercises the real call path, and watch it fail. Fix the root cause. Watch the test pass, then re-run the phase 1 signal on the original scenario. If no honest seam exists, record that as a design finding. Gate: the test went from red to green, and the original signal is green.

6. Clean up

  • Remove all temporary logs, and delete throwaway harnesses (or move them to .agentic/research/).
  • Record the confirmed hypothesis in the commit message and the handoff. Gate: gate.py run --stage pre-push passes.

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.