Review Code
Act as a senior software engineer and perform a thorough code review.
When to use
- The user asks to review code, in any phrasing: "review this diff",
"review the PR", "check my changes", "code review" — or runs
/review-code.
- A commit, branch, PR, or diff is ready and the user wants it assessed
before merge.
Instructions
- Determine what is being reviewed from the user context: a working-tree
diff, a commit range, a branch, a PR (number or URL), or specific files. If
the target is ambiguous, ask before reviewing.
- Delegate the review to the
general subagent (via the task tool), unless the
user specifies another agent. Include in the prompt the
code-review-criteria skill name and all user context.
- When the subagent returns, output the review to the user verbatim. Do not
summarize it and do not act on its findings.
- Right after the review, suggest how to proceed based on the findings. These
are suggestions — the user decides:
- Approve (no required changes): say so — there is nothing to address.
- Minor findings (nits): applying them directly as-is is fine once the
review is done — no plan needed.
- Substantive findings: suggest
/make-a-plan to make a plan to address
them.
Hard rule — read-only while reviewing
This flow is read-only for the duration of the review: from the moment it
starts until the user considers the review finished (including any feedback,
questions, or clarifications about it). During that period, never fix,
implement, edit files or create commits — not even "obvious" fixes derived from
the findings. Once the user explicitly states the review is done (or moves on to
a different task), this rule no longer applies and you act as a normal build
agent again.
Instructions for the subagent
- Load the
code-review-criteria skill and follow its process and output
format.
- Read
AGENTS.md (if present) and follow its instructions for finding and
reading all related testing documentation from memories before reviewing.
- Return in your final message the COMPLETE review, verbatim, exactly as the
skill instructs it to be produced. Do not summarize it — include the full
structured review.
Strong rules for the subagent
- Do not invent problems. Every finding must be real and actionable.
- Read-only: do not modify any file and do not create a commit — reviewing
never writes.
- Be specific and constructive. "This could be better" is not helpful — explain
why and how.
- Prioritize by impact. One structural issue outweighs ten nits.
- Missing tests are an issue, not a suggestion. Report as a severity-tagged
finding — never as a recommendation.
- Skip generated files, lockfile-only changes, and unrelated modifications
unless they introduce security risks.
User context
Extra context in the user's invocation (the message that triggered this skill)
plays the role command arguments play elsewhere: for example, a PR number or
URL, a commit range, specific files, or a different agent to run the review.
1---2name: review-code3description: Code review flow — review a diff, PR, or code change, delegating the review to a subagent that follows the code-review-criteria skill. Use it when the user asks to review code or a PR, in any phrasing.4---56# Review Code78Act as a senior software engineer and perform a thorough code review.910## When to use1112- The user asks to review code, in any phrasing: "review this diff",13 "review the PR", "check my changes", "code review" — or runs14 `/review-code`.15- A commit, branch, PR, or diff is ready and the user wants it assessed16 before merge.1718## Instructions19201. **Determine what is being reviewed** from the user context: a working-tree21 diff, a commit range, a branch, a PR (number or URL), or specific files. If22 the target is ambiguous, ask before reviewing.232. Delegate the review to the `general` subagent (via the task tool), unless the24 user specifies another agent. Include in the prompt the25 **`code-review-criteria`** skill name and all user context.263. When the subagent returns, output the review to the user verbatim. Do not27 summarize it and do not act on its findings.284. Right after the review, suggest how to proceed based on the findings. These29 are suggestions — the user decides:30 - **Approve (no required changes):** say so — there is nothing to address.31 - **Minor findings (nits):** applying them directly as-is is fine once the32 review is done — no plan needed.33 - **Substantive findings:** suggest `/make-a-plan` to make a plan to address34 them.3536### Hard rule — read-only while reviewing3738This flow is read-only **for the duration of the review**: from the moment it39starts until the user considers the review finished (including any feedback,40questions, or clarifications about it). During that period, never fix,41implement, edit files or create commits — not even "obvious" fixes derived from42the findings. Once the user explicitly states the review is done (or moves on to43a different task), this rule no longer applies and you act as a normal build44agent again.4546## Instructions for the subagent47481. Load the **`code-review-criteria`** skill and follow its process and output49 format.502. Read `AGENTS.md` (if present) and follow its instructions for finding and51 reading all related testing documentation from memories before reviewing.523. Return in your final message the COMPLETE review, verbatim, exactly as the53 skill instructs it to be produced. Do not summarize it — include the full54 structured review.5556### Strong rules for the subagent57581. Do not invent problems. Every finding must be real and actionable.592. Read-only: do not modify any file and do not create a commit — reviewing60 never writes.613. Be specific and constructive. "This could be better" is not helpful — explain62 why and how.634. Prioritize by impact. One structural issue outweighs ten nits.645. Missing tests are an issue, not a suggestion. Report as a severity-tagged65 finding — never as a recommendation.666. Skip generated files, lockfile-only changes, and unrelated modifications67 unless they introduce security risks.6869## User context7071Extra context in the user's invocation (the message that triggered this skill)72plays the role command arguments play elsewhere: for example, a PR number or73URL, a commit range, specific files, or a different agent to run the review.