ワンクリックで
fix
Use when a bug needs fixing but there is no GitHub issue to track it.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when a bug needs fixing but there is no GitHub issue to track it.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when updating the toolkit to a new version.
Use when code changes need review before merging or completing.
Use when diagnosing toolkit health issues or optimizing configuration.
Use when contributing generic improvements back to the toolkit repo.
Use when setting up or reconfiguring the toolkit for a project.
Use when existing code needs iterative quality improvement.
| name | fix |
| description | Use when a bug needs fixing but there is no GitHub issue to track it. |
| argument-hint | "description of the bug" or paste an error/stack trace |
| user-invocable | true |
| model | opus |
| allowed-tools | ["Read","Write","Edit","Glob","Grep","Bash","Task","TodoWrite","mcp__plugin_playwright_playwright__*"] |
Systematic bug fix workflow: root-cause, fix, validate, scan for similar issues, test, commit.
Distinct from /fix-github: /fix is standalone (bug description -> root-cause -> fix -> scan similar -> test -> commit). /fix-github is GitHub issue workflow (fetch issue -> reproduce -> plan -> fix -> commit referencing issue).
Customization: Override defaults in
toolkit.tomlunder[skills.fix]. Runbash toolkit.sh customize skills/fix/SKILL.mdto take full ownership of this skill.
| Rule | Description |
|---|---|
| 1. Root cause before fix | Identify the root cause through investigation and evidence before proposing any code change. |
| 2. Reproduce before fixing | Confirm the bug exists (run it, read the trace, or analyze the code path) before writing a fix. |
| 3. Scan for similar patterns | After fixing the bug, search the codebase for the same anti-pattern in other locations. |
| 4. Single hypothesis at a time | Test one fix hypothesis, verify it, then move on; never apply multiple speculative changes at once. |
| 5. 3-fix escalation | After 3 failed fix attempts, stop and ask the user for guidance instead of attempting a 4th. |
git log on affected files to see what changed recentlyPhase Gate: You CANNOT propose ANY fix until the root cause is identified. If you cannot identify the root cause, gather more evidence. Do not guess.
3-Fix Escalation Rule: After 3 failed fix attempts, STOP. Do not attempt fix #4. Instead:
- Question the architecture: "Is the approach fundamentally wrong?"
- Present findings: Show the user evidence from all 3 attempts -- what was tried, what happened, why it failed
- Ask the user: Request guidance on how to proceed before continuing
This prevents the spiral of increasingly desperate changes that make the problem worse.
Test-first for non-trivial bugs (logic errors, edge cases, race conditions):
Skip the reproducing test for:
Run tests:
# Run the project's configured test command
<project-test-command>
# Run the project's configured lint command
<project-lint-command>
If tests fail, fix them -- determine if the test was wrong or if the fix introduced a regression
If the change touches shared code, run the full test suite
Scan scope strategy:
Scan execution:
Use this decision tree to determine whether to add a test:
Is the fix a typo, import correction, or config change?
├── YES → Do NOT add a test. Stop.
└── NO → Continue.
│
Does an existing test already cover this code path?
├── YES → Do NOT add a new test. Verify the existing test passes. Stop.
└── NO → Continue.
│
Could this bug recur (logic error, edge case, race condition)?
├── YES → Add a targeted regression test that:
│ 1. Reproduces the original bug (fails without the fix)
│ 2. Passes with the fix applied
│ 3. Is minimal — tests only the fixed behavior
└── NO (one-off, unlikely to recur) → Do NOT add a test. Stop.
Stage only files you touched and commit:
git add <specific-files-you-modified>
git commit -F <commit-msg-file>
Write commit message file first, then use -F to avoid guard hook issues.
After completing all steps, provide:
## Fix Summary
- **Bug**: <what was broken>
- **Root cause**: <why it was broken>
- **Fix**: <what you changed>
- **Similar issues**: <found and fixed N / none found>
- **Tests added**: <yes: test_name / no: reason>
- **Files changed**: <list>
- **Commit**: <hash>