一键导入
backlog-review
Triage open issues for staleness, duplicates, missing context, and mis-labels; post review comments without mutating issue state.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Triage open issues for staleness, duplicates, missing context, and mis-labels; post review comments without mutating issue state.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Research a work item, draft an implementation plan, and begin work after approval.
Guided one-shot install — discover installed plugins (or help install new ones), pick install scope, calibrate risk tolerance into a concrete allowlist + hooks, scaffold or merge CLAUDE.md, and sanity-check the result.
Finalize work — commit via /commit, push, and create PRs on feature branches.
Reviewer-side PR workflow — checks out the branch in a worktree, runs focus-area reviews plus a senior-engineering pass, optionally cross-checks against an autonomous reviewer, and posts inline findings only on explicit approval. Read-only — never edits, commits, or pushes.
Fetch PR review comments, classify by severity and confidence, and fix the selected subset.
Triage CVE and SBOM scanner output (Trivy, Grype, Snyk, Docker Scout, Dependabot) into a ranked, deduplicated action list.
| name | backlog-review |
| description | Triage open issues for staleness, duplicates, missing context, and mis-labels; post review comments without mutating issue state. |
| user-invocable | true |
| disable-model-invocation | true |
| allowed-tools | Read, Grep, Glob, Bash, Agent, AskUserQuestion |
| argument-hint | ["optional natural-language filter","e.g. \"updated in the last week\" or \"label:bug\""] |
Triage the open-issue backlog: classify into Stale, Duplicate candidate, Unclear, Mis-labeled, and Healthy buckets, present a dashboard, and optionally post canonical triage comments on flagged issues.
Read-and-comment only. This skill never closes issues, edits issue bodies, changes labels, or modifies assignees. Mutating actions belong to the user or /improve-issues.
/backlog-review — prompts for scope (label, age, milestone) via AskUserQuestion./backlog-review <natural-language filter> — parses the filter from the argument. Examples:
/backlog-review issues updated in the last week/backlog-review label:bug/backlog-review milestone:v2/backlog-review assignee:none label:enhancementAnything the parser can't resolve falls back to AskUserQuestion rather than guessing.
If an argument is present, parse it into a concrete gh issue list query:
| Phrase | Query fragment |
|---|---|
label:<name> or --label <name> | --label "<name>" |
milestone:<name> | --milestone "<name>" |
assignee:none / assignee:@me / assignee:<login> | --assignee "<value>" |
updated in the last <N> <unit> | --search "updated:>$(date offset)" |
created in the last <N> <unit> | --search "created:>$(date offset)" |
older than <N> <unit> | --search "updated:<$(date offset)" |
If no argument is present, ask via AskUserQuestion (single call, multiple questions):
gh label list; "any" allowed.gh api repos/{owner}/{repo}/milestones --jq '.[].title'; "any" allowed.Echo the resolved filter back to the user before fetching.
gh issue list --state open \
--json number,title,body,labels,assignees,createdAt,updatedAt,comments,milestone,url \
--limit 100 \
<filter flags from Phase 1>
If the result is empty, print "No open issues match this scope." and stop.
If gh is not authenticated or the working directory is not a GitHub repo, report the error clearly and stop — do not fall back to local-only analysis (unlike /whats-next, this skill is meaningless without the issue list).
If 4 or more issues were fetched, dispatch one Agent per issue (subagent_type: "Explore", max 3 concurrent) to classify each issue into one of the buckets below. For < 4 issues, classify inline.
| Bucket | Condition |
|---|---|
| Stale | No updates in ≥ 8 weeks and no open PR linked from the issue or its branch refs |
| Duplicate candidate | Title or body has high overlap with another open issue (or a closed-in-the-last-30-days issue); cite the candidate |
| Unclear | Body < 200 chars or missing acceptance criteria / repro steps or title is vague ("fix the thing", "broken") |
| Mis-labeled | Label conflicts with content — e.g. labeled bug but reads as a feature ask; labeled priority: high but no activity in months |
| Healthy | Clear, recent, has acceptance criteria or actionable description, labels match content |
An issue can belong to at most one bucket. Priority order if multiple match: Duplicate → Unclear → Mis-labeled → Stale → Healthy.
For each non-healthy issue, generate a one-line recommendation:
Comment: still wanted? (no activity since <YYYY-MM>)Comment: looks like a duplicate of [#N](url)Comment: needs acceptance criteria + repro (or specifics)Recommend: re-label as <suggestion> via /improve-issuesAlways render issue references as markdown hyperlinks: [#N](https://github.com/<owner>/<repo>/issues/N). Repo URL comes from gh repo view --json url.
Use relative time in dashboards: 2w, 3mo, 1y (same convention as /project-status).
# Backlog Review — <repo name>
**Scope**: <resolved filter> | **Open issues in scope**: N
**Stale**: N | **Duplicate candidates**: N | **Unclear**: N | **Mis-labeled**: N | **Healthy**: N
## Stale
| Issue | Title | Age | Last updated | Labels | Recommendation |
|-------|-------|-----|--------------|--------|----------------|
| [#N](url) | <title> | 5mo | 2025-12-14 | bug, area: api | Comment: still wanted? |
## Duplicate candidates
| Issue | Title | Likely duplicate of | Recommendation |
|-------|-------|---------------------|----------------|
| [#N](url) | <title> | [#M](url) | Comment: looks like a duplicate of [#M](url) |
## Unclear / underspecified
| Issue | Title | Missing | Recommendation |
|-------|-------|---------|----------------|
| [#N](url) | <title> | Acceptance criteria, repro | Comment: needs acceptance criteria + repro |
## Mis-labeled
| Issue | Title | Current label | Suggested | Recommendation |
|-------|-------|---------------|-----------|----------------|
| [#N](url) | <title> | bug | enhancement | Recommend: re-label via /improve-issues |
## Healthy
N issues — listed by issue number only: [#A](url), [#B](url), [#C](url), …
Omit any section whose count is zero (replace with a single line: No stale issues found., etc.).
After building the dashboard, dispatch to the engineering-lead subagent with the bucketed issues. Ask it to rank which issues most deserve action now — by value, readiness, and cost of delay — and which can wait. Present its ranked shortlist as a "Recommended order of action" block beneath the dashboard. It advises on prioritization only; it does not replace the bucket classifications above or post anything.
Agent({
subagent_type: "engineering-lead",
description: "Prioritize backlog buckets",
prompt: "Here is a triaged backlog: <stale / duplicate / unclear / mis-labeled issues with titles, ages, and labels>. Rank the handful that most deserve action now versus later, by value, readiness, and cost of delay. For each, give a one-line rationale and the recommended action (close, groom, re-label, keep). Return a short ordered list."
})
For Stale / Duplicate / Unclear buckets, ask via AskUserQuestion:
Post triage comments? You can pick which buckets to act on.
Multi-select options: Stale (N issues) / Duplicate candidates (N) / Unclear (N) / None — just the dashboard.
For each bucket the user selects, post one comment per issue using the canonical marker (mirrors /improve-issues):
## Backlog Review
<!-- backlog-review automated comment; do not edit this line -->
<bucket-specific note>
Bucket-specific note templates:
No activity since <YYYY-MM> and no linked PR. Is this still wanted? Closing in a future triage pass if it stays quiet.This looks like a duplicate of [#M](url). Closing here once confirmed; please add any unique context to [#M](url) first.Triage notes: this issue is missing <specifics — e.g. acceptance criteria, reproduction steps, affected version>. A quick update would help anyone picking it up.Before posting, check for an existing backlog-review comment on the issue:
gh api repos/{owner}/{repo}/issues/{number}/comments \
--jq '[.[] | select(.body | contains("<!-- backlog-review automated comment"))]'
gh issue comment {number} --body "$(cat <<'EOF' ... EOF)".gh api -X PATCH repos/{owner}/{repo}/issues/comments/{id} to update it in place.Mis-labeled issues do not get an automated comment from this skill — re-labeling is a /improve-issues job. Surface them in the dashboard and recommend the hand-off.
After posting (or skipping) every selected comment, print a summary:
### Triage comments
| Issue | Bucket | Action |
|-------|--------|--------|
| [#N](url) | Stale | Posted new comment |
| [#M](url) | Unclear | Updated existing comment |
| [#K](url) | Stale | Already up to date — skipped |
After the dashboard (and optional comment pass), ask via AskUserQuestion:
What would you like to do next?
Options:
/improve-issues — list flagged issue numbers (Unclear + Mis-labeled) for the user to run /improve-issues <number> on.gh issue close, gh issue edit, gh issue lock, gh issue transfer, or any label/assignee/milestone mutation. The dashboard and comments are the only outputs.<!-- backlog-review automated comment; do not edit this line -->. Subsequent runs update in place rather than appending duplicates.gh call per Bash invocation. Mirror the repo's never-chain-git rule.2w, 3mo, 1y. Reserve absolute dates for the "Last updated" column./improve-issues.gh is unavailable, stop. This skill needs the GitHub API; do not fall back to local-only analysis.