$npx -y skills add gate/gate-skills --skill gate-dex-wallet-cliGate DEX CLI wallet skill (pure REST). Auth via OAuth, balance, wallet/account addresses, token list, tx history, transfers, and signing. GV checkin is built into signing commands. Use this skill whenever the user wants to log in, check balance/address, view tx history, transfer
| 1 | # Gate DEX CLI |
| 2 | |
| 3 | ## General Rules |
| 4 | |
| 5 | ⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding. |
| 6 | Do NOT select or call any tool until all rules are read. These rules have the highest priority. |
| 7 | → Read [gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md) |
| 8 | - **Only call MCP tools explicitly listed in this skill.** Tools not documented here must NOT be called, even if they |
| 9 | exist in the MCP server. |
| 10 | - **Only use the `gate-dex` CLI subcommands explicitly listed in this skill and its references.** Commands not documented here must NOT be run for these workflows, even if other interfaces expose them. |
| 11 | |
| 12 | > **Pure Routing Layer** — This SKILL.md is a lightweight router. Sub-module details live in `references/`. |
| 13 | |
| 14 | ## Overview |
| 15 | |
| 16 | `gate-dex` is a standalone CLI tool that communicates with Gate DEX services via REST APIs. **No MCP server is required.** All signing operations (transfer, sign-msg, swap) include built-in GV security checkin — the agent does not need to run any external binary. |
| 17 | |
| 18 | Auth: login via Gate/Google OAuth, token stored in `~/.gate-dex/auth.json`. |
| 19 | |
| 20 | The CLI also supports an **interactive REPL** — running `gate-dex` with no arguments opens a prompt. |
| 21 | |
| 22 | ## Applicable Scenarios |
| 23 | |
| 24 | Use this skill when the user wants to: |
| 25 | |
| 26 | - Authenticate (login/logout) via Gate OAuth or Google OAuth |
| 27 | - Query token balances, total portfolio value, or wallet addresses |
| 28 | - View transaction history |
| 29 | - Transfer or send tokens to an on-chain address (EVM + Solana) |
| 30 | - Sign raw messages or raw transactions |
| 31 | - Use `gate-dex` CLI commands directly |
| 32 | |
| 33 | --- |
| 34 | |
| 35 | ## Capability Boundaries |
| 36 | |
| 37 | | Supported | Route elsewhere | |
| 38 | |-----------|----------------| |
| 39 | | Authentication & session management | Token swap → `gate-dex-trade-cli` skill | |
| 40 | | Balance, address & token list queries | Market data / token info / K-line → `gate-dex-market-cli` skill | |
| 41 | | Transaction history | DApp interactions → `gate-dex-wallet` skill (MCP-based) | |
| 42 | | Token transfers (EVM + Solana) | x402 payments → `gate-dex-wallet` skill (MCP-based) | |
| 43 | | Sign 32-byte hex messages / raw tx | MCP tool calls → `gate-dex-wallet` skill (MCP-based) | |
| 44 | |
| 45 | **Prerequisites**: A `gate-dex` binary on PATH. |
| 46 | |
| 47 | - **GateClaw managed scenario** — `skill/setup.sh` runs automatically on install and drops a pre-built Linux binary into `/home/node/.openclaw/skills/bin/gate-dex`. Environment variables (`RUN_ENV`, `*_URL`) are collected via the GateClaw Web form and injected into `process.env` at runtime. |
| 48 | - **Personal OpenClaw scenario** — the frontmatter `install` spec downloads the binary for the host OS automatically (no Node.js required). |
| 49 | - **Local development** — build from source: |
| 50 | ```bash |
| 51 | cd cli && pnpm install |
| 52 | pnpm build:binary # production binary (no baked env) |
| 53 | pnpm build:binary -- --bake-env # bake root .env into the binary (test env) |
| 54 | ``` |
| 55 | |
| 56 | --- |
| 57 | |
| 58 | ## Installation |
| 59 | |
| 60 | The published binary is a single self-contained executable (no Node.js runtime required). |
| 61 | |
| 62 | ```bash |
| 63 | # GateClaw / OpenClaw: auto-installed via setup.sh or frontmatter.install |
| 64 | # Manual download (example): |
| 65 | curl -fsSL https://gate-dex-cli.gateweb3.cc/latest/gate-dex-linux-x64 \ |
| 66 | -o /usr/local/bin/gate-dex |
| 67 | chmod +x /usr/local/bin/gate-dex |
| 68 | |
| 69 | # Login |
| 70 | gate-dex login # Gate OAuth (default) |
| 71 | gate-dex login --google # Google OAuth |
| 72 | ``` |
| 73 | |
| 74 | **Storage**: |
| 75 | - Auth token → `~/.gate-dex/auth.json` |
| 76 | |
| 77 | **Environment variables** (all optional; defaults target production): |
| 78 | |
| 79 | | Variable | Purpose | |
| 80 | |----------|---------| |
| 81 | | `RUN_EN |