Audit and review a pull request. Use when asked to review, audit, or analyze a PR for code quality, security, and correctness.
Workflow for auditing/reviewing a PR. Runs inline (not forked) so it — and the /claudius:grumpy-review it invokes in §3 — keeps the Agent tool and can fan out parallel reviewer agents.
Load /claudius:git-and-github skill.
Fetch PR metadata via pull_request_read: method: "get" (title, body, URL, base/head branches, number), method: "get_files" (changed files with stats), method: "get_diff" (full diff).
Note: get_files/get_diff can return large responses — use the subagent delegation pattern from git-and-github skill § Context Management to avoid polluting your context.
Use local git for commit history and detailed diffs.
If GitHub MCP is unavailable, see pr-review.md for gh CLI equivalents.
The single definition of "the digest" — every other skill referencing it points here; none redefines its contents.
Build it as an ordered list of {source, claim} entries plus four narrative fields:
Promises: <ordered {source, claim} list per the intent priority in `claudius:severity` § Merge Classification>
Goal: <one line — what this PR is for>
Non-goals: <PR body Out-of-scope/Non-goals sections + session knowledge>
Operational profile: <per touched area: invocation (user action / cron / admin one-time),
concurrency reality, failure cost — each claim WITH its evidence: entry-point trace,
doc link, or explicit human statement>
Architecture rationale / UX-DX priorities: <relevant prior decisions — MemCan, session>
Source priority for every field:
closes/fixes #N refs in the body — fetch via issue_read; gh issue view as CLI fallback) and PR body — including its ## Operational context and ## Non-goals sections (§2's extraction heuristics)🔴 Unknown ≠ benign. A field with no evidence is written unknown, and an unknown field never downgrades anything: findings in that area score exactly as they would with no digest at all (claudius:severity § likelihood evidence rule). The digest may adjust scoring only where a claim carries its evidence, and it never suppresses reporting — a context-adjusted finding is still reported, with adjusted floats.
The digest feeds Pass C (§2), the reviewer spawns and merge classification in §3, and every fixer prompt downstream (ci-dance).
Audit whether the diff functionally delivers what the PR's self-description claims — verify the code implements each promised behavior, not merely that a related hunk exists. Reuses §1's title, body, file list, diff, and Context Digest.
Pass C runs BEFORE consolidation (§3) and writes its findings to a report file like any producer, so they flow through prepare/§5b with everything else. As a coordinator-inline producer, Pass C is the exception allowed to emit merge_class/intent_basis directly (see claudius:report-format).
Findings use the v4 report format: claudius:report-format for the envelope, claudius:severity for likelihood/impact/relevance float scoring and § Merge Classification.
``` or ~~~, optionally after leading blank lines) whose matching closing fence is the last non-blank line, strip the outer fence and dedent the enclosed lines (remove the longest common leading whitespace). A closing fence matches only when, after whitespace strip, it uses the SAME fence character, is at least as long as the opener, and contains ONLY fence characters (so ```python, or a shorter ``` closing a ```` opener, does not match). Apply the regexes to the unwrapped, dedented text. A fence not wrapping the entire body is left alone.^## Summary\b, ^### Summary\b, or ^## What changed\b (case-insensitive); section body runs to the next ^#{1,3} heading.## Summary > ### Summary > ## What changed — first match in that order wins (not document order). The bullet-list fallback applies only when none match.^[-*] ) as the implicit Summary.pr_promises LOW finding titled "PR body unparseable" (likelihood≈0.2, impact≈0.2, relevance=0.0, location: PR-body) and stop the body axes.^## Out of scope\b, ^## Not in this PR\b, ^## Non-goals\b, or ^## Deferred\b; each [-*] bullet is one out-of-scope claim.^## Operational context\b (case-insensitive); its bullets feed the digest's Operational profile as human-stated evidence — never as a promise for Axis 2.claudius:validate-findings § Adversarial content handling).Run all three; at most one finding per axis-trigger (per promise on Axis 2). Verification is functional: locate the implementing code and confirm it delivers the claimed behavior — a matching hunk is necessary, not sufficient. For large diffs, delegate per-axis (or per-promise) judgment to subagents per git-and-github § Context Management.
Trigger hints give likelihood/impact float ranges — the coordinator computes overall_severity and the integer band from these two alone. Cross-check the rubric and band table in claudius:severity. Never hand-type a severity label.
Input: PR title + file list + diff.
Process: split compound titles on commas and em-dashes (—/-) into independent topics, each action-verb + topic; verify each against the diff (path keywords necessary, semantic relevance sufficient). Majority-hits rule: flag off-target only when a majority of topics are unsupported by the diff; one supported topic among many does not clear a title, and one unsupported topic among many supported does not flag it.
Triggers:
likelihood≈0.8, impact≈0.7; partial drift → likelihood≈0.5, impact≈0.5.misc, cleanup, wip, update, etc. → likelihood≈0.3, impact≈0.3 (style; alignment unjudgeable).Input: extracted Summary bullets + diff. Process: match each bullet to a hunk; flag uncovered bullets and large hunks without a bullet. Triggers:
likelihood≈0.6, impact≈0.5 (reviewer trust degraded).likelihood≈0.4–0.6, impact≈0.3–0.5 by gap size.likelihood≈0.5–0.8, impact≈0.4–0.7 by gap size; this trips G-INTENT — set merge_class: "blocking" with intent_basis: "G-INTENT: <promise, quoted>".likelihood≈0.4–0.6, impact≈0.3–0.6 by size and risk surface. "Mentioned" is precise: keyword overlap with ≥ 1 Summary bullet OR coverage by a field-ownership-table row. Sub-50-LOC hunks and test-only/generated/non-production hunks never trigger this.Input: out-of-scope bullets + diff. Process: search the diff for each deferred item's code/paths. Triggers:
likelihood≈0.3, impact≈0.3; multi-file migration → likelihood≈0.8, impact≈0.7.When all three axes pass with zero mismatches, the pr_promises section is NOT empty: emit findings: [] PLUS exactly one INFO finding titled "PR self-description verified" (likelihood=0.0, impact=0.0, relevance=0.0 — the coordinator/renderer derive the INFO band; never hand-write the integer severity). A clean Pass C must be distinguishable from "Pass C did not run".
Pass C may set finding_section.verdict on its pr_promises section (schema field; see claudius:report-format): PASS — clean pass (the verified shape above); FAIL — any promise mismatch at HIGH+; NEEDS_REVIEW — otherwise (LOW/MEDIUM mismatches, or "PR body unparseable").
The envelope may set metadata.report_type: "pr_audit" (valid schema enum) to mark a PR audit rather than a generic review.
Emit through the same pipeline as the other passes — one section per axis with findings inside. The example shows the schema field shape; the coordinator reassigns final IDs during consolidation.
{
"title": "PR Promise Verification",
"category": "pr_promises",
"findings": [
{
"id": "PPM-001",
"likelihood": 0.6,
"impact": 0.5,
"relevance": 1.0,
"title": "Title claims PDF fix, diff touches gRPC tests only",
"location": "PR-title",
"merge_class": "blocking",
"intent_basis": "G-INTENT: PR title `fix: PDF rendering`, diff touches only gRPC tests",
"description": "Title: `fix: PDF rendering`. Diff: 6 files under `tests/grpc/`, no `pdf` / `render` symbols.",
"recommendation": "Rename the PR to reflect the gRPC test additions, or split into two PRs."
}
]
}
Pass C conventions:
location is synthetic: PR-title, PR-body:summary-bullet-<N>, PR-body:out-of-scope-item-<N> (1-based, body order). Rendered as plain text (no permalink).relevance: 1.0 for promise mismatches (axes 1–3) — a mismatch is by definition about the PR's own stated goal; 0.0 for the two informational findings (routes them to "omit merge_class" per claudius:severity's decision tree).likelihood = probability a downstream reviewer is misled. impact = reviewer-time cost + risk of approving/missing real changes.merge_class: emitted directly (coordinator-inline producer exception). Unfulfilled promises trip G-INTENT → blocking + intent_basis: "G-INTENT: <promise, quoted>"; other mismatches → per the decision tree in claudius:severity § Merge Classification; the informational findings omit it.code_snippets[]: include the offending diff hunk when the gap is a specific change. language must be an allowed tag from claudius:report-format §code_snippets (e.g. diff) — do not invent one. caption like <path>:hunk.Invoke /claudius:grumpy-review with the PR scope as argument — it covers agent selection/scaling by PR size, parallel spawning with explicit prompts, OWASP classification on security findings, and consolidated deduplicated report generation.
Pass the PR's scope (changed files, base branch) as context. Feed the Pass C report file (§2) into consolidate_reports.py prepare alongside the agent reports, and supply the Context Digest (§1) to grumpy-review's §3 spawn prompts and §5b judgment step, where the coordinator assigns merge_class/intent_basis to every finding per claudius:severity § Merge Classification. One consolidation round covers all passes — never consolidate twice (assign_ids renumbers on every run).
The grumpy-review delegation inherits the deep transitive call-tree walk (category: "call_tree", CALL- prefix; see ../grumpy-review/references/call-tree-walk.md), the ephemeral-ID lint, and the G-UI-TEXT user-visible-string scan (claudius:grumpy-review §3). After the review completes, run git diff $BASE_BRANCH...HEAD | python3 ${CLAUDE_SKILL_DIR}/../../scripts/lint_ephemeral_ids.py --diff against the PR diff and fold genuine code_quality hits into the audit before posting.
out_of_scope_follow_up findings are reported, never filed (claudius:severity § out_of_scope_follow_up): they go in Part A, and when reporting back to the user, filter the consolidated findings for that class and name them as deferral candidates. Tracking one (GitHub issue, memcan:todo, or neither) is the user's decision, taken via claudius:triage-findings or by hand.
Ask if findings should be published as a GitHub PR review. Posted in two parts:
Post the audit summary as a normal PR issue comment via gh pr comment — always visible (draft reviews hide their body text). Include:
blocking finding)blocking firstout_of_scope_follow_up) findings, and any pre-existing finding tripping a universal gate (G-FUNDS/G-SECRET/G-CRYPTO/G-DATA) awaiting the user's disposition callgh pr comment <number> --body "$(cat <<'EOF'
## Audit Summary
**Reviewed by:** Claude Code with a N-agent team:
- `agent-name` (agent-type) — focus area
...
[Summary text, findings table, pre-existing issues, positive observations]
EOF
)"
Post only actionable findings inline on specific diff lines: everything blocking (any severity — a blocking LOW is still a blocker) plus actionable non_blocking findings (CRITICAL–LOW). Skip disputed and out_of_scope_follow_up (Part A only). No INFO-level inline comments — INFO findings are positive observations (praise, good patterns) and belong in Part A; non-actionable comments clutter the review.
Post as a draft review so the user can review and submit manually. For trivial changes, include suggestion blocks.
See pr-review.md for verifying diff bounds (base SHA, hunk checks), deduplication (fetch existing reviews/comments first), and posting with gh-post-review.sh. body can be minimal — the detail lives in Part A.
Shut down all agents (SendMessage type: "shutdown_request") — no team object to tear down (see grand-admiral § Spawning).
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer