Web3 Docs
/install web3-docs
Web3 Docs
Current patterns and references for EVM development. Covers the full stack: contracts → testing → deployment → frontend integration.
Stack Coverage
| Layer | Tool | Reference |
|---|---|---|
| Contracts | Solidity 0.8.x | references/solidity.md |
| Framework | Foundry (forge/cast/anvil) | references/foundry.md |
| Framework (alt) | Hardhat | references/hardhat.md |
| Standards | OpenZeppelin 5.x | references/openzeppelin.md |
| Standards | ERC-4626 (tokenized vaults) | references/erc4626.md |
| Frontend (low-level) | Viem 2.x | references/viem.md |
| Frontend (React) | Wagmi 2.x | references/wagmi.md |
| Frontend (legacy) | ethers.js 6.x | references/ethers.md |
Quick Lookup
Starting a new Foundry project: See references/foundry.md → Project Setup
Starting a Hardhat project: See references/hardhat.md → Installation
Writing an ERC-20: See references/openzeppelin.md → ERC-20
Building a yield vault (ERC-4626): See references/erc4626.md → OpenZeppelin Implementation
First depositor attack on vaults: See references/erc4626.md → First Depositor Attack
Connecting a wallet in React: See references/wagmi.md → Quick Start
Reading contract state with Viem: See references/viem.md → Read Contracts
Common Solidity errors: See references/solidity.md → Error Reference
Deploying to Optimism/Base with Hardhat: See references/hardhat.md → hardhat.config.ts
Fetch Latest Docs
scripts/fetch-docs.js \x3Ctopic> pulls live docs from official sources when the reference files may be stale.
node scripts/fetch-docs.js solidity # Solidity docs
node scripts/fetch-docs.js foundry # Foundry book
node scripts/fetch-docs.js viem # Viem docs
node scripts/fetch-docs.js wagmi # Wagmi docs
node scripts/fetch-docs.js openzeppelin # OZ docs
node scripts/fetch-docs.js hardhat # Hardhat docs
node scripts/fetch-docs.js erc4626 # ERC-4626 (OZ vault docs)
Gas Optimization Quick Rules
- Use
calldatainstead ofmemoryfor read-only function params - Pack storage variables: multiple
uint128in one slot beats two separateuint256 uncheckedblocks for arithmetic that can't overflow (saves ~30 gas/op)immutable>constant> storage for values set once- Events are cheaper than storage for historical data
- Batch operations: one tx touching N items beats N txs
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install web3-docs - After installation, invoke the skill by name or use
/web3-docs - Provide required inputs per the skill's parameter spec and get structured output
What is Web3 Docs?
Up-to-date documentation and code patterns for Solidity, Foundry, Hardhat, Viem, Wagmi, ethers.js, and OpenZeppelin. Use when writing smart contracts, debugg... It is an AI Agent Skill for Claude Code / OpenClaw, with 308 downloads so far.
How do I install Web3 Docs?
Run "/install web3-docs" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Web3 Docs free?
Yes, Web3 Docs is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Web3 Docs support?
Web3 Docs is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Web3 Docs?
It is built and maintained by old-greggyboy (@old-greggyboy); the current version is v1.0.1.