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
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install web3-docs - 安装完成后,直接呼叫该 Skill 的名称或使用
/web3-docs触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 308 次。
如何安装 Web3 Docs?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install web3-docs」即可一键安装,无需额外配置。
Web3 Docs 是免费的吗?
是的,Web3 Docs 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Web3 Docs 支持哪些平台?
Web3 Docs 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Web3 Docs?
由 old-greggyboy(@old-greggyboy)开发并维护,当前版本 v1.0.1。