Skip to content
Security
Command

/audit-deep

Deep audit — same as /audit but spawns more parallel subagents, runs multi-pass review, and chases exploit chains across files.

From plugin
rugproof
945 skills23 agents45 commands4 hooks
Install
> /plugin marketplace add omermaksutii/RugProof
> /plugin install rugproof@rugproof

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/audit-deep

Context preview

What this command does when you run it.

Deep audit — same as /audit but spawns more parallel subagents, runs multi-pass review, and chases exploit chains across files.

Command definition

audit-deep.md
description: Deep audit — same as /audit but spawns more parallel subagents, runs multi-pass review, and chases exploit chains across files.
argument-hint: "[file-or-dir]"
allowed-tools: Read, Grep, Glob, Bash, Agent, Skill

/audit-deep — multi-pass adversarial audit

Like `/audit`, but slower and more thorough. Use this for pre-launch or pre-mainnet-fork reviews where time is acceptable but escapes are not.

Differences vs `/audit`

1. **Two-pass review.** First pass: per-skill findings. Second pass: cross-finding analysis — can any two findings be combined into an exploit chain? 2. **More specialist dispatches.** Always invoke `attacker` AND `defender` AND `gas-optimizer` AND any matching protocol specialists. 3. **Cross-contract reachability.** Trace external call graphs: which functions can call which, with what authorizations? Look for trust violations across the call graph. 4. **Invariant generation pass.** Spawn `invariant-writer` to identify protocol invariants that the contract intends to hold; check each one against the code. 5. **Historical context.** Use `c4-history` and `sherlock-history` MCPs to look for similar findings in the historical database — protocols of this type have lost funds via X; does this code have X?

Procedure

Run `/audit` end-to-end first. Then:

Pass 2: Exploit-chain hunt

For each (high or critical) finding F:

  • Could F be amplified by another finding? E.g. flash-loan + price oracle + missing access control → drain.
  • Could F be amplified by an external integration (a specific token, a specific oracle behavior)?
  • Generate at least one candidate exploit chain per Critical finding.

Pass 3: Invariant violation hunt

Run `invariant-writer` to extract:

  • Token: `totalSupply == sum(balanceOf)`
  • Vault: `totalAssets >= sum(convertToAssets(balanceOf))`
  • AMM: `K = reserve0 * reserve1` monotonically non-decreasing after swap fees
  • Lending: `sumDebt <= sumCollateralAtPrice * MAX_LTV`

For each invariant, prove or break it. If broken, emit a finding.

Pass 4: Historical pattern match

For each Critical / High finding, query `c4-history-mcp` and `sherlock-history-mcp`:

  • Has a protocol of this type ever lost funds to this exact pattern?
  • Cite the historical incident in the finding write-up.

Output

Same format as `/audit`, with additional sections:

  • **Exploit chains discovered** (chain ID → list of finding IDs, narrative description)
  • **Invariants checked** (invariant → status: holds / broken-finding-ID)
  • **Historical context** (per finding, link to similar past incident if found)

Notes

  • Budget will be larger. Expect to read the whole repo, not just touched files.
  • If the user wants it fast, they should use `/audit` or `/quick-scan` instead.
Read more
Ships withrugproof

Rugproof your code before someone else does. 🌐 Live site: omermaksutii.github.io/RugProof 📦 Latest: v1.0.0 — 45 commands · 23 agents · 45 skills · 13 MCP servers · tested, offline-first, with rule packs, a benchmark, non-EVM coverage, and post-deploy

Get the whole plugin

Other commands on rugproof.