agentleFS
MannyFlussMannyFluss/claude-skills/implement-issue/SKILL.md

implement-issue

Skill0 starsChanged 7 months agoMITView on GitHub

Implement a single GitHub issue end-to-end using TDD, then close it. Discovers the project's feedback loop automatically from ralph.sh, CLAUDE.md, Makefile, or package.json. Use when user says "implement issue #N", "do issue #N", "run ralph on #N", "work on issue", or wants to execute a single queued task.

  • Commits and pushes

30 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use review-issue, create-issue and 4 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.
  • ravihammondSkill

    review-issue

    Review and repair one GitHub issue implementation in the current checkout.

    Also in 4 projects that use this

  • sahinSkill

    create-issue

    Also in 6 projects that use this

  • TermiX-officialSkill

    merge-pr

    Merge a GitHub PR via squash after /preparepr. Use when asked to merge a ready PR. Do not push to main or modify code. Ensure the PR ends in MERGED state and clean up worktrees after success.

    Also in 3 projects that use this

  • SentrySkill

    create-pr

    Create pull requests following Sentry conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Follows Sentry's code review guidelines.

    Also in 5 projects that use this

  • OpenAISkill

    writing-skills

    Use when creating new skills, editing existing skills, or verifying skills work before deployment

    Also in 3 projects that use this

  • Google CloudSkill

    triage

    Gather context on a change or bug and plan the implementation.

    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

30 rules. 0 are common, 20 are distinctive, and 10 are very specific to this project.

  • 0

    Common

    Most of the 29 edited versions we read keep these.

  • 20

    Distinctive

    This author's own choices. Worth a look.

  • 10

    Very specific

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

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

    Ensure dev is up to date and check it out:

    line 14
  2. Very specific:

    All implementation work happens directly on dev.

    line 24
  3. Very specific:

    If progress.txt exists in the project root, read it first.

    line 28
  4. Very specific:

    If the user gave an issue number, use it.

    line 30
  5. Distinctive:

    Read the full issue body:

    line 36
  6. Distinctive:

    Read only the issue title and body.

    line 44
  7. Distinctive:

    No list of multiple distinct features or behaviours

    line 48
  8. Very specific:

    No language like "and also", "additionally", "phase 1/2/3"

    line 49
  9. Distinctive:

    If it smells too big, stop immediately:

    line 51
  10. Distinctive:

    Wait for confirmation before continuing.

    line 55
  11. Distinctive:

    Check these locations in order and use the first match:

    line 59
  12. Distinctive:

    Ask the user: if none found

    line 65
  13. Very specific:

    Godot class registry (TowerDefenseSequel-specific): When a new class_name script is created headlessly, Godot's class registry …

    line 78
  14. Distinctive:

    Read source-of-truth documents before touching any code.

    line 95
  15. Distinctive:

    Follow strict red-green-refactor.

    line 104
  16. Distinctive:

    Never write multiple tests before implementing

    line 107
  17. Distinctive:

    Never implement without a failing test first

    line 108
  18. Distinctive:

    All GDScript strictly typed — every variable, param, return type declared

    line 112
  19. Very specific:

    No bare Array or Dictionary

    line 114
  20. Distinctive:

    Run both commands. If either fails:

    line 120
  21. Distinctive:

    Read the error carefully

    line 121
  22. Very specific:

    Do not use @warning_ignore or skip checks

    line 124
  23. Distinctive:

    Check off the completed item in the parent's task list:

    line 143
  24. Distinctive:

    If the count is 0 (no unchecked boxes remain), close the parent automatically:

    line 162
  25. Distinctive:

    If any remain open, leave the parent open.

    line 167
  26. Very specific:

    If you cannot complete: leave the issue open, note what's blocking in progress.txt, and explain to the user.

    line 169
  27. Very specific:

    Write (or overwrite) progress.txt in the project root.

    line 173
  28. Distinctive:

    Look at open issues and identify the best next unit of work — smallest vertical slice that builds on what was just done:

    line 202
  29. Distinctive:

    Scoreboard: If the just-completed issue has a parent PRD, count total sub-issues (open + closed) and how many are closed.

    line 210
  30. Distinctive:

    If no parent exists, skip the scoreboard line.

    line 219

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

Implement Issue

One issue. One Claude Code session. Full handoff.

Implement exactly one GitHub issue with TDD, run the project's feedback loop, commit directly to dev, close the issue, update the local handoff file, then tell the user to end the session. The user watches and steers — this is not an autonomous loop.

Step 0 — Branch setup

Ensure dev is up to date and check it out:

git fetch origin
git checkout dev 2>/dev/null || git checkout -b dev origin/main 2>/dev/null || git checkout -b dev

# Pull latest dev
git pull origin dev --ff-only 2>/dev/null || true

All implementation work happens directly on dev. Never commit to main.

Step 1 — Read progress.txt and resolve the issue

If progress.txt exists in the project root, read it first. It contains handoff notes from the previous session — what was done, decisions made, suggested next issue. Use it to skip re-exploration.

If the user gave an issue number, use it. Otherwise pick from the suggested next issue in progress.txt, or:

gh issue list --label ralph --state open --json number,title --limit 1

Read the full issue body:

gh issue view <NUMBER> --json title,body

Step 1b — Gate 1: smell check on issue text (before touching the codebase)

Read only the issue title and body. Flag obvious epics before spending any tokens on file reads.

A well-sized ralph issue has:

  • One clear acceptance condition — "done" is unambiguous
  • No list of multiple distinct features or behaviours
  • No language like "and also", "additionally", "phase 1/2/3"

If it smells too big, stop immediately:

"Gate 1: This issue looks oversized — it describes [X, Y, Z]. I'd recommend /decompose-issue #N first. Proceed anyway?"

Wait for confirmation before continuing. If confirmed, note the concern and move on.

Step 2 — Discover the feedback loop

Check these locations in order and use the first match:

  1. ralph.sh — read the feedback_loop() function and the DONE CONDITION block in the claude prompt
  2. CLAUDE.md — look for a "feedback loop" or "done condition" section
  3. Makefile — look for test, check, or verify targets
  4. package.json — look for test or lint scripts
  5. Ask the user if none found

For this project (TowerDefenseSequel), the feedback loop is:

# Godot is flatpak on this machine — use full invocation, not the `godot` alias
flatpak run org.godotengine.Godot --headless --path . \
  --check-only --script res://autoloads/event_bus.gd   # type check — must exit 0

flatpak run org.godotengine.Godot --headless --path . \
  -s addons/gut/gut_cmdln.gd -gdir=res://tests/ -gexit  # test suite — must exit 0

Note: --check-only requires --script (checks one file). -gexit is the correct GUT flag — -gexit_on_failure does not exist.

Godot class registry (TowerDefenseSequel-specific): When a new class_name script is created headlessly, Godot's class registry (.godot/global_script_class_cache.cfg) is not automatically updated. If the test runner reports Could not find base class "Foo" or Could not find type "Foo", add the entry manually:

# In .godot/global_script_class_cache.cfg, add to the list array:
{
"base": &"RefCounted",
"class": &"Foo",
"icon": "",
"is_abstract": false,
"is_tool": false,
"language": &"GDScript",
"path": "res://core/foo.gd"
}

Alternatively, tell the user to open the Godot editor and save the project (Ctrl+S) — the editor auto-populates the registry. Do this at the start of a session if new scripts were added in a prior session without an editor save.

Step 3 — Load project context

Read source-of-truth documents before touching any code. For this project:

  • GDD.md — game design decisions
  • TAD.md — technical architecture decisions
  • core_plan.md — implementation plan and GDScript rules

For other projects: look for README.md, ARCHITECTURE.md, CLAUDE.md, or equivalent.

Step 4 — Implement with TDD

Follow strict red-green-refactor. Non-negotiable:

  • One behaviour → one failing test → minimal code to pass → repeat
  • Never write multiple tests before implementing
  • Never implement without a failing test first
  • Tests verify observable behaviour through the public interface only

For this project, additionally:

  • All GDScript strictly typed — every variable, param, return type declared
  • class_name on every script
  • No bare Array or Dictionary
  • No @warning_ignore — fix the code
  • Signals named in past tense, no Variant in signal params

Step 5 — Run the feedback loop

Run both commands. If either fails:

  • Read the error carefully
  • Fix the root cause
  • Re-run until both pass
  • Do not use @warning_ignore or skip checks

Step 6 — Commit, push to dev, close issue, and update parent if applicable

git add <specific implementation files only — not progress.txt>
git commit -m "<what and why — one atomic commit>"
git push origin dev

One commit per issue. Do not include progress.txt in the commit — it is a local session file, not repo history.

Close the issue directly:

gh issue close <NUMBER> --comment "Implemented in commit $(git rev-parse --short HEAD) on dev. ✓"

If this issue is a sub-issue, check its body for a > Sub-issue of #PARENT line. If found, do both:

  1. Check off the completed item in the parent's task list:
# Fetch current parent body
gh issue view <PARENT> --json body --jq '.body'

# Edit parent — replace "- [ ] #NUMBER" with "- [x] #NUMBER"
gh issue edit <PARENT> --body "<updated body with - [x] #NUMBER checked>"
  1. Comment on the parent for the activity log:
gh issue comment <PARENT> --body "Closed sub-issue #<NUMBER> — <title> ✓"

Then check if all children are done:

gh issue view <PARENT> --json body --jq '.body' | grep -c '\- \[ \]'

If the count is 0 (no unchecked boxes remain), close the parent automatically:

gh issue close <PARENT> --comment "All sub-issues complete. Closing. ✓"

If any remain open, leave the parent open.

If you cannot complete: leave the issue open, note what's blocking in progress.txt, and explain to the user.

Step 7 — Update progress.txt

Write (or overwrite) progress.txt in the project root. This is a local file only — never committed, never git-ignored. Delete it when the sprint is done. Keep entries concise; sacrifice grammar for brevity.

Issue: #<NUMBER> — <title>
Commit: <short SHA> — <commit message>
Date: <YYYY-MM-DD>

Done this session:
- <bullet per meaningful change>

Files changed:
- <path> — <why>

Decisions made:
- <non-obvious choice and reason>

Deferred / out of scope:
- <anything intentionally skipped or left partial>

Tests passing: yes / no (if no, explain)

Suggested next issue:
- #<NUMBER> — <title>  (or list open issues if unclear)

Progress: <done>/<total> issues closed under parent PRD #<PARENT> (<remaining> remaining)

Step 8 — Suggest the next issue

Look at open issues and identify the best next unit of work — smallest vertical slice that builds on what was just done:

gh issue list --label ralph --state open --json number,title

Record the suggestion in progress.txt under "Suggested next issue". Do not create issues on behalf of the user — that is a human decision.

Scoreboard: If the just-completed issue has a parent PRD, count total sub-issues (open + closed) and how many are closed. Add a Progress: line at the bottom of progress.txt showing <done>/<total> issues closed under parent PRD #<PARENT> (<remaining> remaining). Use:

# Count closed sub-issues that reference the parent
gh issue list --state closed --search "Sub-issue of #<PARENT>" --json number --jq 'length'
# Count open sub-issues that reference the parent
gh issue list --state open --search "Sub-issue of #<PARENT>" --json number --jq 'length'

If no parent exists, skip the scoreboard line.

Step 9 — Hand off to the user

Tell the user:

Committed and pushed to dev. Issue #N closed. progress.txt updated.

Suggested next issue: #M — "<title>"

Godot (TowerDefenseSequel only): Open the Godot editor and hit Ctrl+S to save — this registers any new class_name scripts added this session so the next session's headless tests can find them.

End this session and start a fresh Claude Code instance with: Read progress.txt then /implement-issue

When you're ready to ship to main: git checkout main && git merge dev && git push origin main

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.