agentleFS
ForgeyClapForgeyClap/claude-forge/.claude/skills/forge-debug/SKILL.md

forge-debug

Skill2 starsChanged 33 days agoMITView on GitHub

Forge systematic-debugging playbook: ANY bug, crash, stack trace, failing test, or regression — debug, root cause, bisect, flaky test — before proposing a fix.

2 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    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:

    The Iron Law: no fix without root-cause investigation first.

    line 14
  2. Distinctive:

    Minimal-diff check after each fix: After each fix, re-run the same diagnostic and confirm only the targeted error changed.

    line 19
  3. Distinctive:

    Do not silently patch around a failure (swallowed exception, widened try/catch, disabled test, loosened assertion) to make a check go green …

    line 20
  4. Very specific:

    If root cause can't be found within a reasonable number of attempts, say so honestly (BLOCKED / needs owner input) rather than shipping a …

    line 22
  5. Distinctive:

    Regression test: Write a test that fails on the pre-fix code and passes on the post-fix code.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Forge playbook — Systematic debugging

Do not duplicate ECC skills — defer to: systematic-debugging (the deep methodology reference; it ships with Forge as a pinned vendored skill). This file is the Forge-specific orchestration wrapper: it binds that methodology to the honesty core and to which Boss does what.

Hard rules

  • Classify the error first. Build-blocking, type, configuration, or dependency — fix build-blocking errors first before moving to other issues.
  • The Iron Law: no fix without root-cause investigation first. A patch that only makes the symptom go away, without an explanation of why the bug happened, is not a fix — it is a guess.
  • Never claim "fixed" without proof. Per the project honesty core (CLAUDE.md → Honesty), a bug is only "fixed" when there is a real regression test that failed before the change (RED) and passes after it (GREEN). A verbal claim of "should be fixed now" is not evidence.
  • Minimal-diff check after each fix. After each fix, re-run the same diagnostic and confirm only the targeted error changed.
  • Do not silently patch around a failure (swallowed exception, widened try/catch, disabled test, loosened assertion) to make a check go green — that is a rework-flag, not a fix.
  • If root cause can't be found within a reasonable number of attempts, say so honestly (BLOCKED / needs owner input) rather than shipping a guess dressed up as a fix.

The loop (reproduce → isolate → root-cause → fix → regression test → verify)

  1. Reproduce. Get a minimal, reliable repro (exact command, exact input, exact error). If it can't be reproduced, that itself is a finding — don't invent a story around a bug you haven't actually seen.
  2. Isolate (bisect / binary-search). Narrow the surface: which commit introduced it (git bisect), which input triggers it (binary-search the input space), which layer owns it (add targeted logging / breakpoints, remove code paths until the symptom disappears). Prefer removing variables over adding theories.
  3. Root-cause, not symptom. State the mechanism in one sentence: "X happens because Y does Z under condition W." If you can't state it that precisely, you don't have the root cause yet — keep isolating.
  4. Fix at the root, matching the existing architecture and conventions (follow the project's own conventions — a coding-style.md or CLAUDE.md rules when the project has them) — not a parallel workaround bolted on beside the real cause.
  5. Regression test. Write a test that fails on the pre-fix code and passes on the post-fix code. It stays in the suite permanently — it is the proof, and it prevents the same bug returning silently.
  6. Verify. Re-run the full relevant suite (not just the new test) to confirm no other case regressed; quote the real command and its real output.

Isolation techniques

  • git bisect for "this used to work, now it doesn't" regressions.
  • Binary-search the input space for input-dependent bugs (halve the input, see which half still fails).
  • Minimal repro: strip the reproduction down to the smallest file/config/call that still triggers it.
  • Targeted logging beats a debugger you can't attach in CI; remove it once root cause is found.
  • For intermittent or environment-dependent bugs: add temporary logging at decision points and module boundaries, run once to gather evidence, form a hypothesis, then remove the logging. Do not fix based on speculation.
  • For flaky/intermittent failures: run N times to get a real failure rate before touching anything — a "fix" for a race condition that was never actually reproduced is not credible.

When to escalate

  • Security-relevant bug (auth, secrets, data exposure) → also load security-reviewer per the project's security posture.
  • High-risk / hard-to-reproduce bug after one reasonable attempt fails → optional codex-reviewer (Codex, read-only) as an independent second opinion, per CODEX_GLOBAL_POLICY.md (an owner-level policy in ~/.claude when present; on an install without it, the defaults stated in this skill apply — read-only, never a blocker). Not mandatory, never a blocker.
  • Build Boss owns implementation fixes; Test Boss owns the regression-test proof; Debug work that touches both stays with Build Boss, who hands the RED→GREEN evidence to Test Boss for confirmation.

Honesty gate

This skill is grounded in CLAUDE.md's honesty core: no fabricated proof/output, CLAIM=PROOF. A completion report for a debug task without a quoted failing-then-passing test run is incomplete — report it as blocked or partially complete, not fixed.

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.