agentleFS
nnguyenquanggnnguyenquangg/claude-code-spec-driven-development/skills/fix/SKILL.md

fix

Skill18 starsChanged 3 months agoMITView on GitHub

Lightweight track for a small bug — diagnose root cause → pick the right tech-expert skill for the affected stack → minimal fix via that expert → verify. No specs, no ADR, no review gate. Auto-escalates to /make-plan if the "small bug" turns out to need design/cross-cutting changes. Use for bugs and small defects, NOT new features. Triggers on "fix", "/fix", "bug", "fix the bug", "broken", "throwing", "not working".

44 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use feature, pr-creator and 10 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.
  • gh33kSkill

    feature

    Manage feature specifications and implementation plans

    Also in 5 projects that use this

  • GoogleSkill

    pr-creator

    Also in 3 projects that use this

  • DauQuangThanhSkill

    frontend-code-review

    Conducts comprehensive frontend code reviews including React/Vue/Angular component analysis, TypeScript/JavaScript quality assessment, CSS/styling review, performance optimization, accessibility compliance, security vulnerabilities, and best practices validation. Produces detailed review reports with specific issues, severity ratings, and actionable recommendations. Use when reviewing frontend code, analyzing React/Vue/Angular components, checking JavaScript/TypeScript quality, validating CSS/SCSS, assessing web performance, or when users mention "review frontend code", "check React components", "analyze JavaScript", "review TypeScript", "validate accessibility", or "frontend code quality".

    Also in 3 projects that use this

  • Microsoft AzureSkill

    test

    Also in 10 projects that use this

  • MicrosoftSkill

    merge

    Merge changes from the topic branch to the merge base branch. Use when the user wants to merge their session's work back to the base branch.

    Also in 3 projects that use this

  • VercelSkill

    deploy

    Deploy applications to Vercel. Use when the user says "deploy", "deploy to Vercel", "push to production", "deploy my app", or "go live".

    Also in 8 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 36 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run this checklist in order — fix red at any step before moving to the next.

    line 40
  2. Very specific:

    If the root cause was surprising / non-obvious (a gotcha future-you would re-discover the hard way), write ONE short project memory note …

    line 60

“Common” is measured: kept by at least 6 in 10 of the 36 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

fix — fast track for a small bug

For a small bug, the full spec pipeline (/make-plan → review → /implement-specs) is overkill. This skill is the lightweight lane: find the root cause, fix it minimally using the right domain expert, verify, done — no OpenSpec change, no ADR, no review gate. It still picks an expert (a bug in NestJS deserves nestjs-expert, a slow query deserves postgres-pro) so the fix is done well, not just quickly.

Step 0 — Scope gate (decide the lane fast)

  • Trivial (typo, one-liner, obvious mistake) → just fix it directly, skip the ceremony below.
  • Genuine bug (something is broken / wrong behavior) → continue with this skill.
  • Not actually a bug — needs a design decision, touches many modules, changes a contract, or is really a feature → STOP, route to /make-plan. Don't fix-and-hope your way through a design change.

Step 1 — Diagnose (root cause, not symptom)

Reproduce and locate the actual cause before touching code. Use the diagnose skill (or dev-workflows:investigator for a murky one): reproduce → minimise → hypothesise → confirm the faulty line/flow. Don't patch the symptom while the cause lives on.

Step 2 — Pick the expert for the fix (lightweight)

If task-analyzer already dispatched here, reuse its essence/type/scale/tags. Otherwise run its Steps 1-4 on the bug (the faulty code + symptom) now. Map that — plus the stack of the faulty code (file type, framework, layer — from the file itself + host CLAUDE.md / package.json) — to one primary expert that actually exists in this environment, plus at most one supporting expert if the bug spans two areas. State the pick in one line. Never name an unavailable skill.

  • NestJS / API / DI bug → fullstack-dev-skills:nestjs-expert
  • Next.js / RSC / route bug → fullstack-dev-skills:nextjs-developer (or :react-expert for component/render bugs)
  • Slow / wrong SQL, migration, index → fullstack-dev-skills:postgres-pro (or :database-optimizer)
  • Type error / generics / inference → fullstack-dev-skills:typescript-pro
  • Gnarly runtime/stack-trace mystery → fullstack-dev-skills:debugging-wizard
  • Failing/missing test → fullstack-dev-skills:test-master Apply the expert by loading its Skill into context via the Skill tool (default), or for a trickier fix dispatch a general-purpose agent (Agent tool) and tell it to load that expert Skill itself — note subagent_type only accepts a real agent type, never a Skill name.

Step 3 — Minimal fix

Make the smallest diff that fixes the root cause. Don't refactor surrounding code, don't add parallel structures, follow the host CLAUDE.md conventions. If the minimal fix turns out to be large or design-y → go back to Step 0 and escalate to /make-plan.

Step 3b — Remove code the fix orphaned

A fix that replaces or bypasses old logic often leaves dead code behind — helpers nobody calls now, branches made unreachable, imports/constants/config reads with no consumer left (PR #206: removing the trial special-case orphaned _is_free_trial_event, _has_any_trial_event, and the trial_preferred_floor/trial_service_ids reads — deleted in the same PR). Don't leave that rot.

  • From the diff, list what the fix stopped calling / made unreachable / replaced. For each suspect, grep -rn the whole repo for remaining references; zero real consumers → dead → remove it.
  • Scope to what THIS fix orphaned — not a repo-wide dead-code hunt. A pre-existing unused symbol unrelated to the fix is out of scope (mention, don't delete).
  • Cascade: each deletion can orphan more (an import, a constant only that fn read) — re-check until nothing new turns up.
  • Do NOT delete symbols that are dynamically referenced (reflection, DI, decorators/registries, string dispatch, Odoo model/field names in XML/views, ORM columns), public/exported API, framework/lifecycle hooks, or anything in config/i18n/templates. When unsure it's dynamically used → keep it and ask, don't guess-delete.
  • Behavior-preserving only: if removing something would change behavior, it wasn't dead.

Step 4 — Verify, in order

Run this checklist in order — fix red at any step before moving to the next. Cover more than the exact repro when it's cheap (a couple of related inputs/cases), not just the one failing example.

  1. E2e tests, if the touched area has any — run them first. Fix red, re-run.
  2. Unit tests — run the touched area's tests; add a cheap regression test for this bug if one is quick and it warrants it (use test-master if helpful). Fix red, re-run.
  3. Backend/API bug — call the API directly. Hit the endpoint yourself (curl/httpie/the project's API client) with the original repro input and a couple of nearby cases (boundary value, the other branch of whatever condition was wrong) — don't rely on the automated tests alone to prove the fix.
  4. UI-visible bug — reproduce it in the live app, then screenshot. Don't declare it fixed from code alone. The user keeps the app logged in in Arc; drive it via ~/.local/bin/browser-harness (full path — ~/.local/bin is NOT on the non-interactive $PATH). Confirm the exact repro steps now produce the correct behavior:
    ~/.local/bin/browser-harness <<'PY'
    new_tab("http://localhost:3000/<path-that-triggered-the-bug>")   # first nav = new_tab, never goto_url
    wait_for_load()
    # reproduce the bug's steps: read state with js("..."), act with click_at_xy() / js("el.click()")
    capture_screenshot("<project-root>/screenshots/fix-<bug>/after.png", max_dim=1600)
    print(page_info())
    PY
    Create screenshots/ under the project root if missing, and add it to the project's .gitignore if it isn't already ignored — these are local proof artifacts, never committed. Read the screenshot back and confirm the symptom is gone — a captured-but-unread screenshot is not verification. Capture a before.png first (on the unfixed state) when an A/B proof is worth keeping. Only once the screenshot has actually been reviewed and looks right does the fix count as verified.
    • React/Next.js inputs (DynaTax): setting el.value does NOT update React state — use the native setter + dispatch input: Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,'value').set.call(el, v); el.dispatchEvent(new Event('input',{bubbles:true})).
    • Login wall / logged-out → STOP and ask the user to log in; never type credentials.

Step 5 — Record only if non-obvious

If the root cause was surprising / non-obvious (a gotcha future-you would re-discover the hard way), write ONE short project memory note (cause + why + the fix), dedupe against existing notes, add the MEMORY.md pointer. For a routine bug, skip — don't spam memory.

Step 6 — Report

One tight summary: bug → root cause → expert used → the fix (file:line) → dead code removed (symbols the fix orphaned, file:line) + any candidates kept and why → verification result (for a UI bug, link the proof screenshot under screenshots/fix-<bug>/) → (memory note, if written).

Guardrails

  • Bugs only. New behavior/feature work belongs to /make-plan.
  • Root cause over symptom; minimal diff over rewrite.
  • Escalate honestly the moment scope exceeds a bug fix — never silently turn a fix into an unscoped redesign.

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.