bug-fix
Test-driven bug fixing — reproduce with a failing test first, then implement the minimal fix, iterate until all tests pass, and create a PR
Skill by kabirdos
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/kabirdos-bug-fix
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/bug-fix
What's inside
- Skill name
bug-fix- Description
- Test-driven bug fixing — reproduce with a failing test first, then implement the minimal fix, iterate until all tests pass, and create a PR
- License
- MIT
- Instructions
- 156 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# /bug-fix — Test-Driven Bug Fix
Fix bugs properly: reproduce first with a failing test, then implement the minimal fix, verify everything passes, and ship it.
## Usage
- `/bug-fix the login redirect loops infinitely after OAuth callback` — describe the bug, get a TDD fix
- `/bug-fix ISSUE-123` — if it looks like an issue number, try `gh issue view 123` for context
- `/bug-fix` — with no description, ask the user to describe the bug
## Steps
### 1. Understand the Bug
If an issue number was provided:
- Run `gh issue view <number>` to get the full description
- Extract the reproduction steps, expected vs actual behavior
If a text description was provided:
- Parse it for: what's broken, when it happens, expected behavior
If nothing was provided:
- Ask: "Describe the bug — what happens, what should happen, and any steps to reproduce."
### 2. Create a Feature Branch
```bash
git checkout -b fix/<short-kebab-description>
```
Use the bug description to create a meaningful branch name (e.g., `fix/login-redirect-loop`).
### 3. Investigate the Root Cause
Before writing any code, locate the problem:
- Search for relevant files using Grep/Glob based on the bug description
- Read the suspect code
- Form a hypothesis about the root cause
**IMPORTANT:** Keep investigation under 5 minutes. If you haven't found the root cause by then, state your best hypothesis and proceed to step 4. Don't rabbit-hole.
### 4. Write the Failing Test
Write a test that:
- Reproduces the exact bug scenario
- Asserts the EXPECTED (correct) behavior
- Currently FAILS because the bug exists
Place the test in the appropriate test file following the project's conventions:
- Look at existing test files for patterns (Vitest, Jest, Playwright, etc.)
- Match the test style and location of nearby tests
- Use a descriptive test name: `it('should redirect to dashboard after OAuth callback, not loop')`
Run the test to confirm it fails:
```bash
# Use whatever test command the project uses
npm test -- --grep "your test name"
# or
npx vitest run path/to/test.ts
# or
npx jest path/to/test.ts
```
If the test passes (bug not reproduced):
- Re-examine your understanding of the bug
- Adjust the test to better capture the failure condition
- If you still can't reproduce it, tell the user and ask for more context
### 5. Implement the Minimal Fix
Write the smallest possible code change that makes the failing test pass:
- Fix the root cause, not the symptom
- Don't refactor surrounding code
- Don't add features
- Don't "improve" things that aren't broken
### 6. Verify
Run the full test suite (not just the new test):
```bash
npm test
# or whatever the project's test command is
```
**If tests fail:**
- If YOUR new test fails: adjust the fix, try again
- If OTHER tests fail: you introduced a regression — fix it
- Loop until ALL tests pass (max 3 iterations, then ask user for help)
**If the project has type checking:**
```bash
npx tsc --noEmit
# or npm run typecheck
```
### 7. Commit and PR
Once all tests pass:
1. Stage the changes (test file + fix):
```bash
git add <specific-files>
```
2. Commit with conventional format:From kabirdos/claude-toolkit, MIT.
More from kabirdos/claude-toolkit
- 0.479score
ui-design-review
kabirdos
Acts as a UI designer — reviews a written spec/PRD or a live design (URL, local dev server, or in-repo components), audits it against proven UI design…
SkillCFreshness: CClaude Code +9 - 0.414score
manual-qa-collab
kabirdos
Collaborative manual QA testing using Playwright MCP browser automation.
SkillDFreshness: DClaude Code +9 - 0.414score
insight-harness
kabirdos
Generate a comprehensive profile of your Claude Code harness — skills, hooks, workflow patterns, tool usage, token consumption, and plugin inventory across…
SkillDFreshness: DClaude Code +9 - 0.410score
skill-showcase
kabirdos
Build a single-file public HTML showcase of a collection of Claude Code skills — table of contents, grouped categories, per-skill README with hero image…
SkillDFreshness: DClaude Code +9 - 0.409score
init
kabirdos
Bootstrap new projects with frontend design capabilities and skill creation tools.
SkillDFreshness: DClaude Code +9 - 0.409score
consensus-brainstormer
kabirdos
Use when analyzing strategic problems, evaluating options, brainstorming solutions, or making high-stakes decisions that benefit from multi-perspective…
SkillDFreshness: DClaude Code +9 - 0.409score
debate-chamber
kabirdos
Use when a problem needs iterative refinement through structured argumentation rather than independent parallel analysis.
SkillDFreshness: DClaude Code +9 - 0.409score
plan-review
kabirdos
Thorough plan review before implementation.
SkillDFreshness: DClaude Code +9 - 0.409score
qa-checklist
kabirdos
Generate an interactive QA testing checklist as a self-contained HTML page after creating a PR.
SkillDFreshness: DClaude Code +9 - 0.409score
research-orchestrator
kabirdos
Use when conducting deep research on a topic that benefits from multi-perspective analysis.
SkillDFreshness: DClaude Code - 0.406score
gemini-review
kabirdos
Run a Gemini CLI code review on the current branch diff — categorizes findings as Critical/Warning/Suggestion and offers to fix critical issues
SkillDFreshness: DClaude Code +9 - 0.406score
deploy-verify
kabirdos
Merge a PR and monitor the deployment end-to-end — watch the build, check for errors, self-heal failures, verify the deploy is clean
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 1
- Last commit (this folder)
- Mar 27, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/kabirdos/claude-toolkit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from kabirdos
- 0.479score
ui-design-review
kabirdos
Acts as a UI designer — reviews a written spec/PRD or a live design (URL, local dev server, or in-repo components), audits it against proven UI design…
SkillCFreshness: CClaude Code +9 - 0.414score
manual-qa-collab
kabirdos
Collaborative manual QA testing using Playwright MCP browser automation.
SkillDFreshness: DClaude Code +9 - 0.414score
insight-harness
kabirdos
Generate a comprehensive profile of your Claude Code harness — skills, hooks, workflow patterns, tool usage, token consumption, and plugin inventory across…
SkillDFreshness: DClaude Code +9 - 0.410score
skill-showcase
kabirdos
Build a single-file public HTML showcase of a collection of Claude Code skills — table of contents, grouped categories, per-skill README with hero image…
SkillDFreshness: DClaude Code +9 - 0.409score
debate-chamber
kabirdos
Use when a problem needs iterative refinement through structured argumentation rather than independent parallel analysis.
SkillDFreshness: DClaude Code +9 - 0.409score
init
kabirdos
Bootstrap new projects with frontend design capabilities and skill creation tools.
SkillDFreshness: DClaude Code +9
Cite this page
bug-fix skill. Agent Mart. https://agentmart.dev/skills/kabirdos-bug-fix (last updated 2026-10-24)