adversarial-review
Skill1 starsChanged 3 months agoMITView on GitHub
Falsify a code change with evidence-backed edge-case, state, failure, concurrency, resource, and security attacks. Use for bounded correctness or security testing of a change; not for a broad architecture audit.
63 other projects use a version of this.
Adopted by
Most recently taken up by
- Linchi1997yeh/craftsman-suitetheir own version, first seen Oct 5, 2026
- KarhouTam/agent-skillstheir own version, first seen Oct 5, 2026
- slowernet/dietpowerstheir own version, first seen Oct 4, 2026
- baekenough/oh-my-customcodetheir own version, first seen Oct 3, 2026
- NoRiceToday/skillstheir own version, first seen Oct 2, 2026
- microsoft/XBOX-Godot-Sampletheir own version, first seen Oct 1, 2026
Used with
Projects with it also use design-doc, simplify and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
maragudkSkilldesign-doc
For when you're asked to write a design doc or specification, especially after a brainstorm or feature design session.
Also in 3 projects that use this
Hugging FaceSkillsimplify
Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.
Also in 4 projects that use this
AnthropicSkillstatus
Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.
Also in 3 projects that use this
GoogleSkillcode-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
Also in 6 projects that use this
VercelSkillweb-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
Also in 3 projects that use this
DockerSkillresearch
Research a documentation topic — locate affected files, understand the problem, identify what to change. Use when investigating an issue, a question, or a topic before writing a fix. Triggers on: "research issue 1234", "investigate what needs changing for #500", "what files are affected by #200", "where is X documented", "is our docs page about Y accurate", "look into how we document Z".
Also in 3 projects that use this
Other versions63 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 63
- basicmachines-co/basic-memory★ 4.1ksame name
- syahiidkamil/Software-Engineer-AI-Agent-Atlas★ 397same name
- boraoztunc/skills★ 388same name
- microsoft/XBOX-Godot-Sample★ 238same name
- sendbird/cc-plugin-codex★ 219same name
- Miguok/fable-harness★ 205same name
- songjiun10-collab/Senior-thinking-skills★ 82same name
- nubbymong/claude-command-center★ 56same name
- baekenough/oh-my-customcode★ 43same name
- timharris707/skills★ 40same name
53 more not listed
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 repository10 other files it gives its agents.
- checkpoint-walkthroughSkill
- context-prunerSkill
- decision-reconSkill
- deep-planSkill
- evidence-retrospectiveSkill
- harvest-agent-branchesSkill
- idea-forgeSkill
- reasoning-codebase-reviewSkill
- steward-brownfieldSkill
- trace-data-provenanceSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. 0 are common, 14 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 56 edited versions we read keep these.
14
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Read repository instructions, domain vocabulary, architecture records, and the relevant specification before naming behavior or choosing an …
- Distinctive: line 23
Use the repository's installed toolchain.
- Distinctive: line 31
Read adversarial-lenses.md while deriving attacks.
- Distinctive: line 32
Read the relevant sections of technique-playbook.md before using a dynamic technique.
- Distinctive: line 33
Read report-contract.md before constructing the ledger.
- Distinctive: line 45
Run the cheapest bounded focused initial test in the disposable target snapshot only when safe.
- Distinctive: line 73
Put exact boundaries and nearest representable values on both sides into separate rows.
- Distinctive: line 75
Add interaction rows where dimensions can couple.
- Distinctive: line 89
Update the row immediately using report-contract.md:
- Very specific: line 92
When a distinct sibling partition reaches the exact already-confirmed mechanism and consequence by cited source/data-flow evidence, link …
- Very specific: line 95
When a required oracle, runtime, service, tool, or safe environment is unavailable before execution, record the missing prerequisite and …
- Very specific: line 100
When the campaign reaches its final reserve, stop launching new exploration.
- Distinctive: line 119
Use parallel agents only for genuinely disjoint surfaces.
- Distinctive: line 129
Every ledger row has a terminal status from report-contract.md.
- Very specific: line 130
Every relevant changed predicate/error branch and each contract-derived input partition is reached, covered by the exact mechanism of a …
- Distinctive: line 135
Run the repository's proportionate final verification if it is safe and within review scope.
- Distinctive: line 142
Follow report-contract.md.
- Distinctive: line 144
Use the exact no-finding and partial-closure language from report-contract.md.
“Common” is measured: kept by at least 6 in 10 of the 56 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 Review
Try to falsify the code's claimed behavior. Treat existing tests, static warnings, and coverage as evidence that guides attacks, never as proof of correctness.
Execution profiles
- Fast: one focused attack ledger, one safe technique, and one minimization pass.
- Standard: adaptive attacks across material partitions plus reproduction and counterevidence.
- Deep: multiple techniques, platform or concurrency checks, and independent challenge for authentication, money, migrations, destructive effects, or public contracts.
Choose by consequence and uncertainty rather than diff size alone.
Operating contract
- Do not edit product code unless the user explicitly asks for a fix. Do not add or edit tests unless the user explicitly asks for test changes. Put one-off harnesses, corpora, caches, build outputs, and reports in disposable storage; compare working-tree state before and after execution and never clean unexpected writes from the user's tree.
- Read repository instructions, domain vocabulary, architecture records, and the relevant specification before naming behavior or choosing an oracle.
- Preserve dirty work and distinguish the reviewed target from unrelated local changes.
- Use the repository's installed toolchain. Do not install a dependency merely to obtain a technique; choose the closest available attack or mark it blocked.
- Treat reviewed code as executable content. Execute it only from a disposable snapshot with the user's worktree absent or read-only and scratch/output mounts writable. Before running it, assess provenance and trust. Run untrusted or uncertain code only in an ephemeral sandbox with no credentials, restricted network, minimal mounts, and explicit CPU/memory/process/time limits; otherwise stay source-only and mark dynamic attacks blocked.
- Exercise only local, test, or explicitly authorized sandbox targets. Do not scan live services, send adversarial traffic to third parties, run migrations or deployments, expose secrets, or perform destructive/resource-exhaustion tests without explicit authorization.
- Bound the whole campaign and each randomized, fuzz, load, fault, or schedule exploration before starting. Never accept an indefinite default run.
- Do not promise literal exhaustive testing. Except for tiny finite domains, all possible inputs and schedules cannot be executed. Make “every edge case” operational: derive a finite attack model from scoped evidence, give every derived row an honest terminal disposition, and disclose deferred work and blind spots.
Load the references selectively
- Read adversarial-lenses.md while deriving attacks. Apply only lenses justified by the scoped behavior.
- Read the relevant sections of technique-playbook.md before using a dynamic technique. Prefer tools already configured by the project.
- Read report-contract.md before constructing the ledger. Its status and finding definitions are authoritative.
1. Pin scope, comparison, and safety
- Resolve exactly what is under review: a fixed-point diff, PR/branch, commit range, file, function, or behavior. For a diff review, record the merge-base and commit list. If no base was named, infer the repository's default base when unambiguous and state the assumption.
- Capture working-tree state before running anything. Do not attribute pre-existing or unrelated edits to the target.
- Identify the governing contract in this order: explicit spec and acceptance criteria; public API/schema/type contract; architecture/domain decisions; callers and consumers; established tests; a simple independent model. Keep intended behavior separate from current implementation.
- Map changed behavior to reachable entry points, callers, state owners, effects, trust boundaries, and failure containment. Expand beyond changed lines when the changed behavior can break an unchanged consumer or control.
- Apply the executable-content trust gate from the operating contract before any build, test, hook, or package command. If isolation is required but unavailable, continue statically and record the blocked dynamic work.
- Discover existing test, coverage, fuzz, sanitizer, race, and mutation commands without executing them.
- Define the test envelope and a global campaign budget: permitted side effects; maximum time/cases/depth/size/threads/schedules; unavailable infrastructure; and a named final reserve for replay, minimization, baseline comparison, and reporting (default 20%). Choose proportionate bounds when the user supplied none.
- Create a disposable target snapshot before executing any reviewed code, including ordinary tests and build hooks. Keep the user's worktree unmounted or read-only; redirect caches, corpora, coverage, builds, temporary files, and other outputs to scratch. Treat redirection as additional containment, never as a substitute for snapshot isolation.
- Run the cheapest bounded focused initial test in the disposable target snapshot only when safe. Record initial failures with attribution unknown until a controlled comparison.
- When attribution matters, prepare separate disposable target and baseline snapshots pinned to exact revisions or recorded content digests. Use the same externally stored harness, input, seed, command, runtime, environment, and relevant configuration in both; record intentional lock/config differences. Never switch or overwrite the user's working tree.
2. Build the live attack ledger
Create a coordinator-owned ledger. Keep it in conversation or disposable scratch storage unless the user requests an artifact. First screen the lenses and router for applicability; record a short rationale for excluded dimensions or unselected techniques without creating fake blocked rows. Record shared campaign context once, then let rows reference it.
Use these fields:
| Field | Meaning |
| ID | Stable attack identifier |
| Surface | Entry point, branch, state transition, trust boundary, or effect |
| Invariant | Behavior that must remain true |
| Adversary goal | How the invariant could be broken or abused |
| Dimension and partition | Exact value class, interaction, failure, or sequence to attack |
| Oracle | Expected result or justified relation |
| Technique | Cheapest discriminating experiment |
| Bound | Cases, seed, time, size, depth, or schedule limit |
| Execution context | Campaign-context reference plus row-specific executable/runtime/tool versions and relevant flags |
| Evidence | Command/harness, input/trace, and observed output |
| Attribution | Target-only, pre-existing, environmental, or unknown |
| Finding / covered by | Confirmed finding ID, UNVERIFIED, or — |
| Status | One authoritative status from report-contract.md |
Derive rows from evidence, not from a universal checklist:
- Split every relevant predicate, type restriction, schema rule, loop, state transition, and error contract into equivalence partitions.
- Put exact boundaries and nearest representable values on both sides into separate rows.
- Derive relational and sequence attacks from data flow, callers, transformations, transaction boundaries, retry logic, and state ownership.
- Add interaction rows where dimensions can couple. Use covering combinations rather than a blind Cartesian product; increase interaction strength around high-impact coupling or observed failures.
- Turn threat-model assets, actors, entry points, and trust boundaries into abuse cases when security or tenant/role integrity is in scope.
- Seed rows from historical bugs, regression tests, static analysis, uncovered changed branches, surviving mutants, and production-shaped fixtures. Treat each as a lead until runtime or source proof establishes it.
- Merge duplicate rows. Add a row only when it contributes a distinct partition, interaction, oracle, caller, state sequence, or consequence.
- Rank the queue by consequence, reachability, change proximity, oracle strength, uncertainty, and experiment cost. Prefer the attack with the greatest expected information, not simply the easiest input.
3. Run the adaptive attack loop
Repeat until the closure rule is satisfied:
- Select the highest-value unresolved ledger row.
- Choose the narrowest technique that can falsify its invariant. Use the router below, then follow the relevant playbook section.
- Confirm that the attack reaches the intended class. A generated test that rejects, filters, skips, or early-returns is not evidence that the class survived.
- Execute with a recorded seed/configuration and explicit bound. Capture enough raw evidence to replay the observation.
- Update the row immediately using report-contract.md:
- On expected behavior, mark only the exact attacked partition
SURVIVED; do not close its siblings. - On a reproducible discrepancy, minimize the input or action sequence and mark it
COUNTEREXAMPLE. Qualify it separately as a confirmed finding only after it meets the finding bar; otherwise link it toUNVERIFIED. - When a distinct sibling partition reaches the exact already-confirmed mechanism and consequence by cited source/data-flow evidence, link the finding and mark it
COVERED_BY_FINDING; do not manufacture a duplicate finding or redundant execution. - Mark an executed row
INCONCLUSIVEwhen bounded work cannot reach the intended class, the harness/tool fails after starting, evidence is unstable/conflicting, the oracle remains inadequate, or replay/minimization cannot finish. Name what would resolve it. - Mark a row
CONTRACT_EXCLUDEDonly when the governing contract and cited reachability assumptions exclude that class. Implementation-only non-reachability of contract-required behavior remains a counterexample or inconclusive risk. - When a required oracle, runtime, service, tool, or safe environment is unavailable before execution, record the missing prerequisite and mark it
BLOCKED.
- On expected behavior, mark only the exact attacked partition
- Compare a minimized discrepancy through the controlled target/baseline experiment from step 1 when feasible. Use
target-onlyonly when the isolated target fails and the matched baseline survives. Usepre-existingonly when the matched baseline reproduces the same violated invariant and mechanism; useenvironmentalonly when a controlled environment change reproduces or removes it. Otherwise useunknown. Never infer attribution from the diff alone. - Expand the frontier after every surprise or failure. Add only distinct adjacent values, alternate encodings, shorter and longer sequences, reordered/replayed operations, sibling callers, other instances of the root-cause pattern, stronger interactions, or an independent oracle. Group partitions that share one proven mechanism and consequence under one finding ID.
- Re-rank the whole queue after each result. Let passes redirect effort: unreached branches require a better generator/harness; weak observations require a stronger oracle; fuzz plateaus require better seeds/dictionaries/structure; surviving mutants require assertion-focused attacks; flaky results require deterministic control before interpretation.
- Escalate case counts or expensive techniques only when consequence, uncertainty, missed reach, or a surprise justifies them. A small pure change may close with decision tables and focused differential/property probes; do not run every technique.
- When the campaign reaches its final reserve, stop launching new exploration. Merge the queue, mark unexecuted rows
DEFERRED_BY_BOUND, and spend the reserve replaying, minimizing, attributing, and reporting. Transition any active row that cannot finish adjudication toINCONCLUSIVE. Do not silently extend the global budget. - Re-run the directly affected focused tests after each confirmed counterexample. Do not fix product code unless asked.
Technique router
| Evidence shape | Primary attack |
| Comparison, clamp, parser branch, validation rule | Boundary/decision table plus adjacent representable values |
| Pure or deterministic transformation over a broad domain | Property-based generation and shrinking |
| Parser, decoder, protocol, file format, or byte/string boundary | Coverage-guided or structured fuzzing; add applicable sanitizers |
| Workflow, lifecycle, cache, transaction, retry, or reusable object | Model-based or rule-based stateful sequences |
| Exact output oracle is unavailable | Metamorphic relations with explicit preconditions |
| Independent model, prior version, backend, algorithm, or configuration exists | Differential testing over defined behavior |
| Filesystem, database, subprocess, network, queue, clock, or dependency | Deterministic fault injection and partial-failure tests |
| Shared mutable state, async work, locks, or cancellation | Controlled schedule exploration, replay traces, and a race detector |
| Native memory, unsafe arithmetic, lifetime, or uninitialized data | ASan/UBSan/MSan as applicable, in separate instrumented runs |
| Executed code may be weakly asserted | Selective mutation testing on changed/high-risk code, then triage survivors |
| Authorization, tenant, identity, secret, or trust-boundary change | Abuse-case tests and source-to-sink/control tracing |
Use parallel agents only for genuinely disjoint surfaces. Keep one coordinator responsible for the evolving ledger, cross-surface discoveries, attribution, and closure. Do not launch a fixed fan-out and call it dynamic coverage.
4. Enforce the finding bar
Apply the sole normative finding criteria in report-contract.md. Keep every counterexample, differential disagreement, surviving mutant, coverage hole, static warning, suspicious pattern, or flaky failure as a hypothesis until it meets that contract; otherwise report it only as an unverified risk with the missing evidence.
5. Close the bounded attack model
Finish only when all conditions hold:
- Every ledger row has a terminal status from report-contract.md; none remain queued or active.
- Every relevant changed predicate/error branch and each contract-derived input partition is reached, covered by the exact mechanism of a confirmed finding, contract-excluded under cited assumptions, or explicitly incomplete (
INCONCLUSIVE,BLOCKED, orDEFERRED_BY_BOUND). - Relevant interaction, state/sequence, failure, time, permission, concurrency, resource, representation, and configuration dimensions from the lenses have a disposition. Justify excluded dimensions from the scoped contract/data flow; do not run irrelevant techniques merely to say they passed.
- For each selected technique, record applicable reach, distribution, coverage, mutant, corpus, or schedule evidence. Metrics expose gaps but never certify correctness. Give each unselected expensive technique a short risk-based rationale rather than a fake ledger row.
- Each confirmed finding has been minimized, replayed, attributed when possible, expanded to adjacent/root-cause-related attacks, and deduplicated so one root cause and consequence is reported once with sibling triggers beneath it.
- Re-read the diff/source, contracts, callers, and ledger once more. Add any distinct newly visible row while exploration budget remains; otherwise mark it
DEFERRED_BY_BOUND. - Run the repository's proportionate final verification if it is safe and within review scope. Create or reopen a ledger row for every relevant surprise or blocked check, then recompute closure. Leave only demonstrably unrelated failures as report-only context.
- Compare the user's working-tree state with the pre-run snapshot. Record it as unchanged or list every unexpected path and leave those paths untouched.
Classify closure as COMPLETE_WITHIN_MODEL only when no row is INCONCLUSIVE, BLOCKED, or DEFERRED_BY_BOUND, and every counterexample is linked to a confirmed finding. Otherwise classify it as PARTIAL and name the incomplete rows. A terminal ledger is auditable; it is not automatically complete.
6. Report findings and bounded residual risk
Follow report-contract.md. Put confirmed findings first, ordered by severity. Then summarize the attack ledger, tested bounds, baseline comparison, and blocked or untested areas.
Use the exact no-finding and partial-closure language from report-contract.md. Never say the code is correct, safe, exhaustive, or that “all edge cases pass.”
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.

