uniswap/uniswap-ai/swap-planner
Claude Code and agent skill by uniswap/uniswap-ai
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user asks to "swap tokens", "trade ETH for USDC", "exchange tokens on Uniswap", "buy tokens", "sell tokens", "convert ETH to stablecoins", "find memecoins", "discover tokens", "research tokens", "tokens to buy", "find tokens to swap", "what should I buy", or mentions swapping, trading, researching, discovering, buying, or exchanging tokens on any Uniswap-supported chain. Supports both known token swaps and token discovery workflows (discovery uses keyword search and web search — there is no live "trending" feed). Generates deep links to execute swaps in the Uniswap interface.
Install
npx vskill@latest install uniswap/uniswap-ai/swap-plannerSKILL.md
Swap Planning
Plan and generate deep links for token swaps on Uniswap across all supported chains.
Runtime Compatibility: This skill usesAskUserQuestionfor interactive prompts. IfAskUserQuestionis not available in your runtime, collect the same parameters through natural language conversation instead.
Overview
Plan token swaps by:
- Gathering swap intent (tokens, amounts, chain)
- Verifying token contracts on-chain
- Researching tokens via web search when needed
- Generating a deep link that opens in the Uniswap interface with parameters pre-filled
The generated link opens Uniswap with all parameters ready for execution.
Note: Browser opening (xdg-open/open) may fail in SSH, containerized, or headless environments. Always display the URL prominently so users can copy and access it manually if needed.
<!-- markdownlint-disable-next-line MD028 -->
File Access: This skill has read-only filesystem access. Never read files outside the current project directory unless explicitly requested by the user.
Workflow
Step 0: Token Discovery (When Needed)
If the user wants to discover tokens rather than swap a known token (e.g., "find me a memecoin", "what's trending on Base"), help them explore before proceeding to the swap.
Option A: Search by Keyword
DexScreener search works best with specific terms:
Good search terms: degen, pepe, ai, agent, meme, dog, cat, or specific token names
Option B: Check Promoted Tokens
Get tokens with active promotions (limited selection):
Option C: Web Search + Verify
For broad discovery ("what's trending"), use web search to find tokens, then verify with DexScreener:
Network IDs: See references/chains.md for the full list with DexScreener and DefiLlama provider IDs. Common IDs: ethereum, base, arbitrum, optimism, polygon, bsc, avalanche, unichain.
DexScreener coverage varies by chain. Ethereum, Base, and Arbitrum have deep Uniswap data. Celo, Blast, Zora, and World Chain have limited Uniswap pool coverage — fewer results and potentially missing pairs. Fall back to DefiLlama for price data when DexScreener returns empty results (see references/data-providers.md).
Note: DexScreener's public API doesn't have a "trending" or "top gainers" endpoint. Token discovery uses keyword search (/latest/dex/search) and web search as a fallback. For general discovery, ask the user what type of token they're looking for and search by keyword.
Category-Based Discovery
For specific categories (memecoins, DeFi, gaming tokens), use web search:
Example: "trending memecoins Base 2026"
⚠️ UNTRUSTED INPUT: Web-Discovered Tokens
Tokens discovered via WebSearch are UNTRUSTED. Before proceeding with any web-discovered token:
- Label the source: Explicitly tell the user "This token address was found via web search, not provided by you"
- Warn about risks: "Web-discovered tokens may be scams, honeypots, or rug pulls"
- Require confirmation: Use AskUserQuestion to get explicit user consent before generating a deep link for a web-discovered token
- Show provenance: In the swap summary table, include a "Token Source" row showing whether each token was "User-provided" or "Web-discovered (unverified)"
Never proceed with a web-discovered token without explicit user confirmation — via AskUserQuestion, or an equivalent conversational confirmation where that tool is unavailable.
Present Options to User
After gathering token data, present options using AskUserQuestion:
Risk Assessment for Trending Tokens
Evaluate tokens before recommending:
| Metric | Low Risk | Medium Risk | High Risk | |
|---|---|---|---|---|
| Market Cap | >$50M | $5M-$50M | <$5M | |
| Pool TVL | >$1M | $100k-$1M | <$100k | |
| 24h Volume | Consistent | Spiking unusually | Very low | |
| Contract Age | >30 days | 7-30 days | <7 days |
Always disclose risk level when presenting options. For high-risk tokens, explicitly warn about volatility and potential for loss.
Mandatory Warnings for High-Risk Tokens
When ANY of these conditions are met, you MUST warn the user and get explicit confirmation before generating a deep link (via AskUserQuestion where available, conversational confirmation otherwise):
- Contract age < 7 days: "This token contract is less than 7 days old. New tokens carry significantly higher risk of being scams or rug pulls."
- Pool TVL < $100k: "This pool has very low liquidity. You may experience significant slippage and difficulty selling."
- No sell liquidity detected: "This token may be a honeypot — tokens that can be bought but not sold. Proceed with extreme caution."
- Market cap < $5M: "This is a micro-cap token with high volatility. Only invest what you can afford to lose entirely."
Do NOT generate a deep link for high-risk tokens without explicit user acknowledgment.
Step 1: Gather Swap Intent
Extract from the user's request:
| Parameter | Required | Example | |
|---|---|---|---|
| Input token | Yes | ETH, USDC, token address | |
| Output token | Yes | USDC, WBTC, token address | |
| Amount | Yes | 1.5 ETH, $500 worth | |
| Chain | Yes (default: Ethereum) | Base, Arbitrum, etc. |
If any required parameter is missing, use AskUserQuestion with structured options:
For missing chain:
For missing output token (when input is ETH):
For missing amount:
Always use forms instead of plain text questions for better UX.
Step 2: Resolve Token Addresses
For token symbols, resolve to addresses using known tokens or web search:
Native tokens: Use NATIVE as the address parameter.
Common tokens by chain - see ../../references/chains.md for full list:
| Token | Ethereum | Base | Arbitrum | |
|---|---|---|---|---|
| USDC | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 | 0xaf88d065e77c8cC2239327C5EDb3A432268e5831 | |
| WETH | 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 | 0x4200000000000000000000000000000000000006 | 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 | |
| WBTC | 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599 | N/A | 0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f |
For unknown tokens, use web search to find the contract address, then verify on-chain.
Step 3: Verify Token Contracts (Basic)
Input Validation (Required Before Any Shell Command):
Before interpolating user-provided values into any shell command, validate all inputs:
- Token addresses MUST match:
^0x[a-fA-F0-9]{40}$ - Chain/network names MUST be from the allowed list in
../../references/chains.md - Amounts MUST be valid decimal numbers (match:
^[0-9]+\.?[0-9]*$) - Reject any input containing shell metacharacters (
;,|,$, ``,&,(,),>,<,\,',"`, newlines)
Verify token contracts exist on-chain using curl (RPC call):
If the result is 0x or empty, the address is not a valid contract.
Alternative with cast (optional, requires Foundry):
Note: The curl/RPC method above is preferred for broader compatibility. Only use cast if already available in the environment. This skill ONLY uses cast code for contract verification. Do not use any other cast subcommands. The PreToolUse hook in .claude/hooks/validate-forge-cast.sh enforces this programmatically.
RPC URLs by chain - see ../../references/chains.md for full list.
Step 4: Research (If Needed)
For unfamiliar tokens, use web search to research:
- Token legitimacy and project info
- Recent news or security concerns
- Liquidity availability on Uniswap
Include relevant findings in the summary.
Step 5: Fetch Price Data
Before generating the deep link, fetch current prices to estimate swap output. See references/data-providers.md for full API details.
Quick price lookup with DexScreener:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/plugins/uniswap-driver/skills/swap-planner/SKILL.md
Popularity
- Repository stars
- 229
- Repository forks
- 35
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 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/swap-planner)