smart-contract-specialist — Claude Code subagent for contract architecture
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.
no license 708 installs updated 2026-10-24
npx claude-code-templates@latest --agent blockchain-web3/smart-contract-specialistWhat smart-contract-specialist 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.
What it helps with
- 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
transientin DeFi protocol architecture
Example prompts for the agent
- 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?
How to install smart-contract-specialist
1claude-code-templates
npx claude-code-templates@latest --agent blockchain-web3/smart-contract-specialist2Manually: put the files in place
.claude/agents/smart-contract-specialist.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-specialist.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-specialist.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-specialist
How to install smart-contract-specialist in Claude Code?
Run npx claude-code-templates@latest --agent blockchain-web3/smart-contract-specialist and the subagent will appear in .claude/agents/smart-contract-specialist.md.
What does smart-contract-specialist do?
It advises on smart contract architecture: proxy pattern selection, EIP-7201 storage layout design, module boundaries, and token standard selection. It hands off implementation and audits to other subagents.
When should I use Diamond instead of UUPS or Transparent?
When you need independently upgradeable modules or hit contract size limits. Diamond is more complex and costs more to audit because facets share storage.