← 返回 Skills 市场
wpank

Uniswap Execute Swap

作者 wpank · GitHub ↗ · v0.1.0
cross-platform ⚠ suspicious
871
总下载
0
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install 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.
使用说明 (SKILL.md)

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

  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

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:

安全使用建议
This skill claims to execute on-chain swaps but does not say how it will sign transactions or obtain wallet access. Before installing or enabling it: 1) Ask the author how signing is performed — does the trade-executor require your private key, a local wallet connector (e.g., WalletConnect), or a custodial API token? 2) Require an explicit, documented confirmation step before submitting any transaction. 3) Verify and audit the referenced MCP server code (https://github.com/wpank/Agentic-Uniswap) and the trade-executor subagent — do not trust an unknown third-party server with signing or funds. 4) Test on a testnet with small amounts first. 5) If you cannot confirm where private keys remain (local vs remote) and how approvals are handled, do not enable autonomous execution.
功能分析
Type: OpenClaw Skill Name: execute-swap Version: 0.1.0 The skill is classified as suspicious due to the overly broad file system access granted via `allowed-tools: Read, Glob, Grep` in `SKILL.md`. While the skill's instructions do not explicitly direct the agent to perform malicious actions, these permissions create a significant prompt injection vulnerability. A malicious user could exploit this to instruct the agent to read or search sensitive files on the host system (e.g., configuration files, SSH keys), leading to potential data exfiltration. This is a critical vulnerability, not direct malicious intent by the skill author.
能力评估
Purpose & Capability
The name and description (execute swaps on Uniswap) match the instructions (resolve tokens, safety checks, delegate execution). However, executing a swap necessarily requires wallet signing (private key / wallet access), approvals, or a custodial API — none of which are declared (no required env vars, config paths, or credentials). The skill therefore omits a core capability it needs to operate.
Instruction Scope
SKILL.md delegates execution to Task(subagent_type:trade-executor) and calls MCP tools (search_tokens, check_safety_status) which is reasonable, but the instructions do not specify how the agent obtains or stores wallet keys, how user confirmation is obtained before on-chain execution, or what exactly the trade-executor subagent is permitted to do. The skill also states it operates "autonomously" but gives no required confirmation step, creating scope creep from 'suggest a trade' to 'execute with signing'.
Install Mechanism
There is no install spec (instruction-only), so nothing is written to disk by the skill itself — low install risk. It does, however, depend on an external Agentic-Uniswap MCP server (GitHub repo referenced). That external dependency is not bundled or verified here; use of an unverified MCP server is an operational and trust risk.
Credentials
The skill declares no required environment variables or credentials, yet performing swaps requires access to signing credentials and possibly allowlists/spending-limit configuration. That discrepancy means required secrets or config may be requested at runtime by the trade-executor or MCP server but are not documented here — a proportionality/opacity issue.
Persistence & Privilege
always is false (good) but disable-model-invocation is false (normal), meaning the agent can invoke the skill autonomously. Combined with the ability to execute financial transactions and the missing detail on confirmation and credential handling, autonomous invocation increases risk: the agent could attempt to execute trades without clear, documented user approval flows.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install execute-swap
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /execute-swap 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release — enables secure, autonomous Uniswap token swaps. - Supports V2, V3, V4, UniswapX, and cross-chain swaps on all Uniswap-supported networks. - Automatically extracts swap parameters (tokenIn, tokenOut, amount, etc.) from user inputs. - Performs comprehensive safety and allowance checks before execution. - Delegates swap execution to a dedicated trade-executor for best routing. - Provides clear, detailed result and error reporting to the user.
元数据
Slug execute-swap
版本 0.1.0
许可证
累计安装 3
当前安装数 3
历史版本数 1
常见问题

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。

💬 留言讨论