← 返回 Skills 市场
gate-exchange

Gate Exchange Sub-Account

作者 Gate · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ 安全检测通过
268
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install gate-exchange-subaccount
功能描述
Gate Exchange sub-account management skill. Use when the user asks to manage, create, lock, unlock, or list their sub-accounts. Triggers on 'sub-account stat...
使用说明 (SKILL.md)

Gate Exchange Sub-Account 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 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.

MCP Dependencies

Required MCP Servers

MCP Server Status
Gate (main) ✅ Required

MCP Tools Used

Query Operations (Read-only)

  • cex_sa_get_sa
  • cex_sa_list_sas
  • cex_sa_lock_sa
  • cex_sa_unlock_sa

Execution Operations (Write)

  • cex_sa_create_sa

Authentication

Installation Check

  • Required: Gate (main)
  • Install: Run installer skill for your IDE
    • Cursor: gate-mcp-cursor-installer
    • Codex: gate-mcp-codex-installer
    • Claude: gate-mcp-claude-installer
    • OpenClaw: gate-mcp-openclaw-installer

MCP Mode

Read and strictly follow references/mcp.md, then execute this skill's sub-account workflow.

  • SKILL.md keeps intent routing and permission boundaries.
  • references/mcp.md is the authoritative MCP execution layer for create/lock/unlock confirmation gates and status verification.

Prerequisites

  • MCP Dependency: Requires gate-mcp to be installed.
  • Authentication: All sub-account operations require API key authentication with main-account privileges.
  • Permission: The current user must be a main account holder to manage sub-accounts.

Available MCP Tools

Tool Auth Description
cex_sa_get_sa Yes Get details of a specific sub-account by user ID
cex_sa_list_sas Yes List all sub-accounts under the main account
cex_sa_create_sa Yes Create a new normal sub-account
cex_sa_lock_sa Yes Lock a sub-account to disable login and trading
cex_sa_unlock_sa Yes Unlock a previously locked sub-account

Workflow

Step 1: Identify User Intent

Parse the user's message to determine which sub-account operation they need.

Key data to extract:

  • intent: One of query_status, list_all, create, lock, unlock
  • user_id: Sub-account UID (required for query_status, lock, unlock)
  • login_name: Desired username (for create, may need to ask user)

Intent detection rules:

Signal Keywords Intent
"status of sub-account", "sub-account UID {id}", "check sub-account" query_status
"all sub-accounts", "list sub-accounts", "my sub-accounts", "which sub-accounts" list_all
"create sub-account", "new sub-account", "add sub-account" create
"lock sub-account", "disable sub-account", "freeze sub-account" lock
"unlock sub-account", "enable sub-account", "unfreeze sub-account" unlock

Step 2: Execute by Intent

Case A: Query Sub-Account Status (query_status)

Call cex_sa_get_sa with:

  • user_id: The sub-account UID provided by the user

Key data to extract:

  • login_name: Sub-account username
  • remark: Sub-account remark/note
  • state: Account state (normal / locked)
  • type: Account type (normal / pool)
  • create_time: Account creation timestamp

Present the sub-account details in a structured format.

Case B: List All Sub-Accounts (list_all)

Call cex_sa_list_sas with:

  • type: "0" (normal sub-accounts only)

Key data to extract:

  • For each sub-account: user_id, login_name, remark, state, create_time

Present results as a table with username, UID, remark (if any), and current status.

Case C: Create Sub-Account (create)

Pre-check: Call cex_sa_list_sas with type: "0" to get the current list of normal sub-accounts. Check if the user can still create more sub-accounts based on the returned count.

If creation is available:

  1. Ask the user to provide a login name for the new sub-account
  2. Optionally collect: email, remark
  3. Confirm all details with the user before proceeding
  4. Call cex_sa_create_sa with:
    • login_name: User-provided login name (required)
    • email: User-provided email (optional)
    • remark: User-provided remark (optional)
  5. Present the newly created sub-account details

Key data to extract:

  • user_id: Newly created sub-account UID
  • login_name: Confirmed username
  • state: Should be "normal"

Important: Only normal sub-accounts can be created through this skill.

Case D: Lock Sub-Account (lock)

  1. Validate that user_id is provided; if not, ask the user
  2. Call cex_sa_get_sa with user_id to verify the sub-account exists and belongs to the main account
  3. If the sub-account is already locked, inform the user and stop
  4. Confirm with the user: "Are you sure you want to lock sub-account {user_id} ({login_name})? This will disable login and trading for this sub-account."
  5. On confirmation, call cex_sa_lock_sa with:
    • user_id: The sub-account UID
  6. Report the result

Key data to extract:

  • Lock operation success/failure status

Case E: Unlock Sub-Account (unlock)

  1. Validate that user_id is provided; if not, ask the user
  2. Call cex_sa_get_sa with user_id to verify the sub-account exists and is currently locked
  3. If the sub-account is already unlocked/normal, inform the user and stop
  4. Confirm with the user: "Are you sure you want to unlock sub-account {user_id} ({login_name})?"
  5. On confirmation, call cex_sa_unlock_sa with:
    • user_id: The sub-account UID
  6. Report the result

Key data to extract:

  • Unlock operation success/failure status

Step 3: Format and Respond

Present results using the Report Template below. Always include relevant context and next-step suggestions.

Judgment Logic Summary

Condition Action
User asks for a specific sub-account status with UID Route to Case A: query_status
User asks to see all sub-accounts Route to Case B: list_all
User wants to create a new sub-account Route to Case C: create
User wants to lock a sub-account with UID Route to Case D: lock
User wants to unlock a sub-account with UID Route to Case E: unlock
UID not provided for operations requiring it Ask user for the sub-account UID
Login name not provided for creation Ask user for a login name
Sub-account already in target state (lock/unlock) Inform user, no action needed
API returns authentication error Prompt user to log in
API returns permission error Inform user that main account privileges are required
Sub-account does not exist or does not belong to user Inform user the UID is invalid

Report Template

Query Status Response

Sub-Account Details
---
Username:      {login_name}
UID:           {user_id}
Status:        {state}
Type:          {type}
Remark:        {remark or "N/A"}
Created:       {create_time}

List All Sub-Accounts Response

Your Sub-Accounts
---
| # | Username | UID | Status | Remark |
|---|----------|-----|--------|--------|
| 1 | {login_name} | {user_id} | {state} | {remark or "-"} |
| 2 | ... | ... | ... | ... |

Total: {count} sub-account(s)

Create Sub-Account Response

Sub-Account Created Successfully
---
Username:      {login_name}
UID:           {user_id}
Status:        Normal
Remark:        {remark or "N/A"}

Note: Only normal sub-accounts can be created through this interface.

Lock/Unlock Response

Sub-Account {Action} Successfully
---
Username:      {login_name}
UID:           {user_id}
Previous Status: {previous_state}
Current Status:  {new_state}

Domain Knowledge

  • A main account on Gate can create multiple sub-accounts for asset isolation, strategy separation, or team management.
  • Sub-accounts share the main account's KYC verification but have independent trading and wallet capabilities.
  • Locking a sub-account disables both login and trading; the assets remain safe but inaccessible until unlocked.
  • There are two types of sub-accounts: normal (type=0) and pool (type=1). This skill only supports creating normal sub-accounts.
  • Sub-account creation requires a unique login name. Email and remark are optional.

Safety Rules

  • Write operations (cex_sa_create_sa, cex_sa_lock_sa, cex_sa_unlock_sa): Always require explicit user confirmation before execution. Never auto-execute.
  • UID validation: Before lock/unlock, always verify the sub-account exists and belongs to the current main account.
  • State check: Before lock/unlock, check current state to avoid redundant operations.
  • No sensitive data exposure: Never expose API keys, internal endpoint URLs, or raw error traces.
  • Normal sub-accounts only: Creation is restricted to normal sub-accounts (type=0). Do not attempt to create pool sub-accounts.

Error Handling

Condition Response
Auth endpoint returns "not login" "Please log in to your Gate account first."
User is not a main account "Sub-account management requires main account privileges. Please switch to your main account."
Sub-account UID not found "Sub-account with UID {user_id} was not found. Please verify the UID and try again."
Sub-account does not belong to user "This sub-account does not belong to your main account."
Sub-account already locked "Sub-account {user_id} is already locked. No action needed."
Sub-account already unlocked "Sub-account {user_id} is already in normal (unlocked) state. No action needed."
Create sub-account fails (limit reached) "You have reached the maximum number of sub-accounts. Please contact support if you need more."
Create sub-account fails (duplicate name) "The login name '{login_name}' is already taken. Please choose a different name."
Unknown error "An error occurred while processing your request. Please try again later."

Prompt Examples & Scenarios

See scenarios.md for full prompt examples and expected behaviors.

安全使用建议
This skill appears to do what it claims: manage Gate sub-accounts via Gate MCP tools and requires a Gate API key with main-account privileges for write actions. Before installing or enabling it: 1) Confirm how the platform supplies/authenticates the Gate API key (the skill mentions an API key but the registry metadata does not list any required credential — ask the publisher or platform how credentials are provided and stored). 2) Only grant main-account API keys you fully trust (main-account keys can create/lock/unlock sub-accounts). 3) Test using read-only actions (list/query) first to confirm behavior and error handling. 4) Verify the referenced Gate MCP repository and runtime rules (the SKILL.md points to a GitHub link) to ensure you trust the implementation of the MCP tools. If you need higher assurance, ask the publisher to update the registry metadata to explicitly declare the required credential and/or provide a signed repository reference.
功能分析
Type: OpenClaw Skill Name: gate-exchange-subaccount Version: 1.0.2 The skill bundle provides a legitimate interface for managing Gate Exchange sub-accounts via the Gate MCP server. It includes comprehensive instructions in SKILL.md and references/mcp.md that enforce safety protocols, such as mandatory user confirmation for write operations (create, lock, unlock) and state validation. No evidence of data exfiltration, obfuscation, or malicious prompt injection was found; the logic is strictly aligned with the stated purpose of sub-account management.
能力评估
Purpose & Capability
The name/description match the actions the skill actually performs (list/query/create/lock/unlock sub-accounts). The listed MCP tools (cex_sa_*) map directly to the documented API endpoints and are appropriate for sub-account management.
Instruction Scope
SKILL.md limits runtime behavior to calling the named MCP tools, validating parameters, asking for user confirmation before write actions, and re-querying to confirm state. It does not instruct reading unrelated files, exfiltrating data to third-party endpoints, or performing arbitrary shell commands.
Install Mechanism
This is an instruction-only skill with no install spec and no code files to write to disk. That minimizes installation risk; the SKILL references installing gate-mcp on the platform but does not download arbitrary artifacts itself.
Credentials
SKILL.md explicitly states an API key with main-account privileges is required for write operations, which is proportionate to the purpose. However, the registry metadata lists no required environment variables or primary credential. This is an inconsistency: the skill legitimately needs privileged credentials (Gate API key) but that requirement is not reflected in the declared metadata, so verify how the platform will supply/guard that key (MCP-managed credentials vs. user-provided env var).
Persistence & Privilege
The skill is not always-enabled and does not request elevated persistent privileges. It does not modify other skills or system-wide settings according to the provided docs. Write actions require explicit confirmation, reducing risk of accidental autonomous destructive actions.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gate-exchange-subaccount
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gate-exchange-subaccount 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
- Introduced `references/mcp.md` for centralized and authoritative execution logic governing confirmation and status checks. - Clarified that `SKILL.md` handles only intent routing and permissions; delegates execution and validation to `references/mcp.md`. - Updated skill description for greater clarity and improved trigger phrasing. - Streamlined documentation and separated logic boundaries for maintainability. - No changes to available features or MCP tool coverage.
v1.0.1
gate-exchange-subaccount 1.0.1 Changelog - Updated version and metadata for 2026-03-23. - Added an explicit general rules section emphasizing compliance with shared runtime safety and tool usage restrictions. - Clarified MCP server/tool requirements and authentication/installation prerequisites. - No logic, tool, or workflow changes introduced—documentation and rule emphasis improvements only.
v1.0.0
Initial release – provides comprehensive sub-account management for Gate Exchange: - Enables querying status, listing, creating, locking, and unlocking sub-accounts. - Requires main account privileges and API key authentication. - Guides users through the workflow with pre-checks and confirmation steps for sensitive actions. - Presents results in a clear, structured report template. - Designed to handle typical sub-account operations with clear intent identification and error handling.
元数据
Slug gate-exchange-subaccount
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Gate Exchange Sub-Account 是什么?

Gate Exchange sub-account management skill. Use when the user asks to manage, create, lock, unlock, or list their sub-accounts. Triggers on 'sub-account stat... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 268 次。

如何安装 Gate Exchange Sub-Account?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gate-exchange-subaccount」即可一键安装,无需额外配置。

Gate Exchange Sub-Account 是免费的吗?

是的,Gate Exchange Sub-Account 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Gate Exchange Sub-Account 支持哪些平台?

Gate Exchange Sub-Account 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Gate Exchange Sub-Account?

由 Gate(@gate-exchange)开发并维护,当前版本 v1.0.2。

💬 留言讨论