.claude/skills/wagmi-connectors/SKILL.md
Wallet connectors for MetaMask, WalletConnect, injected, and more. Use when setting up wallet connections.
npx skillsauth add cyotee/crane wagmi-connectorsInstall 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.
Wallet connection adapters.
import { createConfig, http } from '@wagmi/core'
import { mainnet, sepolia } from '@wagmi/core/chains'
import { injected } from '@wagmi/connectors'
import { walletConnect } from '@wagmi/connectors'
import { safe } from '@wagmi/connectors'
export const config = createConfig({
chains: [mainnet, sepolia],
connectors: [
injected(), // Browser wallets (MetaMask, etc.)
walletConnect({ projectId: '...' }),
safe()
],
transports: { ... }
})
import { connect, disconnect, getConnection } from '@wagmi/core'
// Connect
const { account, chainId, connector } = await connect(config, {
connector: injected() // or omit to use first available
})
// Get current connection
const { account, chainId } = getConnection(config)
// Disconnect
await disconnect(config)
import { injected } from '@wagmi/connectors'
injected({
shimDisconnect: true // persist disconnect state
})
import { metaMask } from '@wagmi/connectors'
metaMask({
shimDisconnect: true,
flag: 'all' // or 'ethereum'
})
import { walletConnect } from '@wagmi/connectors'
walletConnect({
projectId: 'YOUR_PROJECT_ID',
showQrModal: true,
qrModalOptions: {
themeMode: 'dark'
}
})
import { safe } from '@wagmi/connectors'
safe({
allowedDomains: [/gnosis-safe.io$/, /app.safe.global$/],
debug: false
})
import { mock } from '@wagmi/connectors'
mock({
accounts: [privateKeyToAccount('0x...')],
chainId: 1
})
import { switchChain } from '@wagmi/core'
import { base } from '@wagmi/core/chains'
await switchChain(config, { chainId: base.id })
import { watchConnections, watchConnector } from '@wagmi/core'
// Watch all connections
watchConnections(config, (connections) => {
console.log('Connections:', connections)
})
// Watch specific connector
watchConnector(config, 'injected', (connector) => {
console.log('Injected connector:', connector)
})
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.