From build
Rapidly fixes small bugs and minor issues with root cause analysis and TDD verification. Accepts a bug description, finding ID, or direct finding input.
How this command is triggered — by the user, by Claude, or both
Slash command
/build:SKILL [bug or issue description]opusfix/This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# /fix - Quick Bug Fix
Rapidly fix small bugs with root cause analysis and TDD verification.
## Input
`$ARGUMENTS` holds a bug description, a finding ID from a `/audit` snapshot in `${CLAUDE_SKILL_DIR}/../../workspace/history/` (e.g., `RC-001`, `SEC-003`), or a finding returned by a standalone audit workflow run. Scope is limited to small, well-understood issues of 1-3 files. The `$ARGUMENTS` pattern routes the mode.
| Pattern | Mode | Action ...Rapidly fix small bugs with root cause analysis and TDD verification.
$ARGUMENTS holds a bug description, a finding ID from a /audit snapshot in ${CLAUDE_SKILL_DIR}/../../workspace/history/ (e.g., RC-001, SEC-003), or a finding returned by a standalone audit workflow run. Scope is limited to small, well-understood issues of 1-3 files. The $ARGUMENTS pattern routes the mode.
| Pattern | Mode | Action |
|---|---|---|
/^[A-Z]+-[0-9]+$/ | Finding ID Resolution | Read the latest snapshot from ${CLAUDE_SKILL_DIR}/../../workspace/history/ and find the ID match in findings[]. Carry severity / fix_type / root cause, skip Outcome Anchor and Build Check, enter Triage. If absent, present error + suggest Standard Flow |
| Finding with file / line / severity / summary | Direct Finding Input | Return value of the audit workflow: a single JSON finding, or text carrying file:line + severity + summary. Use file:line as the RCA starting point, skip Outcome Anchor and Build Check, enter Triage |
| empty | Fix Prompt | Ask via AskUserQuestion for Fix type from Bug fix / Error message / Test failure and Description as free text via Other, then execute |
| otherwise | Standard Flow | Treat as a bug description and run from Outcome Anchor |
When Direct Finding Input carries multiple findings, handle them one at a time in descending severity order. When the impact spans 4+ files, check the multi-file trigger in § Escalation first.
| 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 | ${CLAUDE_SKILL_DIR}/references/defense-in-depth.md | Multi-layer validation for Recurring / Systematic |
Read .claude/OUTCOME.md before Build Check. If absent, generate the stub via /outcome. Confirm the bug or fix lives inside the outcome state. If outside, § Escalation.
Detect the build command from package.json or project config and run it.
| Result | Action |
|---|---|
| Build errors | Task with subagent_type: resolver-build, then END |
| No errors | Continue to Triage |
Obvious skips both RCA and regression test generation, so it is limited to findings with low misfix risk.
| Input | Condition | Path |
|---|---|---|
| Bug desc | Single location identified + 1-3 line fix + no similar pattern | Obvious |
| Bug desc | Intermittent, multiple repro conditions, or unknown root cause | Non-obvious |
| Finding ID | fix_type: auto and severity low / med | Obvious |
| Finding ID | severity critical / high, or fix_type not auto | Non-obvious |
| Direct Finding Input | severity low / med and a 1-3 line fix | Obvious |
| Direct Finding Input | severity critical / high, or the fix is non-obvious | Non-obvious |
Skill("use-context-root-cause-analysis"). If via Finding ID or Direct Finding Input, pass the finding's file:line and summary as the 5 Whys starting point, adding the snapshot root cause when available. Output Symptom / Root cause / Pattern.Task(subagent_type: generator-test) for the regression test. Pass symptom + repro steps only${CLAUDE_SKILL_DIR}/references/defense-in-depth.mdBranch on objective triggers, not confidence self-assessment. Do not attempt fix #4 without escalating.
| Trigger | Action |
|---|---|
| RCA cannot identify root cause | Escalate to /research |
| Tests still fail after fix | Re-analyze root cause. After 3 failures, escalate to /research |
| Multi-file impact (4+ files) | Refine via /issue and delegate to the build workflow |
| New feature scope | Refine via /issue and delegate to the build workflow |
| Pattern = Systematic | Escalate to /research |
| Fix outside OUTCOME.md scope | Confirm with user; redefine Non-goals or delegate to the build workflow |
| Error | Action |
|---|---|
| resolver-build fails | Present error, ask user for guidance |
| generator-test timeout | Skip regression test, proceed with fix |
| 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) |
| Re-audit suggested if via finding | Yes (Finding ID / Direct Finding Input) |
npx claudepluginhub thkt/dotclaude --plugin build/fixitFixes broken functionality from pasted error output, stack traces, or failing-behavior descriptions using a stepwise diagnostic workflow with TDD, research, and proof-of-work evidence.
/kasi-fixFixes specific bugs using conservative principles: narrows issue, designs hypothesis, applies minimal pattern-matched diff, controls blast radius, runtime verifies. Outputs structured Mission/Design/Fix/Confidence/Blast/Next report.
/flow-fix-pipelineRuns a compressed bug fix pipeline for flow's --fix mode. Adapts triage levels from full bug+debug+fix+review+PR to quick single-pass fix. Covers documentation, root cause analysis, implementation, and PR creation.
/bug-fixDiagnoses and fixes bugs from a description, stack trace, or file:line reference. Produces a structured report with diagnosis, root cause, diff, and regression test.