gate-exchange-bot
Gate 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 strategy, spot grid, futures grid, martingale, running bots, bot detail, and stop bot.
What this skill does
# Gate Exchange Bot
## General Rules
⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding.
Do NOT select or call any tool until all rules are read. These rules have the highest priority.
→ Read [gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md)
- **Only call MCP tools explicitly listed in this skill.** Tools not documented here must NOT be called, even if they
exist in the MCP server.
- **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.
## Authoring Language
This skill is authored in English. End-user replies should still follow normal language adaptation.
## Skill Dependencies
### gate-cli commands used
**Query Operations (Read-only)**
- `gate-cli cex bot strategy recommend`
- `gate-cli cex bot portfolio running`
- `gate-cli cex bot portfolio detail`
**Execution Operations (Write)**
- `gate-cli cex bot spot-grid create`
- `gate-cli cex bot margin-grid create`
- `gate-cli cex bot infinite-grid create`
- `gate-cli cex bot futures-grid create`
- `gate-cli cex bot spot-martingale create`
- `gate-cli cex bot contract-martingale create`
- `gate-cli cex bot portfolio stop`
### MCP-backed command mapping
| `gate-cli` command | Backing bot capability |
|---|---|
| `gate-cli cex bot strategy recommend` | `cex_bot_get_ai_hub_strategy_recommend` |
| `gate-cli cex bot portfolio running` | `cex_bot_get_ai_hub_portfolio_running` |
| `gate-cli cex bot portfolio detail` | `cex_bot_get_ai_hub_portfolio_detail` |
| `gate-cli cex bot spot-grid create` | `cex_bot_post_ai_hub_spot_grid_create` |
| `gate-cli cex bot margin-grid create` | `cex_bot_post_ai_hub_margin_grid_create` |
| `gate-cli cex bot infinite-grid create` | `cex_bot_post_ai_hub_infinite_grid_create` |
| `gate-cli cex bot futures-grid create` | `cex_bot_post_ai_hub_futures_grid_create` |
| `gate-cli cex bot spot-martingale create` | `cex_bot_post_ai_hub_spot_martingale_create` |
| `gate-cli cex bot contract-martingale create` | `cex_bot_post_ai_hub_contract_martingale_create` |
| `gate-cli cex bot portfolio stop` | `cex_bot_post_ai_hub_portfolio_stop` |
### Authentication
- **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)).
- **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.
- API Key Required: Yes
- **Permissions:** Bot:Read, Bot:Write
- **Portal:** create or rotate keys outside the chat: https://www.gate.com/myaccount/profile/api-key/manage
### Installation Check
- **Required:** `gate-cli`. Run `sh setup.sh` from this skill directory if it is missing. Optional: `GATE_CLI_SETUP_MODE=release`.
- Add `$HOME/.openclaw/skills/bin` to **`PATH`** if you invoke `gate-cli` by name.
- **Host dependencies for `setup.sh`:** `curl`, `tar`, and either `shasum` or `sha256sum`. If user-local installation fails, `setup.sh` may fall back to `sudo install` into `/usr/local/bin`.
- **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 configure matching environment variables outside chat.
- **Sanity check:** Before any mutating call, confirm the CLI behaves as expected with a read-only probe such as `gate-cli --version` or `gate-cli cex bot strategy recommend --help`.
### Resolving `gate-cli` (binary path)
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).
## Execution
Read and strictly follow `references/gate-cli.md`, then execute the matched route in this `SKILL.md`.
- `SKILL.md` keeps intent routing, safety policy, and product boundaries.
- `references/gate-cli.md` is the authoritative execution contract for command probing, `body` payload handling, confirmation gates, and verification.
- `references/scenarios.md` provides scenario-style examples for review, testing, and publication completeness.
## Domain Knowledge
- Strategy recommendation is read-only and must stay separate from creation.
- Grid and martingale flows require different payload schemas and must not share fields across products.
- Running-strategy stop is always a single-strategy action; bulk stop is out of scope.
- Percentage-style business inputs must be normalized into decimal ratio strings before any write command.
- Portfolio detail and stop flows depend on an exact `strategy_id` plus the correct `strategy_type`.
## Module Overview
| Module | Description | Trigger keywords |
|--------|-------------|------------------|
| **Discover** | Recommend AIHub bot strategies by market, strategy type, filter, or refresh context | `recommend strategy`, `bundle`, `top1`, `refresh recommendation`, `filter strategy` |
| **Spot Grid** | Manual spot grid creation | `spot grid`, `manual grid` |
| **Margin Grid** | Manual margin grid creation | `margin grid` |
| **Infinite Grid** | Manual infinite grid creation | `infinite grid` |
| **Futures Grid** | Manual futures grid creation | `futures grid`, `contract grid` |
| **Spot Martingale** | Manual spot martingale creation | `spot martingale` |
| **Contract Martingale** | Manual contract martingale creation | `contract martingale`, `futures martingale` |
| **Portfolio List** | List running strategies | `running strategies`, `bots I have running`, `portfolio running` |
| **Portfolio Detail** | Query a single strategy detail | `strategy detail`, `bot detail`, `P&L detail` |
| **Portfolio Stop** | Stop one running strategy | `stop strategy`, `stop bot` |
## Routing Rules
| Intent | Example phrases | Route to |
|--------|-----------------|----------|
| **Strategy recommendation** | "Recommend a BTC strategy", "Give me a spot grid recommendation", "Refresh that recommendation" | Read `references/strategy-recommend.md` |
| **Spot grid create** | "Create a BTC spot grid from 60000 to 72000 with 50 grids and 1000 USDT" | Read `references/create-spot-grid.md` |
| **Margin grid create** | "Create a margin grid with 3x leverage and 50 grids" | Read `references/create-margin-grid.md` |
| **Infinite grid create** | "Create a BTC infinite grid with 1.5% profit per grid" | Read `references/create-infinite-grid.md` |
| **Futures grid create** | "Create a BTC futures grid with 5x leverage and neutral direction" | Read `references/create-futures-grid.md` |
| **Spot martingale create** | "Create a spot martingale that adds after a 2% drop" | Read `references/create-spot-martingale.md` |
| **Contract martingale create** | "Create a contract martingale, 5x leverage, short bias" | Read `references/create-contract-martingale.md` |
| **Running list** | "What bots do I have running?" | Read `references/list-running.md` |
| **Strategy detail** | "Show me that bot's detailed P&L" | Read `references/get-detail.md` |
| **Stop strategy** | "Stop that BTC grid bot" | Read `references/stop-strategy.md` |
## gate-cli Command Index
| # | Command | Purpose |
|---|---------|---------|
| 1 | `gate-cli cex bot strategy recommend` | Discover recommendations for `toRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.