skills/bug-fix/SKILL.md
Bug fix workflow. Use when: fixing bugs, resolving issues, regression fixes. Not for: new features (use feature-dev), understanding code (use code-explore). Output: fix + regression test + review gate.
npx skillsauth add sd0xdev/sd0x-dev-flow bug-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.
/codex-test-review directly)❌ git add | git commit | git push — per @rules/git-workflow.md
This skill fixes bugs but does not commit. /precommit is a quality gate only. To commit, the user must invoke /smart-commit --execute separately.
Investigate → Locate → Fix → Test + Review → Precommit Gate
│ │ │ │ │
▼ ▼ ▼ ▼ ▼
gh issue Grep Edit /verify /precommit
/git-investigate Read tests /codex-test-review
/codex-review-fast
| Source | Action |
|--------|--------|
| GitHub Issue | gh issue view <number> |
| Error message | Grep("error message") |
| Code history | /git-investigate |
Output root cause analysis:
src/<module>/<file>:<line>| Principle | Description | |-----------|-------------| | Minimal changes | Only modify what is necessary | | No new issues | Confirm changes don't affect other features |
Follow @rules/testing.md for conventions (AAA, naming, evidence model).
Follow @rules/testing-project.md for project-specific overrides.
Bug fixes must have tests at the corresponding level:
| Bug Type | Required | Recommended | |----------|----------|-------------| | Logic error | Unit | - | | Service issue | Unit | Integration | | API issue | Integration | E2E | | Cross-service/data flow | Integration | E2E | | User flow | E2E | - |
/verify → all tests pass?
Yes → Step 2
No → fix failures → re-run /verify
/codex-test-review → ✅ Tests sufficient?
Yes → Step 3
No → close gaps (Step 2a) → /codex-test-review --continue <threadId>
| Gap Type | Remediation |
|----------|-------------|
| Unit test missing | /codex-test-gen → write tests → /verify |
| Integration/E2E missing | /post-dev-test → write tests → /verify |
/codex-review-fast → ✅ Ready?
Yes → Precommit Gate
No → fix issues → re-run /codex-review-fast (auto-loop)
If code changes after the latest ✅ Tests sufficient gate (e.g., fixes from code review), rerun /verify then /codex-test-review --continue <threadId> before proceeding to precommit gate.
MUST re-review after fix until PASS (per @rules/auto-loop.md)
Fix → Review → Issues found → Fix again → ... → ✅ Pass → Next step
Doc Sync is governed by @rules/auto-loop.md (behavior-layer rule). After precommit pass, triggers conditionally when changes map to docs/features/.
## Bug Fix Report
- **Root cause**: <analysis>
- **Fix**: <description of changes>
- **Regression test**: <test result>
- **Gate**: ✅ Fixed / ⛔ Needs further investigation
/verify)/codex-test-review)/codex-review-fast ✅ Ready)/precommit ✅ All Pass)git add/commit/push executedInput: Fix issue #123 - calculation error
Action: gh issue view → locate → fix → write Unit Test → /verify → /codex-test-review → /codex-review-fast → /precommit
Input: API returning 500 error
Action: Grep error → read code → fix → write Integration Test → /verify → /codex-test-review → /codex-review-fast → /precommit
documentation
Rewrite the previous reply in Traditional Chinese
development
Monitor GitHub Actions CI runs until completion. Use when: watching CI after push, checking build status, monitoring PR checks, waiting for CI completion, user says 'watch CI', 'check CI', 'CI status', 'monitor build', or /watch-ci. Not for: pushing code (use push-ci), creating PRs (use create-pr). Output: per-run verdict (pass/fail/timeout).
development
Verification loop — lint -> typecheck -> unit -> integration -> e2e
development
Research current code state then update corresponding docs, ensuring docs stay in sync with code.