# smart-contract-specialist

The smart-contract-specialist subagent for Claude Code advises on proxy patterns, upgradeable storage, and module boundaries; implementation goes to blockchain-developer, audits to smart-contract-auditor.

- subagent · `type=agent` · Claude Code, Codex, Cursor · 708 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-specialist.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/smart-contract-specialist

## What it does

The subagent handles smart contract architecture decisions: which proxy pattern to use (UUPS, Transparent, Beacon, or Diamond — the latter carries higher audit cost and complexity due to shared storage across facets; reserve it for cases that need independent module upgrades or hit contract size limits), how to lay out storage slots under EIP-7201 to avoid collisions on upgrades, where to draw module boundaries, and which token standard fits the use case (ERC-20, ERC-721, ERC-4626, ERC-7579 for modular smart accounts). It accounts for EIP-1153 (`transient` keyword for reentrancy guards without `SSTORE` cost), EIP-7702 (EOA delegation — an address can become a contract in the next block, so `EXTCODESIZE` checks no longer reliably distinguish EOAs), and the `via_ir` compiler flag for contracts hitting stack or gas limits.

It uses Read, Grep, Glob, WebSearch, and WebFetch to analyze code and find compatible OpenZeppelin references. Before recommending a proxy, it asks whether the contract will be upgraded and which network it targets. For any upgradeable contract, it requires EIP-7201 (the `erc7201` builtin since Solidity 0.8.35) so re-delegation under EIP-7702 does not corrupt storage slots.

It supports Solidity up to 0.8.37; the experimental EOF backend was removed in 0.8.36, so EOF is off the table. It factors static analysis tools like Slither and Aderyn into the design upfront so downstream verification runs without rework.

## Install

### Claude Code (native platform)

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

2. **Manually: put the files in place**
- File: `.claude/agents/smart-contract-specialist.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-specialist.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-specialist.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-specialist.md

## When to use it
- choose a proxy pattern and lay out storage for an upgradeable contract
- separate logic into modules without slot collisions
- select a token standard that fits the protocol
- account for EIP-7702 and `transient` in DeFi protocol architecture

## Example prompts
- I need a lending protocol with upgradeable contracts — which proxy pattern should I use and how do I lay out storage?
- Which token standard should I pick for a modular smart account with validators and hooks?

## Similar
- [solidity-security](https://affpapa.org/en/nevibecode/skills/solidity-security.md) — skill · 15382 installs
- [blockchain-developer](https://affpapa.org/en/nevibecode/agents/blockchain-developer.md) — subagent · 375 installs
- [smart-contract-vulnerabilities](https://affpapa.org/en/nevibecode/skills/smart-contract-vulnerabilities.md) — skill · 3900 installs
- [Solidity Smart Contract taste](https://affpapa.org/en/nevibecode/prompts/solidity-smart-contract-taste.md) — prompt · ★ 178201 repo stars
- [analyzing-ethereum-smart-contract-vulnerabilities](https://affpapa.org/en/nevibecode/skills/analyzing-ethereum-smart-contract-vulnerabilities.md) — skill · 398 installs
- [use-smart-contract-platform](https://affpapa.org/en/nevibecode/skills/use-smart-contract-platform.md) — skill · 1000 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 745 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
