/auditsentry:replay-incident <chain> <tx-hash>from auditsentry
Replays a historical exploit transaction on a local fork and produces a step-by-step annotated walkthrough of the attack, including vulnerability classification.
Ships in auditsentry. Installing the plugin adds it to Claude Code.
Pulls a real exploit tx from chain, replays it on a fork, and walks through what happened.
Great teaching tool. Also great content — every replay can become a tweet or blog post.
mcp__block-explorer__get_tx(chain=<chain>, hash=<hash>)
mcp__block-explorer__get_trace(chain=<chain>, hash=<hash>)
Pull the calldata, value, from/to, internal calls, state diff, gas, and block.
mcp__anvil__fork(chain=<chain>, block=<tx_block - 1>)
This gives us the pre-attack state.
Pull the verified source of every contract in the trace.
mcp__anvil__send_raw_tx(<original-tx>)
Capture the actual state changes; compare to the live chain post-tx data — should match.
Walk through each internal call:
Block 18,234,567 — Curve Finance exploit (2023-07-30)
External call: 0xattacker → 0xfraxusdc_pool.remove_liquidity_one_coin(...)
│
├─ Internal: pool transfers $1M USDC to attacker
│ Then calls pool.balanceOf(attacker) for reward accounting...
│ │
│ └─ READ-ONLY REENTRANCY: pool state is mid-update during this read
│
└─ attacker contract uses the stale read to mint reward shares
based on the larger-than-real balance
Map the incident to the [[skills]] taxonomy:
Root cause: read-only reentrancy (skills/reentrancy)
Amplifier: reward accounting based on token.balanceOf during mid-update
Lesson: for any oracle/getter call from a reentrant contract, add
ReentrancyGuard or rely on a settled-state snapshot.
The full walkthrough + a "what to learn" section + (if --card flag) a PNG card for sharing.
Bundle these as /replay-incident demo-curve shortcuts.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub iktok90-design/ai-smart-contract-auditor --plugin auditsentry45 commands in this plugin
/audit/audit — full security auditFull security audit of a Solidity/Vyper/Rust contract or directory. Runs the entire vuln-skills library and dispatches DeFi specialist subagents based on detected protocol type./audit-changes/audit-changes — audit only what changedAudit only the git diff vs main (or specified base). Optimized for PR review./audit-deep/audit-deep — multi-pass adversarial auditDeep audit — same as /audit but spawns more parallel subagents, runs multi-pass review, and chases exploit chains across files./audit-deps/audit-deps — vet the libraries you importAudit third-party dependencies — resolve installed versions, cross-reference known-vulnerable releases, and flag vendored code that has diverged from upstream./audit-diff/audit-diff — regression diff between two auditsDiff two AuditSentry audit reports (before vs after) to track regressions — what's new, what's fixed, and whether the grade moved./audit-history/audit-history — what's been found beforePull past public audits (Code4rena, Sherlock, Spearbit, etc.) for a deployed contract or known protocol.Other plugins' commands for the same job