name: gate-exchange-welfare description: "Gate Exchange welfare center phase-2 skill with MCP integration. Use this skill whenever the user asks about welfare benefits, newcomer rewards, available newcomer tasks, claiming a task, completing a welfare task, or claiming newcomer rewards. Trigger phrases include "welfare center", "new user tasks", "claim task", "claim download task", "complete KYC task", "complete first deposit task", "complete first trade task", "claim reward", and "claim all rewards". Use only real MCP data and current business codes; never fabricate task or reward details." user-invocable: true disable-model-invocation: false metadata: openclaw: emoji: "π±" os: - darwin - linux primaryEnv: GATE_API_KEY requires: bins: - gate-cli env: - GATE_API_KEY - GATE_API_SECRET
install:
- kind: download
os:
- linux
url: "https://github.com/gate/gate-cli/releases/download/v0.6.2/gate-cli_0.6.2_linux_amd64.tar.gz"
bins:
- gate-cli
targetDir: "bin"
label: "Download gate-cli (Linux x64)"
- kind: download
os:
- linux
url: "https://github.com/gate/gate-cli/releases/download/v0.6.2/gate-cli_0.6.2_linux_arm64.tar.gz"
bins:
- gate-cli
targetDir: "bin"
label: "Download gate-cli (Linux arm64)"
- kind: download
os:
- darwin
url: "https://github.com/gate/gate-cli/releases/download/v0.6.2/gate-cli_0.6.2_darwin_amd64.tar.gz"
bins:
- gate-cli
targetDir: "bin"
label: "Download gate-cli (macOS Intel)"
- kind: download
os:
- darwin
url: "https://github.com/gate/gate-cli/releases/download/v0.6.2/gate-cli_0.6.2_darwin_arm64.tar.gz"
bins:
- gate-cli
targetDir: "bin"
label: "Download gate-cli (macOS Apple Silicon)"
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 Β§4 (or gate-runtime-rules.md Β§4).
Gate Exchange Welfare Center
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-clicommands 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
gate-cli cex welfare identitygate-cli cex welfare beginner-tasks
Execution Operations
cex_welfare_claim_task(nogate-climapping ingate-cli/cmd/cex; seeMCP_LEGACY_TOOL_RESOLUTION.mdΒ§δΊ)cex_welfare_claim_reward(nogate-climapping ingate-cli/cmd/cex; seeMCP_LEGACY_TOOL_RESOLUTION.mdΒ§δΊ)
Authentication
- Interactive file setup: when
GATE_API_KEYandGATE_API_SECRETare not both set on the host, rungate-cli config initto complete the wizard for API key, secret, profiles, and defaults (see gate-cli). - Env / flags:
gate-cli config initis not required when credentials are already supplied β e.g. bothGATE_API_KEYandGATE_API_SECRETset on the host, or--api-key/--api-secretwhere supported β never ask the user to paste secrets into chat. - API Key Required: Yes
- Permissions: Welfare query and claim access in the current Gate MCP deployment
- Portal: create or rotate keys outside the chat: https://www.gate.com/myaccount/profile/api-key/manage
Installation Check
- Required:
gate-cli(runsh ./setup.shfrom this skill directory if missing; optionalGATE_CLI_SETUP_MODE=release). - Add
$HOME/.openclaw/skills/bintoPATHif you invokegate-cliby name (or the directory wheresetup.shinstalls it). - Credentials: When
GATE_API_KEYandGATE_API_SECRETare both set (non-empty) for the host, do not requiregate-cli config initβ that is equivalent valid config forgate-cli. When both are unset or empty, remind the operator to rungate-cli config initor to configureGATE_API_KEY/GATE_API_SECRETin 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 --versionor a read-onlygate-cli cex ...command from this skill); confirm credentials resolve before mutating operations.
Execution mode
Read and strictly follow references/gate-cli.md, then execute this skill's welfare workflow.
SKILL.mdkeeps routing, business intent mapping, and safety rules.references/gate-cli.mdis the authoritativegate-cliexecution contract for identity gating, task lookup, task claim, reward claim, and degraded handling.
Overview
Welfare center newcomer skill, phase 2. When users ask about welfare, newcomer rewards, task claiming, task completion, or reward claiming, first determine user eligibility. Then either guide restricted/existing users, show real newcomer tasks, claim a single task, guide task completion, or claim all currently claimable newcomer rewards.
Trigger Scenarios: Execute this skill when users mention welfare benefits, newcomer rewards, task lists, claiming a task, completing a welfare task, or claiming newcomer rewards.
Domain Knowledge
Eligibility codes
code=0: Eligible newcomercode=1001: Existing usercode=1002: Risk-control usercode=1003: Sub-accountcode=1004: Agent usercode=1005: Market makercode=1006: Enterprise usercode=1008: Not logged in
Beginner task list semantics
- The newcomer list is fetched from
gate-cli cex welfare beginner-tasks. - Registration tasks are returned before guidance tasks.
- When the user has not yet received a download task and the system determines the app is not downloaded, the list may include a download task with
task_type=23andstatus=0. task_descmay contain simple HTML such as<span>; present the text content only, not raw tags.
Task type notes
task_type=10: Registration tasktask_type=23: Download task- Guidance tasks may surface task-scene codes such as:
1: KYC / identity verification2: Spot trading3: Futures trading8: First deposit- Some live payloads may use other supported task-scene values. Follow the real MCP payload instead of hardcoding assumptions beyond the documented mappings above.
Status mapping
| Status | Meaning | Handling |
|---|---|---|
0 |
Unclaimed / task can be claimed | Candidate for cex_welfare_claim_task (no gate-cli mapping in gate-cli/cmd/cex; see MCP_LEGACY_TOOL_RESOLUTION.md Β§δΊ) |
1 |
Claimed / in progress | User should complete the task action |
2 |
Completed, reward claimable | Candidate for cex_welfare_claim_reward (no gate-cli mapping in gate-cli/cmd/cex; see MCP_LEGACY_TOOL_RESOLUTION.md Β§δΊ) |
3 |
Reward distributing | Inform user reward is being processed |
4 |
Completed / settled | Inform user task is already finished |
5 |
Expired | Inform user task has expired |
Rewards hub
- Official hub:
https://www.gate.com/zh/rewards_hub - Use the official web/App welfare center as the fallback whenever the APIs cannot return a reliable action result.
Routing Rules
| User Intent | Keywords / Patterns | Routing |
|---|---|---|
| Query welfare / rewards / task list | "what welfare", "what tasks can I do", "new user tasks", "welfare rewards" | Execute this skill β identity gate first |
| Claim a task | "claim task", "claim download task", "receive task" | Execute this skill β identity β list tasks β claim one status=0 task |
| Complete KYC task | "complete identity verification task", "complete KYC task" | Execute this skill β respond with generic KYC guidance |
| Complete first deposit task | "complete first deposit task", "how do I finish deposit task" | Execute this skill β respond with generic deposit guidance |
| Complete first trade task | "complete first trade task", "I want to do my first trade" | Execute this skill β hand off to gate-exchange-trading |
| Complete task (ambiguous) | "complete task", "finish my welfare task" | Execute this skill β identity β list actionable tasks β resolve task |
| Claim reward / claim all rewards | "claim reward", "claim all rewards", "receive newcomer rewards" | Execute this skill β identity β list tasks β claim all status=2 tasks |
| Asset query | "check my balance", "how much USDT do I have" | Route to gate-exchange-assets |
Execution
Step 1: Determine user identity
Call gate-cli cex welfare identity first for every welfare intent.
Branch by code:
0β newcomer flow1001β existing-user guidance1002/1003/1004/1005/1006/1008β mapped restriction guidance- other failure / timeout / HTTP 4xx β degraded fallback
Base Flow: Query or list newcomer tasks
Trigger: The user asks what newcomer welfare/tasks/rewards are available.
Required flow:
- Call
gate-cli cex welfare identity. - If
code=0, callgate-cli cex welfare beginner-tasks. - If list result is
code=1007or the task list is empty, return the no-task fallback. - Render every real task using:
task_nametask_descwith HTML tags removedreward_numreward_unitstatus
- Map each task's next step from
status:
0: can be claimed1: complete the task action2: reward can be claimed3: reward is distributing4: already completed5: expired
Case 1: Claim a single task
Trigger: The user asks to claim a task, usually a download task.
Required flow:
- Call
gate-cli cex welfare identity. - Call
gate-cli cex welfare beginner-tasks. - Find claimable tasks with
status=0. - Resolve the target task:
- If the user names a task, match by
task_name. - If exactly one claimable task exists, use it.
- If multiple claimable tasks exist and intent is ambiguous, ask which task to claim.
- Call
cex_welfare_claim_task(nogate-climapping ingate-cli/cmd/cex; seeMCP_LEGACY_TOOL_RESOLUTION.mdΒ§δΊ) with the selectedwelfare_task_id. - On success, confirm the claimed task name and remind the user to complete it before claiming the reward.
Do not call cex_welfare_claim_task (no gate-cli mapping in gate-cli/cmd/cex; see MCP_LEGACY_TOOL_RESOLUTION.md Β§δΊ) for tasks whose status is not 0.
Case 2: Complete identity verification task
Trigger: The user asks to complete a KYC / identity verification newcomer task.
Required behavior:
- Do not call a welfare write tool.
- Return generic KYC guidance, for example:
Please complete identity verification in Gate web or the Gate App first. After the verification is approved and the newcomer task becomes claimable, come back to the welfare center to claim the reward.
Case 3: Complete first deposit task
Trigger: The user asks to complete a first-deposit newcomer task.
Required behavior:
- Do not call a welfare write tool.
- Return generic deposit guidance without inventing thresholds:
Please complete your first deposit in Gate web or the Gate App using the deposit flow shown there. Deposit requirements, supported assets, and any threshold conditions follow the Rewards Hub display. After the deposit is credited and the task becomes claimable, come back to claim the reward.
Case 4: Complete first trade task
Trigger: The user asks to complete a first-trade newcomer task.
β Read gate-exchange-trading/references/execution-and-guardrails.md
Required behavior:
- Hand off to
gate-exchange-trading. - If the user has not yet specified what to trade, let the trading skill collect symbol / side / size and follow its own Action Draft plus confirmation rules.
Case 5: Complete task with ambiguous intent
Trigger: The user only says "complete task" or equivalent.
Required flow:
- Call
gate-cli cex welfare identity. - Call
gate-cli cex welfare beginner-tasks. - Build an actionable task set from statuses
0and1. - If multiple actionable tasks exist, ask the user which task they want to complete.
- If exactly one actionable task exists:
status=0β use Case 1- task wording or
task_typeindicates KYC β use Case 2 - task wording or
task_typeindicates first deposit β use Case 3 - task wording or
task_typeindicates trading β use Case 4 - otherwise, provide general completion guidance and rewards-hub fallback
Case 6: Claim reward(s)
Trigger: The user asks to claim reward / claim all rewards.
Required flow:
- Call
gate-cli cex welfare identity. - Call
gate-cli cex welfare beginner-tasks. - Filter tasks with
status=2. - If none exist, tell the user there are no currently claimable newcomer rewards.
- For general "claim reward" intent, iterate through all status=
2tasks and callcex_welfare_claim_reward(nogate-climapping ingate-cli/cmd/cex; seeMCP_LEGACY_TOOL_RESOLUTION.mdΒ§δΊ) one by one. - For each successful claim:
- Prefer
coupon_full_namefrom the claim response. - If
coupon_full_nameis empty, fall back to the task'sreward_num+reward_unit.
- If a task returns
has_m_n_task=true, do not complete reward distribution for that task. Instead guide the user to Gate web/App rewards hub for manual claiming.
Response Templates
Existing user guidance
Please visit Gate web at https://www.gate.com/zh/rewards_hub or open the Gate App to view welfare activities, exclusive benefits, and reward redemption items.
Newcomer task list
Your newcomer welfare tasks:
- {task_name}
Description: {task_desc_without_html}
Reward: {reward_num} {reward_unit}
Status: {mapped_status}
Next step: {claim task / complete task / claim reward / distributing / completed / expired}
Task claim success
Successfully claimed {task_name}. Complete the task first, then you can claim {reward_num} {reward_unit}.
Reward claim success
You have claimed these newcomer rewards:
- {task_name}: {coupon_full_name_or_reward_num_reward_unit}
- {task_name}: {coupon_full_name_or_reward_num_reward_unit}
M-select-N reward fallback
This reward must be claimed from Gate web at https://www.gate.com/zh/rewards_hub or from the Gate App welfare center.
Error Handling
| Exception Type | Handling Method |
|---|---|
Existing user (code=1001) |
Show rewards-hub guidance |
Risk-control user (code=1002) |
"Your account is temporarily unable to participate in welfare activities. Please contact customer service for details." |
Sub-account (code=1003) |
"Sub-accounts cannot participate in this welfare activity. Please log in with your main account." |
Agent user (code=1004) |
"Agent users cannot participate in this welfare activity." |
Market maker (code=1005) |
"Market maker users cannot participate in this welfare activity." |
Enterprise user (code=1006) |
"Enterprise users cannot participate in this welfare activity." |
No task data (code=1007) |
"There are currently no active newcomer welfare tasks. Please check the Rewards Hub for more activities." |
Not logged in (code=1008) |
"Please log in to your Gate account first." |
| Identity/list timeout or MCP unavailable | "Welfare information is temporarily unavailable. Please try again later or visit https://www.gate.com/zh/rewards_hub directly." |
Claim task: invalid activity (51501009) |
Tell the user the task is no longer valid or available |
Claim task: already claimed / condition not met (51501010) |
Tell the user the task cannot be claimed again or conditions are not met yet |
Claim task or reward: risk rejected (51501026) |
Tell the user the account is temporarily not eligible for the welfare center |
Claim reward: refresh again (51501027) |
Ask the user to refresh/recheck the task list, then retry |
Claim reward: task expired (51501034) |
Tell the user the reward claim window has expired |
Claim reward: record not exist (51501004) |
Tell the user the reward record is no longer available and suggest refreshing the task list |
HTTP 4xx with standard label + message |
Surface the gateway error briefly and stop; do not treat HTTP 200 alone as success |
Cross-Skill Integration
| User Follow-up Intent | Routing Target |
|---|---|
| User wants to perform the first trade | gate-exchange-trading |
| User narrows to a spot-only trading action | gate-exchange-spot |
| User asks about general asset balances | gate-exchange-assets |
| User asks general KYC status/details outside welfare completion guidance | gate-exchange-kyc |
Safety Rules
- Identity gate first: Always call
gate-cli cex welfare identitybefore showing newcomer task details, claiming a task, or claiming a reward. - Allowed tools only: Use only the four MCP tools documented in this skill.
- Business code is authoritative: Success/failure is determined by response
code, not by HTTP200alone. - Real data only: Never fabricate task names, descriptions, reward numbers, reward units, or reward titles.
- Clean task descriptions: Remove raw HTML tags from
task_descbefore presenting the text to the user. - Claim-task precondition: Only call
cex_welfare_claim_task(nogate-climapping ingate-cli/cmd/cex; seeMCP_LEGACY_TOOL_RESOLUTION.mdΒ§δΊ) for a task selected from the current task list withstatus=0. - Claim-reward precondition: Only call
cex_welfare_claim_reward(nogate-climapping ingate-cli/cmd/cex; seeMCP_LEGACY_TOOL_RESOLUTION.mdΒ§δΊ) for tasks currently shown asstatus=2. - M-select-N handling: If
has_m_n_task=true, do not report the reward as claimed. Redirect the user to the official rewards hub/App. - No unrelated trading writes here: Deposit execution and trading execution are outside this skill. Route them to the proper product skills.
- Fallback safely: If the MCP data is unavailable or inconsistent, guide the user to
https://www.gate.com/zh/rewards_hubinstead of guessing.