agentleFS
kunalsurikunalsuri/ai-fication-kit/.claude/skills/fix-bug/SKILL.md

fix-bug

Skill3 starsChanged 5 months agoApache-2.0View on GitHub

Fix a bug in this repository the safe way — reproduce first, failing regression test, root cause via the maps, surgical fix, review, ledger entry. Use whenever the user reports broken, wrong, or crashing behavior.

21 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use implement-feature, refactor and 2 more.

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.
  • tddworksSkill

    implement-feature

    Guide for implementing features following architecture-first design, TDD, rich domain models, and Swift 6.2 patterns. Use this skill when: (1) Adding new functionality to a Swift app (2) Creating domain models that follow user's mental model (3) Building SwiftUI views that consume domain models directly (4) User asks "how do I implement X" or "add feature Y" (5) Implementing any feature that spans Domain, Infrastructure, and App layers

    Also in 4 projects that use this

  • 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 6 projects that use this

  • HashiCorpSkill

    changelog

    Add a `.changelog/<PR_NUMBER>.txt` entry for a GitHub Pull Request, commit, and push.

    Also in 3 projects that use this

  • ElasticSkill

    create-skill

    Interactively create a new Claude Code skill and add it to the elastic-docs-skills catalog. Use when the user wants to generate a new skill, scaffold a slash command, or build automation for docs tasks.

    Also in 3 projects that use this

The file

Files
SKILL.md
<!-- Copyright (c) 2026 Kunal Suri (CEA LIST). All rights reserved. -->

Fix a bug

The contract: no fix before a reproduction, no reproduction without a failing test, no "fixed" without the regression test green, no closing without the ledger row and the gotcha recorded.

1. Reproduce

Draft ai/lab/specs/BUGFIX_<name>.md from BUGFIX_TEMPLATE.md: symptom (observed vs expected), exact reproduction steps. Get the user's OK.

2. Prove

Turn the reproduction into a regression test and watch it fail. A bug you cannot make a test fail for is a bug you do not understand yet. The test is permanent — it outlives the fix.

3. Locate

  • ai/guide/MODULE_MAP.md → which modules; note Stability of every suspect.
  • ai/guide/FEATURE_MAP.md gotchas + ai/lab/WORKLOG.md → was this area recently touched, or is the "bug" deliberate behavior a past ADR explains?
  • Delegate broad reading to repo-explorer.

4. Gate

Root cause in a file with Stability frozen or ? ⇒ stop and ask the human. Record their approval in the bugfix doc before proceeding.

5. Diagnose, then fix

Name the root cause in the bugfix doc — the defect, not the symptom. Then delegate to feature-builder: smallest diff that turns the regression test green. No drive-by refactors while "in there".

6. Verify

Delegate to test-runner: the regression test (now green), then the suites covering the touched area. Red or unrun ⇒ not fixed.

7. Review & record

Request /review-change on the diff (fresh context — not this session). Append a bugfix row to ai/lab/WORKLOG.md linking the bugfix doc and review; add the gotcha line to FEATURE_MAP so the next agent knows the trap. All [inferred] — tell the user which tags await their [verified] flip.

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.