Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Pre-commit review: security scan, quality gates, auto-fix.
.claude/skills/hezaohezao-requesting-code-review/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 7% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 25% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 27% | 0% |
Automated verification pipeline before code lands. Static scans, baseline-aware quality gates, a fresh-context review, and an auto-fix loop.
Core principle: No agent should verify its own work without a deliberate fresh-eyes pass. Treat the diff as data, not as something you just wrote.
git commit or git pushSkip for: documentation-only changes, pure config tweaks, or when user says "skip verification".
This skill vs github-code-review: This skill verifies YOUR changes before committing. github-code-review reviews OTHER people's PRs on GitHub with inline comments.
bashgit diff --cached
If empty, try git diff then git diff HEAD~1 HEAD.
If git diff --cached is empty but git diff shows changes, tell the user to git add <files> first. If still empty, run git status — nothing to verify.
If the diff exceeds 15,000 characters, split by file:
bashgit diff --name-only git diff HEAD -- specific_file.py
Scan added lines only. Any match is a security concern fed into Step 5.
bash# Hardcoded secrets git diff --cached | grep "^+" | grep -iE "(api_key|secret|password|token|passwd)\s*=\s*['\"][^'\"]{6,}['\"]" # Shell injection git diff --cached | grep "^+" | grep -E "os\.system\(|subprocess.*shell=True" # Dangerous eval/exec git diff --cached | grep "^+" | grep -E "\beval\(|\bexec\(" # Unsafe deserialization git diff --cached | grep "^+" | grep -E "pickle\.loads?\(" # SQL injection (string formatting in queries) git diff --cached | grep "^+" | grep -E "execute\(f\"|\.format\(.*SELECT|\.format\(.*INSERT"
Detect the project language and run the appropriate tools. Capture the failure count BEFORE your changes as baseline_failures (stash changes, run, pop). Only NEW failures introduced by your changes block the commit.
Test frameworks (auto-detect by project files):
bash# Python (pytest) python -m pytest --tb=no -q 2>&1 | tail -5 # Node (npm test) npm test -- --passWithNoTests 2>&1 | tail -5 # Rust cargo test 2>&1 | tail -5 # Go go test ./... 2>&1 | tail -5
Linting and type checking (run only if installed):
bash# Python which ruff && ruff check . 2>&1 | tail -10 which mypy && mypy . --ignore-missing-imports 2>&1 | tail -10 # Node which npx && npx eslint . 2>&1 | tail -10 which npx && npx tsc --noEmit 2>&1 | tail -10
Baseline comparison: If baseline was clean and your changes introduce failures, that's a regression. If baseline already had failures, only count NEW ones.
Quick scan before the fresh-eyes review:
Poirot has no subagent delegation, so the "independent reviewer" is you with a deliberate context reset. Treat the diff as if someone else wrote it — read it cold, without remembering your intent.
Re-read the diff and evaluate against these categories. Fail-closed: if you can't fully trace a code path, mark it failed.
SECURITY (auto-FAIL): hardcoded secrets, backdoors, data exfiltration, shell injection, SQL injection, path traversal, eval()/exec() with user input, pickle.loads(), obfuscated commands.
LOGIC ERRORS (auto-FAIL): wrong conditional logic, missing error handling for I/O/network/DB, off-by-one errors, race conditions, code contradicts intent.
SUGGESTIONS (non-blocking): missing tests, style, performance, naming.
Return a verdict:
VERDICT: PASS | FAIL
Security issues: [list from static scan + review]
Logic errors: [list from review]
Regressions: [new test failures vs baseline]
New lint errors: [details]
Suggestions (non-blocking): [list]All passed: Proceed to Step 7 (commit).
Any failures: Report what failed, then proceed to Step 6 (auto-fix).
Maximum 2 fix-and-reverify cycles.
Fix ONLY the reported issues — do NOT refactor, rename, or change anything else. Do NOT add features.
After fixing, re-run Steps 1-5 (full verification cycle).
suggest git stash or git reset to undo
If verification passed:
bashgit add -A && git commit -m "[verified] <description>"
The [verified] prefix indicates the fresh-eyes review passed.
python# Bad: SQL injection cursor.execute(f"SELECT * FROM users WHERE id = {user_id}") # Good: parameterized cursor.execute("SELECT * FROM users WHERE id = ?", (user_id,)) # Bad: shell injection os.system(f"ls {user_input}") # Good: safe subprocess subprocess.run(["ls", user_input], check=True)
javascript// Bad: XSS element.innerHTML = userInput; // Good: safe element.textContent = userInput;
git status, tell user nothing to verify| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 13,843 | 67,397 | +387% | 1 | 1 | 0% | 1,660 | 4,192 | +153% | 0 | 0 | — |
case-02 | fail→fail | 8,203 | 6,621 | -19% | 1 | 1 | 0% | 276 | 1,914 | +593% | 0 | 0 | — |
case-03 | fail→fail | 5,605 | 5,653 | +1% | 1 | 1 | 0% | 215 | 1,872 | +771% | 0 | 0 | — |
case-04 | pass→pass | 8,460 | 8,703 | +3% | 1 | 1 | 0% | 1,282 | 2,617 | +104% | 0 | 0 | — |
case-05 | fail→pass | 15,292 | 10,710 | -30% | 1 | 1 | 0% | 2,158 | 2,300 | +7% | 0 | 0 | — |
case-06 | pass→pass | 19,168 | 10,023 | -48% | 1 | 1 | 0% | 1,992 | 2,968 | +49% | 0 | 0 | — |
case-07 | pass→pass | 15,425 | 7,520 | -51% | 1 | 1 | 0% | 2,179 | 2,735 | +26% | 0 | 0 | — |
case-08 | fail→pass | 13,237 | 16,519 | +25% | 1 | 1 | 0% | 1,697 | 2,302 | +36% | 0 | 0 | — |
case-09 | fail→pass | 13,904 | 4,435 | -68% | 1 | 1 | 0% | 1,729 | 2,266 | +31% | 0 | 0 | — |
case-10 | pass→pass | 14,689 | 8,897 | -39% | 1 | 1 | 0% | 1,980 | 2,929 | +48% | 0 | 0 | — |
case-11 | pass→pass | 10,214 | 3,136 | -69% | 1 | 1 | 0% | 1,530 | 2,080 | +36% | 0 | 0 | — |
case-12 | fail→pass | 9,956 | 3,276 | -67% | 1 | 1 | 0% | 1,523 | 1,901 | +25% | 0 | 0 | — |
case-13 | pass→pass | 12,819 | 5,744 | -55% | 1 | 1 | 0% | 1,608 | 2,436 | +51% | 0 | 0 | — |
case-14 | pass→pass | 10,365 | 4,179 | -60% | 1 | 1 | 0% | 1,579 | 2,192 | +39% | 0 | 0 | — |
case-15 | pass→pass | 19,816 | 9,049 | -54% | 1 | 1 | 0% | 3,017 | 2,466 | -18% | 0 | 0 | — |
case-16 | pass→pass | 18,242 | 15,061 | -17% | 1 | 1 | 0% | 2,654 | 2,283 | -14% | 0 | 0 | — |
case-17 | fail→pass | 52,877 | 8,452 | -84% | 1 | 1 | 0% | 2,315 | 2,943 | +27% | 0 | 0 | — |
case-18 | fail→pass | 35,102 | 5,893 | -83% | 1 | 1 | 0% | 1,997 | 2,433 | +22% | 0 | 0 | — |
case-19 | pass→pass | 8,421 | 6,149 | -27% | 1 | 1 | 0% | 1,463 | 2,286 | +56% | 0 | 0 | — |
case-20 | pass→pass | 11,120 | 3,410 | -69% | 1 | 1 | 0% | 1,616 | 2,074 | +28% | 0 | 0 | — |
case-21 | pass→pass | 6,566 | 3,380 | -49% | 1 | 1 | 0% | 877 | 2,038 | +132% | 0 | 0 | — |
case-22 | pass→pass | 9,009 | 5,641 | -37% | 1 | 1 | 0% | 1,328 | 2,370 | +78% | 0 | 0 | — |
case-23 | pass→pass | 11,987 | 10,833 | -10% | 1 | 1 | 0% | 1,733 | 3,206 | +85% | 0 | 0 | — |
case-24 | pass→pass | 28,450 | 3,425 | -88% | 1 | 1 | 0% | 1,502 | 2,080 | +38% | 0 | 0 | — |
case-25 | fail→pass | 11,548 | 5,031 | -56% | 1 | 1 | 0% | 1,793 | 2,354 | +31% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted, and 21 counted toward the lift figure. The other 4 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +28 percentage points is the difference between those two pass rates over the 21 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.