agentleFS
rafagomesrafagomes/ai-workflow/skills/fix/SKILL.md

fix

Skill9 starsChanged 19 days agoMITView on GitHub

Diagnose the root cause of a bug and fix it with a regression test, from a description, a stack trace or error output, or a GitHub issue link. Stops with a working tree to review. Use for 'fix this', 'this is broken', a pasted traceback, or an issue link where a patch is expected. For a feature use /wf:feature.

97 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use genie-hacks, workfly 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.
  • automagik-devSkill

    genie-hacks

    Browse, search, and contribute community hacks — real-world patterns for provider switching, teams, skills, hooks, cost optimization, and more.

    Also in 3 projects that use this

  • automagik-devSkill

    workfly

    Discover a procedure and build its saved workflow — dynamic discovery, drafted script, adversarial verification, landed in the catalog.

    Also in 3 projects that use this

  • VulnesisSkill

    container-scan

    Dockerfile / Containerfile / compose analysis plus optional Trivy / Grype / Syft composition when those binaries are present. Use when reviewing a Dockerfile PR, gating `docker build`, building an image SBOM, evaluating base-image risk, or auditing a registry image for CVEs.

    Also in 3 projects that use this

  • VulnesisSkill

    dep-resolve

    Dependency-conflict resolution when a `fix` version bump fails — diagnose the peer-dep tree, find a compatible safe version set, propose package-manager overrides (`overrides`/`resolutions`/`replace`/`[patch]`), fall back to safe-harbour inline patching. Use when an upgrade is blocked by transitive constraints, a peer-dep conflict surfaces, or you need to override a vulnerable transitive without bumping the parent.

    Also in 3 projects that use this

  • bamlabSkill

    eol-check

    Compare the versions of the platform dependencies this repo runs on (Node, React, React Native, Expo, Next.js, Docusaurus, TypeScript, Firebase Functions runtime) against endoflife.date and npm, and say what to upgrade. Use for an EOL / maintenance / "are we up to date" check, or from the factory's weekly run.

    Also in 3 projects that use this

  • +7 more from Vulnesis

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 87 edited versions we read keep these.

  • 3

    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:

    Error output or stack trace: use it as the reproduction.

    line 14
  2. Distinctive:

    Quality checks: Run the project's lint, typecheck and the full test suite (so a regression elsewhere shows up).

    line 30
  3. Very specific:

    Report and stop: Do not review your own fix: /wf:pr dispatches wf:reviewer (wf-reviewer in Codex) once the commits exist.

    line 37
  4. Distinctive:

    Issue link: - if one was provided.

    line 43

“Common” is measured: kept by at least 6 in 10 of the 87 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 the bug described in $ARGUMENTS.

In hosts that do not substitute $ARGUMENTS (e.g. Codex), it is the text the user wrote after the skill name.

Parse arguments

  • Description: /wf:fix users can't login when password contains special chars
  • Issue link or number: /wf:fix https://github.com/org/repo/issues/42. Run gh issue view <url|N> --comments and read the description, comments and labels. If gh is unavailable, ask for the issue text.
  • Error output or stack trace: use it as the reproduction.

Branch

Run git fetch origin, and if the tree is dirty with unrelated changes, say so before starting. Resolve the trunk branch as <base>: gh repo view --json defaultBranchRef -q .defaultBranchRef.name, falling back to git symbolic-ref --short refs/remotes/origin/HEAD with origin/ stripped. Work on a short-lived branch cut from origin/<base>, not from another feature branch: fix/<N>-<slug> when there is an issue, fix/<slug> otherwise. Worktree conventions are in your global agent instructions (~/.claude/CLAUDE.md or ~/.codex/AGENTS.md) (Trunk-Based Workflow).

Steps

  1. Reproduce and locate. Check the project's agent instructions (CLAUDE.md or AGENTS.md), README.md and docs/ for context (for a UI bug, docs/design/DESIGN_SYSTEM.md too, if it exists). Find the code path, then reproduce the failure by running the failing test or the reported steps, telling the user what you are doing. Check git log on the affected files for the change that may have introduced it. If you cannot reproduce it, say so, list what you tried and ask for the missing input; do not patch on a guess.
  2. Diagnose the root cause. Trace the data flow from input to the failure point. Explain the cause, not the symptom, in 1-2 sentences before changing code.
  3. Pick the test layer as in /wf:feature step 2 (docs/ARCHITECTURE.md Testing Strategy, else inferred from the project): unit for pure logic, integration at a boundary (API, database, service interaction), e2e only if a critical user flow broke and had no e2e coverage.
  4. Fix. Write the regression test first and watch it fail for the right reason. Then make the minimal change that fixes the root cause, without refactoring surrounding code, and confirm the test passes. If the bug is at a security trigger (see Security triggers in your global agent instructions (~/.claude/CLAUDE.md or ~/.codex/AGENTS.md)), note that it needs /security-review before the PR.
  5. Quality checks. Run the project's lint, typecheck and the full test suite (so a regression elsewhere shows up); report each in one line (command, result) and paste output only for a failure.

    Risk tier. Derive the tier from the diff (see Risk tiers in your global agent instructions (~/.claude/CLAUDE.md or ~/.codex/AGENTS.md)). A T2 fix needs a human merge however small; say so in the report.

    Size gate. Measure the hand-written source this change adds: Measure as in /wf:feature step 5 (Size gate): added source lines and changed source files, tests, generated files, lockfiles and pure moves excluded. Past roughly 1,000 lines or ~40 files, decide whether it is still one concern. One concern: carry on, and say in the report how large it is and why it stays together. More than one (a fix that grows into a refactor is two slices): stop and propose a split via AskUserQuestion (or, where it is unavailable but the user can answer in chat, as a short numbered list), and do not leave it in the working tree without the user's override.

  6. Report and stop. Do not review your own fix: /wf:pr dispatches wf:reviewer (wf-reviewer in Codex) once the commits exist. Summarize:

    • Root cause - 1-2 sentences on what was broken.
    • Files changed - git diff --stat, or a short list.
    • Regression tests - layers added, where they live, how to re-run them.
    • Verification - each check in one line.
    • Risk - T1 — <why>.
    • Issue link - if one was provided.

    Then stop. The user reviews the working tree and decides next steps, typically /wf:commit then /wf:pr.

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.