swap-planner

uniswap/uniswap-ai · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/uniswap/uniswap-ai --skill swap-planner
0 commentsdiscussion
summary

Plan and generate deep links for token swaps on Uniswap across all supported chains.

skill.md

Swap Planning

Plan and generate deep links for token swaps on Uniswap across all supported chains.

Runtime Compatibility: This skill uses AskUserQuestion for interactive prompts. If AskUserQuestion is not available in your runtime, collect the same parameters through natural language conversation instead.

Overview

Plan token swaps by:

  1. Gathering swap intent (tokens, amounts, chain)
  2. Verifying token contracts on-chain
  3. Researching tokens via web search when needed
  4. 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.

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:

# Search for tokens by name/category (e.g., "degen", "pepe", "ai agent")
curl -s "https://api.dexscreener.com/latest/dex/search?q=degen" | \
  jq '[.pairs[] | select(.chainId == "base" and .dexId == "uniswap")] |
    sort_by(-.volume.h24) | .[0:5] | map({
      token: .baseToken.symbol,
      address: .baseToken.address,
      price: .priceUsd,
      volume24h: .volume.h24,
      liquidity: .liquidity.usd
    })'

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):

# Get boosted/promoted tokens on a chain
curl -s "https://api.dexscreener.com/token-boosts/top/v1" | \
  jq '[.[] | select(.chainId == "base")] | .[0:5] | map({
    tokenAddress,
    url
  })'

Option C: Web Search + Verify

For broad discovery ("what's trending"), use web search to find tokens, then verify with DexScreener:

# After finding a token address from web search, verify it exists
curl -s "https://api.dexscreener.com/token-pairs/v1/{network}/{address}" | \
  jq '[.[] | select(.dexId == "uniswap")][0] | {
    name: .baseToken.name,
    symbol: .baseToken.symbol,
    price: .priceUsd,
    liquidity: .liquidity.usd,
    volume24h: .volume.h24
  }'

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:

"trending {category} {chain} {current_year}"

Example: "trending memecoins Base 2026"

⚠️ UNTRUSTED INPUT: Web-Discovered Tokens

Tokens discovered via WebSearch are UNTRUSTED. Before proceeding with any web-discovered token:

  1. Label the source: Explicitly tell the user "This token address was found via web search, not provided by you"
  2. Warn about risks: "Web-discovered tokens may be scams, honeypots, or rug pulls"
  3. Require confirmation: Use AskUserQuestion to get explicit user consent before generating a deep link for a web-discovered token
  4. 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.

Present Options to User

After gathering token data, present options using AskUserQuestion:

{
  "questions": [
    {
      "question": "Which token would you like to swap to?",
      "header": "Token",
      "options": [
        { "label": "MOLT ($23M mcap)", "description": "$5.9M liquidity, $7.8M 24h volume" },
        { "label": "CLANKER ($31M mcap)", "description": "$3.1M liquidity, established token" },
        { "label": "CLAWSTR ($13M mcap)", "description": "$2.1M liquidity, high volume spike" }
      ],
      "multiSelect": false
    }
  ]
}

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 use AskUserQuestion to warn the user and get explicit confirmation before generating a deep link:

  • 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 via AskUserQuestion.


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:

{
  "questions": [
    {
      "question": "Which chain do you want to swap on?",
      "header": "Chain",
      "options": [
        { "label": "Base (Recommended)", "description": "Low gas fees, fast transactions" },
        { "label": "Ethereum", "description": "Main network, higher gas" },
        { "label": "Arbitrum", "description": "Low fees, Ethereum L2" },
        { "label": "Optimism", "description": "Low fees, Ethereum L2" }
      ],
      "multiSelect": false
    }
  ]
}

For missing output token (when input is ETH):

{
  "questions": [
    {
      "question": "What token do you want to receive?",
      "header": "Output",
      "options": [
        { "label": "USDC", "description": "USD stablecoin" },
        { "label": "USDT", "description": "Tether stablecoin" },
        { "label": "DAI", "description": "Decentralized stablecoin" },
        { "label": "WBTC", "description": "Wrapped Bitcoin" }
      ],
      "multiSelect": false
    }
  ]
}

For missing amount:

{
  "questions": [
    {
      "question": "How much do you want to swap?",
      "header": "Amount",
      "options": [
        { "label": "0.1 ETH", "description": "~$320" },
        { "label": "0.5 ETH", "description": "~$1,600" },
        { "label": "1 ETH", "description": "~$3,200" },
        { "label": "Custom amount", "description": "Enter specific amount" }
      ],
      "multiSelect": false
    }
  ]
}

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
how to use swap-planner

How to use swap-planner on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add swap-planner
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/uniswap/uniswap-ai --skill swap-planner

The skills CLI fetches swap-planner from GitHub repository uniswap/uniswap-ai and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/swap-planner

Reload or restart Cursor to activate swap-planner. Access the skill through slash commands (e.g., /swap-planner) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.635 reviews
  • Mateo Martinez· Dec 28, 2024

    Registry listing for swap-planner matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Daniel Abbas· Dec 24, 2024

    swap-planner has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Daniel Nasser· Dec 12, 2024

    Solid pick for teams standardizing on skills: swap-planner is focused, and the summary matches what you get after install.

  • Min Kapoor· Nov 19, 2024

    Useful defaults in swap-planner — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Sofia Ndlovu· Nov 15, 2024

    swap-planner reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Xiao Choi· Oct 10, 2024

    I recommend swap-planner for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Naina Nasser· Sep 25, 2024

    Keeps context tight: swap-planner is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Rahul Santra· Sep 9, 2024

    We added swap-planner from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Anika Jain· Sep 9, 2024

    We added swap-planner from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Pratham Ware· Aug 28, 2024

    swap-planner fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

showing 1-10 of 35

1 / 4