bugfix
Skill15 starsChanged 18 days agoApache-2.0View on GitHub
Use when a bug is reported, something is broken, an error or crash needs fixing, a wrong output appears, or a regression shows up — guides Grimoire's Reproduce → Root-Cause → failing-test-FIRST → Fix → Verify discipline and will not let the fix begin until a failing regression test is recorded. Use also when the user says "bugfix", "/bugfix", "fix this bug", or "something is broken".
34 other projects use a version of this.
Adopted by
Most recently taken up by
- isanchez-aguilar/relayrace-aitheir own version, first seen Nov 8, 2026
- icarloscornejo/doertheir own version, first seen Nov 7, 2026
- ClaireAll/skillstheir own version, first seen Nov 5, 2026
- bhoon716/skill-forgetheir own version, first seen Nov 2, 2026
- Snowflake-Labs/coco-skillstheir own version, first seen Nov 1, 2026
- irahardianto/awesome-agvtheir own version, first seen Nov 1, 2026
Used with
Projects with it also use feature, refactor and 7 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.
bradtraversySkillfeature
Manage current feature workflow - start, review, explain or complete
Also in 7 projects that use this
GitHubSkillrefactor
Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.
Also in 6 projects that use this
SentrySkillspec
Produce a verified spec — problem, desired outcome, and acceptance criteria — before building. Use when given a GitHub/Linear issue link, when starting from a fuzzy in-conversation idea, or asked to "figure out what to do" / "scope this" / "what should I build" — whenever the *what* isn't yet pinned down. Grills the ambiguities, checks the premise against the code, and produces acceptance criteria you sign off on — then hands to design-first.
Also in 4 projects that use this
BlockSkillplan
Draft a TDD, PRD, or lightweight plan in the conversation without committing it.
Also in 4 projects that use this
SentrySkillreview
Fixture review skill.
Also in 6 projects that use this
MicrosoftSkillpr-review
Verify the technical accuracy of a vscode-docs pull request against the VS Code source code in microsoft/vscode. Use when reviewing a docs PR for factual correctness: setting names, command IDs, default values, API shapes, keybindings, versioned availability, and described behavior.
Also in 3 projects that use this
Other versions34 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 34
- alibaba/MNN★ 16ksame name
- SparkDevNetwork/Rock★ 701same name
- oasm-platform/open-asm★ 272same name
- atelier-fashion/adlc-toolkit★ 173same name
- team-attention/hoyeon★ 173same name
- irahardianto/awesome-agv★ 157same name
- Snowflake-Labs/coco-skills★ 49same name
- mrveiss/AutoBot-AI★ 39same name
- dan-the-dev/xp-developer-skills★ 31same name
- ecodelearn/template-claude-code-open★ 25same name
24 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/research/hooks_vendor_reports/claude.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- code-docs-cleanupSkill
- docs-instrumentSkill
- docs-planSkill
- docs-reviewSkill
- hex-architectSkill
- hex-coreSkill
- hex-discussSkill
- hex-executeSkill
- hex-finalizeSkill
- hex-initSkill
- hex-loopSkill
- hex-planSkill
- hex-retroSkill
- hex-reviewSkill
- nox-reviewSkill
- builderSkill
- changelogSkill
- code-checkSkill
- code-docs-cleanupSkill
- commitSkill
- docs-instrumentSkill
- docs-planSkill
- docs-reviewSkill
- docsSkill
- finalizeSkill
- hex-architectSkill
- hex-coreSkill
- hex-discussSkill
- hex-executeSkill
- hex-finalizeSkill
- hex-initSkill
- hex-loopSkill
- hex-planSkill
- hex-retroSkill
- hex-reviewSkill
- meta-maintain-configSkill
- meta-validate-contextSkill
- nextSkill
- nox-reviewSkill
- qa-engineerSkill
- security-auditorSkill
- upstream-refreshSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 31 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
Write a one-line repro: "<cmd/inputs> → <observed>.
- Distinctive: line 55
If the real cause needs an architectural change, stop and escalate to the feature workflow with a plan artifact — don't paper over it.
- Distinctive: line 62
Write the test that exercises the Phase-1 repro and targets the Phase-2 root cause (not just the symptom).
- Distinctive: line 69
If an existing test encodes the buggy behavior (it asserts the wrong thing the user is now reporting), that test is part of the bug — note …
- Distinctive: line 78
If you cannot make a test fail, you have not reproduced or understood the bug — return to Phase 1/2.
- Very specific: line 92
Run the subsystem gate for the changed area (e.g.
- Very specific: line 110
Never push — the human decides (see workflow-git.md).
“Common” is measured: kept by at least 6 in 10 of the 31 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.
Files
/bugfix — Guided Bug-Fix Workflow
Guard rail for the #1 bug-fix failure: fixing before a failing test exists.
This skill walks workflow-bugfix.md (the
single source of truth) and adds one hard, non-skippable gate — Phase 3 must
produce a test that fails on the current code before any fix is written.
Why this exists: the rule alone was repeatedly skipped. This skill makes the order explicit and the gate blocking. Read
workflow-bugfix.mdfor the full rationale; this file is the executable checklist.
The non-negotiable sequence
Reproduce → Root-Cause Analysis → FAILING TEST → Fix → Verify → Review → CommitEach phase finishes before the next starts. The only way past Phase 3 is a test that you have run and watched fail for the right reason.
Phase 1 — Reproduce (no guessing)
- State the exact wrong behavior: command, input, observed vs expected.
- Find the surface: which entry point(s)? CLI command, TUI path, library seam? A bug often lives on more than one surface (e.g. a CLI path AND its TUI twin); list every one that shares the broken code.
- Confirm it actually reproduces. If you can't reproduce it, keep digging — no speculative fixes.
Write a one-line repro: "<cmd/inputs> → <observed>; expected <expected>".
Phase 2 — Root-Cause Analysis (write it down)
- Trace the symptom to the line and the condition that made it fire.
Output a root-cause statement in this exact shape — no "error on line N":
X happens because Y, introduced by/located at Z.
- Single bug or a pattern? Grep for the same defect elsewhere (sibling call sites, the other surface from Phase 1). If it's a pattern, the fix covers all instances.
- If the real cause needs an architectural change, stop and escalate to the feature workflow with a plan artifact — don't paper over it.
Phase 3 — Failing test FIRST 🚧 GATE
Do not edit any production code until this phase is done.
- Write the test that exercises the Phase-1 repro and targets the Phase-2 root
cause (not just the symptom).
- Acceptance-level →
test/tests/test_*.py(real binary + registry). - Unit-level → inline
#[cfg(test)]in the affected module.
- Acceptance-level →
- Run it. Paste the red output. It must fail, and fail for the bug's reason (assertion on the wrong behavior) — not a compile error, typo, or missing fixture.
- If an existing test encodes the buggy behavior (it asserts the wrong thing the user is now reporting), that test is part of the bug — note it; it will be corrected in the fix, with the reason recorded.
Gate to pass Phase 3 — all three true:
- A test exists that exercises the repro.
- You ran it and it failed (output shown).
- The failure is the bug, not test scaffolding.
If you cannot make a test fail, you have not reproduced or understood the bug — return to Phase 1/2. Skipping this gate is the failure mode this skill prevents.
Phase 4 — Fix (minimal, root-cause)
- Smallest change that addresses the Phase-2 cause. No drive-by refactor, no "while I'm here" cleanup (separate commit, separate type).
- Fix every instance the Phase-2 pattern search found.
- Correct any existing test that encoded the wrong behavior — state why in the diff/commit (user intent / corrected contract supersedes the old assumption).
Phase 5 — Verify (evidence, not vibes)
- The Phase-3 test now passes (show it).
- Run the subsystem gate for the changed area (e.g.
task rust:verify), then cache-bust + re-run unit tests if Rust (touchthe edited files so a stale cache can't mask a failure). - Manually confirm the Phase-1 repro no longer reproduces.
- Final gate before commit:
task --force verify(fmt + clippy + build + unit + acceptance). Verify it yourself — do not trust "should pass".
Phase 6 — Review-Fix Loop (+ optional Codex)
Apply the canonical Review-Fix Loop from workflow-bugfix.md (correctness vs
root cause, regression risk to other callers, minimality, test adequacy). For a
non-trivial fix, run one Codex adversarial pass over the diff as the cross-model
gate; fix real findings, re-verify, then converge.
Phase 7 — Commit
fix:conventional commit; body names the root cause and the regression test.- Reference the issue (
fixes #N) when one exists. - Never push — the human decides (see
workflow-git.md).
Anti-rationalizations (stop if you think these)
| Thought | Reality | Do this |
| "I know the cause, I'll just fix it." | No Phase-2 statement written. | Write the root-cause line first. |
| "The test is trivial, I'll add it after." | A test added after the fix never proved it caught the bug. | Write it first, watch it fail. |
| "Existing tests cover this area." | They may encode the buggy behavior. | Add a test for the exact broken path. |
| "Clippy/format nit nearby, I'll fix too." | Scope creep. | Separate chore:/refactor: commit. |
References
workflow-bugfix.md— full workflow + gates (source of truth)workflow-intent.md— work-type routingquality-core.md— verification honesty, review checklistworkflow-git.md—fix:commits, never push
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
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.

