agentleFS
elfrostelfrost/ai-patchlab/.agents/skills/fix-issue/SKILL.md

fix-issue

Skill1 starsChanged 2 months agoMITView on GitHub

Diagnose, fix, test, review, and commit a bug fix end-to-end. Use when the user reports a bug, error message, or GitHub issue that needs to go from "broken" to "fixed and committed" in one flow.

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ship, review and 1 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.
  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 3 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. 0 are common, 16 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 16

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If a GitHub issue URL: gh issue view <number> --json title,body,comments

    line 12
  2. Distinctive:

    Read CLAUDE.md / AGENTS.md / ROADMAP.md for project context

    line 13
  3. Distinctive:

    Search the codebase for the error message or related symbols

    line 17
  4. Very specific:

    Read recent logs if logs/ exists

    line 18
  5. Distinctive:

    If you cannot reproduce or find the root cause after 2 attempts, STOP and ask the user for more context

    line 20
  6. Distinctive:

    Do NOT modify unrelated files

    line 24
  7. Distinctive:

    Do NOT refactor surrounding code

    line 25
  8. Very specific:

    Verify existing tests still pass: pytest tests/ -v

    line 28
  9. Distinctive:

    Write a regression test that fails without the fix and passes with it

    line 29
  10. Distinctive:

    Run coverage on affected files

    line 30
  11. Distinctive:

    Read the diff and check for: regressions, similar bug patterns elsewhere, root cause vs symptom

    line 33
  12. Distinctive:

    If CRITICAL issues are found, fix them and re-review

    line 34
  13. Distinctive:

    Run the full validation loop (max 3 retries):

    line 37
  14. Distinctive:

    Commit only after user approval

    line 49
  15. Distinctive:

    Always diagnose before fixing — understand the root cause

    line 52
  16. Distinctive:

    Always write a regression test — the same bug should never come back

    line 53
  17. Distinctive:

    Stop after 2 failed diagnosis attempts and ask for more context

    line 54
  18. Distinctive:

    Do NOT push — commit locally and let the user decide when to push

    line 55
  19. Distinctive:

    Keep the fix minimal

    line 56

“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

Fix Issue

End-to-end bug fix. Codex executes the full sequence inline (Claude has subagents for each step; Codex does them sequentially in one model run).

Phase 1: Understand

  1. Parse the bug description from the user input
  2. If a GitHub issue URL: gh issue view <number> --json title,body,comments
  3. Read CLAUDE.md / AGENTS.md / ROADMAP.md for project context
  4. Track progress with a Diagnose -> Fix -> Test -> Review -> Commit checklist

Phase 2: Diagnose

  1. Search the codebase for the error message or related symbols
  2. Read recent logs if logs/ exists
  3. Trace the root cause (not just the symptom)
  4. If you cannot reproduce or find the root cause after 2 attempts, STOP and ask the user for more context

Phase 3: Fix

  1. Apply the minimal change that addresses the root cause
  2. Do NOT modify unrelated files
  3. Do NOT refactor surrounding code

Phase 4: Test

  1. Verify existing tests still pass: pytest tests/ -v
  2. Write a regression test that fails without the fix and passes with it
  3. Run coverage on affected files

Phase 5: Review

  1. Read the diff and check for: regressions, similar bug patterns elsewhere, root cause vs symptom
  2. If CRITICAL issues are found, fix them and re-review

Phase 6: Validate

Run the full validation loop (max 3 retries):

ruff check src/ tests/
black --check src/ tests/
pytest tests/ -v

Auto-fix lint/format with --fix and black. Re-run until all pass.

Phase 7: Commit

  1. Show the user the full diff
  2. Propose a commit message: fix: <description of what was fixed>
  3. Stage specific files (not git add -A)
  4. Commit only after user approval

Rules

  • Always diagnose before fixing — understand the root cause
  • Always write a regression test — the same bug should never come back
  • Stop after 2 failed diagnosis attempts and ask for more context
  • Do NOT push — commit locally and let the user decide when to push
  • Keep the fix minimal

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.