.claude/skills/wagmi-react-overview/SKILL.md
React hooks library for Ethereum built on viem and TanStack Query. Use when building React apps with wallet connections and contract interactions.
npx skillsauth add cyotee/crane wagmi-react-overviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
React hooks for Ethereum.
pnpm add wagmi [email protected] @tanstack/react-query
// config.ts
import { createConfig, http } from 'wagmi'
import { mainnet, sepolia } from 'wagmi/chains'
export const config = createConfig({
chains: [mainnet, sepolia],
transports: {
[mainnet.id]: http(),
[sepolia.id]: http(),
},
})
// App.tsx
import { WagmiProvider } from 'wagmi'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { config } from './config'
const queryClient = new QueryClient()
function App() {
return (
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<YourComponents />
</QueryClientProvider>
</WagmiProvider>
)
}
wagmi-react-providers - WagmiProvider setupwagmi-react-connect - Wallet connection hookswagmi-react-read - useReadContractwagmi-react-write - useWriteContractwagmi-react-hooks - All hooks overviewimport { useBlockNumber } from 'wagmi'
declare module 'wagmi' {
interface Register {
config: typeof config
}
}
// Now chainId is typed
useBlockNumber({ chainId: mainnet.id }) // ✅
useBlockNumber({ chainId: 123 }) // ❌ type error
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
documentation
Write to contracts and send transactions. Use when executing state-changing contract functions.
development
HTTP and WebSocket transports for blockchain connectivity. Use when configuring network connections.
data-ai
Read contract data with type-safe ABI. Use when querying smart contract view/pure functions.