[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F3070A1225TQTHWNH5SZ4Y":3,"skill-same:01M7F3070A1225TQTHWNH5SZ4Y":54},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":12,"updatedAt":33,"install":34,"resources":47},"01M7F3070A1225TQTHWNH5SZ4Y","pr-triage",null,"4-phase PR backlog management with audit, deep code review, validated comments, and optional worktree setup. Use when triaging pull requests, catching up on pending code reviews, or managing a backlog of open PRs. Args: 'all' to review all, PR numbers to focus (e.g. '42 57'), 'en'\u002F'fr' for language, no arg = audit only.","313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace","313DEVGRP","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F34762848?v=4","01M7F2M535Z5X8XGHYD8TDVAB3","A-RMS by 313DEVGRP","01M7F2M54CR0P3631F4YM0D014",0,"MIT","https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Fpr-triage\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: pr-triage\ndescription: \"4-phase PR backlog management with audit, deep code review, validated comments, and optional worktree setup. Use when triaging pull requests, catching up on pending code reviews, or managing a backlog of open PRs. Args: 'all' to review all, PR numbers to focus (e.g. '42 57'), 'en'\u002F'fr' for language, no arg = audit only.\"\nallowed-tools: Bash Read\neffort: medium\n---\n\n# PR triage\n\n4-phase workflow for maintainers: automated audit of all open PRs, opt-in deep review via parallel agents, validated comment posting, and optional worktree setup for local review.\n\n## When to use this skill\n\n| Skill | Usage | Output |\n|-------|-------|--------|\n| `\u002Fpr-triage` | Sort, review, and comment on a PR backlog | Triage table + reviews + posted comments |\n| `\u002Freview-pr` | Review a single PR in depth | Inline PR review |\n\n**Triggers**:\n- Manually: `\u002Fpr-triage` or `\u002Fpr-triage all` or `\u002Fpr-triage 42 57`\n- Proactively: when >5 PRs open without review, or stale PR >14 days detected\n\n---\n\n## Language\n\n- Check the argument passed to the skill\n- If `en` or `english` → tables and summary in English\n- If `fr`, `french`, or no argument → French (default)\n- Note: GitHub comments (Phase 3) are ALWAYS in English (international audience)\n\n---\n\n## Configuration\n\nThresholds used throughout the workflow. Edit to match your project:\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| `staleness_days` | 14 | Days without activity before flagging as stale |\n| `overlap_threshold` | 50% | Shared files % to flag as overlapping |\n| `cluster_min_prs` | 3 | Author PR count to trigger cluster suggestion |\n| `xl_cutoff_additions` | 1000 | Additions above which a PR is classified XL |\n| `xl_cutoff_files` | 10 | Changed files above which a PR is \"too large\" |\n\n---\n\n## Preconditions\n\n```bash\ngit rev-parse --is-inside-work-tree\ngh auth status\n```\n\nIf either fails, stop and explain what is missing.\n\n---\n\n## Phase 1: Audit (always executed)\n\n### Data Gathering (parallel commands)\n\n```bash\ngh repo view --json nameWithOwner -q .nameWithOwner\ngh pr list --state open --limit 50 \\\n  --json number,title,author,createdAt,updatedAt,additions,deletions,changedFiles,isDraft,mergeable,reviewDecision,statusCheckRollup,body\ngh api \"repos\u002F{owner}\u002F{repo}\u002Fcollaborators\" --jq '.[].login'\n```\n\n**Collaborators fallback**: if `gh api ...\u002Fcollaborators` returns 403\u002F404:\n```bash\ngh pr list --state merged --limit 10 --json author --jq '.[].author.login' | sort -u\n```\nIf still ambiguous, ask via `AskUserQuestion`.\n\nFor each PR, fetch reviews and changed files:\n\n```bash\ngh api \"repos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{num}\u002Freviews\" \\\n  --jq '[.[] | .user.login + \":\" + .state] | join(\", \")'\ngh pr view {num} --json files --jq '[.files[].path] | join(\",\")'\n```\n\n**Notes**: Fetching files requires 1 API call per PR; for 20+ PRs, prioritize overlap candidates. The `author` field is an object; always extract `.author.login`.\n\n### Analysis\n\n**Size classification**:\n| Label | Additions |\n|-------|-----------|\n| XS | \u003C 50 |\n| S | 50–200 |\n| M | 200–500 |\n| L | 500–1000 |\n| XL | > 1000 |\n\nSize format: `+{additions}\u002F-{deletions}, {files} files ({label})`\n\n**Detections**:\n- **Overlaps**: compare file lists across PRs; if >50% files in common → cross-reference\n- **Clusters**: author with 3+ open PRs → suggest review order (smallest first)\n- **Staleness**: no activity for >14 days → flag \"stale\"\n- **CI status**: via `statusCheckRollup` → `clean` \u002F `unstable` \u002F `dirty`\n- **Reviews**: approved \u002F changes_requested \u002F none\n\n**PR ↔ Issue linking**:\n- Scan each PR `body` for `fixes #N`, `closes #N`, `resolves #N` (case-insensitive)\n- If found, display in the table: `Fixes #42` in the Action\u002FStatus column\n\n**Categorization**:\n\n_Internal PRs_: author in collaborators list\n\n_External, Ready_: additions ≤ 1000 AND files ≤ 10 AND `mergeable` ≠ `CONFLICTING` AND CI clean\u002Funstable\n\n_External, Problematic_: any of:\n- additions > 1000 OR files > 10\n- OR `mergeable` == `CONFLICTING` (merge conflict)\n- OR CI dirty (statusCheckRollup contains failures)\n- OR overlap with another open PR (>50% shared files)\n\n### Output: Triage table\n\n```\n## Open PRs ({count})\n\n### Internal PRs\n| PR | Title | Size | CI | Status |\n| -- | ----- | ---- | -- | ------ |\n\n### External: Ready for Review\n| PR | Author | Title | Size | CI | Reviews | Action |\n| -- | ------ | ----- | ---- | -- | ------- | ------ |\n\n### External: Problematic\n| PR | Author | Title | Size | Problem | Recommended Action |\n| -- | ------ | ----- | ---- | ------- | ------------------ |\n\n### Summary\n- Quick wins: {XS\u002FS PRs ready to merge}\n- Risks: {overlaps, XL sizes, CI dirty}\n- Clusters: {authors with 3+ PRs}\n- Stale: {PRs with no activity >14d}\n- Overlaps: {PRs touching the same files}\n```\n\n0 PRs → display `No open PRs.` and stop.\n\n### Navigation post-phase 1\n\nAfter displaying the triage table, ask via `AskUserQuestion`:\n\n```\nquestion: \"What would you like to do next?\"\nheader: \"Next Step\"\noptions:\n  - label: \"Phase 2: Deep review\"\n    description: \"Analyze selected PRs with code-reviewer agents and generate comment drafts\"\n  - label: \"Phase 4: Create worktrees\"\n    description: \"Set up local worktrees for hands-on review (skips comment generation)\"\n  - label: \"Done\"\n    description: \"End the workflow here\"\n```\n\nNote: Phase 3 (posting comments) is NOT offered here, as it requires the drafts generated in Phase 2. If the user picks \"Phase 4\", Phase 2 → Phase 3 remains accessible afterward.\n\n### Automatic copy\n\nAfter displaying the triage table, copy to clipboard using platform-appropriate command:\n\n```bash\nUNAME=$(uname -s)\nif [ \"$UNAME\" = \"Darwin\" ]; then\n  pbcopy \u003C\u003C'EOF'\n{full triage table}\nEOF\nelif command -v xclip &>\u002Fdev\u002Fnull; then\n  echo \"{full triage table}\" | xclip -selection clipboard\nelif command -v wl-copy &>\u002Fdev\u002Fnull; then\n  echo \"{full triage table}\" | wl-copy\nelif command -v clip.exe &>\u002Fdev\u002Fnull; then\n  echo \"{full triage table}\" | clip.exe\nfi\n```\n\nConfirm: `Triage table copied to clipboard.` (EN) \u002F `Tableau copié dans le presse-papier.` (FR)\n\n---\n\n## Phase 2: Deep Review (opt-in)\n\n### PR selection\n\n**If argument passed**:\n- `\"all\"` → all external PRs\n- Numbers (`\"42 57\"`) → only those PRs\n- No argument → propose via `AskUserQuestion`\n\n**If no argument**, display:\n\n```\nquestion: \"Which PRs do you want to review in depth?\"\nheader: \"Deep Review\"\nmultiSelect: true\noptions:\n  - label: \"All external\"\n    description: \"Review {N} external PRs with parallel code-reviewer agents\"\n  - label: \"Problematic only\"\n    description: \"Focus on {M} risky PRs (CI dirty, too large, overlaps)\"\n  - label: \"Ready only\"\n    description: \"Review {K} PRs ready to merge\"\n  - label: \"Skip\"\n    description: \"Stop here, audit only\"\n```\n\n**Draft PR behavior**:\n- Draft PRs are EXCLUDED from \"All external\" and \"Ready only\"\n- Draft PRs are INCLUDED in \"Problematic only\" (they need attention)\n- To review a draft: type its number explicitly (e.g. `42`)\n\nIf \"Skip\" → end workflow.\n\n### Executing reviews\n\nFor each selected PR, launch a `code-reviewer` agent via **Task tool in parallel**:\n\n```\nsubagent_type: code-reviewer\nmodel: sonnet\nprompt: |\n  Review PR #{num}: \"{title}\" by @{author}\n\n  **Metadata**: +{additions}\u002F-{deletions}, {changedFiles} files ({size_label})\n  **CI**: {ci_status} | **Reviews**: {existing_reviews} | **Draft**: {isDraft}\n\n  **PR Body**:\n  {body}\n\n  **Diff**:\n  {gh pr diff {num} output}\n\n  Apply your security and architecture expertise. Use the project-specific checklist\n  from the SKILL.md Configuration section if available.\n\n  Return structured review:\n  ### Critical Issues\n  ### Important Issues\n  ### Suggestions\n  ### What's Good\n\n  Be specific: quote file:line, explain the issue, suggest the fix.\n```\n\n**Fallback if parallel agents unavailable**: run reviews sequentially, one PR at a time. Notify user: `Running sequential review (parallel agents not available).`\n\nFetch diff via:\n```bash\ngh pr diff {num}\ngh pr view {num} --json body,title,author -q '{body: .body, title: .title, author: .author.login}'\n```\n\nAggregate all reports. Display a summary after all reviews complete.\n\n---\n\n## Phase 3: Comments (mandatory validation)\n\n### Draft generation\n\nFor each reviewed PR, generate a GitHub comment using the template `templates\u002Freview-comment.md`.\n\n**Rules**:\n- Language: **English** (international audience)\n- Tone: professional, constructive, factual\n- Always include at least 1 positive point\n- Quote code lines when relevant (format `file:42`)\n\n### Display and validation\n\n**Display ALL drafted comments** in format:\n\n```\n---\n### Draft: PR #{num}: {title}\n\n{full comment}\n\n---\n```\n\nThen request validation via `AskUserQuestion`:\n\n```\nquestion: \"These comments are ready. Which ones do you want to post?\"\nheader: \"Post Comments\"\nmultiSelect: true\noptions:\n  - label: \"All ({N} comments)\"\n    description: \"Post on all reviewed PRs\"\n  - label: \"PR #{x}: {title_truncated}\"\n    description: \"Post only on this PR\"\n  - label: \"None\"\n    description: \"Cancel, post nothing\"\n```\n\n(Generate one option per PR + \"All\" + \"None\")\n\n### Posting\n\nFor each validated comment:\n\n```bash\ngh pr comment {num} --body-file - \u003C\u003C'REVIEW_EOF'\n{comment}\nREVIEW_EOF\n```\n\nConfirm each post: `Comment posted on PR #{num}: {title}`\n\nIf \"None\" → `No comments posted. Workflow complete.`\n\n---\n\n## Project-specific checklist\n\nAdd your stack's checklist to the agent prompt in Phase 2. Examples by stack:\n\n**Node.js \u002F TypeScript**:\n- No `any` type without explicit justification\n- `async\u002Fawait` error handling (try\u002Fcatch or `.catch()`)\n- No unhandled promise rejections\n- Input validation at API boundaries\n\n**Python**:\n- Type hints on all public functions\n- Exception specificity (no bare `except:`)\n- Resource cleanup (`with` statements, context managers)\n- No mutable default arguments\n\n**Rust**:\n- `Result\u003CT, E>` with `.context()` for error chain (no `.unwrap()` in production code)\n- No `clone()` on hot paths without justification\n- `lazy_static!` or `once_cell` for static regex\n- Lifetime annotations where ownership is non-obvious\n\n**Go**:\n- Explicit error handling (no `_` discard without comment)\n- `defer` for resource cleanup\n- Context propagation in concurrent code\n- No goroutine leaks\n\n**Generic** (stack-agnostic):\n- No secrets or hardcoded credentials\n- New public functions have tests\n- Breaking changes documented in PR body\n- Dependencies added have clear justification\n\n---\n\n---\n\n## Phase 4: Worktree Setup (opt-in)\n\nCreates local git worktrees for each selected PR so you can run, test, or review code without switching branches.\n\n**Never triggered automatically.** Only via Phase 1 navigation or explicit user request.\n\n### Step 4.1: Cache check + PR list\n\n**Cache check**: before using data from Phase 1, verify it is less than 30 minutes old:\n\n```bash\nCACHE_FILE=\"\u002Ftmp\u002Fpr-triage-prs.json\"\nCACHE_AGE=$(( $(date +%s) - $(stat -f %m \"$CACHE_FILE\" 2>\u002Fdev\u002Fnull || echo 0) ))\nif [ \"$CACHE_AGE\" -gt 1800 ]; then\n  echo \"STALE_CACHE\"\nfi\n```\n\nIf `STALE_CACHE` → re-run the Phase 1 data gathering before continuing.\n\n**Filter**: exclude Draft PRs and bot PRs (Dependabot, renovate, etc.):\n\n```bash\npython3 -c \"\nimport json\nprs = json.load(open('\u002Ftmp\u002Fpr-triage-prs.json'))\nfiltered = [\n  p for p in prs\n  if not p['isDraft']\n  and not any(bot in p['author']['login'].lower() for bot in ['dependabot', 'renovate', 'snyk'])\n]\nimport sys; json.dump(filtered, sys.stdout, indent=2)\n\" > \u002Ftmp\u002Fpr-triage-phase4.json\n```\n\nIf 0 PRs after filtering → display `No reviewable PRs available for worktree (all are drafts or bots).` + end Phase 4.\n\n**Display grouped by author** (use display name if available, fallback to login):\n\n```\n## PRs available for worktree (non-draft)\n\n### Alice Martin (@alice)\n  [1] #123: feat(auth): add OAuth2 support\n      Branch: feat\u002Foauth2  |  Size: M  |  CI: clean\n\n### Bob Chen (@bob)\n  [2] #456: fix(api): handle empty response\n      Branch: fix\u002Fempty-response  |  Size: S  |  CI: dirty ⚠️\n```\n\n### Step 4.2: Selection\n\nAsk via `AskUserQuestion` (multiSelect):\n\n```\nquestion: \"Which PRs do you want to create a worktree for?\"\nheader: \"Worktree Setup\"\nmultiSelect: true\noptions:\n  - label: \"All\"\n    description: \"Create worktrees for all {N} listed PRs\"\n  - label: \"[1] #{num}: {title} ({author})\"\n    description: \"Branch: {branch} | Size: {size} | CI: {ci}\"\n  - label: \"None\"\n    description: \"Cancel, return to menu\"\n```\n\nIf \"None\" → end Phase 4.\n\n### Step 4.3: Sequential creation\n\n**Execution model**: Claude runs **one bash command per PR**, reads its output, updates its internal state (created \u002F existing \u002F failed), then moves to the next. Never a bash loop wrapping all PRs.\n\nFor each selected PR, Claude sets variables explicitly then runs:\n\n```bash\nPR_NUM=\"123\"\nBRANCH_NAME=\"feat\u002Foauth2\"\nWORKTREE_NAME=\"${BRANCH_NAME\u002F\u002F\\\u002F\u002F-}\"\nREPO_ROOT=\"$(cd \"$(git rev-parse --git-common-dir)\u002F..\" && pwd)\"\nWORKTREE_DIR=\"$REPO_ROOT\u002F.worktrees\u002F$WORKTREE_NAME\"\n\n# Already exists?\nif [ -d \"$WORKTREE_DIR\" ]; then\n  echo \"STATUS:EXISTING:$PR_NUM:$WORKTREE_DIR\"\n  exit 0\nfi\n\n# .gitignore check (fail-fast)\nif ! grep -qE \"^\\.worktrees\u002F?$\" \"$REPO_ROOT\u002F.gitignore\" 2>\u002Fdev\u002Fnull; then\n  echo \"STATUS:GITIGNORE_MISSING:$PR_NUM\"\n  exit 1\nfi\n\n# Fetch remote branch\nif ! git fetch origin \"$BRANCH_NAME\" 2>\u002Ftmp\u002Fwt-fetch-$PR_NUM.log; then\n  echo \"STATUS:FETCH_FAILED:$PR_NUM\"\n  exit 1\nfi\n\nmkdir -p \"$REPO_ROOT\u002F.worktrees\"\n\n# Create worktree (branch local exists or not)\nif ! git branch --list \"$BRANCH_NAME\" | grep -q \"$BRANCH_NAME\"; then\n  git worktree add -b \"$BRANCH_NAME\" \"$WORKTREE_DIR\" \"origin\u002F$BRANCH_NAME\" \\\n    2>\u002Ftmp\u002Fwt-err-$PR_NUM.log\nelse\n  git worktree add \"$WORKTREE_DIR\" \"$BRANCH_NAME\" \\\n    2>\u002Ftmp\u002Fwt-err-$PR_NUM.log\nfi\n\nif [ $? -ne 0 ]; then\n  if grep -q \"already checked out\" \u002Ftmp\u002Fwt-err-$PR_NUM.log; then\n    echo \"STATUS:ALREADY_CHECKED_OUT:$PR_NUM\"\n  else\n    echo \"STATUS:CREATE_FAILED:$PR_NUM\"\n  fi\n  exit 1\nfi\n\n# Optional: symlink node_modules (Node.js projects, avoids reinstall)\n[ -d \"$REPO_ROOT\u002Fnode_modules\" ] && ln -sf \"$REPO_ROOT\u002Fnode_modules\" \"$WORKTREE_DIR\u002Fnode_modules\"\n\n# Copy project-specific files listed in .worktreeinclude (if present)\nif [ -f \"$REPO_ROOT\u002F.worktreeinclude\" ]; then\n  while IFS= read -r entry || [ -n \"$entry\" ]; do\n    [[ \"$entry\" =~ ^#.*$ || -z \"$entry\" ]] && continue\n    entry=\"$(echo \"$entry\" | xargs)\"\n    [ -e \"$REPO_ROOT\u002F$entry\" ] && {\n      mkdir -p \"$(dirname \"$WORKTREE_DIR\u002F$entry\")\"\n      cp -R \"$REPO_ROOT\u002F$entry\" \"$WORKTREE_DIR\u002F$entry\"\n    }\n  done \u003C \"$REPO_ROOT\u002F.worktreeinclude\"\nfi\n\necho \"STATUS:CREATED:$PR_NUM:$WORKTREE_DIR\"\n```\n\n**Status handling** (Claude maintains internal state between PRs):\n\n| Status | Claude action |\n|--------|--------------|\n| `STATUS:CREATED:NUM:PATH` | Add to \"created\" list |\n| `STATUS:EXISTING:NUM:PATH` | Add to \"existing\" list → offer pull in Step 4.4 |\n| `STATUS:FETCH_FAILED:NUM` | Warn + continue to next PR |\n| `STATUS:GITIGNORE_MISSING:NUM` | Fail-fast: show fix instructions + stop Phase 4 |\n| `STATUS:ALREADY_CHECKED_OUT:NUM` | Warn: \"Branch already checked out in another worktree. Run `git worktree list` to locate it.\" |\n| `STATUS:CREATE_FAILED:NUM` | Warn + continue to next PR |\n\n**GITIGNORE_MISSING fix instructions**:\n```\n.worktrees\u002F is not in .gitignore. Add it to avoid accidentally committing worktree files:\n  echo \".worktrees\u002F\" >> .gitignore\nThen re-run Phase 4.\n```\n\n### Step 4.4: Update existing worktrees\n\nIf any `STATUS:EXISTING` collected, offer a single prompt:\n\n```\nExisting worktrees detected:\n  PR #123: .worktrees\u002Ffeat-oauth2\n  PR #789: .worktrees\u002Ffix-session-leak\n\n- [Pull all] git pull --ff-only in all existing worktrees\n- [#123] Pull PR #123 only\n- [Skip] Leave as-is\n```\n\nFor each selected pull, Claude runs (one command per worktree):\n\n```bash\nPR_NUM=\"123\"\nBRANCH_NAME=\"feat\u002Foauth2\"\nWORKTREE_DIR=\"\u002Fabs\u002Fpath\u002F.worktrees\u002Ffeat-oauth2\"\n\ncd \"$WORKTREE_DIR\" && git pull origin \"$BRANCH_NAME\" --ff-only 2>\u002Ftmp\u002Fwt-pull-$PR_NUM.log\necho \"PULL_STATUS:$?:$PR_NUM\"\n```\n\nIf `PULL_STATUS` ≠ 0:\n```\n⚠️ PR #123: --ff-only failed (branches have diverged)\n   Manual fix: cd .worktrees\u002Ffeat-oauth2 && git pull --rebase\n```\n\n### Step 4.5: Summary\n\n```\n## Worktrees ready\n\n| PR | Author | Branch | Path | Status |\n|----|--------|--------|------|--------|\n| #123 | Alice | feat\u002Foauth2 | .worktrees\u002Ffeat-oauth2 | Created |\n| #456 | Bob | fix\u002Fempty-response | .worktrees\u002Ffix-empty-response | Created |\n| #789 | Alice | fix\u002Fsession-leak | .worktrees\u002Ffix-session-leak | Updated (pull) |\n| #321 | Carol | feat\u002Fchat | .worktrees\u002Ffeat-chat | Fetch failed ⚠️ |\n\nNote: if a PR modifies package.json, install dependencies manually:\n  cd .worktrees\u002F\u003Cbranch-name> && npm install   # or pnpm\u002Fyarn\u002Fbun\n\nNext steps:\n  cd .worktrees\u002F\u003Cbranch-name>\n  claude\n```\n\n### `.worktreeinclude` convention\n\nCreate a `.worktreeinclude` file at the repo root to list files Phase 4 copies into each new worktree. Useful for local config files not tracked in git:\n\n```\n# .worktreeinclude\n.env.local\n.env.test\nconfig\u002Flocal.json\n```\n\n---\n\n## Edge cases\n\n| Situation | Behavior |\n|-----------|----------|\n| 0 open PRs | Display `No open PRs.` + stop |\n| Draft PR | Show in table, skip for review unless explicitly selected |\n| Unknown CI | Display `?` in CI column |\n| Review agent timeout | Show partial error, continue with others |\n| `gh pr diff` empty | Skip this PR, notify user |\n| Very large PR (>5000 additions) | Warn: \"Partial review, diff truncated\" |\n| Collaborators API 403\u002F404 | Fallback to last 10 merged PR authors |\n| Parallel agents unavailable | Run sequential reviews, notify user |\n| Phase 4: `.gitignore` missing `.worktrees\u002F` | Fail-fast, show fix instructions, stop Phase 4 |\n| Phase 4: branch already checked out | Warn with `git worktree list` hint, skip this PR |\n| Phase 4: stale cache (>30min) | Re-fetch PR list before creating worktrees |\n| Phase 4: PR modifies `package.json` | Warn in summary to run install manually |\n| Phase 4: 0 non-draft PRs | Display message + end Phase 4 |\n\n---\n\n## Notes\n\n- Always derive owner\u002Frepo via `gh repo view`, never hardcode\n- Use `gh` CLI (not `curl` GitHub API) except for collaborators list\n- `statusCheckRollup` can be null → treat as `?`\n- `mergeable` can be `MERGEABLE`, `CONFLICTING`, or `UNKNOWN` → treat `UNKNOWN` as `?`\n- Never post without explicit user validation in chat\n- Drafted comments must be visible BEFORE any `gh pr comment`\n\n---\n\n## Related: \u002Freview-pr\n\n| | `\u002Fpr-triage` | `\u002Freview-pr` |\n|--|-------------|--------------|\n| **Scope** | Full PR backlog | Single PR |\n| **Use when** | Catching up after accumulation, periodic triage | Reviewing a specific incoming PR |\n| **Phases** | 4 (audit + deep review + comments + worktrees) | 1 (review only) |\n| **Agents** | Parallel sub-agents per PR | Single session |\n| **Output** | Triage table + review reports + GitHub comments + local worktrees | Inline review |\n| **Validation** | AskUserQuestion before posting | Manual decision |\n\n**Decision rule**: use `\u002Fpr-triage` for backlog triage (5+ PRs), `\u002Freview-pr` for focused review of a single PR. Use Phase 4 when you want to run the code locally rather than just reading the diff.\n","# PR triage\n\n4-phase workflow for maintainers: automated audit of all open PRs, opt-in deep review via parallel agents, validated comment posting, and optional worktree setup for local review.\n\n## When to use this skill\n\n| Skill | Usage | Output |\n|-------|-------|--------|\n| `\u002Fpr-triage` | Sort, review, and comment on a PR backlog | Triage table + reviews + posted comments |\n| `\u002Freview-pr` | Review a single PR in depth | Inline PR review |\n\n**Triggers**:\n- Manually: `\u002Fpr-triage` or `\u002Fpr-triage all` or `\u002Fpr-triage 42 57`\n- Proactively: when >5 PRs open without review, or stale PR >14 days detected\n\n---\n\n## Language\n\n- Check the argument passed to the skill\n- If `en` or `english` → tables and summary in English\n- If `fr`, `french`, or no argument → French (default)\n- Note: GitHub comments (Phase 3) are ALWAYS in English (international audience)\n\n---\n\n## Configuration\n\nThresholds used throughout the workflow. Edit to match your project:\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| `staleness_days` | 14 | Days without activity before flagging as stale |\n| `overlap_threshold` | 50% | Shared files % to flag as overlapping |\n| `cluster_min_prs` | 3 | Author PR count to trigger cluster suggestion |\n| `xl_cutoff_additions` | 1000 | Additions above which a PR is classified XL |\n| `xl_cutoff_files` | 10 | Changed files above which a PR is \"too large\" |\n\n---\n\n## Preconditions\n\n```bash\ngit rev-parse --is-inside-work-tree\ngh auth status\n```\n\nIf either fails, stop and explain what is missing.\n\n---\n\n## Phase 1: Audit (always executed)\n\n### Data Gathering (parallel commands)\n\n```bash\ngh repo view --json nameWithOwner -q .nameWithOwner\ngh pr list --state open --limit 50 \\\n  --json number,title,author,createdAt,updatedAt,additions,deletions,changedFiles,isDraft,mergeable,reviewDecision,statusCheckRollup,body\ngh api \"repos\u002F{owner}\u002F{repo}\u002Fcollaborators\" --jq '.[].login'\n```\n\n**Collaborators fallback**: if `gh api ...\u002Fcollaborators` returns 403\u002F404:\n```bash\ngh pr list --state merged --limit 10 --json author --jq '.[].author.login' | sort -u\n```\nIf still ambiguous, ask via `AskUserQuestion`.\n\nFor each PR, fetch reviews and changed files:\n\n```bash\ngh api \"repos\u002F{owner}\u002F{repo}\u002Fpulls\u002F{num}\u002Freviews\" \\\n  --jq '[.[] | .user.login + \":\" + .state] | join(\", \")'\ngh pr view {num} --json files --jq '[.files[].path] | join(\",\")'\n```\n\n**Notes**: Fetching files requires 1 API call per PR; for 20+ PRs, prioritize overlap candidates. The `author` field is an object; always extract `.author.login`.\n\n### Analysis\n\n**Size classification**:\n| Label | Additions |\n|-------|-----------|\n| XS | \u003C 50 |\n| S | 50–200 |\n| M | 200–500 |\n| L | 500–1000 |\n| XL | > 1000 |\n\nSize format: `+{additions}\u002F-{deletions}, {files} files ({label})`\n\n**Detections**:\n- **Overlaps**: compare file lists across PRs; if >50% files in common → cross-reference\n- **Clusters**: author with 3+ open PRs → suggest review order (smallest first)\n- **Staleness**: no activity for >14 days → flag \"stale\"\n- **CI status**: via `statusCheckRollup` → `clean` \u002F `unstable` \u002F `dirty`\n- **Reviews**: approved \u002F changes_requested \u002F none\n\n**PR ↔ Issue linking**:\n- Scan each PR `body` for `fixes #N`, `closes #N`, `resolves #N` (case-insensitive)\n- If found, display in the table: `Fixes #42` in the Action\u002FStatus column\n\n**Categorization**:\n\n_Internal PRs_: author in collaborators list\n\n_External, Ready_: additions ≤ 1000 AND files ≤ 10 AND `mergeable` ≠ `CONFLICTING` AND CI clean\u002Funstable\n\n_External, Problematic_: any of:\n- additions > 1000 OR files > 10\n- OR `mergeable` == `CONFLICTING` (merge conflict)\n- OR CI dirty (statusCheckRollup contains failures)\n- OR overlap with another open PR (>50% shared files)\n\n### Output: Triage table\n\n```\n## Open PRs ({count})\n\n### Internal PRs\n| PR | Title | Size | CI | Status |\n| -- | ----- | ---- | -- | ------ |\n\n### External: Ready for Review\n| PR | Author | Title | Size | CI | Reviews | Action |\n| -- | ------ | ----- | ---- | -- | ------- | ------ |\n\n### External: Problematic\n| PR | Author | Title | Size | Problem | Recommended Action |\n| -- | ------ | ----- | ---- | ------- | ------------------ |\n\n### Summary\n- Quick wins: {XS\u002FS PRs ready to merge}\n- Risks: {overlaps, XL sizes, CI dirty}\n- Clusters: {authors with 3+ PRs}\n- Stale: {PRs with no activity >14d}\n- Overlaps: {PRs touching the same files}\n```\n\n0 PRs → display `No open PRs.` and stop.\n\n### Navigation post-phase 1\n\nAfter displaying the triage table, ask via `AskUserQuestion`:\n\n```\nquestion: \"What would you like to do next?\"\nheader: \"Next Step\"\noptions:\n  - label: \"Phase 2: Deep review\"\n    description: \"Analyze selected PRs with code-reviewer agents and generate comment drafts\"\n  - label: \"Phase 4: Create worktrees\"\n    description: \"Set up local worktrees for hands-on review (skips comment generation)\"\n  - label: \"Done\"\n    description: \"End the workflow here\"\n```\n\nNote: Phase 3 (posting comments) is NOT offered here, as it requires the drafts generated in Phase 2. If the user picks \"Phase 4\", Phase 2 → Phase 3 remains accessible afterward.\n\n### Automatic copy\n\nAfter displaying the triage table, copy to clipboard using platform-appropriate command:\n\n```bash\nUNAME=$(uname -s)\nif [ \"$UNAME\" = \"Darwin\" ]; then\n  pbcopy \u003C\u003C'EOF'\n{full triage table}\nEOF\nelif command -v xclip &>\u002Fdev\u002Fnull; then\n  echo \"{full triage table}\" | xclip -selection clipboard\nelif command -v wl-copy &>\u002Fdev\u002Fnull; then\n  echo \"{full triage table}\" | wl-copy\nelif command -v clip.exe &>\u002Fdev\u002Fnull; then\n  echo \"{full triage table}\" | clip.exe\nfi\n```\n\nConfirm: `Triage table copied to clipboard.` (EN) \u002F `Tableau copié dans le presse-papier.` (FR)\n\n---\n\n## Phase 2: Deep Review (opt-in)\n\n### PR selection\n\n**If argument passed**:\n- `\"all\"` → all external PRs\n- Numbers (`\"42 57\"`) → only those PRs\n- No argument → propose via `AskUserQuestion`\n\n**If no argument**, display:\n\n```\nquestion: \"Which PRs do you want to review in depth?\"\nheader: \"Deep Review\"\nmultiSelect: true\noptions:\n  - label: \"All external\"\n    description: \"Review {N} external PRs with parallel code-reviewer agents\"\n  - label: \"Problematic only\"\n    description: \"Focus on {M} risky PRs (CI dirty, too large, overlaps)\"\n  - label: \"Ready only\"\n    description: \"Review {K} PRs ready to merge\"\n  - label: \"Skip\"\n    description: \"Stop here, audit only\"\n```\n\n**Draft PR behavior**:\n- Draft PRs are EXCLUDED from \"All external\" and \"Ready only\"\n- Draft PRs are INCLUDED in \"Problematic only\" (they need attention)\n- To review a draft: type its number explicitly (e.g. `42`)\n\nIf \"Skip\" → end workflow.\n\n### Executing reviews\n\nFor each selected PR, launch a `code-reviewer` agent via **Task tool in parallel**:\n\n```\nsubagent_type: code-reviewer\nmodel: sonnet\nprompt: |\n  Review PR #{num}: \"{title}\" by @{author}\n\n  **Metadata**: +{additions}\u002F-{deletions}, {changedFiles} files ({size_label})\n  **CI**: {ci_status} | **Reviews**: {existing_reviews} | **Draft**: {isDraft}\n\n  **PR Body**:\n  {body}\n\n  **Diff**:\n  {gh pr diff {num} output}\n\n  Apply your security and architecture expertise. Use the project-specific checklist\n  from the SKILL.md Configuration section if available.\n\n  Return structured review:\n  ### Critical Issues\n  ### Important Issues\n  ### Suggestions\n  ### What's Good\n\n  Be specific: quote file:line, explain the issue, suggest the fix.\n```\n\n**Fallback if parallel agents unavailable**: run reviews sequentially, one PR at a time. Notify user: `Running sequential review (parallel agents not available).`\n\nFetch diff via:\n```bash\ngh pr diff {num}\ngh pr view {num} --json body,title,author -q '{body: .body, title: .title, author: .author.login}'\n```\n\nAggregate all reports. Display a summary after all reviews complete.\n\n---\n\n## Phase 3: Comments (mandatory validation)\n\n### Draft generation\n\nFor each reviewed PR, generate a GitHub comment using the template `templates\u002Freview-comment.md`.\n\n**Rules**:\n- Language: **English** (international audience)\n- Tone: professional, constructive, factual\n- Always include at least 1 positive point\n- Quote code lines when relevant (format `file:42`)\n\n### Display and validation\n\n**Display ALL drafted comments** in format:\n\n```\n---\n### Draft: PR #{num}: {title}\n\n{full comment}\n\n---\n```\n\nThen request validation via `AskUserQuestion`:\n\n```\nquestion: \"These comments are ready. Which ones do you want to post?\"\nheader: \"Post Comments\"\nmultiSelect: true\noptions:\n  - label: \"All ({N} comments)\"\n    description: \"Post on all reviewed PRs\"\n  - label: \"PR #{x}: {title_truncated}\"\n    description: \"Post only on this PR\"\n  - label: \"None\"\n    description: \"Cancel, post nothing\"\n```\n\n(Generate one option per PR + \"All\" + \"None\")\n\n### Posting\n\nFor each validated comment:\n\n```bash\ngh pr comment {num} --body-file - \u003C\u003C'REVIEW_EOF'\n{comment}\nREVIEW_EOF\n```\n\nConfirm each post: `Comment posted on PR #{num}: {title}`\n\nIf \"None\" → `No comments posted. Workflow complete.`\n\n---\n\n## Project-specific checklist\n\nAdd your stack's checklist to the agent prompt in Phase 2. Examples by stack:\n\n**Node.js \u002F TypeScript**:\n- No `any` type without explicit justification\n- `async\u002Fawait` error handling (try\u002Fcatch or `.catch()`)\n- No unhandled promise rejections\n- Input validation at API boundaries\n\n**Python**:\n- Type hints on all public functions\n- Exception specificity (no bare `except:`)\n- Resource cleanup (`with` statements, context managers)\n- No mutable default arguments\n\n**Rust**:\n- `Result\u003CT, E>` with `.context()` for error chain (no `.unwrap()` in production code)\n- No `clone()` on hot paths without justification\n- `lazy_static!` or `once_cell` for static regex\n- Lifetime annotations where ownership is non-obvious\n\n**Go**:\n- Explicit error handling (no `_` discard without comment)\n- `defer` for resource cleanup\n- Context propagation in concurrent code\n- No goroutine leaks\n\n**Generic** (stack-agnostic):\n- No secrets or hardcoded credentials\n- New public functions have tests\n- Breaking changes documented in PR body\n- Dependencies added have clear justification\n\n---\n\n---\n\n## Phase 4: Worktree Setup (opt-in)\n\nCreates local git worktrees for each selected PR so you can run, test, or review code without switching branches.\n\n**Never triggered automatically.** Only via Phase 1 navigation or explicit user request.\n\n### Step 4.1: Cache check + PR list\n\n**Cache check**: before using data from Phase 1, verify it is less than 30 minutes old:\n\n```bash\nCACHE_FILE=\"\u002Ftmp\u002Fpr-triage-prs.json\"\nCACHE_AGE=$(( $(date +%s) - $(stat -f %m \"$CACHE_FILE\" 2>\u002Fdev\u002Fnull || echo 0) ))\nif [ \"$CACHE_AGE\" -gt 1800 ]; then\n  echo \"STALE_CACHE\"\nfi\n```\n\nIf `STALE_CACHE` → re-run the Phase 1 data gathering before continuing.\n\n**Filter**: exclude Draft PRs and bot PRs (Dependabot, renovate, etc.):\n\n```bash\npython3 -c \"\nimport json\nprs = json.load(open('\u002Ftmp\u002Fpr-triage-prs.json'))\nfiltered = [\n  p for p in prs\n  if not p['isDraft']\n  and not any(bot in p['author']['login'].lower() for bot in ['dependabot', 'renovate', 'snyk'])\n]\nimport sys; json.dump(filtered, sys.stdout, indent=2)\n\" > \u002Ftmp\u002Fpr-triage-phase4.json\n```\n\nIf 0 PRs after filtering → display `No reviewable PRs available for worktree (all are drafts or bots).` + end Phase 4.\n\n**Display grouped by author** (use display name if available, fallback to login):\n\n```\n## PRs available for worktree (non-draft)\n\n### Alice Martin (@alice)\n  [1] #123: feat(auth): add OAuth2 support\n      Branch: feat\u002Foauth2  |  Size: M  |  CI: clean\n\n### Bob Chen (@bob)\n  [2] #456: fix(api): handle empty response\n      Branch: fix\u002Fempty-response  |  Size: S  |  CI: dirty ⚠️\n```\n\n### Step 4.2: Selection\n\nAsk via `AskUserQuestion` (multiSelect):\n\n```\nquestion: \"Which PRs do you want to create a worktree for?\"\nheader: \"Worktree Setup\"\nmultiSelect: true\noptions:\n  - label: \"All\"\n    description: \"Create worktrees for all {N} listed PRs\"\n  - label: \"[1] #{num}: {title} ({author})\"\n    description: \"Branch: {branch} | Size: {size} | CI: {ci}\"\n  - label: \"None\"\n    description: \"Cancel, return to menu\"\n```\n\nIf \"None\" → end Phase 4.\n\n### Step 4.3: Sequential creation\n\n**Execution model**: Claude runs **one bash command per PR**, reads its output, updates its internal state (created \u002F existing \u002F failed), then moves to the next. Never a bash loop wrapping all PRs.\n\nFor each selected PR, Claude sets variables explicitly then runs:\n\n```bash\nPR_NUM=\"123\"\nBRANCH_NAME=\"feat\u002Foauth2\"\nWORKTREE_NAME=\"${BRANCH_NAME\u002F\u002F\\\u002F\u002F-}\"\nREPO_ROOT=\"$(cd \"$(git rev-parse --git-common-dir)\u002F..\" && pwd)\"\nWORKTREE_DIR=\"$REPO_ROOT\u002F.worktrees\u002F$WORKTREE_NAME\"\n\n# Already exists?\nif [ -d \"$WORKTREE_DIR\" ]; then\n  echo \"STATUS:EXISTING:$PR_NUM:$WORKTREE_DIR\"\n  exit 0\nfi\n\n# .gitignore check (fail-fast)\nif ! grep -qE \"^\\.worktrees\u002F?$\" \"$REPO_ROOT\u002F.gitignore\" 2>\u002Fdev\u002Fnull; then\n  echo \"STATUS:GITIGNORE_MISSING:$PR_NUM\"\n  exit 1\nfi\n\n# Fetch remote branch\nif ! git fetch origin \"$BRANCH_NAME\" 2>\u002Ftmp\u002Fwt-fetch-$PR_NUM.log; then\n  echo \"STATUS:FETCH_FAILED:$PR_NUM\"\n  exit 1\nfi\n\nmkdir -p \"$REPO_ROOT\u002F.worktrees\"\n\n# Create worktree (branch local exists or not)\nif ! git branch --list \"$BRANCH_NAME\" | grep -q \"$BRANCH_NAME\"; then\n  git worktree add -b \"$BRANCH_NAME\" \"$WORKTREE_DIR\" \"origin\u002F$BRANCH_NAME\" \\\n    2>\u002Ftmp\u002Fwt-err-$PR_NUM.log\nelse\n  git worktree add \"$WORKTREE_DIR\" \"$BRANCH_NAME\" \\\n    2>\u002Ftmp\u002Fwt-err-$PR_NUM.log\nfi\n\nif [ $? -ne 0 ]; then\n  if grep -q \"already checked out\" \u002Ftmp\u002Fwt-err-$PR_NUM.log; then\n    echo \"STATUS:ALREADY_CHECKED_OUT:$PR_NUM\"\n  else\n    echo \"STATUS:CREATE_FAILED:$PR_NUM\"\n  fi\n  exit 1\nfi\n\n# Optional: symlink node_modules (Node.js projects, avoids reinstall)\n[ -d \"$REPO_ROOT\u002Fnode_modules\" ] && ln -sf \"$REPO_ROOT\u002Fnode_modules\" \"$WORKTREE_DIR\u002Fnode_modules\"\n\n# Copy project-specific files listed in .worktreeinclude (if present)\nif [ -f \"$REPO_ROOT\u002F.worktreeinclude\" ]; then\n  while IFS= read -r entry || [ -n \"$entry\" ]; do\n    [[ \"$entry\" =~ ^#.*$ || -z \"$entry\" ]] && continue\n    entry=\"$(echo \"$entry\" | xargs)\"\n    [ -e \"$REPO_ROOT\u002F$entry\" ] && {\n      mkdir -p \"$(dirname \"$WORKTREE_DIR\u002F$entry\")\"\n      cp -R \"$REPO_ROOT\u002F$entry\" \"$WORKTREE_DIR\u002F$entry\"\n    }\n  done \u003C \"$REPO_ROOT\u002F.worktreeinclude\"\nfi\n\necho \"STATUS:CREATED:$PR_NUM:$WORKTREE_DIR\"\n```\n\n**Status handling** (Claude maintains internal state between PRs):\n\n| Status | Claude action |\n|--------|--------------|\n| `STATUS:CREATED:NUM:PATH` | Add to \"created\" list |\n| `STATUS:EXISTING:NUM:PATH` | Add to \"existing\" list → offer pull in Step 4.4 |\n| `STATUS:FETCH_FAILED:NUM` | Warn + continue to next PR |\n| `STATUS:GITIGNORE_MISSING:NUM` | Fail-fast: show fix instructions + stop Phase 4 |\n| `STATUS:ALREADY_CHECKED_OUT:NUM` | Warn: \"Branch already checked out in another worktree. Run `git worktree list` to locate it.\" |\n| `STATUS:CREATE_FAILED:NUM` | Warn + continue to next PR |\n\n**GITIGNORE_MISSING fix instructions**:\n```\n.worktrees\u002F is not in .gitignore. Add it to avoid accidentally committing worktree files:\n  echo \".worktrees\u002F\" >> .gitignore\nThen re-run Phase 4.\n```\n\n### Step 4.4: Update existing worktrees\n\nIf any `STATUS:EXISTING` collected, offer a single prompt:\n\n```\nExisting worktrees detected:\n  PR #123: .worktrees\u002Ffeat-oauth2\n  PR #789: .worktrees\u002Ffix-session-leak\n\n- [Pull all] git pull --ff-only in all existing worktrees\n- [#123] Pull PR #123 only\n- [Skip] Leave as-is\n```\n\nFor each selected pull, Claude runs (one command per worktree):\n\n```bash\nPR_NUM=\"123\"\nBRANCH_NAME=\"feat\u002Foauth2\"\nWORKTREE_DIR=\"\u002Fabs\u002Fpath\u002F.worktrees\u002Ffeat-oauth2\"\n\ncd \"$WORKTREE_DIR\" && git pull origin \"$BRANCH_NAME\" --ff-only 2>\u002Ftmp\u002Fwt-pull-$PR_NUM.log\necho \"PULL_STATUS:$?:$PR_NUM\"\n```\n\nIf `PULL_STATUS` ≠ 0:\n```\n⚠️ PR #123: --ff-only failed (branches have diverged)\n   Manual fix: cd .worktrees\u002Ffeat-oauth2 && git pull --rebase\n```\n\n### Step 4.5: Summary\n\n```\n## Worktrees ready\n\n| PR | Author | Branch | Path | Status |\n|----|--------|--------|------|--------|\n| #123 | Alice | feat\u002Foauth2 | .worktrees\u002Ffeat-oauth2 | Created |\n| #456 | Bob | fix\u002Fempty-response | .worktrees\u002Ffix-empty-response | Created |\n| #789 | Alice | fix\u002Fsession-leak | .worktrees\u002Ffix-session-leak | Updated (pull) |\n| #321 | Carol | feat\u002Fchat | .worktrees\u002Ffeat-chat | Fetch failed ⚠️ |\n\nNote: if a PR modifies package.json, install dependencies manually:\n  cd .worktrees\u002F\u003Cbranch-name> && npm install   # or pnpm\u002Fyarn\u002Fbun\n\nNext steps:\n  cd .worktrees\u002F\u003Cbranch-name>\n  claude\n```\n\n### `.worktreeinclude` convention\n\nCreate a `.worktreeinclude` file at the repo root to list files Phase 4 copies into each new worktree. Useful for local config files not tracked in git:\n\n```\n# .worktreeinclude\n.env.local\n.env.test\nconfig\u002Flocal.json\n```\n\n---\n\n## Edge cases\n\n| Situation | Behavior |\n|-----------|----------|\n| 0 open PRs | Display `No open PRs.` + stop |\n| Draft PR | Show in table, skip for review unless explicitly selected |\n| Unknown CI | Display `?` in CI column |\n| Review agent timeout | Show partial error, continue with others |\n| `gh pr diff` empty | Skip this PR, notify user |\n| Very large PR (>5000 additions) | Warn: \"Partial review, diff truncated\" |\n| Collaborators API 403\u002F404 | Fallback to last 10 merged PR authors |\n| Parallel agents unavailable | Run sequential reviews, notify user |\n| Phase 4: `.gitignore` missing `.worktrees\u002F` | Fail-fast, show fix instructions, stop Phase 4 |\n| Phase 4: branch already checked out | Warn with `git worktree list` hint, skip this PR |\n| Phase 4: stale cache (>30min) | Re-fetch PR list before creating worktrees |\n| Phase 4: PR modifies `package.json` | Warn in summary to run install manually |\n| Phase 4: 0 non-draft PRs | Display message + end Phase 4 |\n\n---\n\n## Notes\n\n- Always derive owner\u002Frepo via `gh repo view`, never hardcode\n- Use `gh` CLI (not `curl` GitHub API) except for collaborators list\n- `statusCheckRollup` can be null → treat as `?`\n- `mergeable` can be `MERGEABLE`, `CONFLICTING`, or `UNKNOWN` → treat `UNKNOWN` as `?`\n- Never post without explicit user validation in chat\n- Drafted comments must be visible BEFORE any `gh pr comment`\n\n---\n\n## Related: \u002Freview-pr\n\n| | `\u002Fpr-triage` | `\u002Freview-pr` |\n|--|-------------|--------------|\n| **Scope** | Full PR backlog | Single PR |\n| **Use when** | Catching up after accumulation, periodic triage | Reviewing a specific incoming PR |\n| **Phases** | 4 (audit + deep review + comments + worktrees) | 1 (review only) |\n| **Agents** | Parallel sub-agents per PR | Single session |\n| **Output** | Triage table + review reports + GitHub comments + local worktrees | Inline review |\n| **Validation** | AskUserQuestion before posting | Manual decision |\n\n**Decision rule**: use `\u002Fpr-triage` for backlog triage (5+ PRs), `\u002Freview-pr` for focused review of a single PR. Use Phase 4 when you want to run the code locally rather than just reading the diff.\n",{"name":5,"effort":24,"description":7,"allowed-tools":25},"medium","Bash Read","main","f2cc95bc769ca4c3a398965b767dfb41cdf8d698","reference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Fpr-triage",2,"https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace","https:\u002F\u002Fgithub.com\u002F313DEVGRP","https:\u002F\u002Fwww.a-rms.net","2026-10-18 12:48:10",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add 313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace --skill pr-triage",{"tool":40,"command":41},"bunx","bunx skills add 313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace --skill pr-triage",{"tool":43,"command":44},"pnpm","pnpm dlx skills add 313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace --skill pr-triage","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Fpr-triage\u002FSKILL.md",true,[48],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"templates\u002Freview-comment.md","REFERENCE","参考文档",1817,"https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Fpr-triage\u002Ftemplates\u002Freview-comment.md",[55,62,69,76,83,90],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7F343WNVHZWWYJDD77QEJ7J","voice-refine","Transform verbose voice input into structured, token-efficient Claude prompts. Use when cleaning up voice memos, dictation output, or speech-to-text transcriptions that contain filler words, repetitions, and unstructured thoughts.","https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Fvoice-refine\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7F3417SNXASFTDA1B2X4XYZ","validate-changes","Evaluate staged changes using LLM-as-a-Judge before committing","https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Fvalidate-changes\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7F33YN9QK88H2B81PVHMNG1","update-threat-db","Delegate threat-intelligence research and updates to AgentSec, then validate the guide and landing mirrors.","https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Fupdate-threat-db\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7F33SXQ57G2FVFK094T4584","token-audit","Audit Claude Code configuration to measure fixed-context token overhead and produce a prioritized action plan. Use when hitting rate limits, experiencing early context compression, or after adding significant config files.","https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Ftoken-audit\u002Fskill.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7F33NAWXFPHW59CF52EAGGK","talk-stage6-revision","Produces revision sheets with quick navigation by act, a master concept-to-URL table, Q&A cheat-sheet with 6-10 anticipated questions, glossary, and external resources list. Use when preparing for a talk with Q&A, creating shareable reference material for attendees, or building a safety-net glossary for live delivery.","https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Ftalk-pipeline\u002Fstage-6-revision\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7F33G9V96HVZKAGZ84J4EBR","talk-stage5-script","Produces a complete 5-act pitch with speaker notes, a slide-by-slide specification, and a ready-to-paste Kimi prompt for AI slide generation. Requires validated angle and title from Stage 4. Use when you have a confirmed talk angle and need the full script, slide spec, and AI-generated presentation prompt.","https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Ftalk-pipeline\u002Fstage-5-script\u002FSKILL.md",[],[]]