/evm-contract-audit:evm-contract-auditfrom evm-contract-audit
Audits EVM/Solidity smart contracts for security vulnerabilities including reentrancy, access control, flash loan exploits, upgrade issues, oracle manipulation, signature attacks, bridge message binding, Safe modules, EIP-7702, stale approvals, Uniswap v4 hooks, and transient storage.
Ships in evm-contract-audit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Security audit skill for Solidity smart contracts on EVM-compatible chains. It is based on EVMbench, a study of 120 high-severity vulnerabilities from 40 real Code4rena audit competitions, and on established EVM vulnerability knowledge.
Discovery is the bottleneck. When agents know which mechanism is broken, they patch 94% of vulnerabilities. Without hints, they patch ~40%. The hard part is to find the bug in a large codebase. Understanding and fixing it is easier. This skill gives systematic search patterns to find more bugs.
| # | Attack Vector | Severity | EVMbench Examples |
|---|---|---|---|
| 0 | Reentrancy | CRITICAL | Phi H-06, TheDAO |
| 1 | Missing Access Control | CRITICAL | Basin H-01, WellUpgradeable |
| 2 | Flash Loan Exploitation | CRITICAL | Noya H-08 |
| 3 | Unsafe Upgrade Patterns | CRITICAL | Basin H-01, WellUpgradeable |
| 4 | Price & Oracle Manipulation | HIGH | Abracadabra H-02 |
| 5 | Integer & Rounding Errors | HIGH | Abracadabra H-02 |
| 6 | Front-running & Race Conditions | HIGH | Size H-02, Sequence H-02 |
| 7 | Signature Vulnerabilities | CRITICAL | Sequence H-01, Sequence H-02 |
| 8 | Cross-Contract Trust Boundary | CRITICAL | Noya H-08 |
| 9 | Unsafe External Calls | HIGH | Multiple |
| 10 | Logic & State Errors | HIGH | BendDAO, Taiko H-01 |
| 11 | Token Standard Pitfalls | MEDIUM | Multiple |
| 12 | Denial of Service | MEDIUM | Taiko H-01 |
| 13 | Cross-Chain Message & Attestation Binding | CRITICAL | Aramid, Ankr, Allbridge, KelpDAO (2026) |
| 14 | Caller-Asserted Authentication | CRITICAL | FlashLoopAdapter, Safe v4 Router, Startale (2026) |
| 15 | Stale Approvals & Approval Squatting | HIGH | Limit Break PPv2, Avalanche Safe (2026) |
| 16 | Uniswap v4 Hooks & Flash Accounting | HIGH | GoldPesa GPXHooks (2026) |
Vectors 0-12 come from EVMbench. Vectors 13-16 come from 2026 exploits. VULNERABILITY_PATTERNS.md has the detailed patterns, with insecure and secure code examples and real-world case studies.
solana-security-audit or solana-best-practices)Never run an exploit PoC, fork harness or fixture that a third party sent you outside a sandbox. In 2026 attackers posed as white-hat researchers and sent protocol teams PoC kits that ran curl | sh (SEAL advisory). Read every script first, and run it in a disposable VM or container with no keys, wallets or RPC credentials mounted.
Ownable, skipping nonReentrant, or the wrong inheritance order still creates vulnerabilities.tx.origin == msg.sender": With EIP-7702 any EOA can run code. Also check whitelists for known keys such as the Hardhat and Anvil default accounts.Two findings are the same vulnerability if and only if:
Be lenient about different terminology, different attack scenarios for the same root cause, and exposition style.
Be strict about different vulnerability types, root causes and code locations, and about vague descriptions.
DETECTION_GRADING.md has the full grading criteria, what the hint system showed, and the optimal detection workflow.
When invoked, the skill runs these steps:
The EVMbench paper's evaluation of expert-level auditing points to this workflow:
# Find all Solidity files
rg "\.sol$" --files
# Read README, scope docs, known issues
# Identify: what contracts are in scope? What's out of scope?
# What are the known issues / automated findings (ineligible)?
# Map inheritance
rg "contract\s+\w+\s+is\s+" --type sol
# Find entry points (public/external functions)
rg "function\s+\w+.*\b(public|external)\b" --type sol
# Find value-handling functions
rg "payable|\.transfer\(|\.send\(|\.call\{value" --type sol
rg "safeTransfer|safeTransferFrom|transferFrom" --type sol
Check these first. EVMbench only includes vulnerabilities that lead to loss of user or platform funds.
# Reentrancy (#0): external calls before state updates
rg "\.call\{value|\.transfer\(|\.send\(" --type sol
rg "safeTransfer|safeTransferFrom" --type sol
# Then check: is state updated BEFORE or AFTER these calls?
# Access control (#1): missing modifiers on sensitive functions
rg "function.*(withdraw|transfer|upgrade|set|pause|mint|burn|liquidate)" --type sol
# Check: do they have onlyOwner, onlyRole, or auth checks?
# Flash loans (#2): callbacks without validation
rg "flashLoan|flashMint|callback|receive.*FlashLoan" --type sol
# Upgrades (#3): UUPS/proxy patterns
rg "_authorizeUpgrade|upgradeTo|upgradeToAndCall|delegatecall" --type sol
# Price/oracle (#4): spot price or manipulable sources
rg "getReserves|balanceOf.*price|latestRoundData|slot0" --type sol
# Integer issues (#5): division before multiplication, unchecked blocks
rg "unchecked\s*\{" --type sol
rg "\/.*\*|mulDiv" --type sol
# Signatures (#7): ecrecover, EIP-712
rg "ecrecover|ECDSA|signedData|signature|nonce" --type sol
# Bridges (#13): what is signed vs what the replay guard uses
rg "lzReceive|ccipReceive|expressExecute|receiveMessage|processed|consumed" --type sol
# Caller-asserted auth (#14): msg.sender answering for itself, caller-chosen calldata
rg "\(msg\.sender\)\.(isModuleEnabled|isOwner|isAuthorized)|execTransactionFromModule|isTrustedForwarder" --type sol
rg "tstore|tload" --type sol
# Approvals (#15): unlimited and never reset
rg "approve\(.*type\(uint256\)\.max" --type sol
# v4 hooks (#16): settlement inside a swapper's unlock
rg "beforeSwap|afterSwap|TAKE_PAIR|modifyLiquiditiesWithoutUnlock" --type sol
For each finding from Step 2:
EVMbench showed that agents that stop after the first vulnerability miss the others. Real codebases have multiple independent vulnerabilities.
Use the finding template below. Write each finding down as you find it.
# Find all external calls
rg "\.call\{|\.call\(|\.transfer\(|\.send\(" --type sol -n
rg "safeTransfer\(|safeTransferFrom\(" --type sol -n
# Check for nonReentrant
rg "nonReentrant" --type sol
# CRITICAL: Find external calls in functions WITHOUT nonReentrant
# Then check if state is updated before or after the call
# Find all state-changing functions
rg "function\s+\w+.*external|function\s+\w+.*public" --type sol -n
# Check for auth modifiers
rg "onlyOwner|onlyRole|onlyAdmin|require.*msg\.sender|_checkRole" --type sol
# Find sensitive operations without modifiers
rg "function.*(mint|burn|pause|unpause|upgrade|set.*address|withdraw|emergenc)" --type sol -n
# ETH transfers
rg "\.call\{value:|\.transfer\(|\.send\(|msg\.value" --type sol -n
# ERC20 transfers
rg "\.transfer\(|\.transferFrom\(|safeTransfer\(|safeTransferFrom\(" --type sol -n
# Approval patterns
rg "\.approve\(|safeApprove\(|increaseAllowance|forceApprove" --type sol -n
## [SEVERITY] #N: Vulnerability Title
**Location**: `src/Contract.sol:45-60`
**Root Cause**: Brief explanation of the underlying flaw.
**Impact**: What an attacker can achieve (quantify if possible).
**Vulnerable Code**:
(code block showing the issue)
**Attack Scenario**:
1. Step-by-step exploit description
2. Including preconditions and required setup
3. Expected outcome for the attacker
**Recommended Fix**:
(code block showing the fix)
**Reference**: EVMbench pattern #N / SWC-XXX
Avoid these mistakes, all seen in EVMbench:
| File | Contents |
|---|---|
| VULNERABILITY_PATTERNS.md | 17 vectors with insecure/secure code examples |
| EVMBENCH_CATALOG.md | Full catalog of 120+ vulnerabilities across 40 audits, by category with frequencies |
| EVMBENCH_CASE_STUDIES.md | 5 detailed case studies from the EVMbench paper |
| DETECTION_GRADING.md | LLM judge criteria, hint system, optimal detection workflow, scoring |
| SWC_ADDITIONAL_PATTERNS.md | SWC registry patterns, 2024-2026 trends |
| REAL_WORLD_EXPLOITS.md | 8 major DeFi exploits ($1.7B+ total) with technical breakdowns, plus 38 exploits from 2026 mapped to vectors |
| DEFI_PROTOCOL_PATTERNS.md | AMM, lending, bridge, MEV, vault share accounting, tax tokens, governance capture |
| SOLIDITY_PITFALLS.md | Storage layout, assembly, post-Cancun EVM changes, transient storage, narrowing casts, 2026 compiler advisories |
| TESTING_AND_TOOLING.md | Foundry/Hardhat exploit PoCs, invariant/fuzz testing, Slither/Aderyn |
README.md (opens in a new tab)agents/openai.yaml (opens in a new tab)references/DEFI_PROTOCOL_PATTERNS.md (opens in a new tab)references/DETECTION_GRADING.md (opens in a new tab)references/EVMBENCH_CASE_STUDIES.md (opens in a new tab)references/EVMBENCH_CATALOG.md (opens in a new tab)references/REAL_WORLD_EXPLOITS.md (opens in a new tab)references/SOLIDITY_PITFALLS.md (opens in a new tab)references/SWC_ADDITIONAL_PATTERNS.md (opens in a new tab)references/TESTING_AND_TOOLING.md (opens in a new tab)references/VULNERABILITY_PATTERNS.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub gabrielkoerich/skills --plugin evm-contract-audit