Agent skill

Bug Fix

by sd0xdev in sd0xdev/sd0x-harness

Bug fix workflow. An agent skill from sd0xdev/sd0x-harness.

MITAuto-check: notesDevelopment

Install Bug Fix

skills CLI
$ npx skills add sd0xdev/sd0x-harness --skill bug-fix -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sd0xdev/sd0x-harness bug-fix --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sd0xdev/sd0x-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/bug-fix .claude/skills/bug-fix && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bug-fix
GitHub stars
192
Token cost
~1.4k tokens
SKILL.md length
482 words
Files
1
Skills in repo
91
Repo updated
First seen
Licence
MIT

At a glance

Bug fix workflow. An agent skill from sd0xdev/sd0x-harness.

  • Works in 4 steps: Investigation → Fix → Add Regression Test ⚠️ → …
  • Resolving issues
  • SKILL.md covers Trigger, When NOT to Use, Prohibited Actions and Workflow, plus 10 more sections
  • Calls git, gh and node

What it does

Bug Fix is an agent skill from sd0xdev/sd0x-harness. 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.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Debugging and Human-in-the-loop approvals. The repository describes itself as: The harness layer for Claude Code — a reference implementation of harness engineering with hook-enforced dual review, state-machine gates that survive context compaction, and… The licence is MIT.

When your agent uses it

  • Resolving issues
  • Regression fixes

Example prompts

  • “/bug-fix”

Requirements

  • Pre-approved tools (allowed-tools): Read, Grep, Glob, Edit, Write, Bash, AskUserQuestion, Skill

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Investigation
  2. Fix
  3. Add Regression Test ⚠️
  4. Verify + Review

What it can do on your machine

Read from SKILL.md and the folder at commit c9a2036. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Glob
    • Edit
    • Write
    • Bash
    • AskUserQuestion
    • Skill

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh
    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bug Fix loads about 1.4k tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 482 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Grep, Glob, Edit, Write, Bash, AskUserQuestion, Skill

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sd0xdev/sd0x-harness at commit c9a2036, republished under its MIT licence (© sd0xdev). 482 words, ~1,416 tokens.

Download SKILL.mdSave it as .claude/skills/bug-fix/SKILL.md (or your agent's skills folder).
name
bug-fix
description
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.
allowed-tools
Read, Grep, Glob, Edit, Write, Bash, AskUserQuestion, Skill

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-review directly)

Prohibited Actions

❌ 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, 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

Investigate → Locate → Fix → Test + Review → Precommit Gate
  │             │       │         │                │
  ▼             ▼       ▼         ▼                ▼
gh issue      Grep    Edit     /verify          /precommit
/git-investigate  Read  tests  /codex-test-review
                               /codex-review-fast

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.

SourceAction
GitHub Issuegh issue view <number>
Error messageGrep("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

PrincipleDescription
Minimal changesOnly modify what is necessary
No new issuesConfirm changes don't affect other features
Design preservedChoose 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
Show full SKILL.md (185 more words)Show less

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 TypeRequiredRecommended
Logic errorUnit-
Service issueUnitIntegration
API issueIntegrationE2E
Cross-service/data flowIntegrationE2E
User flowE2E-

Phase 4: Verify + Review

Step 1: Run tests
/verify → all tests pass?
  Yes → Step 2
  No → fix failures → re-run /verify
Step 2: Test adequacy review (mandatory for code changes)
/codex-test-review → ✅ Tests sufficient?
  Yes → Step 3
  No → close gaps (Step 2a) → /codex-test-review --continue <threadId>
Step 2a: Gap closure
Gap TypeRemediation
Unit test missing/codex-test-gen → write tests → /verify
Integration/E2E missing/post-dev-test → write tests → /verify
Step 3: Code review (auto-loop)
/codex-review-fast → ✅ Ready?
  Yes → Precommit Gate
  No → fix issues → re-run /codex-review-fast (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)

Fix → Review → Issues found → Fix again → ... → ✅ Pass → Next step

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

markdown
## Bug Fix Report
- **Root cause**: <analysis>
- **Fix**: <description of changes>
- **Regression test**: <test result>
- **Gate**: ✅ Fixed / ⛔ Needs further investigation

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/push executed

Examples

Input: 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

© sd0xdev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/bug-fix of sd0xdev/sd0x-harness.

Open the folder on GitHubat commit c9a2036

Compare with similar skills

Bug Fix next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bug Fix compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bug Fix this skillsd0xdev/sd0x-harness192—~1.4kAutomated safety check: NotesMIT
Debugging Devtools Extensionsflutter/devtools1.7k—~839Automated safety check: PassBSD-3-Clause
Debug Modedoraemonkeys/claude-code-debug-mode117—~1.3kAutomated safety check: PassMIT
iOS ImplementMacMagazine/app-iOS171—~741Automated safety check: PassNone
PUA High-Agency Governance for Traetanweai/pua20k—~878Automated safety check: PassMIT
Trellis Session Insightmindfold-ai/Trellis15k4 repos~1.7kAutomated safety check: PassAGPL-3.0

Similar skills

  • Guidelines and step-by-step workflow for debugging DevTools extensions locally, including stub mode, fixed-port launching, browser auto-opening, URL query parameters, target app connection, and…

    1.7k GitHub stars~839 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Debug Mode

    doraemonkeys/claude-code-debug-mode

    Interactive debugging mode that generates hypotheses, instruments code with runtime logs, and iteratively fixes bugs with human-in-the-loop verification.

    117 GitHub stars~1.3k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • iOS Implement

    MacMagazine/app-iOS

    Complete feature-implementation workflow for MacMagazine with pattern matching, review gates, and quality verification.

    171 GitHub stars~741 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • An instruction-only discipline for Trae that forces evidence-based work when an agent keeps failing, gives up or declares a task finished without proof.

    20k GitHub stars~878 tokensUpdated 28 days ago
    Agent WorkflowsAuto-check passed
  • Trellis Session Insight

    mindfold-ai/Trellis

    Reach into past AI conversation history through the trellis mem CLI.

    15k GitHub starsUsed in 4 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Native Data Fetching

    CherryHQ/cherry-studio-app

    A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.

    4k GitHub starsUsed in 6 repos~2.9k tokens
    DevelopmentAuto-check: notes

More from sd0xdev/sd0x-harness

All 91 skills in this repo
  • Adr

    sd0xdev/sd0x-harness

    Write an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as docs/features/<feature/adr-<NNN-<title.md with a 3-digit zero-padded…

    192 GitHub stars~4.8k tokensUpdated yesterday
    Auto-check passed
  • Load PR Review

    sd0xdev/sd0x-harness

    Load GitHub PR review comments into AI session — analyze, triage, plan.

    192 GitHub stars~4.4k tokensUpdated yesterday
    Auto-check passed
  • Next Step

    sd0xdev/sd0x-harness

    Change-aware next step advisor. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Obsidian CLI

    sd0xdev/sd0x-harness

    Obsidian vault integration via official CLI. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Orchestrate

    sd0xdev/sd0x-harness

    Agent-driven workflow orchestration (v1 report-only). An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • PR Comment

    sd0xdev/sd0x-harness

    Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review.

    192 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Bug Fix

What does Bug Fix do?

Bug fix workflow. An agent skill from sd0xdev/sd0x-harness. Bug Fix is an agent skill from sd0xdev/sd0x-harness. Bug fix workflow.

When should I use Bug Fix?

Bug Fix fits situations like: resolving issues; regression fixes.

How do I install Bug Fix in Claude Code?

Run `npx skills add sd0xdev/sd0x-harness --skill bug-fix -a claude-code`. Or copy the skill folder (skills/bug-fix in sd0xdev/sd0x-harness) into .claude/skills/bug-fix in your project. Claude Code loads it when a task matches its description.

How do I install Bug Fix in Codex?

Run `npx skills add sd0xdev/sd0x-harness --skill bug-fix -a codex`. Or copy the skill folder (skills/bug-fix in sd0xdev/sd0x-harness) into .agents/skills/bug-fix in your project. Codex loads it when a task matches its description.

Can I use Bug Fix in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sd0xdev/sd0x-harness --skill bug-fix -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bug-fix, .gemini/skills/bug-fix, .github/skills/bug-fix and .opencode/skills/bug-fix in your project.

What does Bug Fix need to run?

Going by SKILL.md and its folder, Bug Fix needs the command-line tools its instructions call (git, gh and node). Its frontmatter pre-approves these tools: Read, Grep, Glob, Edit, Write, Bash, AskUserQuestion, Skill.

Does Bug Fix access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Bug Fix safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Bug Fix use?

Bug Fix is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bug Fix use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bug Fix?

Skills that share tags, products or a category with Bug Fix: Debugging Devtools Extensions (flutter/devtools, 1.7k stars), Debug Mode (doraemonkeys/claude-code-debug-mode, 117 stars), iOS Implement (MacMagazine/app-iOS, 171 stars) and PUA High-Agency Governance for Trae (tanweai/pua, 20k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bug Fix?

sd0xdev (a GitHub user) maintains it in sd0xdev/sd0x-harness, which has 192 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 6, 2026.

Source: sd0xdev/sd0x-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.