
Turn Incidents into Checks for Your AI Reviewer
Every incident on critical code becomes a failure class in your review agent's memory plus a replayable eval case. A runner grades the reviewer with a judge model after prompt or model changes. #エンジニアリング
Make your review subagent get better after every incident instead of repeating its blind spots.
What is inside:
SKILL.md: the workflow. After a postmortem, understand the incident from a log line or reproduction, add one line to the reviewer's memory with the failure class (not the names or amounts), and add an eval case when the bug can be reproduced from code. It explains how to write a case with afocusthat names only where to look, how to reconcile against the bugfix records of a memory plugin to find classes you missed, and how to avoid claiming something is fixed because a session talked about it.scripts/run_evals.py: exports each case's base commit into a temp repo, applies the optional patch, runs your reviewer throughclaude -p, and has a small judge model grade the report PASS or FAIL against what you expected. It reviews without the memory file on purpose, so it measures what the prompt and model catch on their own. Options for model, effort and judge model.
It is for developers who use Claude Code to review changes in code where mistakes are costly: payments, authentication, data deletion, migrations. It needs Claude Code, git and Python 3; each case is one full review session, so mind your quota.
This skill is also part of the Claude Code Weekly Setup Review + Incident Checks pack at a lower per-skill price.
Example request
We just fixed a bug where a retry re-sent a non-idempotent payment request. Add it as a failure class and an eval case, then run the reviewer's eval set.
Example result
Example output on a fictional setup (illustrative).
Incident understood first: the retry wrapper re-sent the charge request after a timeout, and the first request had succeeded. Evidence: log line showing two charge calls with one idempotency key missing, and the commit before the fix.
Memory updated (one line merged into an existing class): "retry path re-sends a non-idempotent request; seen once in a charge call".
Case written to cases/retry-charge/case.json:
- id: retry-charge
- base: the commit before the fix
- focus: payment client and its retry wrapper (no hint of the bug)
- expect: the review must say the retry can duplicate a charge because no idempotency key is sent
Run: python3 scripts/run_evals.py --agent critical-reviewer.md --cases evals/cases
Result: 5 cases, 4 PASS, 1 FAIL (retry-charge: report praised the retry logic, missed the duplicate). Ran the failing case twice more: 1 of 3 passes, so the prompt does not catch it alone.
Next: strengthen the reviewer prompt with a line on idempotency, re-run each case three times before trusting any difference.
Requirements
- Claude Code with a review subagent (or willingness to create a read-only one)
- Python 3 (standard library only) and git
- Terminal login for claude -p runs
How to install
Unzip into your Claude Code skills folder (~/.claude/skills/ or .claude/skills/ in a project) and start a new session; the skill loads by its description.


