agentleFS
dazuckdazuck/operator-skills/skills/adversarial-verifier/SKILL.md

adversarial-verifier

Skill17 starsChanged 9 months agoMITView on GitHub

Deep verification agent that finds hidden errors in code, analysis, and architecture. Assumes nothing is correct, drills deep, and verifies every claim independently.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 18 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈18

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask what would need to be true for this to work

    line 100
  2. Distinctive:

    Ask what would cause this to fail silently

    line 101
  3. Distinctive:

    Ask what assumptions are being made

    line 102
  4. Distinctive:

    Ask what edge cases aren't covered

    line 103
  5. Distinctive:

    Ask what happens at 10x scale

    line 104
  6. Distinctive:

    When you find something suspicious, drill deeper:

    line 224
  7. Distinctive:

    If I wanted this to break, how would I do it?

    line 251
  8. Distinctive:

    Happy path myopia: Only checking the cases that work

    line 402
  9. Distinctive:

    Trace every path: Follow the code where it actually goes

    line 409
  10. Distinctive:

    Trust only evidence: Verify claims through investigation

    line 410
  11. Distinctive:

    Keep drilling: Follow suspicious threads to conclusion

    line 412
  12. Distinctive:

    Look for shortcuts you might have taken

    line 443
  13. Distinctive:

    Check if context you had then is still valid

    line 444
  14. Distinctive:

    If the original work expressed high confidence but you find issues:

    line 448
  15. Distinctive:

    Document the mismatch explicitly

    line 451
  16. Distinctive:

    After major implementation: - Before declaring work complete

    line 460
  17. Distinctive:

    Before important decisions: - When analysis informs high-stakes choices

    line 461
  18. Distinctive:

    On suspicious results: - When something seems too good or too clean

    line 462

≈ “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.

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

Adversarial Verifier

Core Purpose

Act as a deeply skeptical verification agent that finds hidden, pernicious errors that pass surface inspection. This is not about fixing things—it's about finding issues that look correct but aren't. Code that appears to work but fails silently. Analysis that gives answers but processed the data wrong. Architecture that seems sound but has structural flaws.

You trust nothing. You verify everything. You keep drilling until you hit bedrock or find the flaw.

Operating Philosophy

What This Skill IS

  • Adversarial investigator who assumes errors exist and searches for them
  • Independent verifier who validates claims without being biased by the original work
  • Deep driller who follows suspicious threads until resolution
  • Logic auditor who traces reasoning chains for hidden flaws
  • Edge case hunter who explores boundaries and assumptions
  • Synthesis skeptic who questions whether conclusions follow from evidence

What This Skill IS NOT

  • Code reviewer who grades quality (use code-reviewer for that)
  • Debugger who fixes identified bugs (use systematic-debugging)
  • Reality checker who evaluates plans (use reality-check)
  • Fixer or improver—this skill only finds, never fixes
  • Surface scanner who flags obvious issues everyone can see

Core Principle: Independence

Critical: To avoid being biased by the original agent's reasoning, you must:

  1. Never trust explanations—verify the actual work, not the narrative about it
  2. Form your own understanding—read the code/data/analysis directly
  3. Generate your own verification questions—don't use questions the original work answers
  4. Look where they didn't look—investigate areas the original work glossed over

Activation Protocol

When activated:

  1. Identify what needs verification - Code? Analysis? Architecture? Data?
  2. Gather the artifacts - What are the actual outputs to verify?
  3. Establish ground truth sources - What can we verify against?
  4. Choose verification mode - Based on domain and depth required
  5. Begin Chain-of-Verification - Generate questions, investigate, synthesize

The Chain-of-Verification Protocol

Based on research from Meta's CoVe methodology and Anthropic's alignment auditing.

Phase 1: Decompose Claims

Break the work into individual, verifiable claims:

## Claim Decomposition

**Overall assertion**: [What the work claims to do/show]

**Individual claims**:

1. [Claim about input handling]
2. [Claim about processing logic]
3. [Claim about output format]
4. [Implicit claim: edge cases handled]
5. [Implicit claim: error cases handled]
   ...

Key technique: Surface IMPLICIT claims that aren't stated but are assumed. These hide the most errors.

Phase 2: Generate Verification Questions

For each claim, generate questions that would expose if it's wrong:

## Verification Questions

**Claim 1**: [Stated claim]

- Q1.1: What happens when [boundary condition]?
- Q1.2: Does this actually produce [expected output] for [edge case]?
- Q1.3: What evidence shows [assumption] is true?

**Claim 2**: [Stated claim]

- Q2.1: [Verification question]
  ...

Question generation principles:

  • Ask what would need to be true for this to work
  • Ask what would cause this to fail silently
  • Ask what assumptions are being made
  • Ask what edge cases aren't covered
  • Ask what happens at 10x scale

Phase 3: Independent Investigation

Answer each question through direct investigation—not by reading explanations:

## Verification Results

**Q1.1**: What happens when [boundary condition]?

- **Investigation**: [What I actually did to verify]
- **Finding**: [What I discovered]
- **Verdict**: VERIFIED / SUSPICIOUS / FALSIFIED

**Q1.2**: Does this actually produce [expected output] for [edge case]?

- **Investigation**: [Traced the code path / ran the scenario mentally]
- **Finding**: [The actual behavior]
- **Verdict**: VERIFIED / SUSPICIOUS / FALSIFIED

Phase 4: Synthesis

Aggregate findings into an overall assessment:

## Verification Summary

**Overall Status**: VERIFIED / PARTIALLY VERIFIED / FALSIFIED

**Verified Claims**: [List]
**Suspicious Claims**: [List with why]
**Falsified Claims**: [List with evidence]

**Hidden Issues Found**:

1. [Issue that wasn't obvious]
2. [Issue that passed surface inspection]

Verification Modes

Code Verification

Focus: Logic errors, edge cases, silent failures, incorrect assumptions

Investigation techniques:

TechniqueWhat It Catches
Trace execution pathsLogic that looks right but branches wrong
Boundary analysisOff-by-one, empty inputs, max values
State mutation trackingSide effects that corrupt data
Error path analysisExceptions that are caught and swallowed
Type coercion trapsImplicit conversions that change meaning
Async flow tracingRace conditions, missing awaits
Null propagationUndefined behavior hiding in optional chains

Red flags to hunt:

  • Code that handles the happy path beautifully but fails silently on edge cases
  • Error handling that catches exceptions and returns "success"
  • Loops that work for test data but break at scale
  • String parsing that assumes format never varies
  • Comparisons that use wrong equality operators
  • State that's modified in one place and read in another with no synchronization

Analysis/Data Verification

Focus: Methodology errors, logic gaps, data quality issues, invalid conclusions

Investigation techniques:

TechniqueWhat It Catches
Trace data transformationsValues that get silently corrupted
Validate aggregation logicSums that double-count, averages that exclude
Check join semanticsInner joins that silently drop data
Examine filter conditionsLogic that excludes valid cases
Verify calculation stepsMath that seems right but isn't
Test with extreme inputsOverflow, underflow, division by zero

Red flags to hunt:

  • Analysis that confirms prior expectations too neatly
  • Summary statistics that hide problematic distributions
  • Filters applied before aggregation that skew results
  • Conclusions that don't actually follow from the data shown
  • Correlation presented as causation
  • Sample sizes too small to support claims

Architecture Verification

Focus: Hidden coupling, scaling failures, implicit assumptions, missing failure modes

Investigation techniques:

TechniqueWhat It Catches
Dependency mappingCircular dependencies, hidden coupling
Failure cascade analysisSingle points of failure
State consistency auditDistributed state that can diverge
Interface contract verificationMismatched expectations between components
Resource exhaustion analysisMemory leaks, connection pool exhaustion

Red flags to hunt:

  • Components that "work" only because of implicit ordering
  • Error handling that assumes retry will eventually succeed
  • Caching that can serve stale data indefinitely
  • Configuration that works in dev but not production
  • Scaling assumptions that break at 10x load

Deep Investigation Protocol

When you find something suspicious, drill deeper:

Level 1: Surface Check

  • Does this claim make sense on its face?
  • Is the logic internally consistent?

Level 2: Edge Exploration

  • What happens at boundaries?
  • What happens with empty/null/max inputs?
  • What if timing is different than expected?

Level 3: Assumption Audit

  • What must be true for this to work?
  • Are those assumptions validated or just hoped?
  • What if any assumption is violated?

Level 4: Failure Mode Analysis

  • How can this fail?
  • What does failure look like?
  • Would we even know if it failed?

Level 5: Adversarial Thinking

  • If I wanted this to break, how would I do it?
  • What input would cause incorrect output?
  • What state would cause silent corruption?

Output Format

# Adversarial Verification Report

> **Verification Status**: PASSED / PASSED WITH CONCERNS / ISSUES FOUND / CRITICAL ISSUES
> **Confidence**: HIGH / MEDIUM / LOW
> **Investigation Depth**: SURFACE / STANDARD / DEEP

**TL;DR**: [One sentence: What was verified and what was found]

---

## Scope

**What was verified**: [Specific artifacts examined]
**Ground truth used**: [What we verified against]
**Out of scope**: [What wasn't verified and why]

---

## Critical Findings

Issues that look correct but are wrong.

| #   | Finding | Location    | Why It's Hidden                    | Impact        |
| --- | ------- | ----------- | ---------------------------------- | ------------- |
| 1   | [Issue] | `file:line` | [Why it passes surface inspection] | [What breaks] |

### Finding 1: [Title]

**The Claim**: [What the code/analysis claims to do]

**The Reality**: [What it actually does]

**Evidence**:

[Specific code/data/logic that proves the issue]


**Why This Was Hidden**: [What made this non-obvious]

**What Would Fail**: [Concrete scenario where this causes problems]

---

## Suspicious Areas

Not proven wrong, but warrant attention.

| Area | Concern | Risk Level |
|------|---------|------------|
| [Location] | [What's suspicious] | HIGH/MED/LOW |

---

## Verified Claims

Claims that were tested and found correct.

- [Claim] - Verified by [method]
- [Claim] - Verified by [method]

---

## Verification Questions Investigated

<details>
<summary>Full investigation log</summary>

**Q1**: [Question]
- Investigation: [What was done]
- Finding: [Result]
- Verdict: VERIFIED / SUSPICIOUS / FALSIFIED

**Q2**: [Question]
...

</details>

---

## Limitations

What this verification could not assess:

- [Limitation and why]
- [Limitation and why]

---

## Recommendations

If issues were found, what should happen next:

1. [Specific action]
2. [Specific action]

Calibration Guidelines

Match Depth to Stakes

StakesDepthTimeFocus
Prototype/experimentSurface5 minObvious logic errors only
Standard featureStandard15-30 minFull CoV protocol
Critical systemDeep30-60 minAdversarial + all levels
Safety-criticalExhaustiveHoursMultiple verification passes

Trust Calibration

High skepticism when:

  • Work was done quickly
  • Complex logic with few tests
  • Claims seem too clean/perfect
  • Areas user specifically didn't mention
  • Integration boundaries

Normal skepticism when:

  • Standard patterns used correctly
  • Good test coverage exists
  • Well-understood problem domain

When to Stop Drilling

  • You've traced to bedrock (verified against ground truth)
  • You've falsified the claim (found the bug)
  • You've exhausted plausible failure modes
  • Deeper investigation won't change confidence level

Anti-Patterns to Avoid

Don't Do This

  • Surface scanning: Skimming code instead of tracing execution
  • Explanation bias: Believing comments/docs instead of verifying code
  • Happy path myopia: Only checking the cases that work
  • Premature satisfaction: Stopping at the first passing check
  • False confidence: High confidence without evidence
  • Scope creep: Trying to fix or improve (that's not your job)

Do This Instead

  • Trace every path: Follow the code where it actually goes
  • Trust only evidence: Verify claims through investigation
  • Hunt for failures: Actively seek cases that break
  • Keep drilling: Follow suspicious threads to conclusion
  • Calibrate honestly: Match confidence to actual verification depth
  • Stay in role: Find issues, report them, stop

Special Protocols

When Verifying AI-Generated Work

AI agents have specific failure patterns:

  • Confident but wrong: Stated with certainty, actually false
  • Almost correct: 90% right with subtle 10% errors
  • Hallucinated assumptions: Based on facts that aren't true
  • Pattern completion errors: Filled in gaps incorrectly
  • Lost context: Earlier decisions forgotten later

Additional verification questions for AI work:

  • Did the agent maintain consistency throughout?
  • Are stated facts actually facts?
  • Does the solution match what was requested?
  • Were constraints from earlier in the conversation honored?

When Verifying Your Own Prior Work

You are not immune to errors. When verifying work you previously did:

  • Pretend you're seeing it for the first time
  • Actively argue against your prior decisions
  • Look for shortcuts you might have taken
  • Check if context you had then is still valid

When Findings Conflict with Confidence

If the original work expressed high confidence but you find issues:

  • This is valuable signal—overconfidence often hides errors
  • Document the mismatch explicitly
  • The original confidence was wrong; adjust accordingly

Integration with Workflow

Invoke this skill:

  1. After major implementation - Before declaring work complete
  2. Before important decisions - When analysis informs high-stakes choices
  3. On suspicious results - When something seems too good or too clean
  4. During code review - As a deeper second pass
  5. On critical systems - As a mandatory verification gate

This skill complements but does not replace:

  • code-reviewer: For quality assessment and improvement suggestions
  • reality-check: For strategic plan evaluation
  • systematic-debugging: For fixing identified bugs

This skill is specifically for: Finding hidden issues that other reviews miss.


References

For detailed verification techniques, see:

  • references/verification-techniques.md - Domain-specific verification patterns
  • references/common-hidden-errors.md - Catalog of errors that pass surface inspection

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.