review-large-pr
Skill30 starsChanged 2 months agoMITView on GitHub
Review a large pull request (30+ changed files) using chunked parallel review with synthesis. Each chunk is audited by the audit-* specialists in parallel, then synthesized into one consolidated report. Use when a PR is too large for a single audit pass.
In this repository20 other files it gives its agents.
- capSkill
- code-audit-hardcoreSkill
- code-auditSkill
- coding-processSkill
- design-hierarchySkill
- design-masterSkill
- design-windowSkill
- evaluate-skillSkill
- fix-bugSkill
- human-proseSkill
- implement-plan-auditedSkill
- implement-planSkill
- init-phoenixSkill
- learn-systemSkill
- plan-largeSkill
- plan-smallSkill
- refactorSkill
- remove-codeSkill
- review-planSkill
- write-agentSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
Use the concrete agent names — install-time prefix rewriting depends on it:
- Distinctive: line 80
Synthesize across chunks: After all chunk reports return:
- Distinctive: line 97
Implement in small batches: After receiving approval, group approved items by file proximity (not by original chunk).
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Review a Large PR
The strategy: partition the PR into coherent chunks, run the
audit-* specialists against each chunk in parallel, then synthesize
across chunks. Specialist briefs and anti-bias contracts live in the
agent files (audit-triage, audit-logic, audit-security,
audit-simplification, audit-research, audit-architecture) — this
skill orchestrates.
Process
Scope and partition. Get the file list (
git diff --name-only, inline — small). Group files into review chunks of max ~10 files each, organized by logical coherence:- Same domain or entity
- Same architectural layer (schemas, core logic, routers, triggers, frontend)
- Files that import each other belong in the same chunk
For each file in scope, capture a per-file diff:
git diff -- <path> > /tmp/hawk-review-large-pr-chunk-<n>-<file-slug>.patch 2>&1Never capture or read the concatenated multi-file diff — large PRs are exactly the case Big-output discipline exists for.
Per-chunk triage and fan-out. For each chunk, run the same pattern as
code-audit:a. Triage (always — this is a large PR; right-sizing the specialist subset per chunk is the whole point of partitioning). Call
reviewer: audit-triage; brief: <chunk scope, signals>. Triage decision is internal; record it in the chunk report header but do not surface to the user unless asked. If triage's reply doesn't parse, fall back totier=standardfor that chunk and continue.b. Fan out specialists in parallel for the triaged subset. Use the concrete agent names — install-time prefix rewriting depends on it:
reviewer: audit-logic; brief: <chunk user prompt> reviewer: audit-security; brief: <chunk user prompt> reviewer: audit-simplification; brief: <chunk user prompt> reviewer: audit-research; brief: <chunk user prompt> reviewer: audit-architecture; brief: <chunk user prompt>Skip any role not in the triage subset.
Do not delegate to
code-audit— that's a skill, not a subagent. The audit-* names above are the only callable specialists.The chunk user prompt contains:
- Per-file
rg -nslices from the chunk's capture files (not the raw concatenated diff) - Relevant
.agents/standards/content pasted inline - Relevant
.agents/common-mistakes/content pasted inline - One-line context:
Chunk N of M; files: <count>; layer: <layer>.
c. Merge per chunk the same way
code-auditmerges (dedupe bypath:line, attach overlapping reasoning).Wave semantics. Cap concurrency at 3–4 chunks per wave (one wave =
(1 triage + N specialists) × 3–4 chunksrunning concurrently). Wait for every chunk in the current wave to return before starting the next wave. Streaming-style replacement ("queue the next chunk as soon as one finishes") is not allowed — it makes per-wave error handling and progress reporting unreliable.- Per-file
Synthesize across chunks. After all chunk reports return:
- Deduplicate — multiple chunks may flag the same cross-cutting issue (e.g. a shared utility used in different chunks).
- Resolve conflicts — if reviewers disagree, investigate which is correct.
- Verify high-risk recommendations yourself (schema changes, import changes, defensive guards).
- Categorize and prioritize — correctness bugs > security > architecture > duplication > dead code > readability.
Produce a consolidated report.
- Human approval gate. Present the consolidated report. Explain total findings by category, questionable items, and cross-cutting themes. Stop and wait for explicit approval. Never auto-apply review findings.
- Implement in small batches. After receiving approval, group approved items by file proximity (not by original chunk). Implement in batches of max 5–8 files. Run the check command after each batch. Fix any issues before starting the next batch.
Rules
- The synthesis phase is non-negotiable — it catches what individual chunk reviews miss.
- Human approval is non-negotiable — never auto-apply findings.
- Small implementation batches are non-negotiable — monolithic implementation crashes or introduces cascading errors.
- Specialists run as
audit-*subagents with their built-in anti-bias contract. Do NOT paste the goal, PR description, or branch name into specialist user prompts; only the chunk's diff slices, standards, and one-line chunk context. - Feed lessons back into
.agents/common-mistakes/after every review. - Big-output discipline. Heavy command output (project check,
full
git diff, repo-wide search, long log, large fetch) goes to/tmp/hawk-review-large-pr-<step>.log, thenrg -n '<pattern>' /tmp/hawk-review-large-pr-<step>.log | head -50extracts what you need. Read only the required lines from the file. 30+ file diffs are the worst offender for context bloat — this skill is the strictest enforcer: never capture or read the concatenated multi-file diff. Specialist user prompts receive narrowed slices only.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

