.claude/skills/wagmi-react-providers/SKILL.md
WagmiProvider and QueryClientProvider setup for React. Use when configuring the React context for wallet and blockchain data.
npx skillsauth add cyotee/crane wagmi-react-providersInstall 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.
Setup providers for React apps.
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}>
<YourApp />
</QueryClientProvider>
</WagmiProvider>
)
}
<WagmiProvider
config={config}
reconnect={true} // auto-reconnect on mount
>
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 5 * 60 * 1000, // 5 minutes
refetchOnWindowFocus: false,
},
},
})
import { cookieToInitialState } from 'wagmi'
const initialState = cookieToInitialState(config, cookies)
function App() {
return (
<WagmiProvider config={config} initialState={initialState}>
<QueryClientProvider client={queryClient}>
<YourApp />
</QueryClientProvider>
</WagmiProvider>
)
}
Access config from anywhere:
import { useConfig } from 'wagmi'
function MyComponent() {
const config = useConfig()
// Access chains, connectors, etc.
const chains = config.chains
}
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.