compound-engineering: Command for Claude Code

.claude/commands/triage-prs.md

triage-prs is a command for Claude Code from Jerrylalala/compound-engineering. It costs 24 tokens per session (1,629 once invoked), scanned A, a copy of triage-prs, MIT.

A command for reviewing all open GitHub pull requests, which are proposed code changes awaiting review, in a repository.

In plain words
What is it for?
Use it to group, label, cross-reference, and review open pull requests one by one for merge or comment decisions.
Why use it?
It organizes a large queue of pull requests and gathers related issue and history information before decisions are made.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

This is Jerrylalala/compound-engineering's own configuration. It tells Claude Code how to work on compound-engineering itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything compound-engineering configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Jerrylalala/compound-engineering. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Jerrylalala/compound-engineering/main/.claude/commands/triage-prs.md
Clone the repo
git clone --depth 1 https://github.com/Jerrylalala/compound-engineering

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for triage-prs

README.md
[![agentmods](https://agentmods.dev/badge/commands/jerrylalala/compound-engineering/triage-prs.svg)](https://agentmods.dev/commands/jerrylalala/compound-engineering/triage-prs)
Your own site
<a href="https://agentmods.dev/commands/jerrylalala/compound-engineering/triage-prs"><img src="https://agentmods.dev/badge/commands/jerrylalala/compound-engineering/triage-prs.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,629 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00024 $0.01629
Opus 5 $0.00012 $0.00814
Sonnet 5 $0.00005 $0.00326
Haiku 4.5 $0.00002 $0.00163

Measured 6d ago against content hash f288c4d2c7fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

triage-prs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to triage-prs — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/triage-prs.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Triage Open Pull Requests

Review, label, and act on all open PRs for a repository using parallel review agents. Produces a grouped triage report, applies labels, cross-references with issues, and walks through each PR for merge/comment decisions.

Step 0: Detect Repository

Detect repo context:

  • Current repo: !gh repo view --json nameWithOwner -q .nameWithOwner 2>/dev/null || echo "no repo detected"
  • Current branch: !git branch --show-current 2>/dev/null

If $ARGUMENTS contains a GitHub URL or owner/repo, use that instead. Confirm the repo with the user if ambiguous.

Step 1: Gather Context (Parallel)

Run these in parallel:

  1. List all open PRs:

    gh pr list --repo OWNER/REPO --state open --limit 50
    
  2. List all open issues:

    gh issue list --repo OWNER/REPO --state open --limit 50
    
  3. List existing labels:

    gh label list --repo OWNER/REPO --limit 50
    
  4. Check recent merges (to detect duplicate/superseded PRs):

    git log --oneline -20 main
    

Step 2: Batch PRs by Theme

Group PRs into review batches of 4-6 based on apparent type:

  • Bug fixes - titles with fix, bug, error descriptions
  • Features - titles with feat, add, new functionality
  • Documentation - titles with docs, readme, terminology
  • Configuration/Setup - titles with config, setup, install
  • Stale/Old - PRs older than 30 days

Step 3: Parallel Review (Team of Agents)

Spawn one review agent per batch using the Task tool. Each agent should:

For each PR in their batch:

  1. Run gh pr view --repo OWNER/REPO <number> --json title,body,files,additions,deletions,author,createdAt
  2. Run gh pr diff --repo OWNER/REPO <number> (pipe to head -200 for large diffs)
  3. Determine:
    • Description: 1-2 sentence summary of the change
    • Label: Which existing repo label fits best
    • Action: merge / request changes / close / needs discussion
    • Related PRs: Any PRs in this or other batches that touch the same files or feature
    • Quality notes: Code quality, test coverage, staleness concerns

Read the full file on GitHub · 194 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 194 lines · 24 tokens per session scan A f288c4d2c7fc

Subscribe to this mod's changes

triage-prs is a command published in the GitHub repository Jerrylalala/compound-engineering (5 stars, last pushed 3mo ago), licensed MIT. It adds 24 tokens to every session and 1,629 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to triage-prs, differing in 2 lines, and is treated as a copy.