agentleFS
jnMetaCodejnMetaCode/skillet/skills/systematic-debugging/SKILL.md

systematic-debugging

Skill1 starsChanged 6 months agoMITView on GitHub

Root-cause a bug with a hypothesis-driven loop instead of shotgun edits. Use when a bug isn't obvious after the first look, or when asked to "find out why" something fails.

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnosing-superpowers, building-chatgpt-apps 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.
  • obraSkill

    diagnosing-superpowers

    Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

    Also in 6 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

  • MorningStar0709Skill

    chinese-git-workflow

    Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".

    Also in 4 projects that use this

  • +8 more from mjunaidca

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 173 edited versions we read keep these.

  • 2

    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:

    Never fix what you can't reproduce.

    line 11
  2. Distinctive:

    The fix must explain the symptom: Before writing it, say *why* this cause produces *exactly* this behavior.

    line 32

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

Never fix what you can't reproduce; never explain what you haven't observed. The loop is: reproduce → observe → hypothesize → test the hypothesis → narrow. One variable at a time.

Procedure

  1. Reproduce first. Find the smallest, fastest command that shows the failure deterministically. If it's flaky, make the loop tight (while ./repro; do :; done) and treat flakiness itself as a clue (timing, ordering, shared state).
  2. Read the actual error. The full message, the first stack frame in your own code, and the line right before things went wrong. Resist pattern-matching to a familiar failure — verify this one.
  3. State a falsifiable hypothesis ("the cache returns stale entries after a restart") and pick the cheapest observation that could kill it: a log line, an assertion, a debugger breakpoint, one curl.
  4. Bisect the space, whichever axis is cheapest:
    • history: git bisect run ./repro
    • data: half the failing input, recurse
    • stack: confirm the bad value at the boundary between two layers, then descend into the guilty one only
  5. The fix must explain the symptom. Before writing it, say why this cause produces exactly this behavior. If the explanation is fuzzy, you've found a bug, maybe not the bug.
  6. Prove it: the repro from step 1 now passes, AND a new regression test fails without the fix. Then look for siblings — the same mistake usually exists elsewhere (grep for the pattern you just fixed).

Anti-patterns

  • Changing two things between observations — you learn nothing from the result.
  • "It works now" without knowing why it failed — it will be back.
  • Adding sleeps to fix timing issues — that's hiding the race, not fixing it.
  • Debugging through the framework before confirming your own code's inputs and outputs at the boundary.

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.