GH Issue Priority Handoff
Trigger
Use this skill when the user asks to:
- analyze open GitHub issues
- rank issues by priority, impact, or value
- generate delegation-ready instructions for other coding agents
- create a backlog execution sequence
Inputs to Clarify
Collect these before scoring:
- Repository: local checkout,
owner/repo, or current directory.
- Scope: all open issues, selected issue numbers, labels, milestone, or search query.
- Exclusions: issues already delegated, in progress, intentionally deferred, or out of scope.
- Goal: bugfix focus, growth focus, reliability focus, cost/security focus, or balanced.
- Time horizon: urgent sprint, near-term, or strategic roadmap.
If the user does not provide these, proceed with sensible defaults and state assumptions.
Freshness and Repo Guardrails
Before ranking or writing handoff instructions:
- Read local
AGENTS.md and repo docs if present.
- Identify the repo default/base branch. Prefer
gh repo view --json defaultBranchRef, then git symbolic-ref --short refs/remotes/origin/HEAD, then the current branch.
- Fetch the base branch when a remote exists. If the repo has no remote or fetch fails, say that freshness is limited to local state.
- Check whether the current checkout is dirty. Do not ask delegated agents to build on unrelated local changes unless the user explicitly requests it.
- Never recommend direct work on protected branches (
main, master, develop, release branches, or repo-defined equivalents).
- Default each delegated issue to a dedicated branch and worktree.
- Include explicit setup commands in each handoff block using the detected base branch, for example:
BASE_BRANCH=<detected-base-branch>
git fetch origin "$BASE_BRANCH"
git worktree add -b codex/issue-<id>-<slug> /path/to/worktrees/issue-<id> "origin/$BASE_BRANCH"
cd /path/to/worktrees/issue-<id>
If there is no usable remote, replace origin/$BASE_BRANCH with the best local base ref and state the limitation.
Workflow
- Gather issue metadata, body, comments, and linked closure context.
Use gh first:
gh issue list --state open --limit 200 --json number,title,labels,assignees,createdAt,updatedAt,url,state
gh issue view <number> --comments --json number,title,body,labels,comments,assignees,closedByPullRequestsReferences,createdAt,updatedAt,url,state
- Inspect codebase state for each issue.
- Treat each issue as a claim to verify against current code, not as an instruction to apply blindly.
- Verify whether the issue is still reproducible, already partially implemented, fully fixed, duplicated, or superseded.
- Identify likely touched files, architecture dependencies, and existing tests or validation commands.
- Check whether the issue is implementation-ready.
Issue Readiness Gate
Before scoring priority or handoff status, assign each issue one readiness verdict:
READY: clear user outcome, scope, acceptance criteria, likely target files/modules, and validation path.
READY WITH RISKS: implementable, but assumptions, dependencies, or code uncertainty must be visible in the handoff.
NOT READY: missing a product or technical decision that would materially change implementation.
NOT NEEDED: duplicate, obsolete, already implemented, or no longer relevant to current code.
For NOT READY issues, do not create a normal delegation block. Instead, create a readiness block with:
- Missing decision or evidence.
- One concrete question to unblock it.
- Suggested owner: founder/product/engineering.
- Recommended next step: use
backlog-ready-spec, update the issue, close as duplicate, or investigate code.
Readiness is separate from priority. A high-value issue can still be NOT READY.
- Classify handoff readiness before scoring.
Hand off now: valid, bounded, agent-executable, and valuable.
Needs human/product: valid problem but acceptance criteria or direction is missing.
Defer: valid but low value, high opportunity cost, or blocked by another issue.
Close/skip: stale, duplicate, already fixed, invalid, or not worth agent time.
- Score valid issues using this rubric.
Importance: Critical / High / Medium / Low
Value: 1-10 (user impact + business impact + data correctness + risk reduction)
Effort: S / M / L / XL
Dependency: blocked-by or blocks-other-work
Readiness: READY / READY WITH RISKS / NOT READY / NOT NEEDED
Suggested weighting:
- User-visible breakage or data integrity: highest
- Security, abuse, or cost-control risks: highest
- Structural unblockers for many downstream tasks: high
- Nice-to-have channels/features without clear demand: lower
- Produce ranked list.
- Exclude issues user marked as delegated or in progress.
- Sort handoff-ready issues by importance first, then value, then dependency impact.
- Keep skipped/deferred issues visible with a brief reason instead of silently dropping them.
- Produce per-issue paragraph + delegation block for handoff-ready issues only.
- Paragraph: what problem it solves, why now, expected value, risk if delayed, and what evidence was checked.
- Delegation block: objective, scope, non-goals, files, acceptance criteria, branch/worktree setup, validation commands.
Output Contract
Always return these sections in order:
Freshness and Assumptions
- Repo/ref checked, issue scope, base branch, fetch status, and any freshness caveat.
Priority Table
- Issue, Status, Readiness, Importance, Value, Effort, Recommendation, Reason
Issue Analysis
- One paragraph per issue, including skipped/deferred issues.
Readiness Fixes
- One block per
NOT READY or NOT NEEDED issue.
- State the missing decision, duplicate/obsolete evidence, or already-implemented evidence.
- Recommend whether to run
backlog-ready-spec, update the issue, close it, or investigate further.
Agent Handoff Blocks
- One copy-paste block per handoff-ready issue.
- Only include
READY and READY WITH RISKS issues.
- Each block must include:
- issue id and title
- URL
- goal
- implementation scope
- non-goals
- target files or modules
- acceptance criteria
- required validation commands
- worktree/branch setup commands
- If no issues are handoff-ready, say so and do not fabricate blocks.
Skipped or Needs Follow-up
- Issues not handed off, with one-line reasons.
For handoff block format, use:
references/handoff-template.md
Quality Bar
- Do not rank by title only. Use issue body + code reality.
- Check comments and linked closing PR references when available.
- Call out stale, duplicate, outdated, already-fixed, or not-agent-ready issues explicitly.
- Use repo-specific validation commands from package scripts, test config, Makefiles, CI config, or docs. Do not default to
pnpm unless the repo actually uses it.
- Do not hand off
NOT READY issues as if they were executable.
- Keep recommendations actionable; avoid vague prioritization.
- Keep handoff blocks self-contained enough for another coding agent to start without rereading this analysis.
- If uncertain, state assumptions and what evidence is missing.
1---2name: gh-issue-priority-handoff3description: Use when the user asks to triage GitHub issues, prioritize backlog work, verify issue readiness or staleness, or generate delegation-ready issue briefs for coding agents.4---56# GH Issue Priority Handoff78## Trigger910Use this skill when the user asks to:11- analyze open GitHub issues12- rank issues by priority, impact, or value13- generate delegation-ready instructions for other coding agents14- create a backlog execution sequence1516## Inputs to Clarify1718Collect these before scoring:191. Repository: local checkout, `owner/repo`, or current directory.202. Scope: all open issues, selected issue numbers, labels, milestone, or search query.213. Exclusions: issues already delegated, in progress, intentionally deferred, or out of scope.224. Goal: bugfix focus, growth focus, reliability focus, cost/security focus, or balanced.235. Time horizon: urgent sprint, near-term, or strategic roadmap.2425If the user does not provide these, proceed with sensible defaults and state assumptions.2627## Freshness and Repo Guardrails2829Before ranking or writing handoff instructions:301. Read local `AGENTS.md` and repo docs if present.312. Identify the repo default/base branch. Prefer `gh repo view --json defaultBranchRef`, then `git symbolic-ref --short refs/remotes/origin/HEAD`, then the current branch.323. Fetch the base branch when a remote exists. If the repo has no remote or fetch fails, say that freshness is limited to local state.334. Check whether the current checkout is dirty. Do not ask delegated agents to build on unrelated local changes unless the user explicitly requests it.345. Never recommend direct work on protected branches (`main`, `master`, `develop`, release branches, or repo-defined equivalents).356. Default each delegated issue to a dedicated branch and worktree.367. Include explicit setup commands in each handoff block using the detected base branch, for example:3738```bash39BASE_BRANCH=<detected-base-branch>40git fetch origin "$BASE_BRANCH"41git worktree add -b codex/issue-<id>-<slug> /path/to/worktrees/issue-<id> "origin/$BASE_BRANCH"42cd /path/to/worktrees/issue-<id>43```4445If there is no usable remote, replace `origin/$BASE_BRANCH` with the best local base ref and state the limitation.4647## Workflow48491. Gather issue metadata, body, comments, and linked closure context.5051Use `gh` first:52```bash53gh issue list --state open --limit 200 --json number,title,labels,assignees,createdAt,updatedAt,url,state54gh issue view <number> --comments --json number,title,body,labels,comments,assignees,closedByPullRequestsReferences,createdAt,updatedAt,url,state55```56572. Inspect codebase state for each issue.58- Treat each issue as a claim to verify against current code, not as an instruction to apply blindly.59- Verify whether the issue is still reproducible, already partially implemented, fully fixed, duplicated, or superseded.60- Identify likely touched files, architecture dependencies, and existing tests or validation commands.61- Check whether the issue is implementation-ready.6263### Issue Readiness Gate6465Before scoring priority or handoff status, assign each issue one readiness verdict:6667- `READY`: clear user outcome, scope, acceptance criteria, likely target files/modules, and validation path.68- `READY WITH RISKS`: implementable, but assumptions, dependencies, or code uncertainty must be visible in the handoff.69- `NOT READY`: missing a product or technical decision that would materially change implementation.70- `NOT NEEDED`: duplicate, obsolete, already implemented, or no longer relevant to current code.7172For `NOT READY` issues, do not create a normal delegation block. Instead, create a readiness block with:7374- Missing decision or evidence.75- One concrete question to unblock it.76- Suggested owner: founder/product/engineering.77- Recommended next step: use `backlog-ready-spec`, update the issue, close as duplicate, or investigate code.7879Readiness is separate from priority. A high-value issue can still be `NOT READY`.80813. Classify handoff readiness before scoring.82- `Hand off now`: valid, bounded, agent-executable, and valuable.83- `Needs human/product`: valid problem but acceptance criteria or direction is missing.84- `Defer`: valid but low value, high opportunity cost, or blocked by another issue.85- `Close/skip`: stale, duplicate, already fixed, invalid, or not worth agent time.86874. Score valid issues using this rubric.88- `Importance`: Critical / High / Medium / Low89- `Value`: 1-10 (user impact + business impact + data correctness + risk reduction)90- `Effort`: S / M / L / XL91- `Dependency`: blocked-by or blocks-other-work92- `Readiness`: READY / READY WITH RISKS / NOT READY / NOT NEEDED9394Suggested weighting:95- User-visible breakage or data integrity: highest96- Security, abuse, or cost-control risks: highest97- Structural unblockers for many downstream tasks: high98- Nice-to-have channels/features without clear demand: lower991005. Produce ranked list.101- Exclude issues user marked as delegated or in progress.102- Sort handoff-ready issues by importance first, then value, then dependency impact.103- Keep skipped/deferred issues visible with a brief reason instead of silently dropping them.1041056. Produce per-issue paragraph + delegation block for handoff-ready issues only.106- Paragraph: what problem it solves, why now, expected value, risk if delayed, and what evidence was checked.107- Delegation block: objective, scope, non-goals, files, acceptance criteria, branch/worktree setup, validation commands.108109## Output Contract110111Always return these sections in order:1121131. `Freshness and Assumptions`114- Repo/ref checked, issue scope, base branch, fetch status, and any freshness caveat.1151162. `Priority Table`117- Issue, Status, Readiness, Importance, Value, Effort, Recommendation, Reason1181193. `Issue Analysis`120- One paragraph per issue, including skipped/deferred issues.1211224. `Readiness Fixes`123- One block per `NOT READY` or `NOT NEEDED` issue.124- State the missing decision, duplicate/obsolete evidence, or already-implemented evidence.125- Recommend whether to run `backlog-ready-spec`, update the issue, close it, or investigate further.1261275. `Agent Handoff Blocks`128- One copy-paste block per handoff-ready issue.129- Only include `READY` and `READY WITH RISKS` issues.130- Each block must include:131 - issue id and title132 - URL133 - goal134 - implementation scope135 - non-goals136 - target files or modules137 - acceptance criteria138 - required validation commands139 - worktree/branch setup commands140- If no issues are handoff-ready, say so and do not fabricate blocks.1411426. `Skipped or Needs Follow-up`143- Issues not handed off, with one-line reasons.144145For handoff block format, use:146- `references/handoff-template.md`147148## Quality Bar149150- Do not rank by title only. Use issue body + code reality.151- Check comments and linked closing PR references when available.152- Call out stale, duplicate, outdated, already-fixed, or not-agent-ready issues explicitly.153- Use repo-specific validation commands from package scripts, test config, Makefiles, CI config, or docs. Do not default to `pnpm` unless the repo actually uses it.154- Do not hand off `NOT READY` issues as if they were executable.155- Keep recommendations actionable; avoid vague prioritization.156- Keep handoff blocks self-contained enough for another coding agent to start without rereading this analysis.157- If uncertain, state assumptions and what evidence is missing.