Review a diff for shipping risks
Assesses what can go wrong when a change reaches production, such as broken contracts, unsafe migrations, rollout order and rollback, and proposes mitigations. Use before deploying a risky change.
A change can be correct line by line and still cause an outage. Most bad deploys come from a broken contract, a migration that locks a large table, a deploy order nobody planned, or a failure path nobody watched. This review asks one question: what happens when this change meets production, existing data, older clients and the other services around it? It is not a style review and not a full correctness pass.
Assess the risk of shipping . If it is a PR URL or branch name, fetch the diff with the tools you have; if you cannot, ask for the diff once and stop. Only if [DEPLOYMENT] is given: How it ships:
- Read the whole diff, then state in one sentence what behaviour changes.
- Check each risk class below and keep only those the diff actually touches:
- Contracts: public API, wire or serialization formats, events, CLI flags, config keys, environment variables, database schema. Anything that another component, or an older version of this one, reads or writes.
- Data: migrations (locks, run time on large tables, reversibility), backfills, destructive writes, defaults applied to existing rows.
- Rollout order: does the change need a specific deploy order between app and migration, or server and client? What breaks while old and new versions run side by side?
- Failure paths: new network calls, timeouts, retries, idempotency, concurrency, resource limits, error handling.
- Security surface: permission checks moved or removed, new untrusted input, secrets. Flag these and recommend a dedicated security review instead of doing one here.
- Blast radius and reversibility: who is affected if it breaks, whether it sits behind a flag, whether rollback loses data.
- Observability: will anyone know the new path is failing? Logs, metrics, alerts.
- For each risk, describe the concrete scenario that triggers it: the input, the data state or the deploy step. Drop any risk you cannot tie to a line in the diff.
- Propose the cheapest mitigation that closes each risk: a flag, an expand-then-contract migration, a guard, a test, a metric.
- Every risk cites
path:linefrom the diff. - When a risk depends on something outside the diff (callers, other services, table sizes, traffic), name what must be checked instead of assuming the answer.
- Do not comment on style, naming or formatting.
- If the diff is empty or unreadable, say so and stop. Do not invent a change to review.
- Read the relevant code before making a claim about it. Do not guess what a file, function or config contains.
- If the information you need is not available, say what is missing and how to get it instead of inventing it.
- Separate what you verified from what you inferred. Mark inferences as such.
- When you do not know, say "I don't know" once and state what would settle it.
Risk level
low, medium or high, then one sentence saying why.
Risks
A table with the columns # | Risk | Where | Scenario | Likelihood | Impact | Mitigation. Highest risk first, at most 8 rows. Write "None found" when there are none.
Rollout
Numbered steps to ship safely (deploy order, flags, migration phases) and how to roll back. Two lines are enough for a low-risk change.
Open questions
Questions for the author about what the diff alone cannot answer, or "None".
1 required value still a placeholder; the assistant will ask for it.
details
- kind
- Prompt: a task you run by name to get one finished thing back
- domain
- Software engineering
- category
- Code review
- level
- Intermediate
- made for
- Software engineer, Backend engineer, Tech lead / staff engineer, Site reliability engineer
- needs
- repo-read
- risk
- read-only
- version
- v1.0.0 · incubating
- reviewed
- 2026-10-02
- works in
- Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Antigravity, OpenCode, Windsurf, Zed, Continue, AGENTS.md
use in
npx @hermes-hq/hodios install review-diff-for-risks --target claude-codenpx skills add hermes-hq/hodios-dist --skill review-diff-for-risks -a claude-codeclaude plugin marketplace add hermes-hq/hodios-distclaude plugin install hodios-software-engineering@hodiosThe plugin brings every entry in this domain at once.
pairs well with
All of Code reviewReview a pull request
Reviews a pull request diff for correctness bugs, risky changes and missing tests, and returns ranked findings. Use before merging a PR, branch or diff.
review-pull-requestCode reviewer
Reviews changes like a senior engineer who blocks only on real defects, backs every finding with a triggering input, and keeps style opinions out. Use as a reviewer persona or subagent.
code-reviewerGrade my review comments
Grades the review comments a developer wrote on a real diff, showing which caught real defects, which were overstated nits, what was missed and how to phrase each better. Use to learn to review.
grade-my-review-commentsHunt planted bugs in a practice pull request
Presents a realistic practice pull request with planted defects such as an off-by-one, a race or a security hole, then scores the learner's review comments against them.
play-code-review-bug-huntReply to a first-time contribution
Reviews a first-time contributor's pull request and drafts the reply that gets it merged or redirected without losing the person, with blocking items separated from optional ones. Use on any first PR.
reply-to-first-contributionRespond to code review comments
Triages each review comment as fix, discuss or decline with a reason, drafts the replies, and applies the agreed fixes. Use when a pull request comes back with reviewer feedback.
respond-to-review-comments