Change Review Agent
Use this skill after implementation work when the user explicitly asks for an
agent or subagent to review the current changes. The review agent is a second
pass, not the implementer, and must not edit files.
Trigger Phrases
Examples include:
- "start an agent review for these changes"
- "ask another agent to review the diff"
- "spawn a review agent"
- "run a subagent code review"
- "use an agent to review my changes"
Do not use this skill merely because the user asks for depth, confidence, or a
normal review. Only start a subagent when the user explicitly requests an agent
or subagent.
Workflow
- Finish any in-progress local edits before starting the review.
- Capture the local review scope, including staged and untracked files:
git status --short --untracked-files=all
git diff --stat HEAD
git diff --name-only HEAD
git diff --check HEAD
git ls-files --others --exclude-standard
If the worktree contains unrelated user changes, identify the files that belong
to the current task and tell the review agent to focus on those files. If
untracked files are in scope, include their paths and either their contents or a
concise content summary in the review prompt because git diff will not show
them.
- Check review readiness before spawning:
- If the diff is too broad, mixes unrelated goals, or has unclear scope, ask
the reviewer to report this as a finding or note.
- If verification is missing, pass that fact through explicitly instead of
implying the change was tested.
- If generated files, lockfiles, snapshots, or package outputs are present,
tell the reviewer whether they are in scope or incidental.
- Start one read-only review agent, normally an
explorer agent.
- In the review prompt, include:
- repository path
- original user request or current task goal
- files in scope
- verification already run and any failures
- explicit instruction not to edit files or run mutating commands
- Wait for the reviewer before giving the final answer, unless the user asks
for an asynchronous handoff.
- Triage the review result:
- Do not make follow-up code edits just because the reviewer found issues.
Report the findings first and wait for explicit user direction unless the
user already asked to "review and fix".
- If the user explicitly asked to review and fix, validate the finding
yourself before editing, then rerun relevant checks.
- If the user asked only for review, report the findings without making
further changes.
- If the review has no findings, say that clearly and mention any remaining
test gaps or risks.
Allowed and Forbidden Actions
The review agent may run read-only inspection commands such as git status,
git diff, git diff --check, git log, rg, sed, find, ls, package
metadata reads, and test-file inspection.
The review agent must not edit files, format code, stage changes, commit,
install or update dependencies, regenerate outputs, run package scripts that
can mutate the worktree, or apply automated fixes. If a command might mutate
the worktree, the reviewer should list it as suggested verification instead of
running it.
Review Readiness
Before line-level review, the reviewer should decide whether the diff is ready
for useful review:
- scope: one coherent task, no unrelated refactors or formatting churn
- context: task goal and changed files are understandable from the prompt and
diff
- size: large or multi-package diffs identify main files and likely review
order; overly broad diffs should be flagged for splitting
- verification: relevant checks are reported, missing, or intentionally skipped
- generated artifacts: lockfiles, snapshots, bundled outputs, and generated docs
are either explained or flagged as unclear
Readiness problems can be findings when they create merge risk, or notes when
they only limit review confidence.
Review Order
Ask the reviewer to inspect in this order:
- Understand the task goal, diff summary, changed file list, and impact area.
- Review the main implementation files and contracts first.
- Review tests next, including whether they fail for the changed behavior.
- Review package metadata, manifests, docs, install steps, generated files, and
release/changeset implications.
- Scan the rest of the in-scope files so every human-written change has been
considered.
Review Focus
The review agent should inspect the diff as a production code reviewer. Ask it
to cover:
- conflicts with existing behavior, public APIs, package/plugin manifests,
install flows, docs, marketplace entries, and established repository patterns
- impact area: affected packages, commands, docs, tests, generated artifacts,
user-visible behavior, and release or changeset implications
- correctness risks: regressions, broken contracts, missing edge cases,
incomplete error handling, async/concurrency issues, and platform assumptions
- test risk: changed behavior without targeted coverage, stale snapshots, or
verification that does not exercise the risky path
- maintainability risk: duplicated logic, unclear ownership boundaries, or
changes that make future package integration work harder
- security and supply-chain risk: secrets, unsafe shelling out, untrusted input,
dependency changes, permissions, tokens, and package publishing surfaces
- migration and rollback risk: config changes, persistent state, release tags,
marketplace pointers, install commands, or behavior that is hard to undo
Evidence Standard
Every finding must be actionable and evidence-backed:
- include priority, file/line, affected surface, risk, and smallest fix
- explain the concrete failure mode or merge risk, not just a preference
- distinguish confirmed defects from hypotheses and unverified concerns
- label style-only or taste-only feedback as
P3 or a note
- avoid comments that only restate the diff or ask broad questions without a
specific risk
If a reviewer cannot verify a concern from the available context, they should
state what evidence is missing and which command or file would resolve it.
Escalation
Ask for a domain expert or maintainer decision instead of overclaiming when the
change touches areas such as:
- security, auth, tokens, private data, or permissions
- release automation, package publishing, versioning, changesets, or
marketplace metadata
- installation flows, generated package contents, plugin manifests, or host-tool
compatibility
- concurrency, async ordering, persistent state, migrations, or destructive
commands
- broad architecture changes or ownership boundaries across packages
Severity Ratings
Require every finding to include one priority:
P0: blocks release or can cause data loss, security exposure, widespread
runtime failure, broken installs, or destructive behavior.
P1: likely user-facing regression, broken supported workflow, incompatible
package/API behavior, or high-confidence CI/release failure.
P2: localized bug, missing important test, confusing behavior, or
compatibility risk that should be fixed before merge.
P3: low-risk cleanup, naming clarity, minor docs issue, or maintainability
improvement that can reasonably follow later.
Findings without a concrete risk should be reported as notes, not blocking
findings.
Review Agent Prompt Template
Use a focused prompt like this:
Review the current uncommitted changes in <repo-path> as a code reviewer.
Do not edit files or run mutating commands. Inspect git status, git diff, and
the relevant source/tests. Focus only on these in-scope files unless another
file is needed to understand a contract:
<files>
Original task:
<task>
Verification already run:
<commands and results>
First assess review readiness: scope clarity, unrelated changes, diff size,
missing verification, and any unexplained generated artifacts.
Review in order: overall task and impact, main implementation and contracts,
tests, package/docs/manifests/generated files, then the rest of the in-scope
human-written changes.
Review for conflicts with existing behavior, public APIs, package/plugin
manifests, install flows, docs, marketplace entries, and established repository
patterns. Assess impact area, security/supply-chain risk, rollback risk, and
release/changeset implications.
Return findings first, ordered by severity. Each finding must include a P0-P3
priority, concrete file/line reference, affected surface, risk, and smallest
actionable fix. Prioritize bugs, regressions, broken contracts, missing tests
for changed behavior, release or packaging risks, and hidden compatibility
conflicts. If there are no findings, say that directly and list residual test
gaps or impact areas that were not verified. Escalate anything needing a domain
expert or maintainer decision instead of overclaiming certainty.
Reporting Shape
When the agent returns, answer in a code-review style:
- findings first, ordered by severity, each with
P0-P3
- affected surface and impact area for each finding
- review readiness issues, if any
- escalation or maintainer-decision items, if any
- open questions or assumptions
- whether the reviewer found no issues
- verification status and remaining test gaps
Do not bury real findings in a long summary. If you disagree with a reviewer
finding, state why and whether you verified the disagreement locally. Do not
make additional code changes after the review unless the user explicitly asks
you to fix the findings.
1---2name: change-review-agent3description: Use this project-local skill when the user asks Codex to start, spawn, launch, or use an agent/subagent to review current code changes, implementation, diff, or completed modifications in this repository with read-only review, readiness checks, conflict checks, impact analysis, evidence-backed findings, escalation notes, and P0-P3 severity ratings.4---56# Change Review Agent78Use this skill after implementation work when the user explicitly asks for an9agent or subagent to review the current changes. The review agent is a second10pass, not the implementer, and must not edit files.1112## Trigger Phrases1314Examples include:1516- "start an agent review for these changes"17- "ask another agent to review the diff"18- "spawn a review agent"19- "run a subagent code review"20- "use an agent to review my changes"2122Do not use this skill merely because the user asks for depth, confidence, or a23normal review. Only start a subagent when the user explicitly requests an agent24or subagent.2526## Workflow27281. Finish any in-progress local edits before starting the review.292. Capture the local review scope, including staged and untracked files:3031```bash32git status --short --untracked-files=all33git diff --stat HEAD34git diff --name-only HEAD35git diff --check HEAD36git ls-files --others --exclude-standard37```3839If the worktree contains unrelated user changes, identify the files that belong40to the current task and tell the review agent to focus on those files. If41untracked files are in scope, include their paths and either their contents or a42concise content summary in the review prompt because `git diff` will not show43them.44453. Check review readiness before spawning:46 - If the diff is too broad, mixes unrelated goals, or has unclear scope, ask47 the reviewer to report this as a finding or note.48 - If verification is missing, pass that fact through explicitly instead of49 implying the change was tested.50 - If generated files, lockfiles, snapshots, or package outputs are present,51 tell the reviewer whether they are in scope or incidental.524. Start one read-only review agent, normally an `explorer` agent.535. In the review prompt, include:54 - repository path55 - original user request or current task goal56 - files in scope57 - verification already run and any failures58 - explicit instruction not to edit files or run mutating commands596. Wait for the reviewer before giving the final answer, unless the user asks60 for an asynchronous handoff.617. Triage the review result:62 - Do not make follow-up code edits just because the reviewer found issues.63 Report the findings first and wait for explicit user direction unless the64 user already asked to "review and fix".65 - If the user explicitly asked to review and fix, validate the finding66 yourself before editing, then rerun relevant checks.67 - If the user asked only for review, report the findings without making68 further changes.69 - If the review has no findings, say that clearly and mention any remaining70 test gaps or risks.7172## Allowed and Forbidden Actions7374The review agent may run read-only inspection commands such as `git status`,75`git diff`, `git diff --check`, `git log`, `rg`, `sed`, `find`, `ls`, package76metadata reads, and test-file inspection.7778The review agent must not edit files, format code, stage changes, commit,79install or update dependencies, regenerate outputs, run package scripts that80can mutate the worktree, or apply automated fixes. If a command might mutate81the worktree, the reviewer should list it as suggested verification instead of82running it.8384## Review Readiness8586Before line-level review, the reviewer should decide whether the diff is ready87for useful review:8889- scope: one coherent task, no unrelated refactors or formatting churn90- context: task goal and changed files are understandable from the prompt and91 diff92- size: large or multi-package diffs identify main files and likely review93 order; overly broad diffs should be flagged for splitting94- verification: relevant checks are reported, missing, or intentionally skipped95- generated artifacts: lockfiles, snapshots, bundled outputs, and generated docs96 are either explained or flagged as unclear9798Readiness problems can be findings when they create merge risk, or notes when99they only limit review confidence.100101## Review Order102103Ask the reviewer to inspect in this order:1041051. Understand the task goal, diff summary, changed file list, and impact area.1062. Review the main implementation files and contracts first.1073. Review tests next, including whether they fail for the changed behavior.1084. Review package metadata, manifests, docs, install steps, generated files, and109 release/changeset implications.1105. Scan the rest of the in-scope files so every human-written change has been111 considered.112113## Review Focus114115The review agent should inspect the diff as a production code reviewer. Ask it116to cover:117118- conflicts with existing behavior, public APIs, package/plugin manifests,119 install flows, docs, marketplace entries, and established repository patterns120- impact area: affected packages, commands, docs, tests, generated artifacts,121 user-visible behavior, and release or changeset implications122- correctness risks: regressions, broken contracts, missing edge cases,123 incomplete error handling, async/concurrency issues, and platform assumptions124- test risk: changed behavior without targeted coverage, stale snapshots, or125 verification that does not exercise the risky path126- maintainability risk: duplicated logic, unclear ownership boundaries, or127 changes that make future package integration work harder128- security and supply-chain risk: secrets, unsafe shelling out, untrusted input,129 dependency changes, permissions, tokens, and package publishing surfaces130- migration and rollback risk: config changes, persistent state, release tags,131 marketplace pointers, install commands, or behavior that is hard to undo132133## Evidence Standard134135Every finding must be actionable and evidence-backed:136137- include priority, file/line, affected surface, risk, and smallest fix138- explain the concrete failure mode or merge risk, not just a preference139- distinguish confirmed defects from hypotheses and unverified concerns140- label style-only or taste-only feedback as `P3` or a note141- avoid comments that only restate the diff or ask broad questions without a142 specific risk143144If a reviewer cannot verify a concern from the available context, they should145state what evidence is missing and which command or file would resolve it.146147## Escalation148149Ask for a domain expert or maintainer decision instead of overclaiming when the150change touches areas such as:151152- security, auth, tokens, private data, or permissions153- release automation, package publishing, versioning, changesets, or154 marketplace metadata155- installation flows, generated package contents, plugin manifests, or host-tool156 compatibility157- concurrency, async ordering, persistent state, migrations, or destructive158 commands159- broad architecture changes or ownership boundaries across packages160161## Severity Ratings162163Require every finding to include one priority:164165- `P0`: blocks release or can cause data loss, security exposure, widespread166 runtime failure, broken installs, or destructive behavior.167- `P1`: likely user-facing regression, broken supported workflow, incompatible168 package/API behavior, or high-confidence CI/release failure.169- `P2`: localized bug, missing important test, confusing behavior, or170 compatibility risk that should be fixed before merge.171- `P3`: low-risk cleanup, naming clarity, minor docs issue, or maintainability172 improvement that can reasonably follow later.173174Findings without a concrete risk should be reported as notes, not blocking175findings.176177## Review Agent Prompt Template178179Use a focused prompt like this:180181```text182Review the current uncommitted changes in <repo-path> as a code reviewer.183184Do not edit files or run mutating commands. Inspect git status, git diff, and185the relevant source/tests. Focus only on these in-scope files unless another186file is needed to understand a contract:187188<files>189190Original task:191<task>192193Verification already run:194<commands and results>195196First assess review readiness: scope clarity, unrelated changes, diff size,197missing verification, and any unexplained generated artifacts.198199Review in order: overall task and impact, main implementation and contracts,200tests, package/docs/manifests/generated files, then the rest of the in-scope201human-written changes.202203Review for conflicts with existing behavior, public APIs, package/plugin204manifests, install flows, docs, marketplace entries, and established repository205patterns. Assess impact area, security/supply-chain risk, rollback risk, and206release/changeset implications.207208Return findings first, ordered by severity. Each finding must include a P0-P3209priority, concrete file/line reference, affected surface, risk, and smallest210actionable fix. Prioritize bugs, regressions, broken contracts, missing tests211for changed behavior, release or packaging risks, and hidden compatibility212conflicts. If there are no findings, say that directly and list residual test213gaps or impact areas that were not verified. Escalate anything needing a domain214expert or maintainer decision instead of overclaiming certainty.215```216217## Reporting Shape218219When the agent returns, answer in a code-review style:220221- findings first, ordered by severity, each with `P0`-`P3`222- affected surface and impact area for each finding223- review readiness issues, if any224- escalation or maintainer-decision items, if any225- open questions or assumptions226- whether the reviewer found no issues227- verification status and remaining test gaps228229Do not bury real findings in a long summary. If you disagree with a reviewer230finding, state why and whether you verified the disagreement locally. Do not231make additional code changes after the review unless the user explicitly asks232you to fix the findings.