agentleFS
vasuag09vasuag09/harness-claude/skills/fix/SKILL.md

fix

Skill2 starsChanged 6 months agoMITView on GitHub

Bug-fix fast lane — the entry point for fixing something already broken (a red test, a prod error, a reported defect), not building a new feature. Does the bug-specific part — reproduce as a failing test, find the root cause, write a minimal fix-plan — then hands off to the existing pipeline (/implement → /review → /security-review → /verify → /ship) so the fix rides the proven gates. The non-negotiable discipline: reproduce as a failing test FIRST, fix minimally. Opt-in; invoked explicitly. Use when something is broken and you want it fixed under the harness's gates without over-ceremonying it through /spec.

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 5 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

  • 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

  • OpenAISkill

    audit

    Audit or critique a product flow, journey, workflow, funnel, onboarding path, checkout path, settings path, screen, or multi-step product experience by capturing screenshots first, then reporting UX, design, and accessibility findings inline from that evidence. Use Figma only when the user explicitly asks for a board. Use when the user asks to audit, review, critique, inspect, assess, analyze, evaluate, or give feedback on a product experience.

    Also in 10 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

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If a reliable automated repro genuinely isn't possible (e.g.

    line 40

“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 — reproduce first, fix minimally, ride the gates

Goal: take something that is already broken and fix it with discipline — capture the bug as a failing test before touching the fix, scope the change to the cause, and let it flow through the harness's existing review/verify/ship gates. The pipeline's front door (/spec → … → /ship) is greenfield-shaped — it assumes you're building. /harness-claude:fix is the parallel entry for bugs: it does the bug-specific work, then hands off rather than re-implementing the gates.

Opt-in. Invoked explicitly; nothing auto-routes a bug here. Git boundary: /harness-claude:fix never commits or pushes — branch creation for non-trivial work is expected (claude/fix-<slug>, see rules/git.md); the fix is committed (if at all) only through /harness-claude:ship when you ask. Reuse, don't rebuild: the regression test goes through harness-claude:tdd-guide; review/verify/ship are the existing skills, not duplicated here.

When /harness-claude:fix, when /harness-claude:build-fix

  • /harness-claude:fix is for behavioral / logic bugs — wrong output, a crash on some input, a regression, a reported defect. It is reproduce-as-a-failing-test-first, then root-cause, then minimal fix.
  • /harness-claude:build-fix is for build / type / compile errors — get the build green with a minimal diff. It is not a competitor: while fixing a behavioral bug you may call /harness-claude:build-fix to keep the build green mid-change. Use /harness-claude:build-fix alone when nothing is behaviorally wrong and you just need the compiler/types happy.

How it works

reproduce (RED test)  →  root cause  →  minimal fix-plan  →  hand off to /implement  →  /verify → /ship

Do this

  1. Branch, then reproduce — capture the bug RED. Apply branch-at-first-write (rules/git.md) before the test file lands: not a git repo → skip silently; already on a non-default branch → stay there; on the default branch with non-trivial work → create claude/fix-<slug> first (never commit or push — that stays gated behind your explicit ask). Then, before writing any fix, produce a failing test that exercises the reported behavior and fails for the right reason. Run it; confirm it's RED. If a reliable automated repro genuinely isn't possible (e.g. needs real hardware, an external outage), say why and record concrete manual repro steps instead — never skip the repro step silently.
  2. Find the root cause, not the symptom. State the actual defect and why it produces the reported behavior. A patch that makes the symptom disappear without naming the cause is not a fix — it's a guess. Use mgrep / the knowledge graph to trace the failing path to its origin.
  3. Write a minimal fix-plan. The smallest change that turns the RED test GREEN, scoped to the cause. No refactor-while-you're-in-there — unrelated cleanup belongs to /harness-claude:refactor-clean, not here. If the only correct fix is a design change, stop and return to /harness-claude:architect or /harness-claude:plan rather than hacking around it.
  4. Add the repro as a durable regression test via harness-claude:tdd-guide. The failing test from step 1 becomes a permanent test (RED → GREEN once the fix lands) so the bug can't silently return. This is the same TDD seam /harness-claude:implement opens each phase with.
  5. Hand off — do not rebuild the gates. Pass the fix-plan + the RED regression test to /harness-claude:implement (it makes the test GREEN with the minimal change), then let the change ride the existing /harness-claude:review + /harness-claude:security-review → /harness-claude:verify → /harness-claude:ship gates. /harness-claude:fix does not duplicate review, verify, or ship.

Security & trust

  • A bug in security-sensitive code (auth, input handling, queries, file I/O, crypto, secrets) makes /harness-claude:security-review mandatory on the way out — flag it in the fix-plan so the gate isn't skipped. Validate the repro input at the trust boundary like any other input.
  • Git boundary holds: /harness-claude:fix and every step it delegates to commit nothing unless you explicitly arm /harness-claude:ship.

Notes

  • Self-contained: a single skill that leads and reuses existing agents — tdd-guide (regression test), code-reviewer + security-reviewer (gates), build-error-resolver (build green). No new agent, no new dependency, no new MCP server, no new runtime.
  • The skill is the lead — there is no separate fix agent (the lead logic lives here, the same way /harness-claude:orchestrate and /harness-claude:operate own theirs).

Common rationalizations (don't accept these from yourself)

ExcuseReality
"The fix is obvious — a repro test is overhead"An "obvious" fix without a RED repro is a guess with confidence. The test is what proves you fixed this bug.
"I can't easily reproduce it, so I'll just patch the likely cause"Then say so and record manual repro steps — the fallback is explicit, never silent.
"While I'm in this file, I'll clean up..."That's /harness-claude:refactor-clean's job. Mixed fixes make the regression bisect-proof.
"The symptom is gone, ship it"A disappeared symptom with an unnamed cause reappears wearing a different stack trace.

Red flags — stop and re-check

  • You wrote fix code before the repro test existed.
  • The repro test passes before the fix lands (it's not reproducing the bug).
  • The fix-plan touches more files than the root-cause statement explains.
  • The bug is in security-sensitive code and the fix-plan doesn't flag /harness-claude:security-review.

Exit criterion

A failing test reproduced the bug (or manual repro steps were recorded with the reason automation wasn't possible), the root cause was named, a minimal fix-plan was written, and the fix was handed to /harness-claude:implement to ride the existing verify/ship gates — never a symptom-patch without a repro, and never a duplicated gate.

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.