iterative-code-review
Skill0 starsChanged 49 days agoApache-2.0View on GitHub
Run a converging code-review loop on a change: spawn an INDEPENDENT reviewer to hunt real bugs and edge cases (not style, since the gate covers that), triage findings, fix the genuine ones, add tests for them, then re-review until a pass comes back clean. Use after building a feature/slice and before opening or merging a PR, or whenever asked to "review and fix the issues until they're fixed".
3 other projects use a version of this.
Adopted by
Most recently taken up by
- BenSchZA/skillstheir own version, first seen Oct 13, 2026
- portable-genai/data-quality-governanceword for word, first seen Oct 11, 2026
- ichuan/skillstheir own version, first seen Feb 3, 2026
Other versions3 projects use a version of this.
Word for word · 1
- portable-genai/data-quality-governance★ 0100% same
Edited · 0
None found.
Wrote their own version · 2
- BenSchZA/skills★ 1same name
- ichuan/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- audit-first-demoSkill
- deploy-and-residency-hardeningSkill
- deterministic-domain-serviceSkill
- embeddable-secure-uiSkill
- vertical-slice-deliverySkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
After implementing a feature or vertical slice, before the PR (or before merge).
- Distinctive: line 20
When the user says "do iterative code review and fix the issues until fixed".
- Distinctive: line 21
After a non-trivial refactor or bug fix where edge cases lurk.
- Very specific: line 32
Call out the specific risk areas for this change: date/number arithmetic, boundary conditions (zero/empty/exactly-at-threshold), …
- Distinctive: line 53
Run another independent pass focused on the diff since the last review: confirm each fix is correct and complete, and scan for anything the …
- Distinctive: line 78
Keep the reviewer's scope tight (the changed files), and give it the domain context in one paragraph so it judges intent correctly.
- Distinctive: line 89
Attack the artifact, do not only read it: Run the thing from where an attacker would be: a real LAN peer, an unset environment variable, a …
- Very specific: line 102
Docs style: no em-dashes in .md or .html files, commit messages, or PR bodies.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Iterative code-review loop
Tests pin the behavior you thought of; an independent review finds the behavior you didn't. This loop adds a cheap, high-signal adversarial pass on a change and drives it to convergence: issues found AND fixed AND re-verified, not just listed.
When to use
- After implementing a feature or vertical slice, before the PR (or before merge).
- When the user says "do iterative code review and fix the issues until fixed".
- After a non-trivial refactor or bug fix where edge cases lurk.
The loop
1. Independent review pass
Spawn a fresh reviewer (a subagent) with no stake in the code, pointed at the specific new/changed files. Give it sharp instructions:
- Find real correctness bugs and edge cases, not style nits (ruff/mypy/format already pass; say so, so it doesn't waste effort there).
- Call out the specific risk areas for this change: date/number arithmetic, boundary conditions (zero/empty/exactly-at-threshold), None-handling, precedence of conditions, off-by-one, duplication/guard logic, serialization mismatches, and test coverage gaps.
- Require each finding as
file:line · severity (bug/edge-case/minor) · concrete description · suggested fix. Tell it to verify claims (e.g. actually compute the dates) and to not pad: if something is fine, stay silent. - Tell it not to edit, just report.
2. Triage
Sort findings into: genuine bugs (fix now), worthwhile robustness/coverage improvements (fix if cheap and in-scope), and intended-design / false-positive (note why, no action). Don't reflexively act on every item: a finding can be wrong; judge it.
3. Fix + add tests
For each accepted finding: make the fix, and add a regression test that would have caught it (the test is how you prove it's fixed and keep it fixed). Re-run the full gate.
4. Re-review until clean
Run another independent pass focused on the diff since the last review: confirm each fix is correct and complete, and scan for anything the fix introduced (a new bug, new duplication, wrong precedence). Repeat 2-4 until a pass comes back with no actionable findings. That is convergence.
5. Report
Summarize: issues found, which were fixed (with the regression tests added), which were intentional/declined and why, and the final gate result. Then proceed to the PR/merge.
What good findings look like (calibration)
From a real run of this loop:
- Bug: "empty
last_reviewedyields DUE_SOON with days=0 and does not escalate; a never-reviewed case is the highest priority; should be OVERDUE + escalate." -> fixed + testtest_never_reviewed_is_overdue_and_escalates. - Edge-case: "the schedule note is dropped when an event trigger co-occurs." -> always record the note + test.
- Minor: "render uses hard subscripts
t['severity']; rest of file uses.get()." -> defensive.get(). - Declined (intended): "
escalatesis redundant with the OVERDUE check", harmless and deliberate; noted, no change.
Tips
- Keep the reviewer's scope tight (the changed files), and give it the domain context in one paragraph so it judges intent correctly.
- Let it run code to verify: a reviewer that computes the boundary case beats one that guesses.
- The loop is done when a clean pass returns, not after one round of fixes.
- Have the reviewer confirm the gate passed with no cloud SDK installed (the portability invariant), not just that it is green on a developer machine.
- A green gate is evidence about what the gate tests, and nothing else. Say so to the reviewer. The catalog's one CRITICAL exposure defect sat under a fully green suite because every test in it talked to loopback, the one peer the exposure guard always admits. Ask the reviewer what the suite structurally CANNOT observe, and go observe that by hand.
- Attack the artifact, do not only read it. Run the thing from where an attacker would be: a real LAN peer, an unset environment variable, a deliberately emptied one, a credential present that should change nothing. Reading a diff finds logic errors; only exercising the built artifact finds a posture that was derived from the wrong input.
- Ask the reviewer to mutate each new guard and confirm it goes RED. A check nobody has seen fail is indistinguishable from a check that asserts nothing, and both look identical in a diff. Two shipped examples: a lockfile check asserting 40 hex characters could not tell a commit from an annotated tag object, and an environment scanner that parsed only Python was blind to the UI layer where the defect it cited actually lived.
- When a fix removes a fail-open, hunt the test that was PINNING it. A test asserting the old permissive behaviour turns the correct fix into a red build; rewriting it into the regression guard for the fix is part of the fix, not follow-up work.
Docs style: no em-dashes in .md or .html files, commit messages, or PR bodies. See
skills/README.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

