
Swap Integration
This gets you swapping tokens via Uniswap across frontends, backends, and smart contracts. The skill covers three integration paths: the Trading API for most use cases (with a clean three-step flow: check approval, get quote, execute swap), the Universal Router SDK when you need direct control over transaction construction, and on-chain integration for DeFi composability. It includes proper input validation rules, routing type tables (CLASSIC, DUTCH_V2, PRIORITY, etc.), and handles the weirdness of UniswapX responses versus standard AMM quotes. The prerequisites assume you know viem basics, so this isn't a beginner entry point. Good if you're building anything that needs programmatic token swaps and don't want to figure out Uniswap's evolving API surface yourself.
- skills.sh installs
- 2.3K
- GitHub stars
- 236
- last updated
- Aug 21, 2026
Install
$ npx -y skills add uniswap/uniswap-ai --skill swap-integration --agent claude-codeInstalls into .claude/skills of the current project.
Files
Swap Integration
Integrate Uniswap swaps into frontends, backends, and smart contracts.
Prerequisites
This skill assumes familiarity with viem basics (client setup, account management, contract interactions, transaction signing). Install the uniswap-viem plugin for comprehensive viem/wagmi guidance: claude plugin add @uniswap/uniswap-viem
Quick Decision Guide
| Building... | Use This Method |
|---|---|
| Frontend with React/Next.js | Trading API |
| Backend script or bot | Trading API |
| Smart contract integration | Universal Router direct calls |
| Need full control over routing | Universal Router SDK |
Routing Types Quick Reference
Sponsors
Details
- Repository
- github.com/uniswap/uniswap-ai
- Categories
- Frontend Development, Backend & APIs, DevOps & CI/CD, Automation & Workflows, Finance & Trading
- First seen
- Apr 16, 2026