
web3-frontend
Master Web3 frontend development with wallet integration, viem/wagmi, and dApp UX
- Installs
- 250
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-blockchain --skill web3-frontend- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads web3-frontend automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Web3 Frontend Skill
Master Web3 frontend development with wallet integration, modern libraries (viem/wagmi), and production dApp patterns.
Quick Start
# Invoke this skill for Web3 frontend development
Skill("web3-frontend", topic="wallet", framework="react")
Topics Covered
1. Wallet Integration
Connect users to Web3:
- RainbowKit: Beautiful wallet modal
- WalletConnect: Mobile support
- Account Abstraction: ERC-4337
- Multi-chain: Network switching
2. Transaction Management
Handle blockchain interactions:
- Write Operations: Contract writes
- State Tracking: Pending, confirmed
- Gas Estimation: Fee display
- Error Handling: User-friendly messages
3. Signing & Auth
Verify user identity:
- EIP-712: Typed data signing
- SIWE: Sign-In with Ethereum
- Permit: Gasless approvals
- Message Signing: Personal sign
4. React Hooks
Modern patterns with wagmi:
- useAccount: Connection state
- useWriteContract: Transactions
- useReadContract: Data fetching
- useWaitForTransactionReceipt: Confirmations
Code Examples
Connect Wallet
'use client';
import { ConnectButton } from '@rainbow-me/rainbowkit';
import { useAccount } from 'wagmi';
export function WalletConnect() {
const { address, isConnected } = useAccount();
return (
<div>
<ConnectButton />
{isConnected && <p>Connected: {address}</p>}
</div>
);
}
Write Contract
import { useWriteContract, useWaitForTransactionReceipt } from 'wagmi';
import { parseEther } from 'viem';
export function MintButton() {
const { writeContract, data: hash, isPending } = useWriteContract();
const { isLoading, isSuccess } = useWaitForTransactionReceipt({ hash });
const mint = () => {
writeContract({
address: '0x...',
abi: [...],
functionName: 'mint',
args: [1n],
value: parseEther('0.08'),
});
};
return (
<button onClick={mint} disabled={isPending || isLoading}>
{isPending ? 'Confirm in wallet...' :
isLoading ? 'Minting...' :
isSuccess ? 'Minted!' : 'Mint NFT'}
</button>
);
}
Sign Typed Data (EIP-712)
import { useSignTypedData } from 'wagmi';
const DOMAIN = {
name: 'My App',
version: '1',
chainId: 1,
verifyingContract: '0x...',
};
export function useSignOrder() {
const { signTypedDataAsync } = useSignTypedData();
const sign = async (order: Order) => {
return await signTypedDataAsync({
domain: DOMAIN,
types: { Order: [...] },
primaryType: 'Order',
message: order,
});
};
return { sign };
}
Error Handling
export function parseError(error: unknown): string {
const msg = error instanceof Error ? error.message : String(error);
if (msg.includes('user rejected')) return 'Transaction cancelled';
if (msg.includes('insufficient funds')) return 'Insufficient balance';
if (msg.includes('execution reverted')) {
const reason = msg.match(/reason="([^"]+)"/)?.[1];
return reason || 'Transaction would fail';
}
return 'Transaction failed';
}
Package Setup
npm install wagmi viem @rainbow-me/rainbowkit @tanstack/react-query
// providers/Web3.tsx
import { WagmiProvider } from 'wagmi';
import { RainbowKitProvider } from '@rainbow-me/rainbowkit';
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
import { config } from './config';
const queryClient = new QueryClient();
export function Web3Provider({ children }) {
return (
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<RainbowKitProvider>{children}</RainbowKitProvider>
</QueryClientProvider>
</WagmiProvider>
);
}
Common Patterns
| Pattern | Use Case | Hook |
|---|---|---|
| Connect wallet | User auth | useAccount |
| Read data | Display balances | useReadContract |
| Write tx | Mint, transfer | useWriteContract |
| Wait for tx | Confirm state | useWaitForTransactionReceipt |
| Sign message | Auth, permit | useSignMessage |
Common Pitfalls
| Pitfall | Issue | Solution |
|---|---|---|
| Hydration error | SSR mismatch | Use dynamic with ssr: false |
| BigInt serialization | JSON.stringify | Custom serializer |
| Stale data | Cache issues | Use refetchInterval |
Troubleshooting
"Wallet not connecting"
// Ensure client-side only
import dynamic from 'next/dynamic';
const ConnectButton = dynamic(
() => import('./ConnectButton'),
{ ssr: false }
);
"Transaction pending forever"
Check gas settings or speed up:
await wallet.sendTransaction({
...tx,
maxFeePerGas: tx.maxFeePerGas * 120n / 100n,
});
Security Checklist
- Never expose private keys
- Validate contract addresses
- Sanitize user inputs
- Use proper error boundaries
- Implement CSP headers
Cross-References
- Bonded Agent:
05-web3-frontend - Related Skills:
ethereum-development,solidity-development
Version History
| Version | Date | Changes |
|---|---|---|
| 2.0.0 | 2025-01 | Production-grade with wagmi v2, viem |
| 1.0.0 | 2024-12 | Initial release |
FAQ
What does the web3-frontend skill do?
Master Web3 frontend development with wallet integration, viem/wagmi, and dApp UX
How do I install web3-frontend?
Run npx skills add https://github.com/pluginagentmarketplace/custom-plugin-blockchain --skill web3-frontend in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/web3-frontend/ (personal) or .claude/skills/web3-frontend/ (project).
Which AI agents can use web3-frontend?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is web3-frontend safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains web3-frontend?
It is published by pluginagentmarketplace in pluginagentmarketplace/custom-plugin-blockchain. It has 250 recorded installs.
More from pluginagentmarketplace/custom-plugin-blockchain
smart-contract-security
pluginagentmarketplace/custom-plugin-blockchain
Open the skill to read its SKILL.md instructions.
solidity-development
pluginagentmarketplace/custom-plugin-blockchain
Master Solidity smart contract development with patterns, testing, and best practices
defi-protocols
pluginagentmarketplace/custom-plugin-blockchain
Open the skill to read its SKILL.md instructions.
blockchain-basics
pluginagentmarketplace/custom-plugin-blockchain
Open the skill to read its SKILL.md instructions.
ethereum-development
pluginagentmarketplace/custom-plugin-blockchain
Open the skill to read its SKILL.md instructions.
nft-development
pluginagentmarketplace/custom-plugin-blockchain
Open the skill to read its SKILL.md instructions.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.