一键导入
issue-triage
Scan project repositories for GitHub issues, categorize them, flag stale items, and cross-reference with workspace tracking.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scan project repositories for GitHub issues, categorize them, flag stale items, and cross-reference with workspace tracking.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Lead reviewer that orchestrates specialist sub-reviews (static analysis, governance, plan drift, adversarial) to evaluate a PR. Scales review depth to change risk. Produces a unified structured report.
Claude Code only — create or enter the worktree for an issue/skill and switch the session into it via the native EnterWorktree tool. Wraps worktree_create.sh / worktree_enter.sh so all project policy (issue checks, branch naming, skill allowlist, --plan-file draft PR, --workflow scaffolding) still applies.
Evaluate PR review comments (human and bot) against local code, principles, and ADRs. Includes CI check status. Classifies each as valid or false positive and presents a fix plan.
Generate a principles-aware work plan for an issue. Saves to `.agent/work-plans/` in the repo that owns the issue and commits as the first step on the feature branch.
Read ROADMAP.md files, cross-reference with GitHub issues, detect staleness, and suggest prioritized next work.
Independent evaluation of a committed work plan before implementation begins. Checks scope, approach, principle alignment, consequences, and ROS conventions.
| name | issue-triage |
| description | Scan project repositories for GitHub issues, categorize them, flag stale items, and cross-reference with workspace tracking. |
/issue-triage [--repo <repo-name>] [--stale-days <N>]
Without --repo, scans all tracked repositories. Default stale threshold is
90 days.
Lifecycle position: Utility/periodic — run to get a cross-repo view of open issues, identify stale items, and ensure nothing is falling through the cracks.
Scans project repositories for open GitHub issues using gh CLI, categorizes
them by type and priority, flags stale issues, and cross-references with
workspace-level tracking.
python3 .agent/scripts/list_repos.py
This outputs a JSON list of {name, url, version, source_file} for all tracked repos.
Parse the owner/repo from each URL.
If --repo was specified, filter to just that repository.
For each repository, fetch issues via gh (needed for labels, timestamps,
assignees used in categorization). git-bug can provide a quick offline count
but lacks these fields.
# Primary: gh (provides number, title, labels, timestamps, assignees, URLs)
gh issue list --repo <owner/repo> --state open --json number,title,labels,createdAt,updatedAt,url,assignees --limit 100
# Optional: git-bug for offline issue count (when gh is unavailable)
# Note: git-bug output lacks labels, timestamps, and URLs — use only for counts
if ! command -v gh &>/dev/null && command -v git-bug &>/dev/null \
&& git bug bridge 2>/dev/null | grep -q github; then
git bug bug status:open | wc -l # count only
fi
Collect all results into a unified list with the repo name attached.
Classify each issue by type based on labels and title keywords:
| Category | Indicators |
|---|---|
| Bug | bug label, "fix", "crash", "error" in title |
| Enhancement | enhancement label, "add", "improve", "support" in title |
| Documentation | documentation label, "doc", "readme" in title |
| Test | test label, "test", "coverage" in title |
| Infrastructure | ci, build, infra labels |
| Uncategorized | No matching indicators |
An issue is stale if:
updatedAt is more than <stale-days> days ago (default: 90)The updatedAt field already reflects all activity (comments, label changes,
assignments), so no separate comment check is needed.
Check whether issues are being tracked in the workspace:
# Check for existing worktrees or branches referencing the issue
git branch --list "feature/issue-<N>" "feature/ISSUE-<N>-*" 2>/dev/null
Also check if the issue number appears in any open PRs:
ISSUE_NUM=<N>
gh pr list --repo <workspace-repo> --state open --json title,url --jq ".[] | select(.title | test(\"\\b${ISSUE_NUM}\\b\"))"
## Issue Triage Report
**Scanned**: <N> repositories
**Total open issues**: <N>
**Stale issues**: <N> (> <stale-days> days without update)
### By Repository
#### <repo-name>
| # | Title | Category | Age | Stale | Tracked |
|---|-------|----------|-----|-------|---------|
| <N> | <title> | Bug/Enhancement/... | <days> days | Yes/No | Yes/No |
### Summary by Category
| Category | Count |
|----------|-------|
| Bug | <N> |
| Enhancement | <N> |
| ... | ... |
### Stale Issues (Action Needed)
| Repo | # | Title | Last Updated | Suggestion |
|------|---|-------|--------------|------------|
| <repo> | <N> | <title> | <date> | Close / Assign / Update |
### Untracked Issues
Issues not referenced in any workspace branch or PR:
| Repo | # | Title | Category |
|------|---|-------|----------|
| <repo> | <N> | <title> | <category> |
gh CLI — all GitHub queries go through gh, not the API directly.--repo flag helps focus on one repo at a time.