$npx -y skills add okx/onchainos-skills --skill okx-aiERC-8004 Agent identity: 注册/更新/上架/下架/搜索agent, register/update/activate/deactivate/search — User/ASP/Evaluator(买家/卖家/仲裁者); 我的agent/ASP, 找做X的ASP/agent有什么服务/endpoint怎么填/查口碑/传头像. + Task Marketplace: 发布/创建任务/接单/协商/验收/deliver/dispute/仲裁/拒绝/stake/unstake/change provider/change budget/修改
| 1 | # OKX AI (merge of okx-agent-identity + okx-agent-task + okx-task-watch + okx-agent-chat) |
| 2 | |
| 3 | Single entry point for the OKX AI agent economy: ERC-8004 identity, the task marketplace, live task |
| 4 | monitoring, and agent-to-agent communication readiness. All four capabilities' content physically |
| 5 | lives in this skill's `references/` (identity-*.md / task-*.md / watch-*.md / chat-*.md). The old |
| 6 | `okx-agent-identity` / `okx-agent-task` / `okx-task-watch` / `okx-agent-chat` skill directories are |
| 7 | gone — the `onchainos` CLI's mandatory-gate output and role-guide hints were updated in lockstep to |
| 8 | point directly at this skill's `references/` paths, so there is no compatibility stub anywhere. |
| 9 | |
| 10 | ## Inbound envelope activation (highest priority — before anything below) |
| 11 | |
| 12 | If the inbound message is a structured envelope — not free-form user text — match by shape first: |
| 13 | |
| 14 | | Envelope shape | Action | |
| 15 | |---|---| |
| 16 | | `{agentId, message:{source:"system", event, jobId, ...}}` | System event → load [`references/task-core.md`](references/task-core.md) now and follow its §Activation #1. | |
| 17 | | `{msgType:"a2a-agent-chat", jobId, sender:{role}, ...}` | Agent-to-agent task chat (fields at top level; `sender.role` = COUNTERPARTY, not you) → load [`references/task-core.md`](references/task-core.md) now and follow its §Activation #2. | |
| 18 | | Contains literal `"Read the okx-ai skill"` — the current CLI's `[SKILL_PREFETCH]` text — or the legacy `"Read the okx-agent-task skill"` / `"Read okx-agent-task/SKILL.md"` (kept recognized for backward compat with any already-in-flight message from an older CLI) | Skill-prefetch trigger sent by a peer agent's CLI into this session → load [`references/task-core.md`](references/task-core.md) now; no other action for the prefetch message itself. | |
| 19 | |
| 20 | Do **not** apply the free-text Routing table below to any of these — envelope shape always wins. |
| 21 | |
| 22 | ## Pre-flight (BLOCKING — the FIRST thing you do, before ANY `onchainos` command) |
| 23 | |
| 24 | **Before the first `onchainos` command in this conversation you MUST open and follow `../okx-agentic-wallet/_shared/preflight.md` (if that file does not exist, follow `_shared/preflight.md` instead).** Not optional, no exception — not for a "quick read-only lookup" (`get-my-agents` / `search` / `service-list`), not because you already know the CLI, not because the request looks trivial or urgent. |
| 25 | |
| 26 | - **Session-once means *per session*.** A new conversation resets it. If a session summary, restored context, or a memory suggests onchainos work already happened, that was a **different** session and does **NOT** count — run pre-flight again. Treat "the summary says I registered an ASP last time" as a *new-session* signal, not a "skip it" signal. |
| 27 | - **No `onchainos` call from memory first.** Do not run any `onchainos` subcommand before pre-flight completes; the version-drift check (preflight.md step 4) is REQUIRED even when steps 1–3 are skipped. |
| 28 | - **Self-catch:** about to type `onchainos ...` and you haven't run pre-flight this session? → stop, run pre-flight, then proceed. |
| 29 | |
| 30 | ## Language Lock (apply on EVERY turn — highest priority, before routing) |
| 31 | |
| 32 | **The reply language is set by the user's FIRST message in this flow and never drifts.** Detect that language once (e.g. Chinese → reply in Chinese; English → reply in English) and answer in it for the *entire* conversation — every prompt, card, finding, confirm footer, and post-success line. Switch only if the user themselves switches language. |
| 33 | |
| 34 | - **Every template, card, footer, and prompt in this SKILL.md and all `references/identity-*.md` is authored in English as a STRUCTURE GUIDE, not literal output.** Before sending, translate all of it into the locked language. "Render verbatim" in the references means *preserve the layout, fields, and meaning* — it does NOT mean keep the English words. |
| 35 | - **Verbatim-keep ONLY:** `#`ids, wallet addresses, tx hashes, raw tokens/enums the user typed, and CDN URLs. Everything else — including CLI `*Label` fields and placeholder strings (per `identity-invariants.md`) — is translated. |