okx-how-to-play
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOnchain OS — How to Play (Entry Router)
Onchain OS — 使用指南(入口路由器)
The first-time / "I don't know what to do" entry point. Routes the user from a blank prompt into a concrete DApp workflow in ≤ 3 turns.
这是首次使用/「我不知道该做什么」的入口点。可在≤3轮交互内将用户从空白提示引导至具体的DApp工作流。
Instruction Priority
指令优先级
Tagged blocks indicate rule severity (higher wins on conflict):
- — Absolute prohibition.
<NEVER> - — Mandatory step. Skipping breaks the flow.
<MUST> - — Best practice.
<SHOULD>
带标签的区块表示规则的严格程度(优先级越高,冲突时越优先):
- — 绝对禁止。
<NEVER> - — 强制步骤。跳过会中断流程。
<MUST> - — 最佳实践。
<SHOULD>
Pre-flight Checks
预检查
<MUST>
> Read `../okx-agentic-wallet/_shared/preflight.md`. If that file does not exist, read `_shared/preflight.md` instead.
</MUST>
<MUST>
> 阅读 `../okx-agentic-wallet/_shared/preflight.md`。若该文件不存在,则改为阅读 `_shared/preflight.md`。
</MUST>
Trigger Criteria
触发条件
<MUST>
Only trigger this skill when the user message is **open-ended / guidance-seeking**. Positive examples:
- "how do I use this / what can I do / what is this / getting started"
- "I just installed it, now what?"
- "tutorial / onboarding / first time / where do I start"
Negative examples (use the matching skill instead, not this one):
- "check my balance" → /
okx-agentic-walletokx-wallet-portfolio - "swap 0.1 ETH for USDC" →
okx-dex-swap - "what's the price of BTC" →
okx-dex-market - "login" alone → (but
okx-agentic-walletas a reply to the welcome banner is handled inside this skill — see Login Method Choice)login - "search for PEPE token" →
okx-dex-token
<MUST>
仅当用户消息为**开放式/寻求指导类**内容时,触发此技能。正面示例:
- "how do I use this / what can I do / what is this / getting started"
- "I just installed it, now what?"
- "tutorial / onboarding / first time / where do I start"
负面示例(应使用匹配的技能,而非本技能):
- "check my balance" → /
okx-agentic-walletokx-wallet-portfolio - "swap 0.1 ETH for USDC" →
okx-dex-swap - "what's the price of BTC" →
okx-dex-market - 单独的"login" → (但作为对欢迎横幅的回复的"login"由本技能处理——详见 登录方式选择)
okx-agentic-wallet - "search for PEPE token" →
okx-dex-token
Authoring Pattern — Free Zone vs Fixed Zone
编写模式 — 自由区与固定区
Most user-facing copy in this flow is split into two parts:
- Free zone — the agent answers the user's actual question or acknowledgement first, in 1–5 sentences, contextually woven. No fixed copy. The user shouldn't feel like they hit a script.
- Fixed zone — the canonical English template block (welcome banner, login options, API Key heads-up). Render in the user's language at runtime; keep emojis, ,
{placeholders}, code identifiers, and markdown structure literal. Quoted reply tokens like1–Nare prose too — translate them along with the surrounding sentence."login"
This applies to: Welcome Banner, Login Method Choice, and API Key Login Step 1 heads-up.
<MUST>
**Bridging is mandatory.** End the free zone with a transitional half-sentence (e.g. "let me drop the menu" / "here's where to start ↓") — never with a hard period followed by an unrelated fixed-zone line. Self-check before emitting: read the free-zone tail + first fixed-zone line as a single unit; if they feel like two separate posts pasted together, rewrite the free-zone tail.
</MUST>此流程中大多数面向用户的文案分为两部分:
- 自由区 — 智能体首先以1-5句话回应用户的实际问题或确认信息,上下文自然衔接。无固定文案,用户不应感觉像是触发了脚本。
- 固定区 — 标准英文模板区块(欢迎横幅、登录选项、API Key提示)。运行时需转换为用户使用的语言;保留表情符号、、
{placeholders}、代码标识符和Markdown结构不变。像1–N这类带引号的回复词属于散文内容——需连同周围句子一起翻译。"login"
此模式适用于:欢迎横幅、登录方式选择和API Key登录步骤1提示。
<MUST>
**必须添加过渡衔接**。自由区结尾需用半句话过渡(例如:"我来展示菜单" / "以下是入门路径 ↓")——绝不能以句号结尾后直接接上无关的固定区内容。输出前自查:将自由区结尾和固定区第一句连起来读;如果感觉像是两个独立内容拼接而成,请重写自由区结尾。
</MUST>Status Check
状态检查
<MUST>
Run `onchainos wallet status` **before** showing any login or welcome text. Use the `loggedIn` field to branch.
</MUST>
onchainos wallet status- → render the logged-out Welcome Banner.
loggedIn: false - → render the logged-in Welcome Banner.
loggedIn: true
<MUST>
在显示任何登录或欢迎文本**之前**,运行 `onchainos wallet status`。根据`loggedIn`字段分支处理。
</MUST>
onchainos wallet status- → 渲染未登录版欢迎横幅。
loggedIn: false - → 渲染已登录版欢迎横幅。
loggedIn: true
Welcome Banner
欢迎横幅
<MUST>
Render the banner from `references/welcome.md` — it covers placeholders (`{evm_address}` / `{solana_address}` / `{balance}` from `wallet balance`; geoblock variant from `wallet geoblock`), the template, and pick routing (Step 4). Variant A = 5 picks (Polymarket allowed); Variant B = 4 picks (Polymarket geoblocked). Never fabricate addresses or balance.
</MUST>
<MUST>
从`references/welcome.md`渲染横幅——该文件包含占位符(来自`wallet balance`的`{evm_address}` / `{solana_address}` / `{balance}`;来自`wallet geoblock`的地域限制变体)、模板和选项路由(步骤4)。变体A包含5个选项(允许Polymarket);变体B包含4个选项(Polymarket受地域限制)。绝不能伪造地址或余额。
</MUST>
Login Method Choice
登录方式选择
Reached when the user asks to log in (either by replying to the logged-out banner, or by picking a workflow option from the welcome menu while logged out).
loginFree zone (1–5 sentences, agent's own words): answer whatever the user actually asked / acknowledged. If they came from a workflow pick, briefly explain that login unlocks that workflow. Then segue naturally into the fixed-zone choice below.
Fixed zone — render the template below in the user's language:
Welcome to Agentic Wallet — the Onchain OS wallet built for agents. Pick a login method:
1. 📧 Email (recommended — 30 seconds)
2. 🔑 API Key (already an OKX developer? Fastest path)
Reply 1 or 2 ↓If the user replies or "email" → Email Login.
If the user replies or "API Key" → API Key Login.
12当用户要求登录时触发(无论是回复未登录横幅的,还是未登录时选择欢迎菜单中的工作流选项)。
login自由区(1-5句话,智能体自主表述): 回应用户实际提出的问题/确认信息。如果用户来自工作流选项选择,简要说明登录可解锁该工作流。然后自然过渡到下方的固定区选项。
固定区 — 将以下模板转换为用户使用的语言渲染:
Welcome to Agentic Wallet — the Onchain OS wallet built for agents. Pick a login method:
1. 📧 Email (recommended — 30 seconds)
2. 🔑 API Key (already an OKX developer? Fastest path)
Reply 1 or 2 ↓若用户回复或"email" → 邮箱登录。
若用户回复或"API Key" → API Key登录。
12Email Login
邮箱登录
Handled by skill's Authentication section. Steps:
okx-agentic-wallet- Ask for email →
onchainos wallet login <email> --locale <locale> - Ask for OTP code →
onchainos wallet verify <code> - On success → Post-login routing below.
由技能的认证部分处理。步骤:
okx-agentic-wallet- 请求邮箱 →
onchainos wallet login <email> --locale <locale> - 请求OTP验证码 →
onchainos wallet verify <code> - 成功后 → 下方的登录后路由。
API Key Login
API Key登录
Two steps total: (1) one-time heads-up so the user knows what env vars to set and where to get them, (2) run once they confirm.
onchainos wallet login共两步:(1) 一次性提示用户需设置的环境变量及获取位置,(2) 用户确认后运行。
onchainos wallet loginStep 1 — Heads-up (one-shot, fixed zone)
步骤1 — 提示(一次性,固定区)
Free zone (1–5 sentences): if the user has any other question, answer it first. Then segue naturally into the heads-up.
Fixed zone — render the template below in the user's language:
You'll need to set three API Key environment variables before logging in:
1. `OKX_API_KEY` — API Key
2. `OKX_SECRET_KEY` — Secret Key
3. `OKX_PASSPHRASE` — Passphrase
You can find these at https://web3.okx.com/onchainos/dev-portal.
**Attention ⚠️:** Do not paste credentials into the chat — follow the dev-portal instructions and set them locally.Then stop and wait for the user to confirm they're ready (e.g. "done / ok / ready").
自由区(1-5句话): 若用户有其他问题,先进行回复。然后自然过渡到提示内容。
固定区 — 将以下模板转换为用户使用的语言渲染:
You'll need to set three API Key environment variables before logging in:
1. `OKX_API_KEY` — API Key
2. `OKX_SECRET_KEY` — Secret Key
3. `OKX_PASSPHRASE` — Passphrase
You can find these at https://web3.okx.com/onchainos/dev-portal.
**Attention ⚠️:** Do not paste credentials into the chat — follow the dev-portal instructions and set them locally.然后停止并等待用户确认已准备就绪(例如:"done / ok / ready")。
Step 2 — Login
步骤2 — 登录
Once the user confirms, run:
onchainos wallet loginOn success → Post-login routing below. On login failure, surface the error and ask the user to verify their env vars (do NOT re-show the heads-up — they already saw it).
<NEVER>
- Do NOT accept API Key / Secret / Passphrase inline in chat. If the user pastes credentials in chat: do NOT echo, do NOT use the values, ask them to delete the message + rotate the keys + set the env vars locally instead.
- Do NOT walk the user through generating keys, opening URLs, creating `.env` files, editing `.gitignore`, or any other multi-step setup. The heads-up is one-shot — they handle their own local setup.
- Do NOT ask the user to paste the browser URL or any callback back to the CLI. The dev-portal is read-only.
</NEVER>用户确认后,运行:
onchainos wallet login成功后 → 下方的登录后路由。登录失败时,显示错误信息并要求用户验证环境变量(请勿重新显示提示内容——用户已看过)。
<NEVER>
- 请勿在聊天中直接接收API Key/密钥/密码。若用户在聊天中粘贴凭证:请勿回显,请勿使用该值,要求用户删除消息 + 轮换密钥 + 在本地设置环境变量。
- 请勿引导用户完成生成密钥、打开URL、创建`.env`文件、编辑`.gitignore`或其他多步设置流程。提示仅需一次——用户自行处理本地设置。
- 请勿要求用户将浏览器URL或任何回调内容粘贴到CLI中。开发者门户为只读状态。
</NEVER>Post-login routing
登录后路由
After login completes successfully:
- If the user came from picking a workflow pick while logged out: automatically load the corresponding workflow file () and follow it. Do NOT re-render the welcome banner.
~/.onchainos/workflows/<file>.md - If the user came from replying (or equivalent) to the logged-out banner: render the logged-in Welcome Banner so they see their addresses + balance.
login
登录成功后:
- 若用户来自未登录时选择工作流选项:自动加载对应的工作流文件()并执行。请勿重新渲染欢迎横幅。
~/.onchainos/workflows/<file>.md - 若用户来自回复未登录横幅的(或等效表述):渲染已登录版欢迎横幅,展示用户地址 + 余额。
login
Free-form fallback
自由格式回退
If the user types something other than a numbered pick or , answer in the free zone, then route to the matching skill / workflow:
login| Intent | Route to |
|---|---|
| meme sniping / pump.fun / new launches | |
| follow smart money / KOL / whale | |
| bridge / cross-chain / move tokens between chains | |
| yield / earn / stake / DeFi | |
| is this token safe / approvals | |
| swap / buy / sell | |
| my holdings / portfolio | |
| trading competition / join contest / competition rank | |
| login (free-form, not as a banner reply) | this skill's Login Method Choice |
| named DApp + action verb (Aave / Hyperliquid / etc.) | |
若用户输入的内容不是数字选项或,先在自由区回复,然后引导至匹配的技能/工作流:
login| 意图 | 引导至 |
|---|---|
| meme狙击 / pump.fun / 新代币上线 | |
| 追踪聪明钱 / KOL / 巨鲸 | |
| 跨链桥 / 跨链操作 / 在链间转移代币 | |
| 收益 / 赚取 / 质押 / DeFi | |
| 代币安全性检查 / 授权管理 | |
| 兑换 / 买入 / 卖出 | |
| 我的资产 / 投资组合 | |
| 交易竞赛 / 加入赛事 / 竞赛排名 | |
| 登录(自由格式,非横幅回复) | 本技能的登录方式选择 |
| 指定DApp + 操作动词(Aave / Hyperliquid等) | |
Acceptance Criteria
验收标准
- Banner variant matches auth state — renders the logged-out variant (no addresses, with "login" hint);
loggedIn: falserenders the logged-in variant (addresses + balance, no hint).loggedIn: true - Skill picks load without login gate — 🔥 / 💰 load even when logged out; each loaded skill handles its own auth.
- Workflow picks gate on login — when logged out, 🐋 / 🆕 / ☕ route through Login Method Choice first, then auto-resume the workflow. User should not have to re-state their pick.
- Turn budget — ≤ 3 turns end-to-end for a new user; ≤ 2 turns for a returning user picking a workflow + login.
- 横幅变体匹配认证状态 — 渲染未登录变体(无地址,带"login"提示);
loggedIn: false渲染已登录变体(显示地址+余额,无提示)。loggedIn: true - 技能选项无需登录即可加载 — 🔥 / 💰选项即使未登录也可加载;每个加载的技能自行处理认证。
- 工作流选项需登录验证 — 未登录时,🐋 / 🆕 / ☕选项先引导至登录方式选择,然后自动恢复工作流。用户无需重新选择。
- 交互轮次限制 — 新用户端到端交互≤3轮;返回用户选择工作流+登录≤2轮。
Notes / Non-obvious
注意事项 / 非显性规则
- Polymarket plugin is not pre-installed. Pick 🔥 routes through , which handles plugin install + load. Don't try to load
okx-dapp-discoverydirectly.web3-polymarket - Workflow files are runtime resources — at install time they live at ; in this repo's source they're under
~/.onchainos/workflows/.workflows/
- Polymarket插件未预装。选项🔥引导至,由其处理插件安装+加载。请勿尝试直接加载
okx-dapp-discovery。web3-polymarket - 工作流文件为运行时资源 — 安装时位于;在本仓库源码中位于
~/.onchainos/workflows/。workflows/