adversarial-code-review
Skill0 starsChanged 6 months agoMITView on GitHub
Reviews code by actively trying to break it rather than confirming it looks right, surfacing edge cases, hidden coupling, and security and concurrency defects. Use when reviewing a pull request, auditing a change for correctness, or when a change "looks fine" but touches critical paths.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- aws-solutions/konductortheir own version, first seen Sep 23, 2026
- RisorseArtificiali/skillstheir own version, first seen Sep 6, 2026
- 0xrohan10/skillstheir own version, first seen Jul 22, 2026
- abineetsingh/ClaudeSkillstheir own version, first seen Jun 12, 2026
- mlopscommunity/Coding-Agents-Conference-skillstheir own version, first seen Mar 4, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- mlopscommunity/Coding-Agents-Conference-skills★ 38same name
- RisorseArtificiali/skills★ 13same name
- aws-solutions/konductor★ 9same name
- 0xrohan10/skills★ 2same name
- abineetsingh/ClaudeSkills★ 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 repository29 other files it gives its agents.
- api-contract-designSkill
- attack-surface-mappingSkill
- authn-authz-design-reviewSkill
- benchmark-designSkill
- capacity-scalability-planningSkill
- concurrency-race-analysisSkill
- data-consistency-modelingSkill
- data-exfiltration-analysisSkill
- distributed-consensus-designSkill
- error-handling-architectureSkill
- event-driven-architectureSkill
- experiment-designSkill
- hypothesis-falsificationSkill
- incident-rca-postmortemSkill
- legacy-refactoring-strategySkill
- literature-synthesisSkill
- metrics-designSkill
- multi-layer-caching-strategySkill
- mvp-scope-cuttingSkill
- performance-profilingSkill
- rate-limiting-designSkill
- requirements-disambiguationSkill
- secrets-management-auditSkill
- statistical-validity-analysisSkill
- supply-chain-risk-analysisSkill
- system-decomposition-synthesisSkill
- threat-modelingSkill
- tradeoff-decision-frameworkSkill
- user-failure-mode-mappingSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Trace the unhappy paths: every early return, exception, and partial failure.
- Very specific: line 29
Mutate mentally: if you flipped this < to <=, would any test catch it?
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Adversarial Code Review
Confirmation is not review. A review that only checks "does this look like working code" finds style, not defects. Assume the code is wrong and search for the proof.
Read against the grain
- Reconstruct intent: what is this change supposed to guarantee? Review against the invariant, not the diff's surface.
- Find the inputs the author didn't think about: empty, null, zero, negative, max, duplicate, out-of-order, concurrent, malicious, Unicode, huge.
- Trace the unhappy paths: every early return, exception, and partial failure. Bugs hide where the author's attention didn't go.
Defect hunt by category
- Boundary: off-by-one, inclusive/exclusive ranges, empty collection, single element, overflow/wraparound.
- State: mutation of shared/aliased data, stale reads, ordering assumptions, init-before-use.
- Resource: leaks on the error path (unclosed handles, locks held on throw), unbounded growth.
- Concurrency: shared mutable access, check-then-act, missing happens-before (see also race analysis).
- Security: untrusted input reaching a sink (query, command, path, deserializer), missing authz check, secrets in logs.
- Contract: does this break callers? (nullability, defaults, error codes, ordering — see API contract design.)
- Failure handling: swallowed errors, retries on non-idempotent ops, unbounded waits.
Adversarial validation techniques
- Construct the breaking input and walk it through the code by hand; don't assert "this might fail" — prove it with a concrete case.
- Mutate mentally: if you flipped this
<to<=, would any test catch it? If not, coverage is theatre. - Question the test: tests that mock the thing under test, assert nothing meaningful, or only cover the happy path give false confidence.
- Check the deletion: what did this change stop doing? Removed checks and dropped cases are invisible in additive diffs.
Non-obvious risks
- The dangerous part of a PR is often the unchanged code now reached with new assumptions.
- "Refactor" labels hide behavior changes; verify behavioral identity, don't trust the label.
- Large diffs get rubber-stamped; reviewer fatigue is an attack surface — review critical paths first, while fresh.
Output structure
Per finding: severity (blocking / should-fix / nit), the concrete input or interleaving that triggers it, the invariant violated, and a specific fix or the question that must be answered before merge. Lead with correctness and security; defer style.
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.

