/awesome-agent-skills:awesome-bug-fixfrom awesome-agent-skills
Fixes bugs through a systematic process: reproduce, trace root cause, then fix. Use for errors, crashes, failing tests, flaky behavior, or repeated failed fixes.
Ships in awesome-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Find and fix bugs by following a strict process: no fixes without root cause first.
Why this matters: Random fixes feel faster but often introduce new bugs and leave the original cause in place. A few minutes of real investigation—reproduce, trace, hypothesize—usually leads to one right fix instead of a long chain of patches. It works the same whether you’re in a Node app, a Python script, or a distributed system: understand, then change.
No fix until the root cause is found: a fix aimed at a symptom leaves the cause in place and usually adds a new bug. Propose a fix only after Phase 1.
Redact before you show anything. This skill quotes commands, outputs and captured artifacts back to the user, and the transcript leaves the machine. Write <REDACTED> in place of every token, password, connection string, cookie and customer identifier; build loops against environment variables so the credential stays in the environment rather than in the command you paste; and from a captured artifact (a HAR file, a log dump, a request trace) quote only the lines carrying the signal, because auth headers ride in the rest. If the redacted output is genuinely not enough to diagnose the bug, say so and ask the user rather than pasting the raw capture.
Use especially when: Under time pressure, "one quick fix" seems obvious, you've already tried multiple fixes, or you don't fully understand the issue. Do not skip for "simple" bugs — simple bugs have root causes too.
If the bug is slowness, memory growth, or throughput — not a wrong result — the diagnostic path is a performance audit, not this correctness loop: call the Skill tool with "awesome-performance-audit" (measure tail latency, take a heap/CPU profile). Return here only once it narrows to a specific, reproducible defect.
Complete each phase before proceeding to the next.
Before attempting any fix:
Read error messages and stack traces
Reproduce consistently — the feedback loop IS the work
git bisect run drives it when the bug appeared between two known-good states; a differential loop running the same input through two versions or two configs and diffing the outputs; and, last, a human-in-the-loop pass when a person genuinely has to click. Structure that one like any other loop rather than as a paragraph of retyped instructions: one numbered action per line in the order the person performs them, one question per observation you need back, and a closing block that restates every answer as a name and a value, so the next attempt repeats the same script of actions and you can diff two runs. Whatever you build to drive it belongs on your side of the boundary, and never captures a secret — ask the person to use the credential and report what happened, not to type it where it lands in a transcript.Check recent changes
git log -p -- <file>, git log -S <symbol>) and closed tickets with the same symptom. A symptom that came back means the earlier fix treated a symptom; say so in the report, read what that fix changed, and route the "why does it keep happening" question to awesome-root-cause rather than answering it inside this fix.Multi-component systems
Trace data flow
Done when: the loop has been run at least once and its output matches the failure the user reported, the origin of the wrong value is named, and no fix has been proposed yet.
Check the signature table — fast triage before deeper analysis:
| Signature | Likely class | Where to look |
|---|---|---|
| Intermittent, timing/load-dependent | Race condition | Shared state, missing locks/await |
| "Cannot read property of undefined" | Nil propagation | Where the value first became null, not where it crashed |
| Correct after restart or cache clear | Stale cache | Memoization, cache invalidation |
| Works on one machine/env only | Config drift | Env vars, dependency versions, config files |
| Out-of-order effects, empty results | Missing await / unresolved promise | Async call sites |
| Works one way only (saves but won't load, opens but won't close) | Paired operation drift | The other side of the pair: encode/decode, acquire/release, migrate up/down — one side changed, its partner did not |
Find working examples — Similar code in the same codebase that works. What is different?
Compare to references — If implementing a pattern (e.g. from docs or another service), read the reference fully; do not skim.
List differences — Between working and broken paths: config, types, order, assumptions.
Dependencies — What other components, settings, or environment does this depend on?
Done when: the difference between the working path and the broken one is written down as a list, or the report states that no working example exists.
Instrumentation nuances: in tests use console.error()/stderr, not the logger (may be swallowed); log before the dangerous operation, not only after it fails; new Error().stack gives a full trace at a point of interest; when shared state is corrupted, bisect the test order to find the polluting test. Tag every debug log with a unique prefix ([DEBUG-a4f2]) so cleanup is a single grep.
Done when: 3–5 falsifiable hypotheses are ranked and written down, the leading one has survived the red-team pass, and each probe changed exactly one variable.
Minimize the repro — Before fixing, cut inputs, callers, config, data, and steps one at a time, re-running the loop after each cut, until only the essential trigger remains. If a cut makes the bug vanish, restore it and record that condition as a required part of the trigger.
Create a failing test (or repro) — Simplest reproduction: automated test if possible, or one-off script. Must exist before applying the fix — but only if a correct seam exists to test at; if no correct seam exists, that itself is the finding.
Implement a single fix — Address the root cause. One change. No "while I'm here" refactors or extras.
Verify — Test passes; no other tests broken; issue actually resolved; the acceptance criteria from Phase 1 are met. What counts as proof depends on the surface:
Then check the blast radius: callers that relied on the buggy behavior (search every call site of what changed), data already written wrong while the bug was live (its repair is a separate step the user approves, never folded into the fix), and whether the fix changes a contract — a response shape, a persisted format, an error code — in which case hand off to awesome-regression-sweep before calling it done.
If the fix doesn't work — Stop. No fixes before diagnosis is complete, no exceptions; one fix at a time, test after each. If you have tried 3+ fixes and each reveals a problem elsewhere (a fix cascade), question the architecture (see below). Do not attempt a fourth fix without stepping back.
Done when: the original repro no longer reproduces, the regression test fails without the fix and passes with it (or its missing seam is reported as the finding), and every [DEBUG-...] tag is gone.
Pattern: each fix reveals new coupling, shared state, or a problem in a different place; fixes require large refactors or create new symptoms.
When a fix is really an experiment (perf, flakiness, an unclear interaction), run it as an explicit Plan-Do-Check-Act loop: state a quantifiable success criterion before you change anything, make one change, measure against the criterion, then keep or revert. If three PDCA cycles show no progress, stop iterating and return to root-cause analysis — you're treating the wrong thing.
| Phase | Key activities | Success criteria |
|---|---|---|
| 1. Root cause | Read errors, reproduce, check changes, gather evidence, trace data | Understand WHAT and WHY |
| 2. Pattern | Find working examples, compare, list differences | Identify what differs |
| 3. Hypothesis | Form theory, test minimally | Confirmed or new hypothesis |
| 4. Implementation | Create test/repro, fix, verify | Bug resolved, tests pass |
If the issue is truly environmental, timing-dependent, or external:
Most "no root cause" cases are incomplete investigation — double-check before concluding.
When in doubt: If you’re stuck after a solid Phase 1–2 pass, say so. "I’ve reproduced it and traced to X, but the root cause isn’t clear yet; options are [A/B/C]. Which direction should we try?" Asking is better than a fourth guess. The process is the same in any stack—errors might be in logs, a debugger, or distributed traces; the discipline of "reproduce, isolate, then fix" applies everywhere.
Close with a structured debug report:
Symptom: [what was observed]
Environment: [exact versions where reproduced: runtime, OS, key deps, config that mattered]
Root cause: [one sentence]
Fix: [what changed and where]
Evidence: [the passing run: command + result]
Regression test: [test that fails without the fix, passes with it — design it by calling the Skill tool with "awesome-test-writing"]
Status: DONE | DONE_WITH_CONCERNS (name them) | BLOCKED (on what)
Source: executed now | supplied | mixed
Each status has a condition it requires:
Source states where the evidence came from. A log, trace or output the user supplied is never reported as your own run; a mix is labeled mixed with each piece attributed.
One report covers one bug. A second failure discovered on the way gets its own report (or a note), never a second root cause bolted onto this one.
What SKILL.md sets; muted values are Claude Code's defaults
49 skills in this plugin
/awesome-accessibility-auditRead-only WCAG audit of UI and markup with a concrete fix per finding. Use when asked to check accessibility, a11y, keyboard or screen-reader support, or contrast./awesome-agents-md-generatorMines a codebase's real commands, conventions and boundaries into an agent-agnostic AGENTS.md, nested per package in monorepos, every rule backed by counted evidence. Use when asked to write, generate or refresh AGENTS.md or agent instructions for a repo./awesome-api-designDesigns or reviews an HTTP API's shape before code: resources, versioning, pagination, idempotency, filtering. Use when asked to design an API or an endpoint.npx claudepluginhub khasky/awesome-agent-skills --plugin awesome-agent-skillsOther plugins' skills for the same job