Turns a filed issue into a merge-ready change: understand, reproduce, fix with a test, verify, and
open a PR that closes the issue. Never pushes or opens a PR without showing the diff first.
-
Load the issue. Resolve the arg to an issue number (bare number or full URL). Read it and
its discussion:
gh issue view <n> --comments
Extract the actual problem, repro steps, acceptance criteria, and linked PRs/commits. If the
issue is vague or already closed, say so and ask before proceeding — don't guess at scope.
-
Confirm scope (one beat). State in one or two lines what you're changing and what "done"
means for this issue. If the issue is really several changes, do the smallest coherent one and
note the rest. Don't expand scope beyond what the issue asks.
-
Isolate the work. Create a dedicated branch/worktree so this doesn't collide with other
work. Prefer the branch skill if it's installed (/branch fix-<n>-<slug>); otherwise git worktree add, or at minimum git checkout -b fix-<n>-<slug>. Check git status first — never
start on top of another session's uncommitted WIP.
-
Reproduce before fixing (for a bug). Write a failing test that captures the issue, or
otherwise demonstrate the broken behavior concretely — a fix with no reproduction is a guess.
For a feature/chore, write the test that encodes the acceptance criteria. (TDD applied to the
issue: red first.)
-
Fix it. Make the smallest change that turns the test green. Touch only what the issue
needs — don't reformat or refactor adjacent code on the way past.
-
Verify — evidence, not assertion. Run the real commands and read the output: the new test
passes, the existing suite still passes, typecheck/lint clean, and (if relevant) a manual check
of the behavior the issue described. If anything fails, keep working — do not open the PR.
-
Review (optional but recommended). Run /codex-review or /review-panel if installed, and
address anything critical/important before opening the PR. /curate, if installed, can confirm
the "fixed" claim against actual repo state.
-
Open the PR (with your confirmation). Show the diff summary, then open a PR whose body
closes the issue:
gh pr create --title "<imperative summary> (closes #<n>)" \
--body "Closes #<n>\n\n<what changed and why, one short paragraph + the verification you ran>"
Use Closes #<n> so merging the PR auto-closes the issue. Don't push or create the PR until
you've shown the change and gotten a go-ahead.
-
Report. One line: branch, PR URL, and the issue it closes. Note any follow-up the issue
implied but you consciously left out of scope.