How to install okx-how-to-play
npx skills add https://github.com/okx/onchainos-skills --skill okx-how-to-playFull instructions (SKILL.md)
Source of truth, from okx/onchainos-skills.
name: okx-how-to-play description: "Onchain OS entry router for open-ended onboarding questions. Renders a welcome banner with a Quick-start menu and routes the user into the right skill or workflow (Polymarket, DeFi APY, smart-money signals, new-token screening, daily on-chain brief). Triggers: 'what is onchainos', 'what is onchain os', 'what does this do', 'what can it do', 'what can I do here', 'how do I use this', 'how do I play', 'how to use onchainos', 'how to play onchainos', 'how does this work', 'how do I start', 'getting started', 'how do I get started', 'tutorial', 'onboarding', 'first time', 'I just installed', 'now what', 'what do I do now', 'where do I start', 'who are you', 'what are you', 'introduce yourself', 'introduction', 'introduce onchainos', 'tell me about onchainos', 'I'm new'." license: MIT metadata: author: okx version: "3.3.15" homepage: "https://web3.okx.com"
Onchain OS — How to Play (Entry Router)
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.
Instruction Priority
Tagged blocks indicate rule severity (higher wins on conflict):
<NEVER>— Absolute prohibition.<MUST>— Mandatory step. Skipping breaks the flow.<SHOULD>— Best practice.
Pre-flight Checks
<MUST> > Read `../okx-agentic-wallet/_shared/preflight.md`. If that file does not exist, read `_shared/preflight.md` instead. </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-wallet/okx-wallet-portfolio - "swap 0.1 ETH for USDC" →
okx-dex-swap - "what's the price of BTC" →
okx-dex-market - "login" alone →
okx-agentic-wallet(butloginas a reply to the welcome banner is handled inside this skill — see Login Method Choice) - "search for PEPE token" →
okx-dex-token</MUST>
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). At runtime:
- Render all natural-language prose in the user's language.
- Quoted reply words inside prose (e.g.
"login") MUST translate with their sentence. Leaving an English quoted word inside otherwise-translated Chinese / Japanese / etc. prose is a translation bug — the quotes do NOT make the word a literal trigger. - Keep literal: emojis,
{placeholders},1–N, code identifiers / commands / URLs, markdown structure.
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>Status Check
<MUST> Run `onchainos wallet status` **before** showing any login or welcome text. Use the `loggedIn` field to branch. </MUST>onchainos wallet status
loggedIn: false→ render the logged-out Welcome Banner.loggedIn: true→ render the logged-in Welcome Banner.
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>Login Method Choice
Reached when the user asks to log in (either by replying login to the logged-out banner, or by picking a workflow option from the welcome menu while logged out).
Free 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 1 or "email" → Email Login.
If the user replies 2 or "API Key" → API Key Login.
Email Login
Handled by okx-agentic-wallet skill's Authentication section. Steps:
- Ask for email →
onchainos wallet login <email> --locale <locale> - Ask for OTP code →
onchainos wallet verify <code> - On success → Post-login routing below.
API Key Login
Two steps total: (1) one-time heads-up so the user knows what env vars to set and where to get them, (2) run onchainos wallet login once they confirm.
Step 1 — Heads-up (one-shot, fixed zone)
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").
Step 2 — Login
Once the user confirms, run:
onchainos wallet login
On 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>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 (
~/.onchainos/workflows/<file>.md) and follow it. Do NOT re-render the welcome banner. - If the user came from replying
login(or equivalent) to the logged-out banner: render the logged-in Welcome Banner so they see their addresses + balance.
Free-form fallback
If the user types something other than a numbered pick or login, answer in the free zone, then route to the matching skill / workflow:
| Intent | Route to |
|---|---|
| meme sniping / pump.fun / new launches | okx-dex-trenches |
| follow smart money / KOL / whale | okx-dex-signal (or load smart-money-signals.md) |
| bridge / cross-chain / move tokens between chains | okx-dex-bridge |
| yield / earn / stake / DeFi | okx-defi-invest |
| is this token safe / approvals | okx-security |
| swap / buy / sell | okx-dex-swap |
| my holdings / portfolio | okx-wallet-portfolio |
| trading competition / join contest / competition rank | okx-growth-competition |
| login (free-form, not as a banner reply) | this skill's Login Method Choice |
| named DApp + action verb (Aave / Hyperliquid / etc.) | okx-dapp-discovery |
Acceptance Criteria
- Banner variant matches auth state —
loggedIn: falserenders the logged-out variant (no addresses, with "login" hint);loggedIn: truerenders the logged-in variant (addresses + balance, no hint). - 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.
Notes / Non-obvious
- Polymarket plugin is not pre-installed. Pick 🔥 routes through
okx-dapp-discovery, which handles plugin install + load. Don't try to loadweb3-polymarketdirectly. - Workflow files are runtime resources — at install time they live at
~/.onchainos/workflows/; in this repo's source they're underworkflows/.
Related skills
More from okx/onchainos-skills and the wider catalog.
okx-dex-market
HARD BLOCK — NEVER use this skill for prediction-market / Polymarket UpDown queries. Route to okx-dapp-discovery when (a) a named DApp (Polymarket/Aave/Hyperliquid/PancakeSwap/Morpho) appears with any timeframe, OR (b) any 涨跌 / updown / 'up or down' phrase appears for BTC/ETH/SOL/XRP/BNB/DOGE/HYPE (e.g. '<COIN> 涨跌市场', '5 分钟涨跌', 'BTC up or down'). Example: 'BTC 5 分钟涨跌市场' → okx-dapp-discovery (NOT K-line). These are Polymarket prediction markets, not on-chain price queries. Use THIS skill for on-chain market data: token prices/价格, K-line/OHLC/candlestick/K线 charts, index prices, and wallet PnL/盈亏分析 (win rate, my wallet's DEX trade history, realized/unrealized PnL per token). Triggers: 'token price', 'price chart', 'K线', 'OHLC', 'how much is X worth', 'show my PnL', '胜率', '盈亏', 'my wallet DEX history', 'realized/unrealized profit'. NOTE: WebSocket script/脚本/bot → okx-dex-ws. ALSO the OWNER of Market API payment handling — route here (NOT okx-agent-payments-protocol) for: 'onchainos market 报 402', 'market price 402', 'market API pricing/计费/收费', Basic/Premium tier/quota/额度/免费额度, 'ok-web3-openapi-pay' header, 30 天过渡期/grace period, any MARKET_API_* notification code (NEW_USER_INTRO / OLD_USER_GRACE / OLD_USER_POST_GRACE_* / *_OVER_QUOTA), or 'confirming:true' response from onchainos market commands.
okx-wallet-portfolio
Public-address portfolio lookup across XLayer, Solana, Ethereum, Base, BSC, Arbitrum, Polygon and 20+ chains. Invoke when the user supplies a wallet address and wants its: balance, token holdings, total portfolio value, or DeFi positions (e.g. 'check balance of 0xAbc', 'what tokens does 0xAbc hold', 'portfolio value of this address'). Requires an explicit address — for the user's own logged-in wallet with no address use okx-agentic-wallet.
okx-dex-token
Use this skill for token-level data: search tokens, trending/hot tokens (热门, 代币榜单), liquidity pools, holder distribution (whale/巨鲸, sniper, bundler-tagged holder %), token risk metadata (riskControlLevel, tokenTags, dev stats, suspicious/bundle holding % via advanced-info), recent buy/sell activity, trade feed/逐笔成交/每笔交易/stream trades, top profit addresses, token trade history, detailed price info with market cap volume liquidity and holder count (price-info), or holder cluster analysis (持仓集中度, cluster overview, cluster rug pull risk/跑路风险, new wallet percentage/新钱包持仓比例, holder clusters, 'are top holders in same cluster'). Also handles Market API payment/计费/x402/402, Basic/Premium tier/quota/额度 questions, and MARKET_API_*_OVER_QUOTA / confirming:true responses on token endpoints (advanced-info, top-trader, cluster-*, trades, hot-tokens). NOTE: if the user wants to write a WebSocket script/脚本/bot, use okx-dex-ws instead.
okx-dex-swap
Use this skill to swap, trade, buy, sell, exchange, or convert tokens, get a swap quote, execute a trade, find the best or cheapest swap route, compare swap rates, get swap calldata, or build an unsigned swap tx across XLayer, Solana, Ethereum, Base, BSC, Arbitrum, Polygon, or 20+ chains. OKX-aggregated routing over 500+ DEX sources with slippage control, price-impact protection, and cross-DEX route optimization. For OKX-aggregated swaps with no named venue. If the prompt names a specific DApp as the swap venue (Polymarket, Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kamino, Orca, Meteora, Clanker, pump.fun, Uniswap), route to okx-dapp-discovery instead, e.g. 'swap on PancakeSwap', 'swap SOL for USDC on Raydium', '在 Curve 上换 USDT', 'swap on Uniswap'.
okx-onchain-gateway
Onchain transaction gateway across XLayer, Solana, Ethereum, Base, BSC, Arbitrum, Polygon and 20+ chains. Invoke to broadcast a pre-signed / raw / already-signed transaction, push a serialized tx on-chain, query current gas price, estimate gas limit, simulate or dry-run a transaction before sending, track a broadcast order, or check tx-confirmed / pending status by txHash or orderId.
okx-dex-signal
Use this skill for smart-money/whale/KOL/大户 activity tracking, aggregated buy signal/信号 alerts, and leaderboard/牛人榜 rankings. Covers: (1) address tracker — raw DEX transaction feed for smart money, KOL, or custom wallet addresses; (2) aggregated buy-only signal alerts — tokens bought collectively by smart money/KOL/whales; (3) leaderboard — top traders by PnL, win rate, volume, or ROI. Use when the user asks 'what are smart money buying', '聪明钱最新交易', 'KOL交易动态', '追踪聪明钱', 'track address trades', '大户在买什么', 'whale signals', 'smart money alerts', '信号', '大户信号', 'top traders', '牛人榜', or wants to monitor notable wallet activity. Also handles Market API payment/计费/x402/402, Basic/Premium tier/quota/额度 questions, and MARKET_API_*_OVER_QUOTA / confirming:true responses on signal, leaderboard, or tracker endpoints. NOTE: if the user wants to write a WebSocket script/脚本/bot, use okx-dex-ws instead.