← 返回 Skills 市场
wpank

Uniswap Batch Swap

作者 wpank · GitHub ↗ · v0.1.0
cross-platform ⚠ suspicious
838
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install batch-swap
功能描述
Execute multiple token swaps in sequence. Use when user wants to rebalance, swap into multiple tokens, or execute a multi-step trading plan. Each swap goes through full safety validation independently.
使用说明 (SKILL.md)

Batch Swap

Execute multiple token swaps in sequence with independent safety validation per swap.

Activation

Use this skill when the user says any of:

  • "Swap X for Y and Z"
  • "Rebalance to 50% ETH 50% USDC"
  • "Buy 3 different tokens"
  • "Execute these swaps: ..."

Input Extraction

Parameter Required Default Source
swaps Yes List of {tokenIn, tokenOut, amount}
chain No ethereum Default chain for all swaps
stopOnFailure No true Whether to halt on first failure

Workflow

  1. Parse all swaps from the user's message. Confirm token symbols resolve.

  2. Pre-flight check: Verify total spending within daily limits and sufficient balance for all swaps using check_safety_status and get_agent_balance.

  3. Sequential execution: For each swap:

    • Launch Task(subagent_type:trade-executor) with swap parameters
    • Wait for confirmation before starting next swap
    • Update running balance between swaps
    • If stopOnFailure=true and swap fails, halt remaining swaps
  4. Report summary:

Batch Swap Complete (3/3 succeeded)

  #  Swap              Amount In    Amount Out   Tx
  1  USDC → WETH      1,000 USDC   0.307 WETH   0xABC...
  2  USDC → WBTC      1,000 USDC   0.015 WBTC   0xDEF...
  3  USDC → UNI       1,000 USDC   142.3 UNI    0xGHI...

  Total gas: $1.26

Error Handling

Error User Message Suggested Action
BATCH_PARTIAL_FAILURE "Swap #N failed. Remaining halted." Review failed swap, re-run remaining
INSUFFICIENT_BALANCE "Insufficient balance for full batch." Reduce amounts
SAFETY_AGGREGATE_LIMIT "Total batch exceeds daily limit." Reduce total batch size
安全使用建议
This skill looks like a legitimate batch-swap workflow, but it leaves out where and how transactions are signed and what the trade-executor subagent/microservices are permitted to do. Before installing or using it: 1) Ask the publisher where signing keys and RPC credentials reside and who/what will sign transactions (your wallet, a custodian, or the subagent). 2) Verify the implementation and trust boundaries of Task(subagent_type:trade-executor) and the mcp__uniswap__* microservices (what permissions they have, whether they can exfiltrate keys or deploy other actions). 3) Require least-privilege access: prefer a read-only balance check and manual confirmation for high-value trades or transaction signing performed locally. 4) Test with very small amounts in a controlled environment and ensure audit/logging of every submitted tx. Because of the unexplained credential handling, treat this skill as suspicious until the above is clarified.
功能分析
Type: OpenClaw Skill Name: batch-swap Version: 0.1.0 The skill is classified as suspicious due to the broad file system access granted to the AI agent via `Read`, `Glob`, and `Grep` in the `allowed-tools` section of `SKILL.md`. While the skill's stated purpose and workflow are benign (executing token swaps), these powerful tools introduce a significant prompt injection vulnerability. An attacker could craft a malicious prompt to instruct the agent to read sensitive files (e.g., credentials, configuration) or list directories, potentially leading to unauthorized information disclosure, even though the skill itself does not explicitly instruct such actions.
能力评估
Purpose & Capability
Name/description (batch token swaps) align with the workflow in SKILL.md, but a trading skill normally requires wallet signing credentials, RPC endpoints, or an explicit integration with an exchange/bridge. This skill declares no credentials or config paths yet instructs launching a Task(subagent_type:trade-executor) to submit trades, which is an unexplained gap.
Instruction Scope
Instructions stay within a swapping/rebalancing scope (parse swaps, pre-flight safety, sequential execution, reporting) and do not ask to read arbitrary files or unrelated env vars. However they delegate critical actions to an external subagent and microservice tools (mcp__uniswap__check_safety_status, mcp__uniswap__get_agent_balance) without describing their trust model, data flow, or how transaction signing is performed.
Install Mechanism
Instruction-only skill with no install steps or downloaded code; this minimizes on-disk risk. The README references installation commands for package managers, but the skill package itself contains only docs and no install script.
Credentials
No environment variables, credentials, or config paths are declared despite functionality that normally requires private keys, provider RPCs, or API keys. The allowed-tools indicate the skill will call internal microservices and launch a trade-executor subagent — both of which may need sensitive credentials but those are not declared or scoped here.
Persistence & Privilege
Skill is not always-enabled and does not request persistent presence. Autonomous invocation is allowed by default, and the skill's ability to spawn subagents increases its effective privilege during execution; this is normal for agent skills but should be considered when combined with the missing credential details above.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install batch-swap
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /batch-swap 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release: Batch Swap skill for sequential multi-token trading with independent safety checks. - Execute multiple token swaps in a single workflow, ideal for rebalancing or multi-step trading plans. - Each swap is validated for safety and balance before execution. - Supports halting on the first failure or continuing batch execution. - Detailed summary reports outcomes and any partial failures. - Error messages guide users to resolve balance or safety issues.
元数据
Slug batch-swap
版本 0.1.0
许可证
累计安装 2
当前安装数 2
历史版本数 1
常见问题

Uniswap Batch Swap 是什么?

Execute multiple token swaps in sequence. Use when user wants to rebalance, swap into multiple tokens, or execute a multi-step trading plan. Each swap goes through full safety validation independently. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 838 次。

如何安装 Uniswap Batch Swap?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install batch-swap」即可一键安装,无需额外配置。

Uniswap Batch Swap 是免费的吗?

是的,Uniswap Batch Swap 完全免费(开源免费),可自由下载、安装和使用。

Uniswap Batch Swap 支持哪些平台?

Uniswap Batch Swap 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Uniswap Batch Swap?

由 wpank(@wpank)开发并维护,当前版本 v0.1.0。

💬 留言讨论