Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
acedergren avatar

Bugfix

  • 18 installs
  • 22 repo stars
  • Updated May 28, 2026
  • acedergren/agentic-tools

bugfix is a Claude Code skill that autonomously diagnoses a bug's root cause from a report, failing test, or stack trace, implements a minimal fix, verifies it, and commits.

About

bugfix is a Claude Code skill that takes a bug report, failing test, stack trace, or CI failure and diagnoses the root cause, implements a minimal fix, verifies it, and commits. It classifies the root cause before writing code, collects evidence first, runs the targeted test and full workspace suite plus a typecheck, and stages only the files it changed. Developers use it to resolve a specific failing test or reported bug end to end.

  • Autonomously diagnoses a bug's root cause from a report, failing test, or stack trace
  • Implements a minimal fix, verifies with targeted and full test runs plus typecheck, then commits
  • Classifies root cause (code, test, mock, type, import) before writing any code

Bugfix by the numbers

  • 18 all-time installs (skills.sh)
  • Ranked #403 of 596 Debugging skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

bugfix capabilities & compatibility

Capabilities
bug diagnosis · root cause analysis · debugging · test fixing
Use cases
debugging · testing · code review
Pricing
Free
From the docs

What bugfix says it does

Autonomous end-to-end bug fix: diagnose from evidence, find root cause, minimal fix, verify, commit.
SKILL.md
Never refactor unrelated code while fixing a bug — scope creep breaks regression isolation.
SKILL.md
State hypothesis explicitly before writing code: "The test fails because X, caused by Y."
SKILL.md
npx skills add https://github.com/acedergren/agentic-tools --skill bugfix

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs18
repo stars22
Last updatedMay 28, 2026
Repositoryacedergren/agentic-tools

What it does

Diagnose a failing test, stack trace, or bug report, implement a minimal fix, verify it, and commit.

Who is it for?

Resolving a specific failing test, stack trace, or CI failure end to end with a minimal, verified fix.

Skip if: Refactoring unrelated code or fixing other bugs noticed in passing; it warns against scope creep.

When should I use this skill?

You have a bug report, failing test, stack trace, or CI failure that needs diagnosis and repair.

What you get

A minimal fix with the failing test passing, the full suite green, typecheck clean, and a scoped commit.

  • Minimal verified bug fix
  • Scoped git commit with a fix(scope) message

By the numbers

  • 5-row root-cause classification table
  • 4-step verification sequence
  • ships 2 scripts: collect-bugfix-context.sh, run-targeted-test.sh

Files

SKILL.mdMarkdownGitHub ↗

Bugfix

Autonomous end-to-end bug fix: diagnose from evidence, find root cause, minimal fix, verify, commit.

NEVER

  • Never ask the user for more information unless the bug description is completely ambiguous — use tools to find it.
  • Never refactor unrelated code while fixing a bug — scope creep breaks regression isolation.
  • Never fix other bugs you notice while fixing the target — create a new task instead.
  • Never git add -A — stage only the files you changed.
  • Never skip running the full workspace test suite after a fix — targeted test passing doesn't mean no regression.
  • Never commit until typecheck passes on the affected workspace.

Root Cause Classification (decide before writing any code)

TypeSignalFix approach
Code bugLogic error, wrong query, bad comparisonFix implementation
Test bugExpectation contradicts documented contractFix the test — explain why it was wrong
Mock wiringmockReset: true pattern not followed, stale mock stateUse correct mock pattern from CLAUDE.md
Type errorTypeScript compilation failureFix types, not tests
Import errorWrong package path, missing exportFix import resolution

If it's a mock wiring issue: read the mock patterns in CLAUDE.md before writing anything — there are three distinct patterns (forwarding, object-bag, counter-based sequencing).

Evidence-First Thinking

Collect before hypothesizing: 1. Run the failing test — see the exact error output, not just the description 2. Read the failing test — understand what it expects 3. Read the source under test 4. git log --oneline -10 -- <file> — was this recently changed? 5. For runtime errors: check logs, route/plugin/service code

State hypothesis explicitly before writing code: "The test fails because X, caused by Y."

Abort Conditions (stop and ask user)

  • Bug is in security-sensitive area (auth, RBAC, IDOR) — confirm fix approach first
  • Fix requires changing more than 5 files — may be an architectural issue
  • Root cause requires changing the mock strategy for an entire test suite

Scripts

bash scripts/collect-bugfix-context.sh apps/api/src/tests/routes/auth.test.ts
bash scripts/run-targeted-test.sh apps/api/src/tests/routes/auth.test.ts
bash scripts/run-targeted-test.sh apps/api/src/tests/routes/auth.test.ts "returns 500"

Verification Sequence

1. Run the specific failing test — must pass 2. Run the full workspace suite — no new failures 3. Run typecheck on the affected workspace (npx tsc --noEmit) 4. git diff --name-only — verify every changed file relates to the bug; revert anything that doesn't

Commit Format

fix(scope): what was broken and how it was fixed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Arguments

$ARGUMENTS: Error message, failing test path, CI log URL, or reproduction steps. If empty, ask for the error or failing test name.

Related skills

FAQ

How does it avoid regressions?

It runs the specific failing test, then the full workspace suite, then a typecheck, and reverts any changed file that does not relate to the bug.

Will it fix other bugs it notices?

No. It creates a new task instead and never refactors unrelated code, to keep regression isolation intact.

Debuggingtestingbackend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.