PluginBench
Skill
Review
Audit score 70

okx-security

okx/onchainos-skills

How to install okx-security

npx skills add https://github.com/okx/onchainos-skills --skill okx-security
Claude Code
Cursor
Windsurf
Cline
Full instructions (SKILL.md)

Source of truth, from okx/onchainos-skills.


name: okx-security description: "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." license: MIT metadata: author: okx version: "4.0.0" homepage: "https://web3.okx.com"

Onchain OS Security

5 commands for token risk analysis, DApp phishing detection, transaction pre-execution security, signature safety, and approval management.

Pre-flight Checks

Read ../okx-agentic-wallet/_shared/preflight.md. If that file does not exist, read _shared/preflight.md instead.

Fail-safe Principle (CRITICAL)

Scan completed — risk detected

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.

Scan failed — infrastructure error

If a security scan fails to complete (network error, API timeout, rate limiting, malformed response), the Agent MUST:

  • Report the error clearly to the user.
  • Ask the user whether to retry the scan or proceed without scan results.
  • If the user chooses to proceed, display a warning:

    "⚠️ Security scan could not be completed. Proceeding without verification — please ensure you trust this operation."

  • Log the skipped scan for auditability.

A security scan that fails to complete is NOT a "pass". Always inform the user and let them make an explicit decision.

Risk Action Priority Rule

tx-scan / sig-scan (transaction & signature scanning)

block > warn > safe (empty). The top-level action field reflects the highest priority from riskItemDetail.

action valueRisk LevelAgent Behavior
(empty/null)Low riskSafe to proceed
warnMedium riskShow risk details, ask for explicit user confirmation
blockHigh riskDo NOT proceed, show risk details, recommend cancel
  • Risk scan result is still valid even if simulation fails (simulator.revertReason may contain the revert reason).
  • If warnings field is populated, the scan completed but some data may be incomplete. Still present available risk information.
  • An empty/null 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 (token risk label scanning)

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.

riskLevelBuy ActionSell Action
CRITICALblock — refuse to buywarn — display risk, allow sell
HIGHwarn + pause — require explicit yes/nowarn — display risk, allow sell
MEDIUMwarn — info notice, continuewarn — info notice, continue
LOWsafe — proceedsafe — proceed

Full label catalog, tax threshold rules, and display format are defined in references/risk-token-detection.md. Always load that reference before executing token-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.
  • Buy is stricter than sell: 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.
  • Individual label levels are not displayed to the user — only the overall riskLevel is shown, with triggered labels listed without level prefixes.
  • If isChainSupported: false, skip detection with a warning; do not block.
  • If API fails, warn but do not block. In swap context, token-scan failures auto-continue with a warning to avoid blocking time-sensitive trades — this overrides the general fail-safe's ask-user behavior.

Security commands do not require wallet login. They work with any address.

Chain Name Support

The CLI accepts human-readable chain names and resolves them automatically.

ChainNamechainIndex
XLayerxlayer196
Ethereumethereum or eth1
Solanasolana or sol501
BSCbsc or bnb56
Polygonpolygon or matic137
Arbitrumarbitrum or arb42161
Basebase8453
Avalancheavalanche or avax43114
Optimismoptimism or op10
zkSync Erazksync324
Linealinea59144
Scrollscroll534352

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.

Related Workflows

When one of the following commands is used, show the related workflow hint after displaying results:

CommandWorkflowFile
security token-scanNew Token Screening~/.onchainos/workflows/new-token-screening.md
security token-scanSmart Money Signals~/.onchainos/workflows/smart-money-signals.md
security token-scanToken Research~/.onchainos/workflows/token-research.md
security token-scanWallet 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 Index

#CommandDescription
1onchainos security token-scanToken risk / honeypot detection (all chains)
2onchainos security dapp-scanDApp / URL phishing detection (chain-agnostic)
3onchainos security tx-scanTransaction pre-execution security (EVM + Solana)
4onchainos security sig-scanMessage signature security (EVM only)
5onchainos security approvalsToken approval / Permit2 authorization query (EVM only)

Reference Loading Rules (MANDATORY)

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 intentRead 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.

Integration with Other Skills

Security scanning is often a prerequisite for other wallet operations:

  • Before wallet send with a contract token: run token-scan to verify token safety
  • Before wallet contract-call with approve calldata: run tx-scan to check spender
  • Before interacting with any DApp URL: run dapp-scan
  • Before signing any EIP-712 message: run sig-scan

Use okx-agentic-wallet skill for the subsequent send/contract-call operations.

Related skills

More from okx/onchainos-skills and the wider catalog.

OK

okx-dex-market

okx/onchainos-skills

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.

8.0k installs
OK

okx-wallet-portfolio

okx/onchainos-skills

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.

7.9k installs
OK

okx-dex-token

okx/onchainos-skills

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.

7.9k installs
OK

okx-dex-swap

okx/onchainos-skills

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'.

7.9k installs
OK

okx-onchain-gateway

okx/onchainos-skills

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.

7.8k installs
OK

okx-dex-signal

okx/onchainos-skills

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.

5.8k installs