sd0xdev/sd0x-harness/bug-fix
Claude Code and agent skill by sd0xdev/sd0x-harness
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install sd0xdev/sd0x-harness/bug-fixSKILL.md
The same SKILL.md was published earlier as sd0xdev/sd0x-harness/bug-fix.
Bug Fix Skill
Trigger
- Keywords: bug, issue, fix, error, broken, failing
When NOT to Use
- New feature development (use feature-dev)
- Just want to understand code (use code-explore)
- Pure test-only tasks without feature changes (use
/codex-test-reviewdirectly)
Prohibited Actions
This skill fixes bugs but does not commit. /precommit is a quality gate only. To commit, offer the menu per rules/git-workflow.md § Proactive Offer — a commit option on any real branch, a push option only where review-state.js offer allows one — and invoke /smart-commit --execute on selection; never print the command for the user to copy.
Workflow
agentctl (optional)
At the start, run node "${CLAUDE_PLUGIN_ROOT}/skills/agentctl-setup/scripts/agentctl-setup.js" status once. Only when state is installed/enabled, offer to draft a task proposal from the ticket per @skills/agentctl-setup/references/workflow-integration.md — the user accepts it with /agentctl accept; any other state, say nothing about agentctl and continue. It is never a gate: every review and precommit obligation in this skill is unchanged, and its evidence is context beside a verdict, never the verdict.
Phase 1: Investigation
Before fixing: if the bug maps to a feature under docs/features/, read docs/features/<key>/intent-<key>.md when it exists — a fix that contradicts one of its INV-* invariants or Non-goals stops and asks the user (cite the line). No identifiable feature → nothing to load; proceed.
| Source | Action | |
|---|---|---|
| GitHub Issue | gh issue view <number> | |
| Error message | Grep("error message") | |
| Code history | /git-investigate |
Output root cause analysis:
- Problem location:
src/<module>/<file>:<line> - Root cause: <specific cause>
- Impact scope: <which features are affected>
Phase 2: Fix
| Principle | Description | |
|---|---|---|
| Minimal changes | Only modify what is necessary | |
| No new issues | Confirm changes don't affect other features | |
| Design preserved | Choose the smallest root-cause fix that keeps current responsibilities. If the fix moves a boundary or adds an abstraction, say which shape you chose and why — "direct fix; existing design retained" is the expected common answer |
Phase 3: Add Regression Test ⚠️
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 | - |
Phase 4: Verify + Review
Step 1: Run tests
Step 2: Test adequacy review (mandatory for code changes)
Step 2a: Gap closure
| Gap Type | Remediation | |
|---|---|---|
| Unit test missing | /codex-test-gen → write tests → /verify | |
| Integration/E2E missing | /post-dev-test → write tests → /verify |
Step 3: Code review (auto-loop)
Freshness rule
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.
Review Loop
MUST re-review after fix until PASS (per @rules/auto-loop.md)
Doc Sync
Doc Sync is governed by @rules/auto-loop.md (behavior-layer rule). After precommit pass, triggers conditionally when changes map to docs/features/.
Output
Verification Checklist
- [ ] Root cause identified and documented
- [ ] Regression test written at appropriate level
- [ ] All tests pass (
/verify) - [ ] Test adequacy reviewed (
/codex-test-review) - [ ] Code review passed (
/codex-review-fast✅ Ready) - [ ] Precommit passed (
/precommit✅ All Pass) - [ ] No
git add/commit/pushexecuted
Examples
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/bug-fix/SKILL.md
Popularity
- Repository stars
- 191
- Repository forks
- 26
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sd0xdev/sd0x-harness/bug-fix)