.claude/skills/wagmi-react-hooks/SKILL.md
React hooks for blockchain queries and mutations. Use when reading/writing contracts or querying chain data.
npx skillsauth add cyotee/crane wagmi-react-hooksInstall 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.
Overview of React hooks.
// Contract reads
useReadContract({ abi, address, functionName, args })
useReadContracts({ contracts: [...] })
// Chain data
useBlockNumber({ chainId })
useBalance({ address, chainId })
useChainId()
// Transactions
useTransactionReceipt({ hash })
useWaitForTransactionReceipt({ hash })
// Contract writes
useWriteContract()
useSimulateContract()
// Transactions
useSendTransaction()
useSignMessage()
useSignTypedData()
// Re-fetch on block changes
useReadContract({
abi,
address,
functionName: 'balanceOf',
args: [address],
watch: true // re-fetch when block changes
})
useReadContract({
abi,
address,
functionName: 'balanceOf',
args: [address],
query: {
enabled: !!address, // only fetch when address exists
staleTime: 5 * 60 * 1000, // cache for 5 minutes
refetchOnWindowFocus: false,
}
})
const { data, error, isError, isLoading, isPending, refetch } = useReadContract({
abi, address, functionName, args
})
// data - the result (if successful)
// error - error object (if failed)
// isLoading / isPending - loading state
// isError - error state
// refetch - function to manually re-fetch
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.