agentleFS
undeadlistundeadlist/claude-code-agents/skills/bug-fix/SKILL.md

bug-fix

Skill149 starsChanged 11 months agoMITView on GitHub

Fix bugs with regression prevention using test-first approach

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use refactor and code-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a test that fails (reproduces the bug)

    line 14
  2. Distinctive:

    Test should pass after the fix is applied

    line 15
  3. Distinctive:

    Don't refactor unrelated code

    line 21
  4. Distinctive:

    All existing tests pass (no regressions)

    line 26
  5. Distinctive:

    Check related features still work

    line 32

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Bug Fix Workflow

Fix bugs with a test-first approach to prevent regressions. Provide the bug description when invoking.

Execution (Sequential)

Step 1: Reproduce with Test

Spawn test-writer with the bug description:

  • Create a test that fails (reproduces the bug)
  • Test should pass after the fix is applied

Step 2: Fix the Bug

Spawn code-fixer with the bug description and test file:

  • Find root cause
  • Implement minimal fix
  • Don't refactor unrelated code

Step 3: Verify

Spawn test-runner:

  • New test passes (bug is fixed)
  • All existing tests pass (no regressions)

Step 4: Browser QA (if UI bug)

Spawn browser-qa-agent:

  • Reproduce original steps
  • Confirm bug is fixed
  • Check related features still work

Usage

Provide bug details when invoking:

/bug-fix

Bug: Login fails with valid credentials
Steps to reproduce:
1. Go to /login
2. Enter valid email/password
3. Click submit
Expected: Redirect to dashboard
Actual: 500 error
Location: src/api/auth/login.ts

Skip browser-qa for

  • Non-UI bugs (API, background jobs)
  • Build/compilation issues
  • Test infrastructure bugs

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.