$npx -y skills add gate/gate-skills --skill gate-exchange-marketanalysisGate Exchange market analysis tool. Use when the user asks for deep market metrics like liquidity, slippage, funding arbitrage, or manipulation risk. Triggers on 'liquidity', 'depth', 'slippage', 'momentum', 'buy/sell pressure', 'squeeze', 'funding rate', 'arbitrage', 'basis', 'p
| 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-marketanalysis |
| 7 | |
| 8 | ## General Rules |
| 9 | |
| 10 | ⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding. |
| 11 | Do NOT select or call any tool until all rules are read. These rules have the highest priority. |
| 12 | → Read [gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md) |
| 13 | - **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. |
| 14 | |
| 15 | Market tape analysis covering thirteen scenarios, such as liquidity, momentum, liquidation monitoring, funding arbitrage, basis monitoring, manipulation risk, order book explanation, slippage simulation, K-line breakout/support–resistance, and liquidity with weekend vs weekday. This skill provides structured market insights by orchestrating Gate MCP tools; call order and judgment logic are defined in `references/scenarios.md`. |
| 16 | |
| 17 | --- |
| 18 | |
| 19 | ## Skill Dependencies |
| 20 | |
| 21 | |
| 22 | ### Authentication |
| 23 | - **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)). |
| 24 | - **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. |
| 25 | - API Key Required: Not necessarily |
| 26 | - Note: This skill is read-only and primarily uses public market-data surfaces. In many runtimes these calls work without authentication, though some deployments may still route them through an authenticated MCP layer. |
| 27 | |
| 28 | ### Installation Check |
| 29 | - **Required:** `gate-cli` (run `sh ./setup.sh` from this skill directory if missing; optional `GATE_CLI_SETUP_MODE=release`). |
| 30 | - Add `$HOME/.openclaw/skills/bin` to **`PATH`** if you invoke `gate-cli` by name (or the directory where [`setup.sh`](./setup.sh) installs it). |
| 31 | - **Credentials:** When **`GATE_API_KEY`** and **`GATE_API_SECRET`** are both set (non-empty) for the host, **do not** require **`gate-cli config init`** for `gate-cli`-backed auth. When **both** are unset or empty and the deployment still expects keys, **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). |
| 32 | - **Sanity check:** Confirm the CLI works (e.g. **`gate-cli --version`** or a read-only **`gate-cli cex ...`** market call from this skill) before depending on deeper tool chains. |
| 33 | |
| 34 | ## Execution mode |