gate-exchange-assets-manager
Gate multi-account asset manager L2 skill. Use when the user asks to check total assets combined with margin/liquidation risk or earnings snapshots. Triggers on 'total assets', 'margin check', 'liquidation risk', 'earn interest', 'staking rewards', 'affiliate commissions', 'borrow USDT', 'add margin', 'set collateral'.
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 Account and Asset Manager
This is an L2 composite skill that orchestrates 58 deduplicated MCP tool calls (54 read + 4 write) across 7 L1 skills. It provides a unified entry point for account and asset overview, margin and liquidation risk assessment, SimpleEarn and staking earnings snapshots, affiliate commission queries, and unified-account write operations (borrowing, collateral, leverage settings).
This skill is intended for users aged 18 or above with full civil capacity.
## 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)**
- `gate-cli cex alpha account balances`
- `gate-cli cex alpha market currencies`
- `gate-cli cex alpha market tickers`
- `gate-cli cex alpha market tokens`
- `gate-cli cex earn staking assets`
- `gate-cli cex earn staking awards`
- `gate-cli cex earn staking find`
- `gate-cli cex earn uni currency`
- `gate-cli cex earn uni interest`
- `gate-cli cex earn dual balance`
- `gate-cli cex earn dual orders`
- cex_earn_list_structured_orders
- `gate-cli cex earn uni currencies`
- `gate-cli cex earn uni rate`
- `gate-cli cex earn uni lends`
- `gate-cli cex earn staking orders`
- `gate-cli cex futures account get`
- `gate-cli cex futures market candlesticks`
- `gate-cli cex futures market contract`
- `gate-cli cex futures market funding-rate`
- `gate-cli cex futures market orderbook`
- `gate-cli cex futures market premium`
- `gate-cli cex futures market tickers`
- `gate-cli cex futures market trades`
- `gate-cli cex futures market liquidations`
- `gate-cli cex futures position list`
- `gate-cli cex margin account list`
- `gate-cli cex options account get`
- `gate-cli cex rebate broker commissions`
- `gate-cli cex rebate broker transactions`
- `gate-cli cex rebate partner commissions`
- `gate-cli cex rebate partner sub-list`
- `gate-cli cex rebate partner transactions`
- `gate-cli cex rebate user-info`
- `gate-cli cex rebate sub-relation`
- `gate-cli cex spot account get`
- `gate-cli cex spot market candlesticks`
- `gate-cli cex spot market orderbook`
- `gate-cli cex spot market tickers`
- `gate-cli cex spot market trades`
- `gate-cli cex spot account book`
- `gate-cli cex tradfi account assets`
- `gate-cli cex unified account get`
- `gate-cli cex unified query borrowable`
- `gate-cli cex unified query estimate-rate`
- `gate-cli cex unified mode get`
- `gate-cli cex unified query transferable`
- `gate-cli cex unified config leverage-get`
- `gate-cli cex unified config discount-tiers`
- `gate-cli cex unified account currencies`
- `gate-cli cex unified loan interest`
- `gate-cli cex unified loan records`
- `gate-cli cex wallet balance total`
**Execution Operations (Write)**
- `gate-cli cex unified loan create`
- `gate-cli cex unified config collateral`
- `gate-cli cex unified mode set`
- `gate-cli cex unified config leverage-set`
### 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.
- **Permissions:** Alpha:Read, Earn:Read, Fx:Read, Margin:Read, Options:Read, Rebate:Read, Spot:Read, Tradfi:Read, Unified:Write, Wallet:Read
- **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 module routing in this skill.
- `SKILL.md` keeps orchestration/routing logic across account domains.
- `references/gate-cli.md` is the authoritative `gate-cli` execution contract for module aggregation, partial degradation strategy, and unified mutation safeguards.
## Sub-Modules
| Module | L1 Source | Tool Count | Read/Write | Purpose |
|--------|-----------|------------|------------|---------|
| S1 Assets / Overview | gate-exchange-assets, gate-exchange-alpha | 10+ | Read only | Multi-account balance panorama |
| S2 Risk / Margin | gate-exchange-unified, gate-exchange-marketanalysis | 6+ | Read only | Margin ratio, liquidation price, unrealised PnL |
| S3 Earn / Yield | gate-exchange-simpleearn, gate-exchange-staking | 4 | Read only | Current SimpleEarn and staking position/interest snapshots |
| S4 Affiliate / Rebate | gate-exchange-affiliate | 7 | Read only | Rebate user info (may be empty), partner commissions history, sub-relations |
| S5 Borrow / Transfer (Write) | gate-exchange-unified | 6 | 2 Read + 4 Write | Borrow, set collateral, set leverage, switch mode |
Note: TradFi tools (from gate-exchange-tradfi, 10 read tools) are all read-only and used for asset inventory queries. They are included in the deduplicated 58-tool count but not listed as a separate L1 module in the sub-module table above.
## Routing Rules
### Design Principle
User queries often span multiple dimensions (e.g. "check my earn interest and will I get liquidated" covers S3 and S2). Instead of forcing single-intent classification, this skill uses **signal overlay**: each of 5 signal dimensions is independently detected from the query, and the activated dimensions contribute their respective tool sets. The final tool set is the union of all activated signals, deduplicated before execution.
### Signal Dimension Definitions
| Signal | Dimension | Trigger Condition | Trigger Keywords | Tool Subset |
|--------|-----------|-------------------|------------------|-------------|
| S1 | Assets / Overview | User asks about overall assets, multi-account balances, asset inventory; also covers read-only borrowable/rate inquiry (no execution intent) and transferable limit snapshots | assets, balance, account, how mRelated 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.