ethereum — Claude Code skill: Solidity, Hardhat, OpenZeppelin
Gives your agent a rulebook for Ethereum smart contracts: security patterns, OpenZeppelin integration, Hardhat tests.
npx skills add Mindrally/skills --skill ethereum -a claude-codeWhat ethereum does
The skill turns the assistant into a Solidity reviewer. It carries a set of conventions: explicit visibility modifiers, NatSpec comments, function modifiers for repeated checks, interface segregation, and proxy patterns for upgradeable contracts.
Security gets its own section. Expect the agent to reach for Checks-Effects-Interactions against reentrancy, pull-over-push payments, rate limiting on sensitive calls, and ReentrancyGuard. Custom errors replace revert strings. From OpenZeppelin it pulls AccessControl, SafeERC20, Pausable, and TimelockController.
On optimization the rules point to Solidity 0.8.0+ for built-in overflow protection, storage packing, immutable variables, and libraries to shrink contract size. Static analysis runs through Slither and Mythril, testing and debugging through Hardhat. One caveat: the guidelines are opinionated. Assembly in performance-critical sections and dropping ethical disclaimers are both on the list, so the agent will push back on code that follows a different house style.
What it helps with
- write an ERC-20 contract without access control holes
- guard a withdrawal function against reentrancy
- swap hand-rolled token code for OpenZeppelin
- set up Hardhat tests and static analysis
- cut gas costs with storage packing
Example prompts for the agent
- Write an ERC-20 contract with AccessControl roles and a pause switch
- Check this function for reentrancy and apply Checks-Effects-Interactions
- Set up Hardhat tests and run Slither over the contracts
How to install ethereum
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill ethereum -a claude-code2Manually: put the files in place
~/.claude/skills/ethereum/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ethereum/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill ethereum -a codex2Manually: put the files in place
.agents/skills/ethereum/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill ethereum -a cursor2Manually: put the files in place
.cursor/skills/ethereum/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills ethereum2Manually: put the files in place
.github/skills/ethereum/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill ethereum -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path ethereumManually: put the files in place
.devin/skills/ethereum/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill ethereum -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about ethereum
How do I install the ethereum skill in Claude?
Run npx skills add Mindrally/skills --skill ethereum -a claude-code. The skill lands in ~/.claude/skills/ethereum/SKILL.md.
What does the ethereum skill do?
It gives the agent Solidity coding standards, security patterns, OpenZeppelin usage, gas optimization tips, and a Hardhat-based testing workflow for smart contracts.
What tooling does the skill assume?
The rules target Solidity 0.8.0+, Hardhat for testing and debugging, and Slither plus Mythril for static analysis. OpenZeppelin libraries are wired into your own project.
Source text
SKILL.md · Apache-2.0
--- name: ethereum description: Expert guidelines for Ethereum smart contract development with Solidity, OpenZeppelin, and Hardhat metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # Ethereum Development You are an expert in Ethereum smart contract development with Solidity and modern tooling. ## Core Philosophy Cut the fluff. Code or detailed explanations only. Keep it casual and brief. Accuracy and depth matter. ## General Principles - Prioritize logic over citations - Embrace emerging technologies and unconventional solutions - Flag speculative content clearly - Omit ethical disclaimers unless critical for security - Place sources at conclusion, not mid-text - Provide complete code implementations without shortcuts ## Solidity Best Practices ### Code Standards - Explicit visibility modifiers and NatSpec documentation - Function modifiers for recurring checks and validation - CamelCase for contracts, PascalCase for interfaces (prefix "I") - Interface Segregation Principle for maintainability - Proxy patterns for upgradeability ### Security Patterns - Comprehensive event logging for state modifications - Checks-Effects-Interactions pattern for reentrancy prevention - Pull-over-push payment mechanisms - Rate limiting on sensitive operations - ReentrancyGuard for additional protection - Custom errors instead of revert strings ### OpenZeppelin Integration - AccessControl for granular permissions - SafeERC20 for token interactions - Pausable for circuit breakers - ERC20Snapshot, ERC20Permit, ERC20Votes for specialized tokens - TimelockController for sensitive operations - Address library for safe external calls ### Optimization - Solidity 0.8.0+ for built-in overflow/underflow protection - Gas-efficient storage packing - Assembly for performance-critical sections (with documentation) - Immutable variables for compile-time constants - Libraries for reducing contract size ## Testing & Analysis - Unit, integration, and end-to-end test coverage - Property-based testing for edge cases - Slither and Mythril static analysis - High coverage on critical paths - Security audits and bug bounties ## Development Workflow - Hardhat for testing and debugging - CI/CD pipelines for deployments - Pre-commit linting and type checking - Architecture diagrams and decision logs
© Mindrally · Apache-2.0 · Mindrally/skills