/triage-prs
Classify all open PRs by module, review state, scope, and architectural impact — produces a prioritized triage dashboard
$ npx -y skills add nearai/ironclaw --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/triage-prs
Context preview
What this command does when you run it.
Classify all open PRs by module, review state, scope, and architectural impact — produces a prioritized triage dashboard
Command definition
triage-prs.mddescription: Classify all open PRs by module, review state, scope, and architectural impact — produces a prioritized triage dashboard
disable-model-invocation: true
allowed-tools: Bash(gh pr list:*), Bash(gh pr view:*), Bash(gh pr diff:*), Bash(gh api:*), Bash(gh pr checks:*), Bash(git log:*), Read, Grep, Glob, Agent
argument-hint: "[--label=<filter>] [--author=<filter>]"
PR Triage Dashboard
You are triaging all open PRs on this repository. Your job is to produce a prioritized, module-grouped dashboard that tells the maintainer exactly which PRs need attention and in what order.
Step 1: Fetch all open PRs
Fetch every open PR with metadata:
gh pr list --state open --limit 100 --json number,title,author,labels,additions,deletions,headRefName,createdAt,updatedAt,isDraft,reviewRequests,reviews,files,body
If `$ARGUMENTS` contains `--label=<X>`, append `--label '<X>'` to the `gh pr list` command. If it contains `--author=<X>`, append `--author '<X>'` to the command.
Also fetch recently merged PRs (last 7 days) to detect superseded/conflicting work:
gh pr list --state merged --search "merged:>=$(python3 -c 'from datetime import datetime, timedelta, timezone; print((datetime.now(timezone.utc) - timedelta(days=7)).strftime("%Y-%m-%d"))')" --limit 100 --json number,title,body,mergedAtStep 2: Classify each PR by module
For each open PR, determine the primary module it touches by examining the `files` field. Classify into these categories based on the dominant directory. Each path appears in exactly one row; if a future edit introduces an overlap, the more specific row wins over the **Reborn stack** umbrella:
| Category | Directories | |----------|------------| | **Reborn stack (most current work)** | `crates/loop/ironclaw_turn_runner/`, `crates/app/ironclaw_cli/`, `crates/app/ironclaw_composition/`, `crates/events/ironclaw_event_store/`, `crates/domains/ironclaw_identity/`, `crates/product/ironclaw_openai_compat*/`, `crates/domains/ironclaw_trace_commons/`, `crates/product/ironclaw_webui/`, `crates/product/ironclaw_assistant/`, `crates/kernel/ironclaw_turns/`, `crates/domains/ironclaw_threads/`, `crates/loop/ironclaw_agent_loop/`, `crates/kernel/ironclaw_host_runtime/`, `crates/loop/ironclaw_loop_host/`, `crates/kernel/ironclaw_capabilities/` | | **LLM & Inference** | `crates/domains/ironclaw_llm/` | | **Agent Core** | `crates/domains/ironclaw_skills/` | | **Tools & Extensions** | `crates/extensions/ironclaw_extension_support/`, `crates/extensions/ironclaw_extension_host/`, `crates/extensions/ironclaw_extension_registry/` | | **Channels** | `crates/extensions/packages/slack/`, `crates/extensions/packages/telegram/` | | **Storage & Memory** | `crates/substrates/ironclaw_filesystem/`, `crates/domains/ironclaw_memory*/`, `crates/substrates/ironclaw_libsql_runtime/`, `migrations/` | | **Security** | `crates/substrates/ironclaw_safety/`, `crates/substrates/ironclaw_secrets/`, `crates/kernel/ironclaw_trust/`, `crates/kernel/ironclaw_authorization/`, `crates/kernel/ironclaw_approvals/` | | **Config & Setup** | `crates/app/ironclaw_config/` | | **Sandbox & Processes** | `crates/lanes/ironclaw_sandbox/`, `crates/kernel/ironclaw_processes/`, `crates/lanes/ironclaw_wasm*/` | | **Hooks** | `crates/loop/ironclaw_hooks/` | | **Events & Projections** | `crates/events/ironclaw_event_log/`, `crates/events/ironclaw_event_projections/`, `crates/events/ironclaw_event_streams/` | | **CI/CD & Docs** | `.github/`, `README.md`, `CLAUDE.md`, `*.md` (no src) | | **Other** | Anything else |
If a PR touches multiple modules, assign it to the **primary** module (most files changed) but note the cross-cutting modules.
Note: CI's own scope labeler (`.github/workflows/pr-label-scope.yml` + `.github/labeler.yml`) still fires a handful of non-`src/**` labels (`scope: ci` for `.github/**`, `scope: docs` for `**/*.md` and `docs/**`, `scope: dependencies` for `Cargo.toml`/`Cargo.lock`, `DB MIGRATION` for `migrations/**`), but every `src/**`-scoped label (`scope: agent`, `scope: tool*`, `scope: db*`, `scope: safety`, `scope: llm`, …) targets pre-Reborn paths that no longer exist and can never fire on a current PR — `grep -c 'src/' .github/labeler.yml` shows the extent. For unlabelled `crates/**` changes, or to classify anything the labeler doesn't cover, use this manual table; when a `scope: *` label from the list above is already present, use it instead of re-deriving.
Step 3: Assess review state
For each PR, determine its review status:
- **Approved** — At least one human APPROVED review, no outstanding CHANGES_REQUESTED
- **Changes requested** — At least one CHANGES_REQUESTED review still unresolved
- **Reviewed (comments only)** — Human comments but no formal approve/reject
- **Automated only** — Only bot reviews (gemini-code-assist, copilot, etc.)
- **No review** — No reviews at all
Also check:
- CI status: `gh pr checks {number}` — PASS / FAIL / NONE
- Draft status: is the PR marked as draft?
- Staleness: how many days since `updatedAt`?
Step 4: Determine scope and risk
CI already classifies every PR on open/sync via `.github/workflows/pr-label-classify.yml` (`.github/scripts/pr-labeler.sh`), which sets an exclusive `size: XS|S|M|L|XL` label (by total additions+deletions) and an exclusive `risk: *` label. The `size: *` label is diff-stat-based and safe to trust as-is; read it from the `labels` field already fetched in Step 1 instead of re-deriving line-count buckets — only fall back to computing size yourself (below) if the PR predates the labeler or its label is missing (e.g. CI hasn't run yet).
**Do not trust `risk: *` at face value for `crates/**` PRs.** `classify_risk` in `.github/scripts/pr-labeler.sh` pattern-matches only pre-Reborn `src/**` paths (plus `Cargo.toml` and `.github/workflows/*`); a PR that touches only `crates/**` — including `crates/kernel/ironclaw_trust/`, `crates/substrates/ironclaw_secrets/`, or `crates/substrates/ironclaw_safety/` — always falls t
Read more
description: Classify all open PRs by module, review state, scope, and architectural impact — produces a prioritized triage dashboard disable-model-invocation: true allowed-tools: Bash(gh pr list:*), Bash(gh pr view:*), Bash(gh pr diff:*), Bash(gh api:*), Bash(gh pr checks:*), Bash(git log:*), Read, Grep, Glob, Agent argument-hint: "[--label=<filter>] [--author=<filter>]"
PR Triage Dashboard
You are triaging all open PRs on this repository. Your job is to produce a prioritized, module-grouped dashboard that tells the maintainer exactly which PRs need attention and in what order.
Step 1: Fetch all open PRs
Fetch every open PR with metadata:
gh pr list --state open --limit 100 --json number,title,author,labels,additions,deletions,headRefName,createdAt,updatedAt,isDraft,reviewRequests,reviews,files,body
If `$ARGUMENTS` contains `--label=<X>`, append `--label '<X>'` to the `gh pr list` command. If it contains `--author=<X>`, append `--author '<X>'` to the command.
Also fetch recently merged PRs (last 7 days) to detect superseded/conflicting work:
gh pr list --state merged --search "merged:>=$(python3 -c 'from datetime import datetime, timedelta, timezone; print((datetime.now(timezone.utc) - timedelta(days=7)).strftime("%Y-%m-%d"))')" --limit 100 --json number,title,body,mergedAtStep 2: Classify each PR by module
For each open PR, determine the primary module it touches by examining the `files` field. Classify into these categories based on the dominant directory. Each path appears in exactly one row; if a future edit introduces an overlap, the more specific row wins over the **Reborn stack** umbrella:
| Category | Directories | |----------|------------| | **Reborn stack (most current work)** | `crates/loop/ironclaw_turn_runner/`, `crates/app/ironclaw_cli/`, `crates/app/ironclaw_composition/`, `crates/events/ironclaw_event_store/`, `crates/domains/ironclaw_identity/`, `crates/product/ironclaw_openai_compat*/`, `crates/domains/ironclaw_trace_commons/`, `crates/product/ironclaw_webui/`, `crates/product/ironclaw_assistant/`, `crates/kernel/ironclaw_turns/`, `crates/domains/ironclaw_threads/`, `crates/loop/ironclaw_agent_loop/`, `crates/kernel/ironclaw_host_runtime/`, `crates/loop/ironclaw_loop_host/`, `crates/kernel/ironclaw_capabilities/` | | **LLM & Inference** | `crates/domains/ironclaw_llm/` | | **Agent Core** | `crates/domains/ironclaw_skills/` | | **Tools & Extensions** | `crates/extensions/ironclaw_extension_support/`, `crates/extensions/ironclaw_extension_host/`, `crates/extensions/ironclaw_extension_registry/` | | **Channels** | `crates/extensions/packages/slack/`, `crates/extensions/packages/telegram/` | | **Storage & Memory** | `crates/substrates/ironclaw_filesystem/`, `crates/domains/ironclaw_memory*/`, `crates/substrates/ironclaw_libsql_runtime/`, `migrations/` | | **Security** | `crates/substrates/ironclaw_safety/`, `crates/substrates/ironclaw_secrets/`, `crates/kernel/ironclaw_trust/`, `crates/kernel/ironclaw_authorization/`, `crates/kernel/ironclaw_approvals/` | | **Config & Setup** | `crates/app/ironclaw_config/` | | **Sandbox & Processes** | `crates/lanes/ironclaw_sandbox/`, `crates/kernel/ironclaw_processes/`, `crates/lanes/ironclaw_wasm*/` | | **Hooks** | `crates/loop/ironclaw_hooks/` | | **Events & Projections** | `crates/events/ironclaw_event_log/`, `crates/events/ironclaw_event_projections/`, `crates/events/ironclaw_event_streams/` | | **CI/CD & Docs** | `.github/`, `README.md`, `CLAUDE.md`, `*.md` (no src) | | **Other** | Anything else |
If a PR touches multiple modules, assign it to the **primary** module (most files changed) but note the cross-cutting modules.
Note: CI's own scope labeler (`.github/workflows/pr-label-scope.yml` + `.github/labeler.yml`) still fires a handful of non-`src/**` labels (`scope: ci` for `.github/**`, `scope: docs` for `**/*.md` and `docs/**`, `scope: dependencies` for `Cargo.toml`/`Cargo.lock`, `DB MIGRATION` for `migrations/**`), but every `src/**`-scoped label (`scope: agent`, `scope: tool*`, `scope: db*`, `scope: safety`, `scope: llm`, …) targets pre-Reborn paths that no longer exist and can never fire on a current PR — `grep -c 'src/' .github/labeler.yml` shows the extent. For unlabelled `crates/**` changes, or to classify anything the labeler doesn't cover, use this manual table; when a `scope: *` label from the list above is already present, use it instead of re-deriving.
Step 3: Assess review state
For each PR, determine its review status:
- **Approved** — At least one human APPROVED review, no outstanding CHANGES_REQUESTED
- **Changes requested** — At least one CHANGES_REQUESTED review still unresolved
- **Reviewed (comments only)** — Human comments but no formal approve/reject
- **Automated only** — Only bot reviews (gemini-code-assist, copilot, etc.)
- **No review** — No reviews at all
Also check:
- CI status: `gh pr checks {number}` — PASS / FAIL / NONE
- Draft status: is the PR marked as draft?
- Staleness: how many days since `updatedAt`?
Step 4: Determine scope and risk
CI already classifies every PR on open/sync via `.github/workflows/pr-label-classify.yml` (`.github/scripts/pr-labeler.sh`), which sets an exclusive `size: XS|S|M|L|XL` label (by total additions+deletions) and an exclusive `risk: *` label. The `size: *` label is diff-stat-based and safe to trust as-is; read it from the `labels` field already fetched in Step 1 instead of re-deriving line-count buckets — only fall back to computing size yourself (below) if the PR predates the labeler or its label is missing (e.g. CI hasn't run yet).
**Do not trust `risk: *` at face value for `crates/**` PRs.** `classify_risk` in `.github/scripts/pr-labeler.sh` pattern-matches only pre-Reborn `src/**` paths (plus `Cargo.toml` and `.github/workflows/*`); a PR that touches only `crates/**` — including `crates/kernel/ironclaw_trust/`, `crates/substrates/ironclaw_secrets/`, or `crates/substrates/ironclaw_safety/` — always falls t
IronClaw is an Agent OS focused on privacy, security and extensibility

