smart-contract-auditor — Claude Code subagent: features and install
Audits EVM and Solidity smart contracts for exploits, logic flaws, and economic attack vectors. Useful for pre-deployment reviews and vulnerability reports.
npx claude-code-templates@latest --agent blockchain-web3/smart-contract-auditorWhat smart-contract-auditor does
This subagent inspects Solidity and EVM code to uncover access control flaws, reentrancy paths, and oracle manipulation risks. It runs shell tools, grep, and file lookups while classifying findings according to the OWASP framework. The agent reports problems without rewriting contract code or architecting upgrade schemes.
Audits cover token standard issues across ERC-4626, ERC-4337, and EIP-7702. The agent tests for flash loan exposures, proxy storage slot overlaps, and view-function read-only reentrancy. When needed, it runs static linters and Foundry property-based fuzz tests to confirm suspect execution paths.
The auditor never marks a repository as entirely safe to ship. If a working proof-of-concept exploit touches live public chains, the agent stops to confirm permission first.
What it helps with
- Audit an ERC-4626 vault implementation for share inflation exploits
- Detect reentrancy and permission bypasses in DeFi protocol contracts
- Assess spot price dependencies against flash loan manipulation
- Generate a structured risk report categorized by severity levels
Example prompts for the agent
- Check my yield farming contract for reentrancy bugs and flash loan attack vectors.
- Inspect this suspicious transaction on-chain to reveal the exploit mechanism.
- Run a pre-deployment security review across all smart contracts in this repository.
How to install smart-contract-auditor
1claude-code-templates
npx claude-code-templates@latest --agent blockchain-web3/smart-contract-auditor2Manually: put the files in place
.claude/agents/smart-contract-auditor.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/smart-contract-auditor.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/smart-contract-auditor.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about smart-contract-auditor
How do I install smart-contract-auditor in Claude Code?
Run npx claude-code-templates@latest --agent blockchain-web3/smart-contract-auditor in your terminal. This creates the configuration file at .claude/agents/smart-contract-auditor.md.
Does the agent fix the vulnerabilities it detects?
No, its scope is strictly restricted to uncovering bugs and documenting attack paths. Remediation code and architecture decisions are left to the developer.
Can this agent audit non-EVM networks like Solana?
Its primary toolchain and vulnerability checks are built specifically for EVM and Solidity. For non-EVM chains, it advises using ecosystem-specific tools instead.