gate-exchange-dual
Gate dual investment skill. Use when the user asks about dual currency products, target price settlement, or placing dual orders. Triggers on 'dual investment', 'dual currency', 'target price', 'exercise price', 'dual orders', 'dual balance', 'sell-high', 'buy-low', 'place dual order', 'subscribe dual'.
What this skill does
### 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).
# Gate Exchange Dual Investment Skill
## 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 `./references/gate-runtime-rules.md`
- **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.
## Skill Dependencies
### gate-cli commands used
**Query Operations (Read-only)**
- `gate-cli cex earn dual balance`
- `gate-cli cex earn dual plans`
- `gate-cli cex earn dual orders`
**Execution Operations (Write)**
- `gate-cli cex earn dual place`
### 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 — 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.
- API Key Required: Yes
- **Permissions:** Earn: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 missing; optional `GATE_CLI_SETUP_MODE=release`).
- Add `$HOME/.openclaw/skills/bin` to **`PATH`** if you invoke `gate-cli` by name (or the directory where [`setup.sh`](./setup.sh) installs it).
- **Credentials:** When **`GATE_API_KEY`** and **`GATE_API_SECRET`** are both set (non-empty) for the host, **do not** require **`gate-cli config init`** — that is equivalent valid config for `gate-cli`. 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).
- **Sanity check:** Do not proceed with authenticated calls until the CLI behaves as expected (e.g. **`gate-cli --version`** or a read-only **`gate-cli cex ...`** command from this skill); confirm credentials resolve before mutating operations.
## Execution mode
**Read and strictly follow** [`references/gate-cli.md`](./references/gate-cli.md), then execute this skill's dual-investment workflow.
- `SKILL.md` keeps routing and product semantics.
- `references/gate-cli.md` is the authoritative `gate-cli` execution contract for plan lookup, confirmation-gated placement, and order verification.
## Prerequisites
- **MCP Dependency**: Requires [gate-mcp](https://github.com/gate/gate-mcp) to be installed.
- **Authentication**: All endpoints require API key authentication.
- **Risk Disclaimer**: Always append: _"This information is for reference only and does not constitute investment advice. Dual investment is not principal-protected. You may receive settlement in a different currency than your investment. Please understand the product terms before investing."_
## Available MCP Tools
| Tool | Auth | Description |
|------|------|-------------|
| `gate-cli cex earn dual plans` | Yes | List available dual investment plans (optional param: plan_id) |
| `gate-cli cex earn dual orders` | Yes | List dual investment orders. **`page` and `limit` are required**: always pass `page=1, limit=100`. Optional: `from`, `to`. **MUST loop all pages (increment page until returned rows < limit) before drawing any conclusion.** |
| `gate-cli cex earn dual balance` | Yes | Get dual investment balance & interest stats |
| `gate-cli cex earn dual place` | Yes | Place a dual investment order. Params: `plan_id` (required), `amount` (required), `text` (optional, must start with `t-`, max 28 bytes after prefix, alphanumeric/`_`/`-`/`.` only). |
## Routing Rules
| Case | User Intent | Signal Keywords | Action |
|------|-------------|----------------|--------|
| 1 | Browse dual product list | "dual products", "sell-high / buy-low options" | See `references/product-query.md` |
| 3 | Product details | "min investment", "BTC sell-high" | See `references/product-query.md` (filter locally by currency; show matching plans, skip min amount) |
| 4 | Settlement simulation | "what happens at delivery", "if price reaches X" | See `references/product-query.md` (simulation) |
| 5 | Position summary (ongoing) | "how much locked", "active positions" | See `references/product-query.md` (ongoing + balance) |
| 6 | Settlement records | "settlement records", "got crypto or USDT", "last month orders" | See `references/product-query.md` (settled) |
| 7 | Sell-high order (invest crypto) | "sell high for me", "sell high with BTC", "sell high order" | See `references/subscription.md` |
| 8 | Buy-low order (invest stablecoin) | "buy low for me", "buy low BTC with USDT", "buy low order" | See `references/subscription.md` |
| 9 | Amount eligibility for order | "can I buy", "is 5000U enough" | See `references/subscription.md` |
| 10 | Min purchase check for order | "minimum to buy", "can I buy dual with 50U" | See `references/subscription.md` |
| 11 | Settlement result query | "what did I receive", "settlement result" | See `references/settlement-assets.md` (settlement) |
| 12 | Dual asset briefing | "dual balance", "total locked" | See `references/settlement-assets.md` (balance) |
| 13 | Currency conversion risk | "will I lose principal", "risk", "principal-protected?" | Domain Knowledge (no API) |
| 14 | Missed gains explanation | "did I lose money", "missed gains", "price surged" | Domain Knowledge (no API) |
| 15 | Restricted region | "can I buy dual in [region]", "which regions supported" | See `references/subscription.md` (compliance) |
| 17 | Compliance check failure | "subscription failed", "compliance check not passed" | See `references/subscription.md` (compliance) |
## Execution
1. Identify user intent from the Routing Rules table above.
2. For Cases 1–6, 11–12: Read the corresponding sub-module document in `references/` and follow the Workflow.
3. For Cases 7–10: Read `references/subscription.md` and follow the order placement Workflow.
4. For Cases 15, 17: Read `references/subscription.md` and follow the compliance handling Workflow. These cases are triggered by `gate-cli cex earn dual place` error responses or by the user asking about region restrictions.
5. For Cases 13–14: Answer directly using Domain Knowledge below (no API call needed).
6. If the user's intent is ambiguous, ask a clarifying question before routing.
## Domain Knowledge
### Core Concepts
- **Sell High (Call)**: User invests crypto, target price above current price. If settlement price ≥ target price → receive USDT (principal × target price × (1 + interest)); if settlement price < target price → get back crypto + interest.
- **Buy Low (Put)**: User invests stablecoins, target price below current price. If settlement price ≤ target price → receive crypto; if settlement price > target price → get back USDT + interest.
- **Target Price**: The price that determines settlement outcome at delivery. Gate official term.
- **Settlement Price**: Market price of the underlying asset at delivery time, compared against target price.
- **Interest-guaranteed, not pRelated 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.