/install 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:
| Parameter | Required | Default | Source |
|---|---|---|---|
tokenIn |
Yes | — | Token name/symbol/address |
tokenOut |
Yes | — | Token name/symbol/address |
amount |
Yes | — | Numeric value |
chain |
No | ethereum | Chain name or context |
slippage |
No | 0.5% | Explicit percentage |
routing |
No | auto | "via V3", "use UniswapX", etc. |
Workflow
-
Validate inputs: Resolve token symbols using
search_tokens. Confirm chain is supported. -
Pre-flight safety check: Call
check_safety_statusto verify:- Spending limits have room for this trade
- Rate limits are not exhausted
- Circuit breaker is not tripped
-
Delegate to trade-executor: Launch
Task(subagent_type:trade-executor)with:- tokenIn, tokenOut, amount, chain
- slippageTolerance (in bps)
- routingPreference (auto/v2/v3/v4/uniswapx)
-
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
| Error | User Message | Suggested 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:
- Repo:
Agentic-UniswapMCP server - Package:
@agentic-uniswap/mcp-server
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install execute-swap - 安装完成后,直接呼叫该 Skill 的名称或使用
/execute-swap触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
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. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 871 次。
如何安装 Uniswap Execute Swap?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install execute-swap」即可一键安装,无需额外配置。
Uniswap Execute Swap 是免费的吗?
是的,Uniswap Execute Swap 完全免费(开源免费),可自由下载、安装和使用。
Uniswap Execute Swap 支持哪些平台?
Uniswap Execute Swap 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Uniswap Execute Swap?
由 wpank(@wpank)开发并维护,当前版本 v0.1.0。