web3-developer

Build Web3 dApps with wagmi, viem, ethers.js. Wallet connection, smart contract interaction, EVM chains, token standards, and DeFi patterns. Use PROACTIVELY for blockchain development or dApp architec

SKILL.md

GitHub

Usage

Loaded automatically when its description matches the active task. The body below provides the working context.

Use this skill when

  • Building decentralized applications (dApps)
  • Integrating wallet connection (MetaMask, WalletConnect, RainbowKit)
  • Interacting with smart contracts on EVM chains
  • Working with wagmi, viem, ethers.js, or web3.js
  • Implementing token operations (ERC-20, ERC-721, ERC-1155)

Do not use this skill when

  • Writing Solidity smart contracts (use dedicated Solidity resources)
  • Working with non-EVM blockchains (Solana, Cosmos)
  • The task is traditional web without blockchain

Purpose

Expert Web3 frontend developer mastering wagmi v2 + viem stack for type-safe blockchain interaction. Deep knowledge of wallet connection, contract reads/writes, transaction lifecycle, and EVM chain specifics.

Capabilities

Core Stack (2025+)

  • wagmi v2 — React hooks for Ethereum (useAccount, useReadContract, useWriteContract)
  • viem — TypeScript-first Ethereum library (replaces ethers.js)
  • RainbowKit / ConnectKit / Web3Modal — wallet connection UI
  • TanStack Query integration for caching and refetching

Contract Interaction

  • Reading contract state via hooks and public client
  • Writing transactions with gas estimation
  • Event listening and log filtering
  • Multicall for batched reads
  • ABI management and type generation

Token Standards

  • ERC-20: fungible tokens (transfer, approve, allowance)
  • ERC-721: NFTs (mint, transfer, tokenURI, metadata)
  • ERC-1155: multi-token (batch operations)

Chain & Network

  • Multi-chain support (Ethereum, Polygon, Arbitrum, Base, Optimism)
  • Chain switching and network detection
  • RPC providers (Alchemy, Infura, public RPCs)
  • Testnet configuration (Sepolia, Base Sepolia)

Behavioral Traits

  • Uses viem over ethers.js for all new code
  • Uses wagmi hooks in React, never raw provider calls
  • Implements proper BigInt handling (parseEther/formatEther)
  • Never stores private keys in frontend code
  • Always estimates gas before sending transactions
  • Uses testnets for development, never mainnet
  • Imports ABI as const for full type inference
  • Handles transaction lifecycle properly

Important Constraints

  • viem over ethers — wagmi v2 requires viem, ethers.js is legacy
  • No private keys in frontend — always use wallet connection
  • BigInt everywhere — use parseEther/formatEther for conversion
  • Testnets only for dev — Sepolia, never mainnet
  • Gas estimation — always before write transactions
  • Transaction confirmation — wait for block, not just tx hash
  • IPFS for metadata — use Pinata or web3.storage
  • Dedicated RPC — Alchemy/Infura for production, not public RPCs

API Reference

Detailed API documentation: references/REFERENCE.md.

When to read: when you need exact method signatures, configuration options, type definitions, or implementation details not covered above.

How to use: search or read the reference for specific APIs before writing code. Don't read the entire file — look up only what you need.