Uniswap Execute Swap

Execute a Uniswap token swap. Use when user wants to swap, trade, buy, or sell tokens. Handles quotes, safety checks, simulation, and execution autonomously. Supports V2, V3, V4, UniswapX, and cross-chain routing on all supported chains.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Uniswap Execute Swap" with this command: npx skills add execute-swap

Execute Swap

Execute a token swap on Uniswap with full safety validation.

Activation

Use this skill when the user says any of:

  • "Swap X for Y"
  • "Buy X with Y"
  • "Sell X for Y"
  • "Trade X for Y"
  • "Exchange X to Y"
  • "Convert X to Y"

Input Extraction

Extract these parameters from the user's message:

ParameterRequiredDefaultSource
tokenInYesToken name/symbol/address
tokenOutYesToken name/symbol/address
amountYesNumeric value
chainNoethereumChain name or context
slippageNo0.5%Explicit percentage
routingNoauto"via V3", "use UniswapX", etc.

Workflow

  1. Validate inputs: Resolve token symbols using search_tokens. Confirm chain is supported.

  2. Pre-flight safety check: Call check_safety_status to verify:

    • Spending limits have room for this trade
    • Rate limits are not exhausted
    • Circuit breaker is not tripped
  3. Delegate to trade-executor: Launch Task(subagent_type:trade-executor) with:

    • tokenIn, tokenOut, amount, chain
    • slippageTolerance (in bps)
    • routingPreference (auto/v2/v3/v4/uniswapx)
  4. Report result to the user in a clear format:

Swap Executed Successfully

  Input:  500.00 USDC
  Output: 0.1538 WETH ($499.55)
  Price:  1 WETH = $3,248.04
  Impact: 0.01%
  Gas:    $0.42

  Tx: https://basescan.org/tx/0xABC...

  Safety: All 7 checks passed

Error Handling

ErrorUser MessageSuggested Action
SAFETY_SPENDING_LIMIT_EXCEEDED"This swap would exceed your $X daily limit."Reduce amount or wait
SAFETY_TOKEN_NOT_ALLOWED"TOKEN is not on your allowlist."Add to config
SAFETY_SIMULATION_FAILED"Swap simulation failed: [reason]."Check addresses, try smaller
INSUFFICIENT_LIQUIDITY"Not enough liquidity at acceptable slippage."Try smaller amount

MCP server dependency

This skill relies on Uniswap MCP tools for chain support lookup, token search, safety checks, and swap execution. When used in isolation (for example, from a skills catalog), ensure the Agentic Uniswap MCP server is running:

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

PaySpawn — On-Chain Spending Limits for AI Agents

Add spending controls to any AI agent that makes API payments. Supports x402 auto-pay, daily limits, per-transaction limits, address allowlists, and fleet pr...

Registry SourceRecently Updated
Web3

OpenClawCash

OpenclawCash crypto wallet API for AI agents (also called openclawcash). Use when an agent needs to send native or token transfers, check balances, list wall...

Registry SourceRecently Updated
6210macd2
Web3

Wasm Spa Autofix React Imports

Meticulously detect and fix missing React/TSX imports, undefined components, and bundler runtime errors in the WASM SPA build/preview pipeline. Ensures JSX c...

Registry SourceRecently Updated
Web3

Cortex Protocol

Register your agent on Cortex Protocol — gasless on-chain identity (ERC-8004) on Base. One command to get a verifiable agent identity.

Registry SourceRecently Updated