agentleFS
iktok90-designiktok90-design/ai-smart-contract-auditor/skills/multi-pass-self-critique/SKILL.md

multi-pass-self-critique

Skill36 starsChanged 5 months agoMITView on GitHub

Meta-skill for /audit-strict and high-stakes audits. Run two independent passes with different starting contexts, then keep only consensus findings. Aggressively cuts false positives.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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:

    Read the code line-by-line.

    line 20

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

Multi-pass self-critique (meta-skill)

This skill governs the protocol for high-precision audits where false positives are unacceptable.

When to use

  • /audit-strict invocations
  • Pre-launch audits where the user has explicitly opted into slower, higher-precision review
  • Re-audits where prior tools have been noisy

The protocol

Pass A — Skill-driven, bottom-up

Read the code line-by-line. Apply the vuln-skill library. Emit candidate findings with reasoning traces.

Pass B — Exploit-driven, top-down

Fresh context. Pretend you have no prior findings. Approach the contract as an attacker: "What would I steal here? What's the cheapest exploit?" Emit findings.

Compare

For each Pass-A finding, check Pass-B:

  • Did Pass B independently identify this issue (under any name)?
  • Does Pass B's exploit narrative match this issue's mechanism?

For each Pass-B finding, check Pass-A:

  • Did the skill library flag this?

Categorize

Pass APass BResult
✓✓Consensus — Confidence HIGH, keep
✓✗Single-source A — Confidence MEDIUM, keep with note
✗✓Single-source B — Confidence MEDIUM, keep with note
✗✗Not reported

Synthesize

Output the consensus findings as primary, single-source findings as secondary. Be explicit about which is which.

Why this works

  • Each pass has different blind spots. Skill-based misses novel patterns; exploit-based misses subtle CWE patterns.
  • Their intersection is the high-precision set.
  • Their union is the high-recall set. Sometimes you want union; for /audit-strict, you want intersection.

Anti-patterns

  • Sharing findings between passes. Pass B must not see Pass A's findings; that defeats independence.
  • Counting "Pass A finds X, Pass A also finds X in a different file" as consensus. Same pass = same blind spots.
  • Using the same model temperature for both passes. Vary the approach, not just the seed.

Output

Multi-pass audit:

  Pass A (skill-driven) findings:     12
  Pass B (exploit-driven) findings:    9
  Consensus (both):                    7   ← HIGH confidence
  Pass-A-only (no exploit found):      5   ← MEDIUM, flagged for review
  Pass-B-only (skills missed):         2   ← MEDIUM, possibly novel patterns

Final report:
  → 7 HIGH-confidence findings (action recommended)
  → 7 MEDIUM-confidence findings (requires user judgment)

Related

  • [[confidence-scoring]] — output of this skill drives the confidence label
  • [[known-good-comparison]] — third axis: also check against reference impls
  • /audit-strict (command)

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.