$npx -y skills add gate/gate-skills --skill gate-exchange-smallbalanceGate Exchange small balance (dust) conversion to GT via wallet APIs. Use this skill whenever the user wants to list eligible dust balances, convert small balances to GT, or view small-balance conversion history. Trigger phrases include \"small balance\", \"dust\", \"convert to GT
| 1 | ### Resolving `gate-cli` (binary path) |
| 2 | |
| 3 | Resolve **`gate-cli`** in order: **(1)** **`command -v gate-cli`** and **`gate-cli --version`** succeeds; **(2)** **`${HOME}/.local/bin/gate-cli`** if executable; **(3)** **`${HOME}/.openclaw/skills/bin/gate-cli`** if executable. Canonical rules: [`exchange-runtime-rules.md`](https://github.com/gate/gate-skills/blob/master/skills/exchange-runtime-rules.md) §4 (or [`gate-runtime-rules.md`](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md) §4). |
| 4 | |
| 5 | |
| 6 | # Gate Exchange Small Balance (Dust to GT) |
| 7 | |
| 8 | ## General Rules |
| 9 | |
| 10 | Read and follow the shared runtime rules before proceeding: |
| 11 | → `exchange-runtime-rules.md` (in parent directory `skills/`) |
| 12 | |
| 13 | ## Skill Dependencies |
| 14 | |
| 15 | ### Authentication |
| 16 | - **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)). |
| 17 | - **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. |
| 18 | - **Permissions:** Wallet read and small-balance convert as required for dust-to-GT flows (least privilege). |
| 19 | - **Portal:** create or rotate keys outside the chat: https://www.gate.com/myaccount/profile/api-key/manage |
| 20 | |
| 21 | ### Installation Check |
| 22 | - **Required:** `gate-cli` (install from [gate-cli releases](https://github.com/gate/gate-cli/releases) or via your environment’s Gate MCP / skills installer). |
| 23 | - Add the directory containing **`gate-cli`** to **`PATH`** when invoking by name. |
| 24 | - **Credentials:** When **`GATE_API_KEY`** and **`GATE_API_SECRET`** are both set (non-empty) for the host, **do not** require **`gate-cli config init`**. When **both** are unset or empty, **remind** the operator to run **`gate-cli config init`** **or** to configure **`GATE_API_KEY`** / **`GATE_API_SECRET`** in the **matching skill** from the skill library (never ask the user to paste secrets into chat). |
| 25 | - **Sanity check:** Before convert operations, confirm the CLI works (e.g. **`gate-cli cex wallet balance small`** or **`gate-cli --version`**). |
| 26 | |
| 27 | --- |
| 28 | |
| 29 | This Skill covers **small balance conversion**: listing spot holdings that qualify under the platform dust threshold, executing conversion to **GT**, and querying conversion history. Under the hood this maps to wallet routes `GET/POST /wallet/small_balance` and `GET /wallet/small_balance_history`; **agents should drive the flow via MCP tools** `cex_wallet_*` below, not by hand-crafting HTTP. |
| 30 | |
| 31 | ## Domain Knowledge |
| 32 | |
| 33 | **Small balance conversion** batches spot (or unified account spot-side) holdings whose value is below the platform **small-balance threshold** (typically up to **100 USDT** equivalent per policy; exact limits follow API responses). |
| 34 | |
| 35 | | Term | Meaning | |
| 36 | |------|---------| |
| 37 | | **Dust** | Very small leftover balances that are hard to trade as standalone orders | |
| 38 | | **Small balance** | Eligible curr |