{
  "schemaVersion": "1.0",
  "item": {
    "slug": "zeroex-swap",
    "name": "ZeroEx Swap",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/aviclaw/zeroex-swap",
    "canonicalUrl": "https://clawhub.ai/aviclaw/zeroex-swap",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/zeroex-swap",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=zeroex-swap",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "package.json",
      "quote.js",
      "swap.js"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/zeroex-swap"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/zeroex-swap",
    "agentPageUrl": "https://openagent3.xyz/skills/zeroex-swap/agent",
    "manifestUrl": "https://openagent3.xyz/skills/zeroex-swap/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/zeroex-swap/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "ZeroEx Swap Skill",
        "body": "⚠️ SECURITY WARNING: This skill involves real funds. Review all parameters before executing swaps."
      },
      {
        "title": "Install",
        "body": "cd skills/zeroex-swap\nnpm install"
      },
      {
        "title": "Required Environment Variables",
        "body": "VariableDescriptionRequiredZEROEX_API_KEYGet from https://dashboard.0x.org/YesPRIVATE_KEYWallet private key (hex, without 0x prefix)YesRPC_URLRPC endpoint for chain (optional, defaults provided)No\n\nDeclared required env vars: ZEROEX_API_KEY, PRIVATE_KEY\n\nexport ZEROEX_API_KEY=\"your-0x-api-key\"\nexport PRIVATE_KEY=\"your-private-key-hex\"\nexport RPC_URL=\"https://mainnet.base.org\"  # optional"
      },
      {
        "title": "Get Price Quote",
        "body": "node quote.js --sell USDC --buy WETH --amount 1 --chain base"
      },
      {
        "title": "Execute Swap (sell → buy)",
        "body": "node swap.js --sell USDC --buy WETH --amount 1 --chain base"
      },
      {
        "title": "Execute Swap (buy example)",
        "body": "node swap.js --sell WETH --buy USDC --amount 0.01 --chain base"
      },
      {
        "title": "getSwapTrades",
        "body": "curl -s \"https://api.0x.org/trade-analytics/swap?chainId=8453&taker=0xYOUR_WALLET\" \\\n  -H \"0x-api-key: $ZEROEX_API_KEY\" \\\n  -H \"0x-version: v2\""
      },
      {
        "title": "getGaslessTrades",
        "body": "curl -s \"https://api.0x.org/trade-analytics/gasless?chainId=8453&taker=0xYOUR_WALLET\" \\\n  -H \"0x-api-key: $ZEROEX_API_KEY\" \\\n  -H \"0x-version: v2\""
      },
      {
        "title": "Gasless Swap (Meta-transaction)",
        "body": "Flow:\n\nGet gasless quote\nSign EIP-712 payload\nSubmit meta-tx"
      },
      {
        "title": "1) Get gasless quote",
        "body": "curl -s \"https://api.0x.org/gasless/quote?sellToken=USDC&buyToken=WETH&sellAmount=1000000&chainId=8453&taker=0xYOUR_WALLET\" \\\n  -H \"0x-api-key: $ZEROEX_API_KEY\" \\\n  -H \"0x-version: v2\""
      },
      {
        "title": "2) Sign EIP-712 (use viem)",
        "body": "// use viem to sign quote.trade.eip712\nawait client.signTypedData({\n  domain: quote.trade.eip712.domain,\n  types: quote.trade.eip712.types,\n  message: quote.trade.eip712.message,\n  primaryType: quote.trade.eip712.primaryType\n});"
      },
      {
        "title": "3) Submit",
        "body": "curl -s -X POST \"https://api.0x.org/gasless/submit\" \\\n  -H \"0x-api-key: $ZEROEX_API_KEY\" \\\n  -H \"0x-version: v2\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"trade\": {\"type\":\"settler_metatransaction\",\"eip712\": {\"domain\": {\"name\": \"Settler\", \"chainId\": 8453, \"verifyingContract\": \"0x...\"},\"types\": {...},\"message\": {...},\"primaryType\":\"...\"},\"signature\": {\"v\": 27, \"r\": \"0x...\", \"s\": \"0x...\", \"signatureType\": 2}}}'"
      },
      {
        "title": "Security Best Practices",
        "body": "Use a dedicated hot wallet\nSet slippage protection\nApprove exact amounts only\nUse your own RPC via RPC_URL"
      }
    ],
    "body": "ZeroEx Swap Skill\n\n⚠️ SECURITY WARNING: This skill involves real funds. Review all parameters before executing swaps.\n\nInstall\ncd skills/zeroex-swap\nnpm install\n\nRequired Environment Variables\nVariable\tDescription\tRequired\nZEROEX_API_KEY\tGet from https://dashboard.0x.org/\tYes\nPRIVATE_KEY\tWallet private key (hex, without 0x prefix)\tYes\nRPC_URL\tRPC endpoint for chain (optional, defaults provided)\tNo\n\nDeclared required env vars: ZEROEX_API_KEY, PRIVATE_KEY\n\nexport ZEROEX_API_KEY=\"your-0x-api-key\"\nexport PRIVATE_KEY=\"your-private-key-hex\"\nexport RPC_URL=\"https://mainnet.base.org\"  # optional\n\nUsage\nGet Price Quote\nnode quote.js --sell USDC --buy WETH --amount 1 --chain base\n\nExecute Swap (sell → buy)\nnode swap.js --sell USDC --buy WETH --amount 1 --chain base\n\nExecute Swap (buy example)\nnode swap.js --sell WETH --buy USDC --amount 0.01 --chain base\n\nTrade History\ngetSwapTrades\ncurl -s \"https://api.0x.org/trade-analytics/swap?chainId=8453&taker=0xYOUR_WALLET\" \\\n  -H \"0x-api-key: $ZEROEX_API_KEY\" \\\n  -H \"0x-version: v2\"\n\ngetGaslessTrades\ncurl -s \"https://api.0x.org/trade-analytics/gasless?chainId=8453&taker=0xYOUR_WALLET\" \\\n  -H \"0x-api-key: $ZEROEX_API_KEY\" \\\n  -H \"0x-version: v2\"\n\nGasless Swap (Meta-transaction)\n\nFlow:\n\nGet gasless quote\nSign EIP-712 payload\nSubmit meta-tx\n1) Get gasless quote\ncurl -s \"https://api.0x.org/gasless/quote?sellToken=USDC&buyToken=WETH&sellAmount=1000000&chainId=8453&taker=0xYOUR_WALLET\" \\\n  -H \"0x-api-key: $ZEROEX_API_KEY\" \\\n  -H \"0x-version: v2\"\n\n2) Sign EIP-712 (use viem)\n// use viem to sign quote.trade.eip712\nawait client.signTypedData({\n  domain: quote.trade.eip712.domain,\n  types: quote.trade.eip712.types,\n  message: quote.trade.eip712.message,\n  primaryType: quote.trade.eip712.primaryType\n});\n\n3) Submit\ncurl -s -X POST \"https://api.0x.org/gasless/submit\" \\\n  -H \"0x-api-key: $ZEROEX_API_KEY\" \\\n  -H \"0x-version: v2\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"trade\": {\"type\":\"settler_metatransaction\",\"eip712\": {\"domain\": {\"name\": \"Settler\", \"chainId\": 8453, \"verifyingContract\": \"0x...\"},\"types\": {...},\"message\": {...},\"primaryType\":\"...\"},\"signature\": {\"v\": 27, \"r\": \"0x...\", \"s\": \"0x...\", \"signatureType\": 2}}}'\n\nSecurity Best Practices\nUse a dedicated hot wallet\nSet slippage protection\nApprove exact amounts only\nUse your own RPC via RPC_URL"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/aviclaw/zeroex-swap",
    "publisherUrl": "https://clawhub.ai/aviclaw/zeroex-swap",
    "owner": "aviclaw",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/zeroex-swap",
    "downloadUrl": "https://openagent3.xyz/downloads/zeroex-swap",
    "agentUrl": "https://openagent3.xyz/skills/zeroex-swap/agent",
    "manifestUrl": "https://openagent3.xyz/skills/zeroex-swap/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/zeroex-swap/agent.md"
  }
}