uniswap/uniswap-ai/viem-integration
Claude Code and agent skill by uniswap/uniswap-ai
- community
Checking that the SKILL.md file is still in the repository.
Integrate EVM blockchains using viem. Use when user says "read blockchain data", "send transaction", "interact with smart contract", "connect to Ethereum", "use viem", "use wagmi", "wallet integration", "viem setup", or mentions blockchain/EVM development with TypeScript.
Install
npx vskill@latest install uniswap/uniswap-ai/viem-integrationSKILL.md
viem Integration
Integrate EVM blockchains using viem for TypeScript/JavaScript applications.
Quick Decision Guide
| Building... | Use This | |
|---|---|---|
| Node.js script/backend | viem with http transport | |
| React/Next.js frontend | wagmi hooks (built on viem) | |
| Real-time event monitoring | viem with webSocket transport | |
| Browser wallet integration | wagmi or viem custom transport |
Installation
Core Concepts
Clients
viem uses two client types:
| Client | Purpose | Example Use | |
|---|---|---|---|
| PublicClient | Read-only operations | Get balances, read contracts, fetch logs | |
| WalletClient | Write operations | Send transactions, sign messages |
Transports
| Transport | Use Case | |
|---|---|---|
http() | Standard RPC calls (most common) | |
webSocket() | Real-time event subscriptions | |
custom() | Browser wallets (window.ethereum) |
Chains
viem includes 50+ chain definitions. Import from viem/chains:
Input Validation Rules
Before interpolating ANY user-provided value into generated TypeScript code:
- Ethereum addresses: MUST match
^0x[a-fA-F0-9]{40}$— use viem'sisAddress()for validation - Chain IDs: MUST be from viem's supported chain definitions
- Private keys: MUST NEVER be hardcoded — always use
process.env.PRIVATE_KEYwith runtime validation - RPC URLs: MUST use
https://orwss://protocols only - ABI inputs: Validate types match expected Solidity types before encoding
Quick Start Examples
Read Balance
Read Contract
Send Transaction
Write to Contract
Reference Documentation
For deeper coverage of specific topics:
| Topic | Reference File | |
|---|---|---|
| Client setup, transports, chains | Clients & Transports | |
| Reading blockchain data | Reading Data | |
| Sending transactions | Writing Transactions | |
| Private keys, HD wallets | Accounts & Keys | |
| ABI handling, multicall | Contract Patterns | |
| React/wagmi hooks | Wagmi React |
Related Plugins
Once you're comfortable with viem basics, the uniswap-trading plugin provides comprehensive Uniswap swap integration:
- Uniswap Trading API integration
- Universal Router SDK usage
- Token swap implementations
Install it with: claude plugin add @uniswap/uniswap-trading
Common Utilities
Unit Conversion
Address Utilities
Hashing
Error Handling
viem throws typed errors that can be caught and handled:
Resources
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/plugins/uniswap-viem/skills/viem-integration/SKILL.md
Popularity
- Repository stars
- 235
- Repository forks
- 40
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/uniswap/uniswap-ai/viem-integration)