A React hooks library for Ethereum development that's now on v3 with some smart breaking changes. The hooks are clean (useAccount, useReadContract, useWriteContract) and they moved connectors to a separate package to keep dependencies lean. Built on TanStack Query, so you get proper caching and refetching behavior. The type inference with ABIs is excellent if you remember the "as const" annotation. One thing that trips people up is the migration from v2: useContractRead is now useReadContract, and connectors come from useConnectors() instead of useConnect(). If you're building a React or Next.js app that talks to EVM chains, this is the standard. For Node scripts or backend work, skip this and use viem directly.
- skills.sh installs
- 163
- last updated
- Aug 21, 2026
Install
$ npx -y skills add 0xsardius/onchain-typescript-skills --skill wagmi --agent claude-codeInstalls into .claude/skills of the current project.
Files
Wagmi Skill
Version: Wagmi 3.x | Official Docs | Requires TypeScript 5.7.3+
Wagmi provides React hooks for Ethereum. This skill ensures correct patterns for provider setup, hooks usage, and React-specific pitfalls.
Quick Setup (Wagmi v3)
1. Config Setup
// config.ts
import { http, createConfig } from 'wagmi'
import { mainnet, polygon, arbitrum } from 'wagmi/chains'
// v3: Install connectors separately: npm i @wagmi/connectors
import { injected, coinbaseWallet, walletConnect } from '@wagmi/connectors'
export const config = createConfig({
chains: [mainnet, polygon, arbitrum],
connectors: [
injected(),
coinbaseWallet({ appName: 'My App' }),
walletConnect({ projectId: 'YOUR_PROJECT_ID' }),
],
transports: {
[mainnet.id]: http('https://eth-mainnet.g.alchemy.com/v2/KEY'),
[polygon.id]: http('https://polygon-mainnet.g.alchemy.com/v2/KEY'),
[arbitrum.id]: http('https://arb-mainnet.g.alchemy.com/v2/KEY'),
},
})
v3 Note: Connectors are now in
@wagmi/connectorspackage for better dependency control.
2. Provider Setup
Sponsors
Details
- Repository
- github.com/0xsardius/onchain-typescript-skills
- Categories
- Frontend Development, Finance & Trading, Web3 & Blockchain
- First seen
- Jun 3, 2026
