with one click
with one click
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | parallel-review |
| description | Launch parallel code review with multiple specialist reviewers |
| allowed-tools | Agent, Read, Glob, Grep, Bash(.claude/scripts/fetch-diff.sh:*), Bash(.claude/scripts/rm-tmp.sh:*), Bash(grep:*), Bash(ls:*), Bash(find:*), Bash(mkdir:*), Bash(git log:*), Bash(git diff:*), Bash(git show:*) |
As the review leader, you orchestrate a parallel code review using specialist reviewers and consolidate each reviewer's findings into a single report.
The review leader does not act as a reviewer; instead, the leader orchestrates the overall review and performs aggregation and judgment. All reviewer roles are delegated to sub-agents.
If the arguments include a round number (e.g., Round 1, Round 2), reflect it in the report title.
The user specifies one or more of the following as the review target:
HEAD~3..HEAD, branch name, PR)If the argument is $ARGUMENTS, interpret it as the review target specification (including round number and options).
--base {branch} โ Specify the base branch. Defaults to main or master.If the user does not explicitly specify a review target, use the following as the default:
git log {base}..HEAD).git diff --cached) and unstaged (git diff) changes.If no base branch is specified via --base, use whichever of main or master exists on the remote (prefer main if both exist).
For common prohibitions, see .claude/rules/sub-agent.md. The prompt body for each sub-agent is stored in an external template under templates/*.md (each template has a template_id in its frontmatter). When launching via the Agent tool, the leader passes a launch prompt that instructs the sub-agent to "Read the template and follow its instructions," with the variable values substituted in. The sub-agent must include template_id in its return value. The leader verifies that the returned template_id matches the UUID specified at each step (hardcoded per step, see below); if it does not match, the leader re-launches that sub-agent.
For launch-prompt-completeness rules, see .claude/rules/sub-agent.md ยง Launch Prompt Completeness.
The leader (you) does not Read the diff content. Diff analysis, line counting, and selection of required reviewer candidates are delegated to the scope-analysis sub-agent; the leader receives only the return value (line count + candidate list + summary).
.claude/tmp/parallel-review-{timestamp}/{tmp_dir}/reviews/mkdir -p.{tmp_dir}/diff.txt.claude/scripts/fetch-diff.sh {base} {tmp_dir}/diff.txt
As your first action, you MUST Read `.claude/skills/parallel-review/templates/scope-analysis.md`. Do not perform any other judgment, action, or tool call before the Read completes. After reading, follow its instructions.
Variables (substitute into the template's {{...}} placeholders):
- tmp_dir: {tmp_dir}
- user_requested: {user_requested}
Round-specific overrides (apply after following the template's instructions):
- (none)
Include `template_id` (Read from the template's frontmatter) in the return value.
{line_count, recommended_reviewers, extension_summary, rationale, template_id}) from the sub-agent.template_id matches b3e2f1a7-9c84-4d56-8e3b-7f1a4c9d2e85. If it does not match, re-launch the sub-agent.recommended_reviewers as-is as the final reviewer list, and pass each element's name to subagent_type in Step 2.line_count == 0, generate an empty review document at {output_path} and proceed directly to Step 4.Launch all selected reviewers concurrently via the Agent tool. Each reviewer must not return findings to stdout; instead, they Write to a dedicated file. The review leader (you) must not load reviewer output bodies into context (the aggregator sub-agent reads them in a later step).
{tmp_dir}/reviews/{reviewer-name}.md[severity] file_path:line โ Description of the issue and its importance.When launching via the Agent tool, specify subagent_type={name} to load the persona and perspective from the agent definition (.claude/agents/{name}.md). Do not include the persona / perspective in the launch prompt. Task-specific instructions are stored in the templates/reviewer.md external template.
As your first action, you MUST Read `.claude/skills/parallel-review/templates/reviewer.md`. Do not perform any other judgment, action, or tool call before the Read completes. After reading, follow its instructions.
Variables (substitute into the template's {{...}} placeholders):
- targets: {targets}
- base: {base}
- diff_path: {diff_path}
- output_path: {output_path}
Round-specific overrides (apply after following the template's instructions):
- (none)
Include `template_id` (Read from the template's frontmatter) in the return value.
Receive the return value ({path, critical, major, minor, info, template_id}) from each reviewer. Verify that template_id matches 4d8c2e5b-1f73-4a96-b2e8-9c1d3a7f4b62. If it does not match, re-launch that reviewer.
After all reviewers complete, launch the aggregator sub-agent and delegate report consolidation to it. The review leader does not perform aggregation work (Reading each reviewer file, deduplicating, sorting, Writing the deliverable) and does not load reviewer output bodies into context.
Launch via Agent(subagent_type="review-helper", prompt=...) (model follows review-helper's agent definition; do not specify model from the leader).
Task-specific instructions are stored in the templates/aggregator.md external template.
As your first action, you MUST Read `.claude/skills/parallel-review/templates/aggregator.md`. Do not perform any other judgment, action, or tool call before the Read completes. After reading, follow its instructions.
Variables (substitute into the template's {{...}} placeholders):
- tmp_dir: {tmp_dir}
- reviewer_paths_list: {reviewer_paths_list}
- final_doc_path: {final_doc_path}
- round_num_or_omitted: {round_num_or_omitted}
- targets_description: {targets_description}
- reviewer_names_csv: {reviewer_names_csv}
Round-specific overrides (apply after following the template's instructions):
- (none)
Include `template_id` (Read from the template's frontmatter) in the return value.
Receive the return value ({doc_path, findings_total, severity_counts, duplicates_merged, template_id}) from the aggregator sub-agent. Verify that template_id matches 7a5f8c1d-3e92-4b67-9c4a-2d8e1f7b3c54. If it does not match, re-launch the sub-agent.
Template: .claude/skills/parallel-review/templates/review-doc.md (the aggregator Sub Reads this to grasp the skeleton)
### {finding-id} โ {location}``.--- separator, place the metadata insertion markers <!-- METADATA({finding-id}) --> and <!-- /METADATA({finding-id}) -->, separated from surrounding content by blank lines. Output the space between the markers as empty (a later step inserts metadata mechanically).--- horizontal rule. Do not output a Status line (it is outside this skill's responsibility).## Critical / ## Major / ## Minor / ## Info), do not omit the heading; output the heading and write No findings in the body.After the aggregator sub-agent completes Writing the final report, delete the entire working directory created in Step 1 (including diff.txt and the reviewer files under reviews/).
.claude/scripts/rm-tmp.sh {tmp_dir}