skills/fix/SKILL.md
Rapidly fix small bugs and minor improvements in development environment. Do NOT use for new feature implementation or large-scale changes (use /code instead).
npx skillsauth add thkt/claude-config fixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Rapidly fix small bugs with root cause analysis and TDD verification.
$ARGUMENTS: bug description OR Suggestion ID from /audit (e.g., SUG-001)| $ARGUMENTS pattern | Mode |
| -------------------- | ---------------------------- |
| /^SUG-[0-9]+$/ | Suggestion ID Mode |
| empty | Fix Prompt (AskUserQuestion) |
| otherwise | Standard Flow |
Asked via AskUserQuestion when $ARGUMENTS is empty.
| Question | Options | | ----------- | -------------------------------------- | | Fix type | Bug fix / Error message / Test failure | | Description | [free text via Other] |
| Step | Action |
| ---- | ---------------------------------------------------------------------- |
| 1 | Read latest snapshot from ${CLAUDE_SKILL_DIR}/../../workspace/history/ |
| 2 | Find matching suggestion by ID |
| 3 | Apply fix directly (skip RCA, trust audit finding) |
| 4 | Verify tests pass |
| 5 | Suggest targeted re-audit: /audit <modified files> |
| Type | Target | Purpose | | --------- | ------------------------------- | ----------------------------------------------- | | Skill | use-context-root-cause-analysis | 5 Whys for non-obvious bugs | | Agent | generator-test | Regression test from symptom + repro steps | | Agent | resolver-build | TypeScript or build error triage | | Reference | references/defense-in-depth.md | Multi-layer validation for Recurring/Systematic |
Read .claude/OUTCOME.md before Build Check. If absent, stub generation (see rules/core/OUTCOME.md). Confirm the bug or fix lives inside the outcome state. Escalate if outside (see Escalation).
Run project build command (detect from package.json or project config).
| Result | Action |
| ------------ | ----------------------------------------------------- |
| Build errors | Task with subagent_type: resolver-build, then END |
| No errors | Continue to Triage |
| Condition | Path | | -------------------------------------------------------------- | -------------------------- | | Single location identified + 1-3 line fix + no similar pattern | Obvious: Direct Fix | | Intermittent, multiple repro conditions, or unknown root cause | Non-obvious: Full Protocol |
| Step | Action | | ---- | ----------------------------------------------- | | 1 | Apply minimal fix | | 2 | Run tests covering affected code (skip if none) |
| Step | Action |
| ---- | ---------------------------------------------------------------------------------------------- |
| 1 | Skill("use-context-root-cause-analysis") for 5 Whys. Output: Symptom / Root cause / Pattern |
| 2 | Task(subagent_type: generator-test) for regression test (pass symptom + repro only) |
| 3 | Verify regression test is Red |
| 4 | Apply fix |
| 5 | Verify regression test is Green and no other tests regressed |
| 6 | If Pattern ∈ {Recurring, Systematic}: apply ${CLAUDE_SKILL_DIR}/references/defense-in-depth.md |
Objective triggers. No confidence self-assessment.
| Trigger | Action |
| ------------------------------ | ------------------------------------------------------------ |
| RCA cannot identify root cause | Escalate → /research |
| 3 fix attempts failed | STOP. Escalate → /research with full context |
| Multi-file impact (>3 files) | Delegate → /code |
| New feature scope | Delegate → /think |
| Pattern = Systematic | Escalate → /research |
| Fix outside OUTCOME.md scope | Confirm with user; redefine Non-goals or delegate to /code |
The ≥3 rule: if three distinct fix attempts fail, the issue is likely architectural, not a local bug. Do not attempt fix #4 without escalating.
| Error | Action | | -------------------------- | -------------------------------------- | | resolver-build fails | Present error, ask user for guidance | | generator-test timeout | Skip regression test, proceed with fix | | Tests still fail after fix | Re-analyze root cause or escalate |
| Check | Required | | ---------------------------------------- | ------------------------------- | | Root cause identified (Non-obvious path) | Yes | | All tests pass | Yes | | Pattern field recorded from RCA | Yes (Non-obvious path) | | defense-in-depth applied if needed | Yes (Recurring/Systematic only) |
tools
Internal helper for /think Step 11. Renders SOW.md + Spec.md as an integrated Astro view and returns a dev server URL.
development
Extract repository spec while detecting bugs, spec gaps, and consistency drift via dual-purpose documentation. OUTCOME.md-axis question-driven exploration with ephemeral output. Do NOT use for code review (use /audit or /polish), feature implementation (use /code), planning only (use /think), or single-bug fix (use /fix).
development
Discover undocumented design decisions and challenge each candidate via critic-design before promotion. Rank by impact and reversibility, produce ADR promotion candidates. Treat each candidate as a position arguing for ADR status, not a fact to be filed. Pairs with audit-adr-drift, which scans existing ADRs for drift against code.
development
Scan ADR Decision sections against current code and report drift with modification direction and priority. Do NOT use for repos without ADRs (use audit-adr-gaps instead).