$npx -y skills add gate/gate-skills --skill gate-exchange-botGate Exchange AI bot skill. Use this skill whenever the user wants AIHub strategy recommendation, manual spot/margin/infinite/futures grid creation, manual spot/contract martingale creation, or running strategy portfolio query and stop flows. Trigger phrases include recommend str
| 1 | # Gate Exchange Bot |
| 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-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 | ## Authoring Language |
| 13 | |
| 14 | This skill is authored in English. End-user replies should still follow normal language adaptation. |
| 15 | |
| 16 | ## Skill Dependencies |
| 17 | |
| 18 | ### gate-cli commands used |
| 19 | |
| 20 | **Query Operations (Read-only)** |
| 21 | |
| 22 | - `gate-cli cex bot strategy recommend` |
| 23 | - `gate-cli cex bot portfolio running` |
| 24 | - `gate-cli cex bot portfolio detail` |
| 25 | |
| 26 | **Execution Operations (Write)** |
| 27 | |
| 28 | - `gate-cli cex bot spot-grid create` |
| 29 | - `gate-cli cex bot margin-grid create` |
| 30 | - `gate-cli cex bot infinite-grid create` |
| 31 | - `gate-cli cex bot futures-grid create` |
| 32 | - `gate-cli cex bot spot-martingale create` |
| 33 | - `gate-cli cex bot contract-martingale create` |
| 34 | - `gate-cli cex bot portfolio stop` |
| 35 | |
| 36 | ### MCP-backed command mapping |
| 37 | |
| 38 | | `gate-cli` command | Backing bot capability | |
| 39 | |---|---| |
| 40 | | `gate-cli cex bot strategy recommend` | `cex_bot_get_ai_hub_strategy_recommend` | |
| 41 | | `gate-cli cex bot portfolio running` | `cex_bot_get_ai_hub_portfolio_running` | |
| 42 | | `gate-cli cex bot portfolio detail` | `cex_bot_get_ai_hub_portfolio_detail` | |
| 43 | | `gate-cli cex bot spot-grid create` | `cex_bot_post_ai_hub_spot_grid_create` | |
| 44 | | `gate-cli cex bot margin-grid create` | `cex_bot_post_ai_hub_margin_grid_create` | |
| 45 | | `gate-cli cex bot infinite-grid create` | `cex_bot_post_ai_hub_infinite_grid_create` | |
| 46 | | `gate-cli cex bot futures-grid create` | `cex_bot_post_ai_hub_futures_grid_create` | |
| 47 | | `gate-cli cex bot spot-martingale create` | `cex_bot_post_ai_hub_spot_martingale_create` | |
| 48 | | `gate-cli cex bot contract-martingale create` | `cex_bot_post_ai_hub_contract_martingale_create` | |
| 49 | | `gate-cli cex bot portfolio stop` | `cex_bot_post_ai_hub_portfolio_stop` | |
| 50 | |
| 51 | ### Authentication |
| 52 | |
| 53 | - **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)). |
| 54 | - **Env / flags:** **`gate-cli config init`** is not required when credentials are already supplied — for example when **both** **`GATE_API_KEY`** and **`GATE_API_SECRET`** are set on the host, or when **`--api-key`** / **`--api-secret`** are supported. Never ask the user to paste secrets into chat. |
| 55 | - API Key Required: Yes |
| 56 | - **Permissions:** Bot:Read, Bot:Write |
| 57 | - **Portal:** create or rotate keys outside the chat: https://www.gate.com/myaccount/profile/api-key/manage |
| 58 | |
| 59 | ### Installation Check |
| 60 | |
| 61 | - **Required:** `gate-cli`. Run `sh setup.sh` from this skill directory if it is missing. Optional: `GATE_CLI_SETUP_MODE=re |