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-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
gate-cli cex welfare identity
gate-cli cex welfare beginner-tasks
Execution Operations
cex_welfare_claim_task (no gate-cli mapping in gate-cli/cmd/cex; see MCP_LEGACY_TOOL_RESOLUTION.md §二)
cex_welfare_claim_reward (no gate-cli mapping in gate-cli/cmd/cex; see MCP_LEGACY_TOOL_RESOLUTION.md §二)
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).
- 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: 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 (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 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, then execute this skill's welfare workflow.
SKILL.md keeps routing, business intent mapping, and safety rules.
references/gate-cli.md is the authoritative gate-cli execution 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 newcomer
code=1001: Existing user
code=1002: Risk-control user
code=1003: Sub-account
code=1004: Agent user
code=1005: Market maker
code=1006: Enterprise user
code=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=23 and status=0.
task_desc may contain simple HTML such as <span>; present the text content only, not raw tags.
Task type notes
task_type=10: Registration task
task_type=23: Download task
- Guidance tasks may surface task-scene codes such as:
1: KYC / identity verification
2: Spot trading
3: Futures trading
8: 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 flow
1001 → existing-user guidance
1002/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, call gate-cli cex welfare beginner-tasks.
- If list result is
code=1007 or the task list is empty, return the no-task fallback.
- Render every real task using:
task_name
task_desc with HTML tags removed
reward_num
reward_unit
status
- Map each task's next step from
status:
0: can be claimed
1: complete the task action
2: reward can be claimed
3: reward is distributing
4: already completed
5: 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 (no gate-cli mapping in gate-cli/cmd/cex; see MCP_LEGACY_TOOL_RESOLUTION.md §二) with the selected welfare_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
0 and 1.
- 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_type indicates KYC → use Case 2
- task wording or
task_type indicates first deposit → use Case 3
- task wording or
task_type indicates 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=
2 tasks and call cex_welfare_claim_reward (no gate-cli mapping in gate-cli/cmd/cex; see MCP_LEGACY_TOOL_RESOLUTION.md §二) one by one.
- For each successful claim:
- Prefer
coupon_full_name from the claim response.
- If
coupon_full_name is empty, fall back to the task's reward_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 identity before 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 HTTP 200 alone.
- Real data only: Never fabricate task names, descriptions, reward numbers, reward units, or reward titles.
- Clean task descriptions: Remove raw HTML tags from
task_desc before presenting the text to the user.
- Claim-task precondition: Only call
cex_welfare_claim_task (no gate-cli mapping in gate-cli/cmd/cex; see MCP_LEGACY_TOOL_RESOLUTION.md §二) for a task selected from the current task list with status=0.
- Claim-reward precondition: Only call
cex_welfare_claim_reward (no gate-cli mapping in gate-cli/cmd/cex; see MCP_LEGACY_TOOL_RESOLUTION.md §二) for tasks currently shown as status=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_hub instead of guessing.
1---2name: gate-exchange-welfare3description: "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."4user-invocable: true5disable-model-invocation: false6metadata:7 openclaw:8 emoji: "💱"9 os:10 - darwin11 - linux12 primaryEnv: GATE_API_KEY13 requires:14 bins:15 - gate-cli16 env:17 - GATE_API_KEY18 - GATE_API_SECRET1920 install:21 - kind: download22 os:23 - linux24 url: "https://github.com/gate/gate-cli/releases/download/v0.6.2/gate-cli_0.6.2_linux_amd64.tar.gz"25 bins:26 - gate-cli27 targetDir: "bin"28 label: "Download gate-cli (Linux x64)"29 - kind: download30 os:31 - linux32 url: "https://github.com/gate/gate-cli/releases/download/v0.6.2/gate-cli_0.6.2_linux_arm64.tar.gz"33 bins:34 - gate-cli35 targetDir: "bin"36 label: "Download gate-cli (Linux arm64)"37 - kind: download38 os:39 - darwin40 url: "https://github.com/gate/gate-cli/releases/download/v0.6.2/gate-cli_0.6.2_darwin_amd64.tar.gz"41 bins:42 - gate-cli43 targetDir: "bin"44 label: "Download gate-cli (macOS Intel)"45 - kind: download46 os:47 - darwin48 url: "https://github.com/gate/gate-cli/releases/download/v0.6.2/gate-cli_0.6.2_darwin_arm64.tar.gz"49 bins:50 - gate-cli51 targetDir: "bin"52 label: "Download gate-cli (macOS Apple Silicon)"53---5455### Resolving `gate-cli` (binary path)5657Resolve **`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).585960# Gate Exchange Welfare Center6162## General Rules6364⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding.65Do NOT select or call any tool until all rules are read. These rules have the highest priority.66→ Read `./references/gate-runtime-rules.md`67- **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.6869## Skill Dependencies707172### gate-cli commands used7374**Query Operations**7576- `gate-cli cex welfare identity`77- `gate-cli cex welfare beginner-tasks`7879**Execution Operations**8081- `cex_welfare_claim_task` (no `gate-cli` mapping in `gate-cli/cmd/cex`; see `MCP_LEGACY_TOOL_RESOLUTION.md` §二)82- `cex_welfare_claim_reward` (no `gate-cli` mapping in `gate-cli/cmd/cex`; see `MCP_LEGACY_TOOL_RESOLUTION.md` §二)8384### Authentication85- **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)).86- **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.87- API Key Required: Yes88- **Permissions:** Welfare query and claim access in the current Gate MCP deployment89- **Portal:** create or rotate keys outside the chat: https://www.gate.com/myaccount/profile/api-key/manage9091### Installation Check92- **Required:** `gate-cli` (run `sh ./setup.sh` from this skill directory if missing; optional `GATE_CLI_SETUP_MODE=release`).93- Add `$HOME/.openclaw/skills/bin` to **`PATH`** if you invoke `gate-cli` by name (or the directory where [`setup.sh`](./setup.sh) installs it).94- **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).95- **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.969798## Execution mode99100**Read and strictly follow** [`references/gate-cli.md`](./references/gate-cli.md), then execute this skill's welfare workflow.101102- `SKILL.md` keeps routing, business intent mapping, and safety rules.103- `references/gate-cli.md` is the authoritative `gate-cli` execution contract for identity gating, task lookup, task claim, reward claim, and degraded handling.104105## Overview106107> 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.108109**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.110111---112113## Domain Knowledge114115### Eligibility codes116- **`code=0`**: Eligible newcomer117- **`code=1001`**: Existing user118- **`code=1002`**: Risk-control user119- **`code=1003`**: Sub-account120- **`code=1004`**: Agent user121- **`code=1005`**: Market maker122- **`code=1006`**: Enterprise user123- **`code=1008`**: Not logged in124125### Beginner task list semantics126- The newcomer list is fetched from `gate-cli cex welfare beginner-tasks`.127- Registration tasks are returned before guidance tasks.128- 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=23`** and **`status=0`**.129- `task_desc` may contain simple HTML such as `<span>`; present the text content only, not raw tags.130131### Task type notes132- **`task_type=10`**: Registration task133- **`task_type=23`**: Download task134- Guidance tasks may surface task-scene codes such as:135 - **`1`**: KYC / identity verification136 - **`2`**: Spot trading137 - **`3`**: Futures trading138 - **`8`**: First deposit139- Some live payloads may use other supported task-scene values. Follow the real MCP payload instead of hardcoding assumptions beyond the documented mappings above.140141### Status mapping142143| Status | Meaning | Handling |144|--------|---------|----------|145| `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` §二) |146| `1` | Claimed / in progress | User should complete the task action |147| `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` §二) |148| `3` | Reward distributing | Inform user reward is being processed |149| `4` | Completed / settled | Inform user task is already finished |150| `5` | Expired | Inform user task has expired |151152### Rewards hub153- Official hub: `https://www.gate.com/zh/rewards_hub`154- Use the official web/App welfare center as the fallback whenever the APIs cannot return a reliable action result.155156---157158## Routing Rules159160| User Intent | Keywords / Patterns | Routing |161|-------------|---------------------|---------|162| Query welfare / rewards / task list | "what welfare", "what tasks can I do", "new user tasks", "welfare rewards" | Execute this skill → identity gate first |163| Claim a task | "claim task", "claim download task", "receive task" | Execute this skill → identity → list tasks → claim one status=`0` task |164| Complete KYC task | "complete identity verification task", "complete KYC task" | Execute this skill → respond with generic KYC guidance |165| Complete first deposit task | "complete first deposit task", "how do I finish deposit task" | Execute this skill → respond with generic deposit guidance |166| Complete first trade task | "complete first trade task", "I want to do my first trade" | Execute this skill → hand off to `gate-exchange-trading` |167| Complete task (ambiguous) | "complete task", "finish my welfare task" | Execute this skill → identity → list actionable tasks → resolve task |168| Claim reward / claim all rewards | "claim reward", "claim all rewards", "receive newcomer rewards" | Execute this skill → identity → list tasks → claim all status=`2` tasks |169| Asset query | "check my balance", "how much USDT do I have" | Route to `gate-exchange-assets` |170171---172173## Execution174175### Step 1: Determine user identity176177Call `gate-cli cex welfare identity` first for every welfare intent.178179Branch by `code`:180- **`0`** → newcomer flow181- **`1001`** → existing-user guidance182- **`1002/1003/1004/1005/1006/1008`** → mapped restriction guidance183- **other failure / timeout / HTTP 4xx** → degraded fallback184185### Base Flow: Query or list newcomer tasks186187**Trigger**: The user asks what newcomer welfare/tasks/rewards are available.188189Required flow:1901. Call `gate-cli cex welfare identity`.1912. If `code=0`, call `gate-cli cex welfare beginner-tasks`.1923. If list result is `code=1007` or the task list is empty, return the no-task fallback.1934. Render every real task using:194 - `task_name`195 - `task_desc` with HTML tags removed196 - `reward_num`197 - `reward_unit`198 - `status`1995. Map each task's next step from `status`:200 - `0`: can be claimed201 - `1`: complete the task action202 - `2`: reward can be claimed203 - `3`: reward is distributing204 - `4`: already completed205 - `5`: expired206207### Case 1: Claim a single task208209**Trigger**: The user asks to claim a task, usually a download task.210211Required flow:2121. Call `gate-cli cex welfare identity`.2132. Call `gate-cli cex welfare beginner-tasks`.2143. Find claimable tasks with `status=0`.2154. Resolve the target task:216 - If the user names a task, match by `task_name`.217 - If exactly one claimable task exists, use it.218 - If multiple claimable tasks exist and intent is ambiguous, ask which task to claim.2195. Call `cex_welfare_claim_task` (no `gate-cli` mapping in `gate-cli/cmd/cex`; see `MCP_LEGACY_TOOL_RESOLUTION.md` §二) with the selected `welfare_task_id`.2206. On success, confirm the claimed task name and remind the user to complete it before claiming the reward.221222Do 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`.223224### Case 2: Complete identity verification task225226**Trigger**: The user asks to complete a KYC / identity verification newcomer task.227228Required behavior:229- Do **not** call a welfare write tool.230- Return generic KYC guidance, for example:231232```text233Please 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.234```235236### Case 3: Complete first deposit task237238**Trigger**: The user asks to complete a first-deposit newcomer task.239240Required behavior:241- Do **not** call a welfare write tool.242- Return generic deposit guidance without inventing thresholds:243244```text245Please 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.246```247248### Case 4: Complete first trade task249250**Trigger**: The user asks to complete a first-trade newcomer task.251252→ Read [gate-exchange-trading/references/execution-and-guardrails.md](https://github.com/gate/gate-skills/blob/master/skills/gate-exchange-trading/references/execution-and-guardrails.md)253254Required behavior:255- Hand off to `gate-exchange-trading`.256- 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.257258### Case 5: Complete task with ambiguous intent259260**Trigger**: The user only says "complete task" or equivalent.261262Required flow:2631. Call `gate-cli cex welfare identity`.2642. Call `gate-cli cex welfare beginner-tasks`.2653. Build an actionable task set from statuses `0` and `1`.2664. If multiple actionable tasks exist, ask the user which task they want to complete.2675. If exactly one actionable task exists:268 - `status=0` → use **Case 1**269 - task wording or `task_type` indicates KYC → use **Case 2**270 - task wording or `task_type` indicates first deposit → use **Case 3**271 - task wording or `task_type` indicates trading → use **Case 4**272 - otherwise, provide general completion guidance and rewards-hub fallback273274### Case 6: Claim reward(s)275276**Trigger**: The user asks to claim reward / claim all rewards.277278Required flow:2791. Call `gate-cli cex welfare identity`.2802. Call `gate-cli cex welfare beginner-tasks`.2813. Filter tasks with `status=2`.2824. If none exist, tell the user there are no currently claimable newcomer rewards.2835. For general "claim reward" intent, iterate through all status=`2` tasks and call `cex_welfare_claim_reward` (no `gate-cli` mapping in `gate-cli/cmd/cex`; see `MCP_LEGACY_TOOL_RESOLUTION.md` §二) one by one.2846. For each successful claim:285 - Prefer `coupon_full_name` from the claim response.286 - If `coupon_full_name` is empty, fall back to the task's `reward_num` + `reward_unit`.2877. 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.288289---290291## Response Templates292293### Existing user guidance294295```text296Please 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.297```298299### Newcomer task list300301```text302Your newcomer welfare tasks:303304- {task_name}305 Description: {task_desc_without_html}306 Reward: {reward_num} {reward_unit}307 Status: {mapped_status}308 Next step: {claim task / complete task / claim reward / distributing / completed / expired}309```310311### Task claim success312313```text314Successfully claimed {task_name}. Complete the task first, then you can claim {reward_num} {reward_unit}.315```316317### Reward claim success318319```text320You have claimed these newcomer rewards:321322- {task_name}: {coupon_full_name_or_reward_num_reward_unit}323- {task_name}: {coupon_full_name_or_reward_num_reward_unit}324```325326### M-select-N reward fallback327328```text329This reward must be claimed from Gate web at https://www.gate.com/zh/rewards_hub or from the Gate App welfare center.330```331332---333334## Error Handling335336| Exception Type | Handling Method |337|----------------|-----------------|338| Existing user (`code=1001`) | Show rewards-hub guidance |339| Risk-control user (`code=1002`) | "Your account is temporarily unable to participate in welfare activities. Please contact customer service for details." |340| Sub-account (`code=1003`) | "Sub-accounts cannot participate in this welfare activity. Please log in with your main account." |341| Agent user (`code=1004`) | "Agent users cannot participate in this welfare activity." |342| Market maker (`code=1005`) | "Market maker users cannot participate in this welfare activity." |343| Enterprise user (`code=1006`) | "Enterprise users cannot participate in this welfare activity." |344| No task data (`code=1007`) | "There are currently no active newcomer welfare tasks. Please check the Rewards Hub for more activities." |345| Not logged in (`code=1008`) | "Please log in to your Gate account first." |346| 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." |347| Claim task: invalid activity (`51501009`) | Tell the user the task is no longer valid or available |348| Claim task: already claimed / condition not met (`51501010`) | Tell the user the task cannot be claimed again or conditions are not met yet |349| Claim task or reward: risk rejected (`51501026`) | Tell the user the account is temporarily not eligible for the welfare center |350| Claim reward: refresh again (`51501027`) | Ask the user to refresh/recheck the task list, then retry |351| Claim reward: task expired (`51501034`) | Tell the user the reward claim window has expired |352| Claim reward: record not exist (`51501004`) | Tell the user the reward record is no longer available and suggest refreshing the task list |353| HTTP `4xx` with standard `label` + `message` | Surface the gateway error briefly and stop; do not treat HTTP `200` alone as success |354355---356357## Cross-Skill Integration358359| User Follow-up Intent | Routing Target |360|-----------------------|----------------|361| User wants to perform the first trade | `gate-exchange-trading` |362| User narrows to a spot-only trading action | `gate-exchange-spot` |363| User asks about general asset balances | `gate-exchange-assets` |364| User asks general KYC status/details outside welfare completion guidance | `gate-exchange-kyc` |365366---367368## Safety Rules3693701. **Identity gate first**: Always call `gate-cli cex welfare identity` before showing newcomer task details, claiming a task, or claiming a reward.3712. **Allowed tools only**: Use only the four MCP tools documented in this skill.3723. **Business code is authoritative**: Success/failure is determined by response `code`, not by HTTP `200` alone.3734. **Real data only**: Never fabricate task names, descriptions, reward numbers, reward units, or reward titles.3745. **Clean task descriptions**: Remove raw HTML tags from `task_desc` before presenting the text to the user.3756. **Claim-task precondition**: Only call `cex_welfare_claim_task` (no `gate-cli` mapping in `gate-cli/cmd/cex`; see `MCP_LEGACY_TOOL_RESOLUTION.md` §二) for a task selected from the current task list with `status=0`.3767. **Claim-reward precondition**: Only call `cex_welfare_claim_reward` (no `gate-cli` mapping in `gate-cli/cmd/cex`; see `MCP_LEGACY_TOOL_RESOLUTION.md` §二) for tasks currently shown as `status=2`.3778. **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.3789. **No unrelated trading writes here**: Deposit execution and trading execution are outside this skill. Route them to the proper product skills.37910. **Fallback safely**: If the MCP data is unavailable or inconsistent, guide the user to `https://www.gate.com/zh/rewards_hub` instead of guessing.