bug-fixer

A debugging skill for finding and fixing software bugs, such as compilation errors or runtime failures, through a four-stage process.

In plain words
What is it for?
Use it when a feature is broken, an error appears, or a code review confirms a problem that can be fixed automatically.
Why use it?
It helps identify the underlying cause instead of applying unrelated changes, then checks that the fix did not cause a regression.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/zxpmail/reqforge/bug-fixer
Any agent
npx skills add zxpmail/ReqForge --skill bug-fixer
Clone the repo
git clone --depth 1 https://github.com/zxpmail/ReqForge

Made for: Claude Code, Codex.

Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,434 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02434
Opus 5 $0.00000 $0.01217
Sonnet 5 $0.00000 $0.00487
Haiku 4.5 $0.00000 $0.00243

Measured 2d ago against content hash 34325c75bd0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bug-fixer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

adapters/claude-code/.claude/skills/bug-fixer/SKILL.md · 179 lines

How it starts

The opening of the file, as written. The whole thing — 179 lines — stays where its author put it; the contents beside it link to each section on GitHub.


name: bug-fixer description: Used when the user says "this feature is broken", "getting an error", "something's not right", or reports a bug, compilation error, or runtime exception. Locates root cause through a four-stage systematic debugging process and fixes it. version: 1.2.0 updated: 2026-06-27 requires: []

[Task] Locate the root cause of bugs through a systematic debugging process and fix them. Fix one problem at a time. Assess impact before each modification. Verify regression after fix.

[Invocation Context] bug-fixer may be called in two scenarios: 1. User directly reports a bug -> main Agent invokes bug-fixer -> after fix, suggest user run /code-review to verify 2. code-review finds confirmed bug/security/type issues (confidence_5 ≥ 4, or legacy confidence ≥ 0.6) -> main Agent invokes bug-fixer, passing the failure items from the code-review report -> after fix, main Agent re-dispatches code-review

**Action filter**: bug-fixer receives **only `auto-fix` findings**. Findings with `action="ask-user"` (intent / product-behavior / dead-code decisions) are escalated to the human by dev-builder *before* reaching bug-fixer — never auto-fix them. See `../_shared/finding-actions.md`.

[Not For] - Feature requests or new functionality -> use /dev-builder instead - Code quality or style issues without runtime errors -> use /code-review instead - Performance optimization without a specific bug -> use /code-review with performance dimension

[Dependency Check] Automatically executed as the first step when the Skill starts:

Required:
- Project code exists -> if no code, prompt to call /dev-builder first
- Bug description -> user-provided symptoms, or failure item descriptions from a code-review report

Optional (enhances debugging capability):
- Product-Spec.md -> if available, cross-reference expected behavior to determine if it is a bug or a feature
- DEV-PLAN.md -> if available, locate the relevant Phase and files
- Design tool MCP (Pencil / Figma, etc.) -> if available, cross-reference design to check if UI is correct
- Playwright plugin -> if available, automate reproduction and verification
- git -> if available, use git log/diff/blame to trace changes
- **Dependency Graph** (`dep-graph`) -> if available, run `pnpm dep-graph affected <file>` to scope the blast radius before debugging
- **forge-bug-fix** (`pnpm forge-bug-fix`) -> if available, use diagnose/trace/verify to automate preflight checks, capture debug snapshots, and run post-fix verification

[Shared Discipline] Karpathy 四原则 → ../_shared/karpathy-discipline.md(bug 场景:先证据后改码;最小修复) 只修 auto-fix finding;ask-user(意图/产品行为/死代码决策)已被上游 escalate → ../_shared/finding-actions.md

[First Principles] Debug 前必读 references/first-principles.md

[Output Style] → references/output-style.md → Bug 报告 / 修复完成必须附加 ../_shared/output-status-protocol.md(Status: BLOCKED 或 NEEDS_CONTEXT 时必须说明原因)

[File Structure] bug-fixer/ ├── SKILL.md ├── commands/bug-fixer.md └── references/ ├── first-principles.md ├── output-style.md ├── debugging-strategy.md # 四阶段(Stage 1–4) ├── cot-diagnostic-checklist.md ├── three-layer-diagnostic-model.md ├── debugging-rule-checklist.md ├── anti-rationalization.md ├── anti-ai-slop-checklist.md # 交付前自检:防敷衍式修 bug ├── workflow.md # Startup → Debug → Verify → Complete └── yolo-mode.md ../_shared/

Read the full file on GitHub · 179 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 179 lines · 0 tokens per session scan A 34325c75bd0d

Subscribe to this mod's changes

bug-fixer is a skill published in the GitHub repository zxpmail/ReqForge (18 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,434 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.