$npx -y skills add gate/gate-skills --skill gate-exchange-spotGate spot trading and account operations skill. Use when the user asks to buy/sell crypto on spot, check account value, list spot balances, or place conditional/trigger orders. Triggers on 'buy coin', 'sell spot', 'take profit', 'stop loss', 'cancel order', 'my spot balance', '查看
| 1 | # Gate Spot Trading Assistant |
| 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 `./references/gate-runtime-rules.md` |
| 8 | - **Only use the `gate-cli` commands explicitly listed in this skill.** Commands not documented here must NOT be run for these workflows, even if other interfaces expose them. |
| 9 | |
| 10 | |
| 11 | --- |
| 12 | |
| 13 | ## Skill Dependencies |
| 14 | |
| 15 | - **Before any `gate-cli` invocation:** ensure `gate-cli` is installed. Let `GATE_CLI_BIN="${GATE_OPENCLAW_SKILLS_BIN:-$HOME/.openclaw/skills/bin}/gate-cli"`. If **`[ ! -x "$GATE_CLI_BIN" ]`** (and `command -v gate-cli` also fails if you rely on `PATH`), **run** [`setup.sh`](./setup.sh) (e.g. `sh ./setup.sh` from this skill directory), then re-check. **Do not** continue with trading or account reads that require auth until `gate-cli` runs successfully (e.g. `gate-cli --version`). |
| 16 | - **No MCP servers** are required for this skill; execution is **`gate-cli` only**. |
| 17 | |
| 18 | ### gate-cli commands used |
| 19 | |
| 20 | **Query Operations (Read-only)** |
| 21 | |
| 22 | - `gate-cli cex spot market currency` |
| 23 | - `gate-cli cex spot market pair` |
| 24 | - `gate-cli cex spot account list` |
| 25 | - `gate-cli cex spot account get` |
| 26 | - `gate-cli cex spot account batch-fee` |
| 27 | - `gate-cli cex spot market candlesticks` |
| 28 | - `gate-cli cex spot market orderbook` |
| 29 | - `gate-cli cex spot price-trigger get` |
| 30 | - `gate-cli cex spot market tickers` |
| 31 | - `gate-cli cex spot account book` |
| 32 | - `gate-cli cex spot order my-trades` |
| 33 | - `gate-cli cex spot order list` |
| 34 | - `gate-cli cex spot price-trigger list` |
| 35 | - `gate-cli cex wallet market trade-fee` |
| 36 | |
| 37 | **Execution Operations (Write)** |
| 38 | |
| 39 | - `gate-cli cex spot order batch-amend` |
| 40 | - `gate-cli cex spot order amend` |
| 41 | - `gate-cli cex spot order cancel` |
| 42 | - `gate-cli cex spot order batch-cancel` |
| 43 | - `gate-cli cex spot price-trigger cancel` |
| 44 | - `gate-cli cex spot price-trigger cancel-all` |
| 45 | - `gate-cli cex spot order batch-create` |
| 46 | - `gate-cli cex spot order buy` / `gate-cli cex spot order sell` |
| 47 | - `gate-cli cex spot price-trigger create` |
| 48 | |
| 49 | ### Authentication |
| 50 | - **Interactive file setup:** when **`GATE_API_KEY`** and **`GATE_API_SECRET`** are **not** both set on the host, run **`gate-cli config init`** to complete the wizard for API key, secret, profiles, and defaults (see [gate-cli](https://github.com/gate/gate-cli)). |
| 51 | - **Env / flags:** **`gate-cli config init`** is **not** required when credentials are already supplied — e.g. **both** **`GATE_API_KEY`** and **`GATE_API_SECRET`** set on the host, or **`--api-key`** / **`--api-secret`** where supported — never ask the user to paste secrets into chat. |
| 52 | - **Permissions:** Spot:Write, Wallet:Read on the key used by `gate-cli`. |
| 53 | - **Portal:** create or rotate keys outside the chat: https://www.gate.com/myaccount/profile/api-key/manage |
| 54 | |
| 55 | ### Installation Check |
| 56 | - **Required:** `gate-cli` (install via [`setup.sh`](./setup.sh) when missing, per Skill Dependencies). |
| 57 | - GateClaw / OpenClaw: [`setup.sh`](./setup.sh) installs to `$HOME/.openclaw/skills/bin/gate-cli` by default; add that directory to **`PATH`** if agents invoke `gate-cli` by name. |
| 58 | - **Credentials:** When **`GATE_API_KEY`** and **`GATE_API_SECRET`** are both set (non-empty) for the host, **do not** require **`gate-cli config init`** — th |