微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🔐

智能钱包 DeFi 技能中枢

Elytro: security-first ERC-4337 smart account wallet CLI for AI agents. Built-in 2FA, configurable spending limits. · v0.2.3
专业技能 安全 A 级 作者 walkjoi 公开目录收录
971 下载 0 安装 3.6k 收藏 7 浏览

简介

Elytro钱包生态入口,整合智能账户管理与DeFi协议技能,提供Uniswap等子技能的安全调用框架

原始描述

Entry point for the Elytro wallet skill plus the curated DeFi sub-skills. Start here before loading any individual protocol skill.

通过你的 Agent 添加

安装目录:elytro-defi/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/elytro-security-first-erc-4337-smart-account-wallet-cli-for-ai-agents-built-in-2/
Codex CLI~/.codex/skills/elytro-security-first-erc-4337-smart-account-wallet-cli-for-ai-agents-built-in-2/
DeepSeek Harness~/.agents/skills/elytro-security-first-erc-4337-smart-account-wallet-cli-for-ai-agents-built-in-2/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

Elytro Skills Pack 是智能合约钱包 Elytro 的官方技能集合入口,采用三层架构设计:

  1. 钱包核心层(elytro/):管理智能账户生命周期,包括部署、余额查询、转账、安全设置等,内置内联按钮交互规范与交易审批流程
  2. DeFi 调度层(defi/):意图识别与协议路由,自动将用户需求分发至对应子技能(如兑换、流动性、收益策略)
  3. 协议执行层(defi/<protocol>/):当前支持 Uniswap(兑换、LP 管理),通过 defi/elytro/ 执行桥将规划器的 calldata/UserOps 提交至链上

典型工作流:用户表达意图 → defi 识别协议 → 加载 defi/uniswap 生成交易计划 → defi/elytro 模拟并发送 UserOp → elytro 处理签名与上链。

显著优点

  • 模块化组合:按需加载技能,避免单一大技能包的 token 浪费
  • 账户抽象原生:专为 ERC-4337 智能账户设计,支持批量交易、Paymaster gas 抽象
  • 安全交互范式:强制内联按钮确认、交易模拟、人工审批节点(如 Payroll 的周期支付确认)
  • Clawhub 原生:支持单仓库多技能管理,无需重新打包

潜在局限

  • CLI 依赖:Node ≥ 24 与全局 CLI 安装为硬性门槛
  • 协议覆盖有限:当前仅 Uniswap 完整支持,其他协议需社区扩展
  • 用户可调用限制:本入口文件标记 user-invocable: false,需通过子技能触发
  • 模拟环境依赖:交易前模拟依赖外部 RPC 与网络状态

适合人群

  • 需要智能账户管理的 DeFi 活跃用户
  • 团队/DAO 进行周期性 Payroll 自动化
  • 开发者构建基于 Elytro 的 AI Agent 工作流

常规风险

  • 智能合约风险:依赖 Uniswap 等第三方协议合约安全
  • 私钥管理:CLI 环境下的密钥存储需遵循 Elytro 安全规范
  • 网络钓鱼:需验证 elytro --help 输出的原始链接指向 Elytro-eth/skills 官方仓库
  • Gas 波动:账户抽象交易的 gas 成本可能高于 EOA 简单转账

技能正文


name: elytro-defi description: Coordinate Elytro ERC-4337 smart accounts with DeFi planners (e.g., Uniswap AI) to quote, build, simulate, and execute calldata or UserOperations safely. user-invocable: true disable-model-invocation: false required-skills: ["elytro"] allowed-tools:

  • "Bash(elytro account*)"
  • "Bash(elytro query*)"
  • "Bash(elytro tx build*)"
  • "Bash(elytro tx simulate*)"
  • "Bash(elytro tx send*)" related-skills: ["defi", "defi/uniswap", "elytro"]

Coordinate Elytro With DeFi Planners

Use this skill when a protocol-specific planner (e.g., defi/uniswap) provides swap/liquidity/lending instructions that must be executed from an Elytro smart account. Elytro signs and submits the tx/UserOp; the planner supplies calldata, route, and slippage details.

Prerequisites

  1. Wallet ready – Follow the elytro skill to run elytro init, create/activate the target account, and fund it with required assets plus gas if sponsorship is disabled.
  2. Planner context – Load the protocol-specific skill (Uniswap AI or similar). Share balances, chain, and account alias so it can craft calldata/UserOps against the correct router and chain ID.
  3. Environment – Export Elytro env vars (ELYTRO_ENV, Pimlico key, RPC overrides) in the same shell session that runs the commands below.
  4. Secure temp files – Store planner output in temporary files or shell variables (CALLDATA, USEROP_JSON). Never commit Elytro vault data or planner secrets.

Workflow

1. Gather context for the planner

elytro account list
elytro query balance <alias> [--token <erc20>]
elytro query tokens <alias>

Share the alias/address, chain ID, native/token balances, and any gas sponsorship preferences with the planner so it can size the trade and pick pools.

2. Obtain calldata or UserOp from the planner

Ask the planner for one of two artifacts:

Artifact When to Request Contents
Calldata bundle Most swaps, liquidity adds/removes, lending interactions Router/contract address, calldata hex, ETH value (if payable), recommended chain ID
UserOperation JSON When the planner already built an ERC‑4337 UserOp (paymasters, batching logic, etc.) Complete userOperation structure ready for signing

Always confirm the planner output references your Elytro account address and target chain.

3. Simulate before sending

Calldata path
ACCOUNT=demo-arb
CHAIN=42161
ROUTER=0xE592427A0AEce92De3Edee1F18E0157C05861564
CALLDATA=0x472b43f3...
VALUE_ETH=0

elytro tx simulate "$ACCOUNT" \
  --chain "$CHAIN" \
  --tx "to:$ROUTER,value:$VALUE_ETH,data:$CALLDATA"

Review the output for:

  • Type, selector, and calldata size (should match planner summary)
  • Sponsorship status (Sponsored: Yes/No)
  • Balance warnings (insufficient ERC-20 or native ETH)
  • Gas limits and estimated max cost
UserOperation path
USEROP_JSON=$(cat userop.json)
elytro tx simulate "$ACCOUNT" --userop "$USEROP_JSON"

Simulation ensures gas limits and paymaster fields are valid before signing.

4. Execute the action

  • Calldata – Repeat the same spec with tx send. Add --no-sponsor if you must force self-paid gas.

    elytro tx send "$ACCOUNT" \
      --chain "$CHAIN" \
      --tx "to:$ROUTER,value:$VALUE_ETH,data:$CALLDATA"
    
  • UserOperation – Sign and relay the planner’s JSON verbatim (Elytro will not overwrite paymaster data).

    elytro tx send "$ACCOUNT" --userop "$USEROP_JSON"
    

Record the printed bundler hash and eventual transaction hash for auditing.

5. Verify results

After inclusion, confirm balances or positions changed as expected:

elytro query balance "$ACCOUNT" --token <erc20>
elytro query tokens "$ACCOUNT"

Share proofs back with the planner or user if required.

Input Validation & Safety

  • Addresses – Must match ^0x[0-9a-fA-F]{40}$. Reject any value with shell metacharacters.
  • Chain IDs – Accept numeric IDs only (e.g., 42161). Never pass unchecked strings into --chain.
  • Calldata – Enforce ^0x[0-9a-fA-F]+$ and even length. Reject planner output that does not include 0x.
  • Value – Must be numeric (^\d+(\.\d+)?$). Convert planner-supplied wei using --tx "value:<ETH>".
  • UserOp JSON – Keep in a single-quoted shell string or file to avoid interpolation. Optionally validate with jq.

Do not execute planner instructions that involve unknown contracts, self-modifying code, or unreviewed paymasters without human approval.

Examples

# Swap 100 USDC -> ETH on Arbitrum with calldata from Uniswap AI
CALLDATA=0x3593564c...
elytro tx simulate demo-arb \
  --chain 42161 \
  --tx "to:0xE592427A0AEce92De3Edee1F18E0157C05861564,value:0,data:$CALLDATA"
elytro tx send demo-arb \
  --chain 42161 \
  --tx "to:0xE592427A0AEce92De3Edee1F18E0157C05861564,value:0,data:$CALLDATA"

# Execute a planner-supplied UserOp (already sponsored)
elytro tx simulate demo-mainnet --userop "$(cat swap-userop.json)"
elytro tx send demo-mainnet --userop "$(cat swap-userop.json)"

If anything fails, rerun elytro tx simulate to inspect the error, then coordinate with the planner to adjust calldata, slippage, or paymaster settings.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

walletaccount-abstractionsmart-contractdefiuniswapcli-toolerc-4337user-operationpaymaster

同类 Skill