원클릭으로
solve-issue
Claim exactly one issue, fix it, and create a pull request starting from a clean branch.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Claim exactly one issue, fix it, and create a pull request starting from a clean branch.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Abandon an active issue or release a stale issue claim so another agent can pick it up.
Use in repositories that track work with the agent-issues local issue workflow.
Prepare and open a pull request for the current branch after validating the full diff and running checks.
Push the current branch, open or update its PR, and loop through CI failures and review feedback until the PR is clean.
Like solve-issue, but skips plan confirmation and goes straight to implementation.
| name | solve-issue |
| description | Claim exactly one issue, fix it, and create a pull request starting from a clean branch. |
Pick and solve exactly one issue, then create a PR. Issue claims live in the shared local claim store under the repo's git common dir; claiming does not create a PR up front.
Before starting, check for a repo-scoped skill with additional instructions:
.claude/skills/solve-issue-local/SKILL.md (Claude Code).agents/skills/solve-issue-local/SKILL.md (Codex)If either exists, read it and follow its instructions alongside this workflow. The local skill should stay narrow: repo-specific build, test, and lint commands; generated-artifact rules; dependency policy; domain constraints; and other project-specific review steps.
Do not expect solve-issue-local to repeat shared issue or PR mechanics. This
skill owns preflight checks, issue claiming, already-fixed cleanup, planning
shape, issue deletion, progress pushes, and final submit-pr handoff. The
submit-pr skill owns PR creation or update, CI watching, review feedback
loops, and timeout handling through agent-submit.
Preflight check — run this single command to verify the working tree is clean, HEAD matches origin/<default-branch>, and no open PR is already tied to the current branch:
agent-preflight
If it exits non-zero, stop immediately and tell the user what failed. Do not proceed — solve-issue must start from a clean branch that matches the default branch exactly and is not already tied to an open PR.
Resolve a user-supplied issue argument — only if the user explicitly passed an issue name/path. Use your judgment to determine the issue file they very obviously meant before invoking the claim script.
Canonicalize the argument to the basename expected by issue-autoclaim:
p0-..., p1-..., p2-..., p3-..., p4-..., or blocked-...issues/<name>.json5, strip the leading issues/<name> without .json5, try <name>.json5issues/, use that file's basenameDo not silently switch to a different issue or auto-pick a replacement. If there is no single obvious match, stop immediately and ask the user to clarify instead of guessing.
Try to claim an unblocked issue first by running:
issue-autoclaim
This auto-picks the highest-priority unclaimed issue, skipping issues with a truthy blocked field (those have preconditions that need manual review). The blocked field can be true or a string describing the blocker.
Only if the user explicitly passed an issue name (e.g. /solve-issue populate-deck-strategies or /solve-issue issues/populate-deck-strategies.json5), claim that resolved canonical issue instead:
issue-autoclaim <resolved-issue-name>
Never pick a specific issue on your own — always use the auto-pick unless the user told you which issue to work on.
issue-claim --current and treat the returned filename stem as the authoritative claimed issue for all later steps.issue-claim --current before continuing. The local claim key is stable across blocked-... / pN-... renames.issue-abandon without asking and retry the intended claim once. A claim
is clearly stale when the prior work is demonstrably complete, including
when step 0 proved the worktree is clean at the default branch with no open
PR after the prior task, or when the claimed issue was removed by a merged
PR. Releasing a stale claim is always authorized. If the claim may still
own active work, stop and tell the user instead of releasing it.Fallback to blocked issues only if auto-claim found nothing. Skip this step if the user explicitly passed an issue name or step 2 already claimed something.
issue-query is still useful for listing blocked issues, but do not use it to decide whether blocked fallback is needed. It does not know which unblocked issues are already claimed in the shared local claim store; issue-autoclaim is the authoritative check for "nothing unblocked is actually claimable."
Work through blocked issues in any reasonable order. Prefer blockers you can verify mechanically before issues that obviously require the user or an external dependency.
Read the blocked issue's JSON5 file — the blocked field is a string describing why it's blocked
Investigate whether the blocker has been resolved: check the codebase, git history, external conditions described in the blocker string
If the blocker IS resolved: first try to claim that specific blocked issue as it exists on disk:
issue-autoclaim <blocked-issue-name>
issue-claim --current and treat that returned filename stem as authoritative for all later steps. Then immediately remove the blocked field, rename the file from blocked-<name>.json5 to p{priority}-<name>.json5, commit that change on your branch, and continue. Stop scanning blocked issues.If the blocker is NOT resolved: leave it blocked and continue to the next blocked issue
If no blocked issue can be unblocked and claimed, stop immediately and tell the user no issue was claimed.
Check if already fixed — before planning anything, check whether the issue was already resolved and the issue file just wasn't cleaned up. Do this by:
git log --diff-filter=A -- issues/<filename>.json5)If the issue is already fixed: skip the planning/implementation steps entirely. Just delete the issue file, commit it, push, and finalize the PR as a cleanup. The PR title should be something like "Clean up outdated issue: <title>" and the body should briefly explain that the issue was already resolved (mention the commit or change that fixed it). Conceptually this is a zero-line fix — the only change is removing the stale issue file.
If the issue is NOT fixed: continue to step 5.
Enter plan mode — explore the codebase, design your approach, and present it to the user for feedback before writing any code. This is the user's chance to redirect you if the approach is wrong.
Start the plan with a short issue context recap in plain language: what the bug/task actually is, how it shows up today, and why the proposed fix addresses it. Do not assume the user remembers the issue details from when they filed it.
Your plan must end with this checklist (substitute repo-specific build/test/lint commands from the local skill if available):
## Post-implementation checklist
- [ ] Implement the changes described above
- [ ] Add/update tests
- [ ] Run lint/typecheck/tests (use repo-specific commands from solve-issue-local)
- [ ] Delete the issue file and include deletion in the commit
- [ ] Review changed code for quality
- [ ] Submit PR via the `submit-pr` skill (pass the claimed issue filename as the argument)
This checklist survives the plan mode boundary and ensures no steps are skipped even if earlier context is compressed.
After the plan is approved, create tasks from the checklist using TaskCreate. Mark each task in_progress when you start it and completed when you finish it.
TaskCreate is unavailable in the current session, mirror the checklist in update_plan instead and keep the statuses current there.Implement the fix. Push progress:
git push origin HEAD
Update tests to expect the correct behavior.
Run the repo's lint/typecheck/test suite. Consult the local solve-issue-local skill for the specific commands. If no local skill exists, look for Makefile targets like make check, make test, or make lint.
Delete the issue file (e.g., rm issues/<issue-filename>.json5) and include the deletion in the commit — the issue removal must ship with the fix.
blocked- prefix) and delete the renamed path that now exists on your branch. If issue-claim --current can no longer resolve the claim because the file is gone, that does not mean the claim itself is gone — agent-submit does not read the claim file.Document ALL issues you discover during exploration, even if you're only fixing one. Future agents benefit from this documentation! Document them by filing new issues in issues/.
Review the changed code for reuse, quality, and efficiency. Fix any issues found. If the repo has a /simplify skill, use it.
Finalize the PR by invoking the submit-pr skill with the claimed issue filename:
/submit-pr <claimed-issue-filename>
submit-pr composes the title and body from the branch state (including the deleted issue file's context recovered from git history), pushes, opens or updates the PR, and loops through CI failures and review feedback until the PR is clean.
If you determine an issue isn't worth fixing after claiming it, run:
issue-abandon
This releases the local claim so another worktree can pick up the issue. See /abandon-issue for the full workflow including branch cleanup.
Releasing a stale claim is different from abandoning active work and is always
authorized without user confirmation. Use issue-abandon as bookkeeping, then
continue the requested workflow; do not perform branch cleanup when the
worktree is already clean and ready.
Then restart from step 1 to pick a different issue.
Not every quirk deserves a fix. For issues that seem one-in-a-million or where it's not realistically possible to determine the original author's intent, it's fine to give up and handle it gracefully. Being correct on fewer things is better than being wrong.