gate-exchange-assetswap
Use this skill whenever the user wants Gate Exchange asset allocation optimization for spot holdings (list eligible assets, load config, evaluate/preview, place orders, query history). Trigger phrases include "asset allocation optimization", "allocation configuration", "portfolio allocation", "rebalance spot to stablecoin", "Top 5 market cap allocation", "optimize holdings to BTC", "preview allocation optimization", "allocation optimization order list".
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 Asset Allocation Optimization
## 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 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, profile scope)**
- `gate-cli cex assetswap assets`
- `gate-cli cex assetswap config`
- `gate-cli cex assetswap evaluate`
- `gate-cli cex assetswap order list`
- `gate-cli cex assetswap order get`
**Execution operations (write, trade scope)**
- `gate-cli cex assetswap order preview`
- `gate-cli cex assetswap order create`
### 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:** Profile (read) for listing, config, evaluation, and order queries; Trade for preview and order creation
- **Portal:** create or rotate keys outside the chat: https://www.gate.com/myaccount/profile/api-key/manage
### Installation Check
- **Required:** Gate (main) MCP with asset allocation optimization tools enabled (MCP names `cex_assetswap_*`); prefer **`gate-cli cex assetswap …`** when running from the host CLI.
- **Install (MCP / IDE):** `gate-mcp-cursor-installer`, `gate-mcp-codex-installer`, `gate-mcp-claude-installer`, or `gate-mcp-openclaw-installer`.
- **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).
- **Sanity check:** Before preview or order creation, confirm the runtime works (e.g. **`gate-cli --version`** or deployment-specific checks).
---
## Trigger Conditions
Activate this skill when the user wants any of the following:
- Multi-asset spot **portfolio optimization** or **rebalancing** into a **strategy** (conservative stablecoin, conviction single asset, or market-cap-weighted basket)
- To see which spot balances are **eligible** for asset allocation optimization
- **Preview** estimated execution, slippage, or risk hints before committing
- **Submit** an asset allocation optimization order after confirmation
- **Query** historical allocation optimization orders or **one order’s** status and child orders
Do **not** use this skill for: transfers between accounts or products, Launchpool or earn subscriptions, single manual spot limit/market orders without the allocation product, or dust handling below product thresholds (route to the appropriate transfer, earn, spot, or small-balance product skill instead).
---
## Data privacy and collection
- **AI interaction information**: User prompts, follow-up instructions, and tool arguments used while following this skill qualify as AI interaction data under the [Gate Privacy Policy](https://www.gate.com/legal/privacy-policy) (see §4.2.7). Do not ask for or repeat API keys, secrets, or unrelated personal data in user-visible output.
- **Data flow**: Account and trading data for this skill flow **only** through the configured **Gate (main) MCP** to **Gate Exchange APIs** via the asset-swap tools above (MCP `cex_assetswap_*` or equivalent `gate-cli cex assetswap …` calls). Do not relay the same data to undocumented third-party services, scrapers, or custom backends as part of this workflow.
- **Minimization**: Pass only parameters required by each documented MCP call (symbols, amounts, strategy fields, pagination). Do not send full chat transcripts or unrelated context fields into tool payloads.
---
## Domain Knowledge
**Product**: Asset Allocation Optimization exposes Exchange capability for restructuring multiple spot holdings into a target mix. One optimization may map to multiple internal execution legs at the order layer.
**Strategy types** (conceptual; exact enums and parameters come from `gate-cli cex assetswap config`):
| Strategy | Typical targets | Meaning |
|----------|------------------|---------|
| Conservative | USDT, GUSD, USDC (examples) | Consolidate into a single stablecoin; risk-off / idle cash posture |
| Conviction ("faith") | BTC, ETH, GT (examples) | Reallocate selected spot toward target weights in the chosen asset(s); intermediate steps follow the product and API |
| Market cap | Top 2, Top 5 (examples) | Index-like exposure weighted by market cap into a basket such as BTC, ETH, SOL, BNB, XRP (actual list from API) |
**Listing rules** (for agent interpretation; product may filter server-side):
- Default presentation may exclude major reserve assets (e.g. BTC, ETH, USDT, USDC) unless the user explicitly asks to include them in the sell set.
- Only **spot available** balances participate; locked balances from earn, borrow, staking, or similar are out of scope.
- Very small balances (e.g. below roughly USD 10 equivalent) may be hidden or routed to small-balance handling; exact thresholds follow API or product rules.
**Out of scope for public skill documentation** (do not document as standard Exchange MCP capabilities):
- Banner or UI-only feature flags
- Non-standard semantic "validate and fill parameters" helpers not published as Exchange MCP
**Rate limiting**: Align with wallet or Exchange API limits when documented (example: 200 requests per 10 seconds per user or key); confirm in published API docs.
**Preview → create payload (mandatory for agents)**:
- After a successful `gate-cli cex assetswap order preview`, construct the `gate-cli cex assetswap order create` body from the preview response **`data.order`** only: for each object in **`data.order.from`** and **`data.order.to`**, emit `{ "asset": <value>, "amount": <value> }` using the preview’s **`asset`** and **`amount`** string fields (use **`amount`**, not **`amount_show`**, unless published API docs say otherwise).
- Preserve the **array order** of `to` (and `from` if multiple legs) exactly as returned in `data.order`; do not reorder symbols for convenience.
- A preview request may use **`ratio`** on `to`; the **create** call must still use the **resolved `asset` + `amount`** legs from the preview output. Creating with ratio-only `to` while omitting preview amounts often yields quote errors (for example `code: 4`).
- If the API returns additional preview-bound fields (for example top-level `usdt_evaluated_value` or `transaction_fee` inside `data`), mirror them on create **when the MCP or Exchange docs require it**; otherwise the `from` / `to` legs from preview are the primary contract.
**Main chain (mandatory oRelated 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.