wagmi-best-practices
Installation
SKILL.md
Wagmi best practices
Use when building or reviewing React Ethereum applications with wagmi.
Mental model
- wagmi is a React integration layer for Ethereum apps, built on top of viem and TanStack Query.
- Keep wagmi responsible for React-facing wallet state, account state, and cached blockchain reads, not as a place to hide all web3 logic.
- Treat connection, chain state, reads, and writes as separate concerns with different UX and reliability requirements.
Config and providers
- Keep a single, explicit wagmi config that defines chains, transports, connectors, and provider scope.
- Make RPC transport choices intentional; wallet UX and public read performance often depend more on transport quality than on hook code.
- Keep environment-specific chain and provider configuration out of scattered component files.