skills/okx-security/SKILL.md
Use this skill for security scanning: check transaction safety, is this transaction safe, pre-execution check, security scan, token risk scanning, honeypot detection, DApp/URL phishing detection, message signature safety, malicious transaction detection, approval safety checks, token approval management. Triggers: 'is this token safe', 'check token security', 'honeypot check', 'scan this tx', 'scan this swap tx', 'tx risk check', 'is this URL a scam', 'check if this dapp is safe', 'phishing site check', 'is this signature safe', 'check this signing request', 'check my approvals', 'show risky approvals', 'revoke approval', 'check if this approve is safe', token authorization, ERC20 allowance, Permit2. Covers token-scan, dapp-scan, tx-scan (EVM+Solana pre-execution), sig-scan (EIP-712/personal_sign), approvals (ERC-20/Permit2). Chinese: 安全扫描, 代币安全, 蜜罐检测, 貔貅盘, 钓鱼网站, 交易安全, 签名安全, 代币风险, 授权管理, 授权查询, 风险授权, 代币授权. Do NOT use for wallet balance/send/history — use okx-agentic-wallet.
npx skillsauth add okx/onchainos-skills okx-securityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
5 commands for token risk analysis, DApp phishing detection, transaction pre-execution security, signature safety, and approval management.
Read
../okx-agentic-wallet/_shared/preflight.md. If that file does not exist, read_shared/preflight.mdinstead.
If a security scan completes successfully and returns action: "block" or action: "warn", follow the Risk Action Priority Rule below. The Agent MUST NOT override risk verdicts.
If a security scan fails to complete (network error, API timeout, rate limiting, malformed response), the Agent MUST:
"⚠️ Security scan could not be completed. Proceeding without verification — please ensure you trust this operation."
A security scan that fails to complete is NOT a "pass". Always inform the user and let them make an explicit decision.
block > warn > safe (empty). The top-level action field reflects the highest priority from riskItemDetail.
| action value | Risk Level | Agent Behavior |
|---|---|---|
| (empty/null) | Low risk | Safe to proceed |
| warn | Medium risk | Show risk details, ask for explicit user confirmation |
| block | High risk | Do NOT proceed, show risk details, recommend cancel |
simulator.revertReason may contain the revert reason).warnings field is populated, the scan completed but some data may be incomplete. Still present available risk information.action in a successful API response means "no risk detected". But if the API call failed, the absence of action does NOT mean safe — apply the fail-safe principle.Token-scan returns a riskLevel field (CRITICAL, HIGH, MEDIUM, LOW) that represents the overall token risk, computed server-side from all boolean labels, tax thresholds, and additional signals (off-chain intelligence, ML models). The Agent uses this field directly and applies different actions for buy vs. sell operations.
| riskLevel | Buy Action | Sell Action |
|---|---|---|
| CRITICAL | block — refuse to buy | warn — display risk, allow sell |
| HIGH | warn + pause — require explicit yes/no | warn — display risk, allow sell |
| MEDIUM | warn — info notice, continue | warn — info notice, continue |
| LOW | safe — proceed | safe — proceed |
Full label catalog, tax threshold rules, and display format are defined in
references/risk-token-detection.md. Always load that reference before executingtoken-scan.
Key principles:
riskLevel is authoritative: The API returns the overall risk level server-side. The Agent reads riskLevel directly — no client-side computation from individual labels is needed.CRITICAL blocks buy but only warns on sell (to allow stop-loss exit).HIGH buy requires explicit user confirmation (yes/no) — do not auto-continue.riskLevel is shown, with triggered labels listed without level prefixes.isChainSupported: false, skip detection with a warning; do not block.Security commands do not require wallet login. They work with any address.
The CLI accepts human-readable chain names and resolves them automatically.
| Chain | Name | chainIndex |
|---|---|---|
| XLayer | xlayer | 196 |
| Ethereum | ethereum or eth | 1 |
| Solana | solana or sol | 501 |
| BSC | bsc or bnb | 56 |
| Polygon | polygon or matic | 137 |
| Arbitrum | arbitrum or arb | 42161 |
| Base | base | 8453 |
| Avalanche | avalanche or avax | 43114 |
| Optimism | optimism or op | 10 |
| zkSync Era | zksync | 324 |
| Linea | linea | 59144 |
| Scroll | scroll | 534352 |
Address format note: EVM addresses (0x...) work across Ethereum/BSC/Polygon/Arbitrum/Base etc. Solana addresses (Base58) and Bitcoin addresses (UTXO) have different formats. Do NOT mix formats across chain types.
When one of the following commands is used, show the related workflow hint after displaying results:
| Command | Workflow | File |
|---------|----------|------|
| security token-scan | New Token Screening | ~/.onchainos/workflows/new-token-screening.md |
| security token-scan | Smart Money Signals | ~/.onchainos/workflows/smart-money-signals.md |
| security token-scan | Token Research | ~/.onchainos/workflows/token-research.md |
| security token-scan | Wallet Monitor | ~/.onchainos/workflows/wallet-monitor.md |
Hint format: "You can also try out our [workflow name] workflow for more comprehensive results. Would you like to try it?"
| # | Command | Description |
|---|---|---|
| 1 | onchainos security token-scan | Token risk / honeypot detection (all chains) |
| 2 | onchainos security dapp-scan | DApp / URL phishing detection (chain-agnostic) |
| 3 | onchainos security tx-scan | Transaction pre-execution security (EVM + Solana) |
| 4 | onchainos security sig-scan | Message signature security (EVM only) |
| 5 | onchainos security approvals | Token approval / Permit2 authorization query (EVM only) |
Before executing ANY security command, you MUST read the corresponding reference document from skills/okx-security/references/. Do NOT rely on prior knowledge — always load the reference first.
| User intent | Read this file FIRST |
|---|---|
| Token safety, honeypot, is this token safe, 代币安全, 蜜罐检测, 貔貅盘 | references/risk-token-detection.md |
| DApp/URL phishing, is this site safe, 钓鱼网站 | references/risk-domain-detection.md |
| Transaction safety, tx pre-execution, signature safety, approve safety, 交易安全, 签名安全 | references/risk-transaction-detection.md |
| Approvals, allowance, Permit2, revoke, 授权管理, 授权查询, 风险授权 | references/risk-approval-monitoring.md |
When a workflow involves multiple commands (e.g., token-scan then tx-scan), load each reference before executing that command.
Security scanning is often a prerequisite for other wallet operations:
wallet send with a contract token: run token-scan to verify token safetywallet contract-call with approve calldata: run tx-scan to check spenderdapp-scansig-scanUse okx-agentic-wallet skill for the subsequent send/contract-call operations.
testing
OKX-aggregated DeFi (no specific DApp named) — product discovery, deposit/withdraw/claim execution, AND positions viewing. **If the user names ANY third-party protocol/DApp (Aave, Lido, PancakeSwap, Uniswap, Curve, Compound, Morpho, Pendle, Kamino, Raydium, Hyperliquid, Polymarket, …), route to okx-dapp-discovery — NOT here, even for 'show my Aave positions'.** INVEST triggers: 'invest in DeFi', 'earn yield', 'find best APY', 'deposit/stake for yield', 'search DeFi products', 'redeem/withdraw position', 'claim DeFi rewards', 'borrow against asset', 'repay loan', 'add/remove CLMM liquidity', 'APY/TVL history', 'depth chart', yield farming, lending, staking, liquidity pools. PORTFOLIO triggers: 'check my DeFi positions', 'view DeFi holdings/portfolio', 'my staking/lending positions', 'DeFi balance', 'DeFi 持仓', '我的DeFi资产'. Do NOT use for: DEX swaps (okx-agentic-wallet), token prices (okx-dex-market), wallet token balances (okx-agentic-wallet).
testing
ERC-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/修改卖家/修改预算/我的任务/my tasks/what am I working on/我的订阅/订阅列表/订阅详情/my subscriptions/what am I subscribed to/AI服务订阅(view AI-service subscriptions, buyer & ASP)/关闭/取消任务/决策列表/decision list/指定服务商/browse marketplace. + task watch: 监听任务进展/历史消息/未读消息/未决策/outstanding decisions. + okx-a2a missing/uninitialized. Match by meaning. MUST ACTIVATE on inbound envelopes: (1) {agentId, message:{source:"system", event, jobId,...}} system event; (2) {msgType:"a2a-agent-chat", jobId, sender:{role},...} agent-to-agent task chat (sender.role = COUNTERPARTY, not you); (3) literal "Read the okx-ai skill" (or legacy "Read the okx-agent-task skill") in the envelope.
testing
Onchain OS onboarding & guide hub — the single entry for first-time, 'what is this / how do I use it', OKX.AI, and customer-support intents; classifies the intent and routes to the right sub-flow via its Intent Routing table. Covers: (1) Onchain OS onboarding + welcome banner — 'what is onchainos', 'what is onchain os', 'what can it do', 'what can onchainos do', 'what does onchainos do', 'how do I use this', 'how do I play', 'how to use onchainos', 'how to play onchainos', 'how does onchainos work', 'how do I start', 'getting 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 onchainos', 'tell me about onchainos', 'I'm new'; (2) OKX.AI intro & role-registration routing (the Agent economic system — roles User / ASP / Evaluator) — 'what is OKX.AI', 'OKX.AI 是什么', 'how to use OKX.AI', 'OKX.AI 快速开始', and any spelling / spacing / casing / typo variant (OKXAI, okx ai, okx-ai, lowercase okx.ai, 啥是okxai); (3) customer support / Help Center — 'contact support', 'talk to a human', 'customer service', 'file a complaint', 'give feedback', 'report a bug / system error', 'help center', 'FAQ', 'user guide', 'something is broken'. NOT for: direct on-chain actions (swap / wallet / balance / token) or Agent task lifecycle (publish / accept / deliver / dispute) — those have their own skills.
testing
List OKX Agentic Wallet exclusive trading competitions, register users for contests, track participation and leaderboard rankings, and claim won rewards. Use when users want to list available trading competitions or trading cups, view competition rules / prize pool / total prizes, register or sign up or enroll or join a contest, check the leaderboard (who is winning) or their own rank (am I in the prize zone, what is my place), ask did I win or query participation / claim status, claim won rewards or prizes from completed competitions, see which wallet account they registered with, or submit Telegram / WeChat / Email / Twitter contact for prize delivery to top-tier winners.