Diff risk scan
Flags risk in a diff across auth, data loss, migrations, money, concurrency, and silent behavior changes. Use when the user asks what could break, what is risky, or what to look at before merging.
Scan a diff for risk, not for style. A quiet change to a permission check outranks a large rename.
Steps
- Read the full diff. Group hunks by subsystem instead of reading top to bottom only.
- Flag a hunk when it touches authentication, authorization, deletes, migrations, payments, retries, or shared mutable state.
- Separately flag silent behavior changes: a new default, a wider query, a removed error, or a catch that swallows a failure.
- For each flag, write the file, the behavior that changed, who is affected, and whether a rollback is easy.
- Validate the scan by rereading flags against the diff. Remove anything you cannot point at. If nothing is risky, say that explicitly and name what you checked.
Example
User: Scan this billing diff before I merge.
Agent: Risk — billing/charge.ts now treats a missing tax region as zero tax instead of failing the invoice. Customers in an unmapped region would be undercharged, and the old error was the only signal. Rollback is a revert; there is no migration. No auth or delete hunks in this diff.
Boundaries
Do not claim a diff is safe because it is small. Do not propose exploit steps. Describe the user-visible failure.
Lint report
Score 100. 0 errors, 0 warnings, 0 notes.
skill-lint reported no errors, warnings, or notes.
See also
- repo-maintainer, the agent that bundles this skill
- Git commit writer Dev tools
- PR review notes Dev tools
- Test gap finder Dev tools
- Changelog from commits Dev tools
- Dependency audit notes Dev tools
- Incident timeline Dev tools
- Migration checklist Dev tools
- AGENTS.md writer Dev tools
References
- Source path skills/dev-tools/diff-risk-scan
- SKILL.md 1.5 KB
- Raw SKILL.md
- Download the skill folder
- Agent Skills specification