# smart-contract-auditor

Audits EVM and Solidity smart contracts for exploits, logic flaws, and economic attack vectors. Useful for pre-deployment reviews and vulnerability reports.

- subagent · `type=agent` · Claude Code · 701 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/blockchain-web3/smart-contract-auditor.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/agents/smart-contract-auditor

## What it 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.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --agent blockchain-web3/smart-contract-auditor
```

2. **Manually: put the files in place**
- File: `.claude/agents/smart-contract-auditor.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/smart-contract-auditor.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/smart-contract-auditor.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/blockchain-web3/smart-contract-auditor.md

## When to use it
- 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
- 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.

## Similar
- [code-reviewer](https://affpapa.org/en/nevibecode/agents/code-reviewer.md) — subagent · 31050 installs
- [security-auditor](https://affpapa.org/en/nevibecode/agents/security-auditor.md) — subagent · 10718 installs
- [test-engineer](https://affpapa.org/en/nevibecode/agents/test-engineer.md) — subagent · 9715 installs
- [code-reviewer](https://affpapa.org/en/nevibecode/agents/voltagent-community-code-reviewer.md) — subagent · 31050 installs
- [security-auditor](https://affpapa.org/en/nevibecode/agents/voltagent-community-security-auditor.md) — subagent · 10718 installs
- [devops-engineer](https://affpapa.org/en/nevibecode/agents/devops-engineer.md) — subagent · 7392 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 495 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
