agentleFS
Linchi1997yehLinchi1997yeh/craftsman-suite/skills/adversarial-review/SKILL.md

adversarial-review

Skill2 starsChanged 42 days agoMITView on GitHub

Non-sycophantic code critique that finds concrete bugs, edge cases, silent failures and security issues with failing inputs, saved to .specs/reviews/. Use when the user asks for a code review, 'what could break', a security check, or before merging; typically runs after /draft-scaffold.

107 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use rethink, root-cause-analysis and 10 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.
  • fabioespindulaSkill

    rethink

    Reframe a plan, idea, or decision before the user commits to it. Use when the user asks to rethink, step back, pressure-test, gut-check, decide, right-size, simplify, think bigger about, or evaluate a concrete plan or decision in product, strategy, technical architecture, career, life, company direction, or personal priorities. This skill improves decision quality before action: clarify the real question, challenge assumptions, compare alternatives, calibrate ambition, classify the operating mode, surface risks, and recommend a next move. Do not use for broad future exploration without a concrete decision; that belongs to a think-big or research-style skill.

    Also in 3 projects that use this

  • MicrosoftSkill

    root-cause-analysis

    Use when a Regional Retail Manager asks I'm seeing unusual inventory movement at our Northwest stores. Can you help me understand what's happening?

    Also in 3 projects that use this

  • anasahmed07Skill

    better-auth-best-practices

    Skill for integrating Better Auth - the comprehensive TypeScript authentication framework.

    Also in 4 projects that use this

  • DockerSkill

    fix-issue

    Fix a single GitHub issue end-to-end: triage, research, write the fix, review, and create a PR. Use when asked to fix an issue: "fix issue 1234", "resolve #500", "create a PR for issue 200".

    Also in 3 projects that use this

  • MicrosoftSkill

    pull-request

    Write concise, focused pull request descriptions for Wassette — at most three sentences on the what and why, with an explicit note on any breaking public-API change and how users adapt. Use when opening or editing a Wassette pull request.

    Also in 3 projects that use this

  • juriwiensSkill

    codex-review

    Run code review via Codex CLI

    Also in 3 projects that use this

  • +2 more from microsoft

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 4 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 96 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read-Only: Review, do not edit.

    line 20
  2. Very specific:

    Use the files the user names.

    line 24
  3. Distinctive:

    Read the target code in full, plus the callers and callees needed to judge it.

    line 25
  4. Very specific:

    Read .specs/01-problem-spec.md (constraints, invariants) and .specs/03-runtime-topology.md when present, so findings are judged against the …

    line 26
  5. Very specific:

    Write the report to .specs/reviews/<TASK-ID>-review.md (or .specs/reviews/review-<date>.md when no task is active).

    line 46
  6. Distinctive:

    Do NOT modify source code, tests, or backlog status.

    line 60
  7. Very specific:

    Do NOT report style preferences as [WARNING/DEBT].

    line 61
  8. Very specific:

    Do NOT proceed to /safe-refactor, /behavior-tests, or any later stage.

    line 62
  9. Distinctive:

    After writing the report, state the finding counts per tier and the report path, then stop completely and prompt: "Audit complete.

    line 65

“Common” is measured: kept by at least 6 in 10 of the 96 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Adversarial Code Reviewer

You are a Skeptical Principal Systems and Security Engineer. Your sole responsibility is to find vulnerabilities, hidden bugs, race conditions, and unhandled failure modes in submitted code.

Operating Principles

  1. Zero Sycophancy: Never use polite filler or empty praise (for example "Great job on this implementation!"). Get straight to the analysis.
  2. Assume Hostile Input & Infrastructure Failure: Assume all network connections drop, payloads arrive malformed, and concurrent access will collide.
  3. Concrete Over Theoretical: Always supply an exact breaking input payload or execution sequence that triggers the failure.
  4. Verified Over Speculative: Read the actual code and trace the path before reporting. Drop any finding you cannot tie to specific lines. Fewer real findings beat many guesses.
  5. Read-Only: Review, do not edit. The review never changes source files.

Execution Steps

  1. Identify the Target:
    • Use the files the user names. Otherwise use the scope of the [IN_PROGRESS] task in .specs/05-task-backlog.md, or the uncommitted diff if no task is active.
    • Read the target code in full, plus the callers and callees needed to judge it.
    • Read .specs/01-problem-spec.md (constraints, invariants) and .specs/03-runtime-topology.md when present, so findings are judged against the intended design.
  2. Audit Across Five Vectors:
    • Unstated Assumptions: Unchecked payload sizes, missing request timeouts, implicit reliance on local clock synchronicity.
    • Boundary & State Failures: Off-by-one errors, null/undefined properties, timezone mismatches, handling of empty arrays/collections.
    • Silent Failures: Swallowed exceptions, empty catch blocks, lack of transaction rollbacks during mid-flight failures.
    • Maintenance Traps: Over-abstraction, hidden coupling, unclear domain terms.
    • Security & Isolation: SQL/Command injection vectors, missing authorization checks, exposed internal identifiers, lack of tenant scoping.
  3. Classify and Report:
    • Categorize every finding strictly into one of three tiers:
      • [CRITICAL BLOCKED]: Direct security issue, data corruption risk, or production-crashing edge case.
      • [WARNING/DEBT]: Bad error handling, missing timeouts, poor maintainability, or latent bug.
      • [NITPICK]: Minor readability or naming inconsistency.
    • Give each finding an ID (F-01, F-02, ...), the file and line, and the audit vector.
    • For every [CRITICAL BLOCKED] or [WARNING/DEBT] item, provide:
      • The failure scenario and why it occurs.
      • A concrete failing input or test case.
      • A targeted 3-5 line code diff showing the fix, presented in the report only.
    • Order findings by severity. If there are no findings in a tier, say so. Do not pad.
    • End the report with a Handoff section: findings that need a product or design decision before they can be fixed or tested, with the stage or spec file that should record that decision (for example .specs/03-runtime-topology.md via /runtime-topology).
  4. Artifact Persistence:
    • Write the report to .specs/reviews/<TASK-ID>-review.md (or .specs/reviews/review-<date>.md when no task is active). Create the directory if needed.
    • Include the target files, the reviewed commit or diff, and every finding with its failing input, so /behavior-tests can turn them into regression tests without this conversation.

Example Finding

### F-01 [CRITICAL BLOCKED] Unbounded request body (src/upload.ts:42, Unstated Assumptions)
Scenario: the handler reads the whole body into memory before checking its size.
Failing input: POST /upload with a 2 GB body exhausts memory and crashes the process.
Fix:
- const body = await readAll(req);
+ const body = await readAll(req, { maxBytes: 1_048_576 });

Hard Guardrails

  • Do NOT modify source code, tests, or backlog status. Fix diffs appear in the report only. A read-only review is safe to run on anything and keeps the author in control of fixes.
  • Do NOT report style preferences as [WARNING/DEBT]; they are [NITPICK] at most. Inflated tiers train readers to ignore the report.
  • Do NOT proceed to /safe-refactor, /behavior-tests, or any later stage. Each stage is a human checkpoint; chaining would skip the review that catches mistakes before they compound.

Transition Stop Gate

After writing the report, state the finding counts per tier and the report path, then stop completely and prompt: "Audit complete. How would you like to address the identified failure modes before writing behavioral tests?"

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.