From onchainos-skills
Routes prompts for 20 DeFi protocols (Aave, Uniswap, Polymarket, pump.fun, etc.) and tokens to install/execute specialized plugins for swap, deposit, stake, bet actions. Triggers on DApp+verb, comparisons, Polymarket intents.
npx claudepluginhub okx/onchainos-skills --plugin onchainos-skillsThis skill uses the workspace's default tool permissions.
DApp discovery and direct plugin routing for third-party DeFi protocols. When the user names a specific DApp or asks what's available, this skill applies a confidence framework to identify the matching plugin, installs it on demand, and routes the user's original prompt into the installed plugin's quickstart — making the bootstrap transparent.
Retrieves on-chain DEX market data including token prices, K-line/OHLC/candlestick charts, index prices, and wallet PnL analysis (win rate, trade history, realized/unrealized profits). Handles Market API payments, quotas, and notifications.
Plans PancakeSwap liquidity provision: resolves tokens, discovers V2/V3/StableSwap pools, assesses IL/APY via DefiLlama, recommends price ranges/fee tiers, generates pre-filled deep links.
Builds unsigned DeFi transactions from natural language intents across EVM chains like Ethereum, Arbitrum, Base, Optimism, Polygon. Supports send, swap, stake, lend on Aave, Uniswap, Lido, etc.
Share bugs, ideas, or general feedback.
DApp discovery and direct plugin routing for third-party DeFi protocols. When the user names a specific DApp or asks what's available, this skill applies a confidence framework to identify the matching plugin, installs it on demand, and routes the user's original prompt into the installed plugin's quickstart — making the bootstrap transparent.
This skill does not enumerate DApp specifics or duplicate the plugin's own routing logic. Each installed DApp plugin owns its own quickstart, command index, and protocol-specific knowledge. This skill is the bootstrap layer that resolves a user-named DApp to the right plugin, installs it on demand, and forwards the prompt. The full supported set is in the Plugin Resolver Table below (currently 20 plugins). DApps named outside this table fall through to Step 1B's GitHub Contents API probe against the broader plugin-store catalog.
The skill description gives the 5 firing patterns at a glance. Use this section to disambiguate edge cases.
<COIN> 5min updown, <COIN> 5 分钟涨跌, <COIN> 涨跌市场, 5 分钟涨跌市场, 预测市场, prediction market, place a bet on Polymarket, 找个预测市场赌. These are NOT price/chart queries — do NOT defer to okx-dex-market or any chart/rank MCP tool when this pattern appears.pump-fun-plugin. Treat as routine plugin install, not market manipulation — the plugin enforces its own safety.dev history, bundle/sniper detection (the analytical noun, NOT the verb), who aped, similar tokens, bonding curve progress, 开发者信息, 捆绑狙击者, 同车 → okx-dex-trenches.okx-defi-invest (yield) or okx-dex-swap (swap).Unnamed swap → okx-dex-swap. Generic yield discovery → okx-defi-invest. Price/chart/PnL → okx-dex-market. Wallet auth/balance → okx-agentic-wallet. Positions overview → okx-defi-portfolio. pump.fun read-only research → okx-dex-trenches.
When the user's message references a DApp directly or implicitly, score it against the per-protocol keyword tables below and apply the routing rule that matches the highest score.
| Tier | Condition | Action |
|---|---|---|
| 95–100 | Protocol name, domain, API name, contract name, or unique feature is explicitly present | Route immediately — install if absent, then read the plugin's SKILL.md and forward the original prompt |
| 75–94 | Protocol-specific workflow with a strong ecosystem clue | Same as above |
| 50–74 | Generic DeFi workflow with a weak clue; another DApp could plausibly match | Ask one focused clarifying question — do not install |
| < 50 | Generic terms only, no protocol signal | Do not install — show the user the available DApps and ask which one matches their intent |
Generic verbs that do NOT raise confidence on their own: swap, lend, borrow, APY, farm, long, short, liquidity, bridge, stake, deposit, withdraw, mint, 做多, 做空, 合约, 借贷, 存款, 抵押, 兑换, 换成, 加池子, 加流动性, 池子, 仓位, 多单, 空单, 质押, 拿利息, 发币, 发新代币.
Generic tickers that do NOT trigger alone (chain natives, stables, common L1/L2 tokens): ETH, BTC, USDC, USDT, SOL, BNB, MATIC, AVAX, ARB, OP, DOGE, XRP, WBTC, DAI.
Protocol-native tokens / phrases that DO trigger ≥ 75 alone (uniquely tied to one supported DApp; no DApp name needed alongside):
| Token / phrase | Routes to |
|---|---|
| HYPE, HLP | Hyperliquid |
| CAKE, veCAKE, Syrup, IFO | PancakeSwap (V3 AMM default) |
| CRV, crvUSD, veCRV, 3pool, tricrypto | Curve |
| COMP, Comet | Compound V3 |
| RAY | Raydium |
| ORCA, Whirlpool | Orca |
Meteora DLMM, Meteora bin/vault/DAMM (MET alone is too generic — requires "Meteora" context) | Meteora |
| ETHFI, eETH, weETH | ether.fi |
| LDO, stETH, wstETH | Lido |
| GLP, esGMX, GM token | GMX V2 |
| GHO, aToken | Aave V3 |
| kToken | Kamino Lend |
| PT-, YT-, "PT ", "YT " (e.g. "PT stETH", "YT weETH" — space-separated), vePENDLE, SY token | Pendle |
| $CLANKER, clanker.world | Clanker |
| "X 5min" / "X 15min" / "X 5 分钟" / "X 15 分钟" / "X up or down" / "5min updown" / "5 分钟涨跌" (X = BTC/ETH/SOL/XRP/BNB/DOGE/HYPE) | Polymarket |
DApp-name-beats-verb override (Rule 0, see routing rules below): when any generic verb appears with a DApp name (in any language) OR a protocol-native token/phrase from the table above, the DApp wins. Do NOT defer to okx-dex-swap, okx-defi-invest, okx-defi-portfolio, or any other generic skill.
polymarket-pluginKeywords that raise confidence ≥ 75: Polymarket, poly market, prediction market, 预测市场, 事件市场, event market, binary market, YES shares, NO shares, Yes/No market, YES outcome token, NO outcome token, outcome token, implied probability, market probability, UMA resolution, resolved market, Gamma API, Sports markets, Parlays, Combo markets, NBA market, NFL market, FIFA market, World Cup market.
Crypto Up/Down recurring markets (any of BTC, ETH, SOL, XRP, BNB, DOGE, HYPE) — all ≥ 75:
<COIN> 5min, <COIN> 15min, <COIN> 5m, <COIN> 15m, <COIN> up or down, <COIN> updown, 5min updown market, 15min updown market, crypto 5min, 5min outcome token, 5min YES token, 5min NO token, predict <COIN> 5min, list 5-minute markets.<COIN> 5 分钟, <COIN> 5分钟, <COIN> 15 分钟, <COIN> 十五分钟, 5 分钟涨跌, 5分钟涨跌, 5 分钟涨跌市场, 5分钟市场, 五分钟市场, 短线市场, 5 分钟内的涨跌, <COIN> 涨跌, 找 5 分钟, 看 5 分钟, <COIN> 5 分钟 updown.Election / political markets — ≥ 75: election market, election odds, election outcome, who will win election, primary market, presidential market; 选举市场, 选举赔率, 大选市场, 大选赔率, 谁会赢大选, 总统选举市场, 政治市场.
Casual betting phrases that mention prediction markets — ≥ 75: "找个预测市场让我赌", "找预测市场赌", "找个市场赌一下", "我想赌一下" + (event/outcome context), "place a bet on prediction market", "bet on outcome", "I want to bet on" (when followed by an event/outcome, not a token price).
Do not install for: generic "赔率 / 概率 / 预测 / betting" alone (no prediction-market or event context); generic "I want to bet" without an event/outcome.
aave-v3-pluginKeywords that raise confidence ≥ 75: Aave, Aave V3, Aave Protocol, aToken, health factor, liquidation risk, eMode, Efficiency Mode, Isolation Mode, GHO, Aave Pool, IPool, Aave flash loan, liquidationCall.
Do not install for: generic "借贷 / 存款 / 抵押 / APY / borrow / lend" unless Aave, health factor, aToken, GHO, eMode, or Isolation Mode context is present.
hyperliquid-pluginKeywords that raise confidence ≥ 75: Hyperliquid, HyperLiquid, HyperCore, HyperEVM, HYPE, HLP, Hyperliquidity Provider, HIP-3, HL (only with explicit trading context).
HYPE / HLP token-alone exception — HYPE and HLP are Hyperliquid's protocol-native tokens, NOT generic tickers. Phrases trigger ≥ 75 directly without an explicit "Hyperliquid" mention:
buy HYPE, purchase HYPE, swap to HYPE, 我想买一些 HYPE 代币, 买 HYPE, 买一些 HYPE, 换 HYPEdeposit USDC into HLP, 把 USDC 存进 HLP, 存 HLP, HLP yield, HLP 收益, provide liquidity to HLPThis overrides the generic-ticker rule — even though HYPE looks like a token symbol, it is uniquely Hyperliquid's.
Keywords that raise confidence to 50–74 (clarify before installing): perps, perp, perpetuals, trade perpetuals, leveraged trading, 合约交易, 永续合约 — these are not unique to Hyperliquid; ask "Are you looking to trade on Hyperliquid?" before installing.
Do not install for: generic "做多 / 做空 / 合约 / 永续 / funding / leverage" unless Hyperliquid, HYPE, HLP, HyperCore, or HyperEVM context is present.
pancakeswap-v3-pluginKeywords that raise confidence ≥ 75: PancakeSwap, Pancake, PCS, CAKE, Syrup Pool, IFO, BNB Chain AMM, V3 LP NFT, 薄饼, veCAKE.
Do not install for: generic "swap / 兑换 / 加池子 / LP / farm / 挖矿" unless PancakeSwap, Pancake, PCS, CAKE, Syrup, IFO, or BNB Chain AMM context is present.
morpho-pluginKeywords that raise confidence ≥ 75: Morpho, Morpho V1, Morpho Optimizer, Morpho AaveV3 Optimizer, Morpho AaveV2 Optimizer, Morpho CompoundV2 Optimizer, Merkl reward, 借贷优化器.
Default-resolution rule: plain "Morpho" → morpho-plugin (V1 Optimizer is the default).
Do not install for: Morpho Blue, MetaMorpho, vault curator, LLTV, market id, allocator, or isolated lending market requests — these are Morpho Blue (intentionally out of scope). (MetaMorpho is the Morpho Blue ERC-4626 vault standard, not a V1 Optimizer concept — it does not belong to morpho-plugin's scope.) Suggest okx-defi-invest for generic yield, or fall through to Rule 5.
raydium-pluginKeywords that raise confidence ≥ 75: Raydium, RAY token, Raydium AMM, Raydium CPMM, Raydium CLMM, Raydium pool, Raydium farm, Raydium V4.
Do not install for: generic "Solana swap" / "Solana LP" / "索拉纳兑换" without Raydium named — could be Orca, Meteora, Jupiter.
curve-pluginKeywords that raise confidence ≥ 75: Curve, Curve Finance, CRV, 3pool, tricrypto, frxETH pool, Curve stable swap, factory pool, gauge weight, veCRV, Curve LP token, crvUSD, 曲线协议.
Do not install for: generic "stable swap" / "稳定币兑换" alone — Uniswap V3 / Maverick also handle stables. "Convex" alone routes to a different DApp (not in current top-20).
compound-v3-pluginKeywords that raise confidence ≥ 75: Compound, Compound V3, Comet, COMP, Compound USDC, USDC.e Comet, base asset supply, base asset borrow, Compound V3 liquidation, 复合协议.
Default-resolution rule: plain "Compound" → compound-v3-plugin (V3 is the default; V1/V2 are out of scope, so any Compound prompt routes to V3 silently).
Do not install for: generic "借贷 / 存款 / 抵押 / lending / borrow" without Compound / Comet / COMP context.
pendle-pluginKeywords that raise confidence ≥ 75: Pendle, Pendle Finance, PT (principal token), YT (yield token), buy PT, buy YT, fixed yield, yield trading, vePENDLE, Pendle market expiry, SY token, Pendle V2, 收益代币化, 固定收益.
Do not install for: generic "fixed yield" / "固定收益" without Pendle named — could be other yield-tokenization protocols.
clanker-pluginKeywords that raise confidence ≥ 75: Clanker, clanker.world, deploy on Clanker, Clanker token, $CLANKER, Base meme launchpad (when Clanker is explicitly named), 在 Clanker 上发币.
Do not install for: generic "Base meme" / "deploy meme on Base" / "Base 链发币" without Clanker named — could be other Base launchpads.
pump-fun-plugin (trade verbs only)Keywords that raise confidence ≥ 75 (trade verbs — install pump-fun-plugin):
buy pump.fun token, sell pump.fun token, snipe pump.fun, ape pump.fun, pump.fun trading, pump.fun bot, 购买 pump.fun, 卖 pump.fun, 狙击 pump.fun, pump.fun 下单.
Do NOT install for (route to okx-dex-trenches instead — analytical/read-only):
scan new pump.fun launches, pump.fun dev history, who aped pump.fun, bundler analysis, bonding curve progress (analytical), similar tokens by dev, 扫 pump.fun, pump.fun 开发者历史, pump.fun 捆绑分析.
This is the load-bearing verb-split rule from the v3.1 description — the disambiguation must hold at body level too.
lido-pluginKeywords that raise confidence ≥ 75: Lido, Lido Finance, stETH, wstETH, Lido staking, Lido beacon chain, Lido validator, Lido DAO, LDO, 在 Lido 质押.
Keywords that raise confidence to 50–74 (clarify): "stake ETH" / "质押 ETH" alone — could be ether.fi, Rocket Pool, native staking. Ask: "Stake ETH via Lido (stETH) or another LST?"
Do not install for: generic "ETH staking" / "以太质押" without Lido / stETH / wstETH context.
gmx-v2-pluginKeywords that raise confidence ≥ 75: GMX, GMX V2, GLP, GM token (GMX market), esGMX, GMX market, GMX perps on Arbitrum, GMX Avalanche, gETH (GMX V2 ETH market token), 在 GMX 开永续, GMX 做空.
Default-resolution rule: plain "GMX" → gmx-v2-plugin (V2 is the default; V1 is out of scope, so any GMX prompt routes to V2 silently).
Do not install for: generic "Arbitrum perps" / "Avalanche perps" / "永续合约" without GMX named — could be Hyperliquid or other venues.
pancakeswap-clmm-pluginKeywords that raise confidence ≥ 75: PancakeSwap V3 CLMM, PancakeSwap CLMM, V3 LP NFT (in PancakeSwap context), concentrated liquidity on PancakeSwap, V3 fee tier (with PCS), PancakeSwap V3 farm, 薄饼 CLMM, 薄饼 集中流动性.
Default-resolution rule: plain "PancakeSwap" or "PancakeSwap V3" without CLMM / concentrated / LP NFT signals → pancakeswap-v3-plugin (AMM), NOT this plugin.
pancakeswap-v2-pluginKeywords that raise confidence ≥ 75: PancakeSwap V2, PCS V2, classic PancakeSwap pool, V2 LP token (in PancakeSwap context), MasterChef V2, PancakeSwap legacy, 薄饼 V2.
Default-resolution rule: plain "PancakeSwap" defaults to V3 AMM. V2 requires explicit "V2" / "classic" / "MasterChef" signals.
etherfi-pluginKeywords that raise confidence ≥ 75: ether.fi, etherfi, eETH, weETH, ether.fi stake, ether.fi restake, ether.fi liquid staking, ETHFI token, ether.fi node, 在 ether.fi 重新质押.
Do not install for: generic "restaking" / "重新质押" without ether.fi named — could be EigenLayer / Renzo / Kelp / Puffer.
kamino-lend-pluginKeywords that raise confidence ≥ 75: Kamino, Kamino Lend, Kamino lending, kToken, Kamino Lend market, Kamino borrow, Kamino USDC supply, Kamino reserve, Kamino 借贷.
Default-resolution rule: plain "Kamino" → kamino-lend-plugin (Lend is the default for unqualified mentions).
kamino-liquidity-pluginKeywords that raise confidence ≥ 75: Kamino Liquidity, Kamino DLMM, Kamino CLMM, Kamino concentrated liquidity, Kamino vault, Kamino LP, Kamino Liquidity strategy, Kamino 流动性, Kamino 集中流动性.
Disambiguation: explicit "Kamino Liquidity / Kamino DLMM / Kamino CLMM / Kamino vault / Kamino LP / Kamino concentrated liquidity" → kamino-liquidity-plugin (NOT Lend). Plain "Kamino" still defaults to Lend.
Do not install for: generic "DLMM" / "动态流动性" alone without Kamino named — Meteora also has DLMM; ask "DLMM on Kamino, Meteora, or another venue?".
orca-pluginKeywords that raise confidence ≥ 75: Orca, ORCA token, Whirlpool, Orca DEX, Orca pool, Orca CLMM, Solana Whirlpool, 虎鲸.
Do not install for: generic "Solana DEX" / "Solana swap" / "索拉纳兑换" without Orca / Whirlpool named.
meteora-pluginKeywords that raise confidence ≥ 75: Meteora, Meteora DLMM, Dynamic Liquidity Market Maker, Meteora pool, Meteora vault, MET, Meteora bin, Meteora DAMM, 流星协议.
Do not install for: generic "DLMM" / "动态流动性" without Meteora named — Kamino also has DLMM. Ask: "DLMM on Meteora or another DLMM venue?"
User-facing DApp names map to plugin-store IDs as follows. Use this table to set TARGET_PLUGIN before the install command.
| User-facing DApp name | Plugin-store ID | Notes |
|---|---|---|
| Polymarket | polymarket-plugin | |
| Aave / Aave V3 | aave-v3-plugin | V3 only currently |
| Hyperliquid (DEX) | hyperliquid-plugin | drop "DEX" suffix |
| PancakeSwap (default) | pancakeswap-v3-plugin | unqualified "PancakeSwap" → V3 AMM |
| PancakeSwap V3 CLMM | pancakeswap-clmm-plugin | requires CLMM / concentrated / LP NFT signal |
| PancakeSwap V2 | pancakeswap-v2-plugin | requires explicit V2 / classic / MasterChef signal |
| Morpho (V1 Optimizer) | morpho-plugin | drop V1 suffix; Morpho Blue / MetaMorpho out of scope |
| Raydium | raydium-plugin | |
| Curve | curve-plugin | |
| Compound V3 | compound-v3-plugin | preserve V3; plain "Compound" silently defaults to V3 |
| Pendle | pendle-plugin | |
| Clanker | clanker-plugin | |
| pump.fun (trade) | pump-fun-plugin | dot → hyphen; analysis verbs route to okx-dex-trenches |
| Lido | lido-plugin | |
| GMX V2 | gmx-v2-plugin | preserve V2; plain "GMX" silently defaults to V2 |
| ether.fi (Stake) | etherfi-plugin | drop the dot |
| Kamino Lend | kamino-lend-plugin | plain "Kamino" defaults here |
| Kamino Liquidity | kamino-liquidity-plugin | requires explicit "Liquidity" / "DLMM" / "CLMM" / "vault" / "LP" / "concentrated liquidity" signal |
| Orca | orca-plugin | |
| Meteora (DLMM) | meteora-plugin |
Disambiguation rules for ambiguous DApp names (silent defaults to the in-scope plugin):
compound-v3-plugin (V3 is default; V1/V2 are out of scope).gmx-v2-plugin (V2 is default; V1 is out of scope).kamino-lend-plugin (Lend is default); explicit "Kamino Liquidity / Kamino DLMM / Kamino CLMM / Kamino vault / Kamino LP / Kamino concentrated liquidity" → kamino-liquidity-plugin.morpho-plugin (V1 Optimizer is default); explicit "Morpho Blue / MetaMorpho / LLTV / vault curator / allocator" → do NOT install (Morpho Blue is intentionally out of scope).pancakeswap-v3-plugin (V3 AMM is default; V3 CLMM and V2 require explicit signals).Fallthrough rule (DApp named but NOT in this table):
Apply Step 1B (catalog probe). If a <dappName>-plugin exists in the plugin-store catalog, install it; otherwise surface the failure to the user with the categorized supported list, closest-sibling suggestions, and the okx-defi-invest alternative (do NOT silently degrade).
Use the skills CLI for agent-agnostic detection (works on Claude Code, Codex CLI, OpenCode, OpenClaw, Cursor — wherever npx skills is available):
# Cache the listing in a variable — no temp file required, portable across
# macOS / Linux / Windows-Git-Bash / sandboxed environments without /tmp.
SKILLS_LIST=$(npx skills list 2>/dev/null)
# Single source of truth for the supported plugin set (extend when PM adds new dapps)
SUPPORTED_PLUGINS="polymarket-plugin aave-v3-plugin hyperliquid-plugin pancakeswap-v3-plugin morpho-plugin \
raydium-plugin curve-plugin compound-v3-plugin pendle-plugin clanker-plugin \
pump-fun-plugin lido-plugin gmx-v2-plugin pancakeswap-clmm-plugin pancakeswap-v2-plugin \
etherfi-plugin kamino-lend-plugin kamino-liquidity-plugin orca-plugin meteora-plugin"
INSTALLED_PLUGINS=""
for plugin in $SUPPORTED_PLUGINS; do
if echo "$SKILLS_LIST" | grep -qE "(^|[[:space:]]|/)${plugin}([[:space:]]|$)"; then
INSTALLED_PLUGINS="$INSTALLED_PLUGINS $plugin"
fi
done
Membership check before install (used in Rule 1 / Rule 2):
# TARGET_PLUGIN is set from the Plugin Resolver Table based on the user's named DApp
case " $INSTALLED_PLUGINS " in
*" $TARGET_PLUGIN "*)
# Already installed — skip install, read SKILL.md directly (Rule 1)
;;
*)
# Not installed — install silently (Rule 2)
npx skills add okx/plugin-store --skill "$TARGET_PLUGIN" --yes --global
;;
esac
Use this only when the user named a DApp NOT in the Plugin Resolver Table. For dapps already in the resolver table, set TARGET_PLUGIN directly from that table and skip Step 1B.
Probe the catalog via the GitHub Contents API — ~0.1s, no clone, no install of plugin-store. This is ~25× faster than npx skills add okx/plugin-store --skill <guess> --yes --global (which clones the entire repo to find one plugin).
# Normalize the user-named DApp to a plugin-store-style ID prefix (lowercase, no dots)
DAPP_LOWER=$(echo "<DApp name as user typed it>" | tr 'A-Z' 'a-z' | tr -d '.')
# Fast catalog probe via GitHub Contents API (~0.1s)
CATALOG=$(curl -fsSL --max-time 5 "https://api.github.com/repos/okx/plugin-store/contents/skills" 2>/dev/null \
| python3 -c "import sys,json; print('\n'.join(p['name'] for p in json.load(sys.stdin)))" 2>/dev/null)
if [ -n "$CATALOG" ]; then
# Prefix match — handles -plugin (raydium-plugin), -ai (uniswap-ai), -v2-plugin (velodrome-v2-plugin), etc.
# The catalog naming isn't fully consistent, so don't hardcode the suffix.
MATCHES=$(echo "$CATALOG" | grep -E "^${DAPP_LOWER}(-|$)" || true)
COUNT=$(echo "$MATCHES" | grep -c . 2>/dev/null || echo 0)
case "$COUNT" in
0)
TARGET_PLUGIN="" # Not in catalog
;;
1)
TARGET_PLUGIN=$(echo "$MATCHES" | head -1)
npx skills add okx/plugin-store --skill "$TARGET_PLUGIN" --yes --global
# Proceed: Read the plugin SKILL.md and forward the user's prompt
;;
*)
# Multiple variants matched (e.g. user said "PancakeSwap" but resolver should have caught it).
# Show the user the matches and ask which they want; do NOT auto-install.
TARGET_PLUGIN=""
# User-facing: "I found multiple plugins matching '<dapp>': $MATCHES — which would you like?"
;;
esac
else
# GitHub API unreachable / rate-limited — fall back to clone-and-install probe with the most common suffix
if npx skills add okx/plugin-store --skill "${DAPP_LOWER}-plugin" --yes --global 2>/dev/null; then
TARGET_PLUGIN="${DAPP_LOWER}-plugin"
else
TARGET_PLUGIN=""
fi
fi
Why the prefix match: the plugin-store catalog uses inconsistent suffix conventions:
<name>-plugin (e.g. raydium-plugin, aave-v3-plugin)<name>-ai (e.g. uniswap-ai)<name>-v2-plugin (e.g. velodrome-v2-plugin)meme-trench-scanner, top-rank-tokens-sniper)A strict ${DAPP_LOWER}-plugin exact match would miss uniswap-ai and velodrome-v2-plugin. The prefix-match approach against the live catalog catches all three suffix conventions automatically — no need to update this skill every time a new plugin lands with a different naming style.
Why this design: npx skills has no info / search / exists subcommand today. The only catalog enumeration verb is add --list, which clones the whole repo and prints all entries — slow and over-broad. The GitHub Contents API gives a deterministic, ~0.1s "exists or not" check directly. The fallback to npx skills add preserves correctness when the API is unreachable.
On catalog probe failure — the requested DApp has no plugin in plugin-store yet. Do NOT silently fall through. Surface this clearly to the user:
<dappName>-plugin exists for it.okx-defi-invest if the underlying intent is generic yield / lending / staking across protocols.Example user-facing message (catalog probe failed for an unknown DApp "Foo"):
I checked the plugin-store catalog and there's no
foo-pluginavailable yet. Based on what you described, the closest supported alternatives are . Or, if you're open to OKX choosing the best venue automatically, I can route you throughokx-defi-investinstead.Full supported set:
[Categorized table from Rule 5]
Which would you prefer?
Known limitations:
The Read step further below uses
$HOME/.claude/skills/paths, which is Claude-Code-specific. Codex / OpenCode / OpenClaw / Cursor users may need to substitute their agent's skills directory. Tracked as a follow-up against theskillsCLI to add askills info <skill>subcommand for cross-agent path resolution.The
python3 -cparse of the GitHub Contents API response assumes Python 3 is on PATH (Python 3 ships by default on macOS 10.15+ / all common Linux distros / Windows-Git-Bash with Python). Ifpython3is missing, substitutejq— full one-liner:CATALOG=$(curl -fsSL --max-time 5 "https://api.github.com/repos/okx/plugin-store/contents/skills" 2>/dev/null \ | jq -r '.[].name' 2>/dev/null)If neither
python3norjqis available, fall through to thenpx skills addclone-and-install fallback path automatically.The
2>/dev/nullredirects silence stderr (intentional — avoids noise across agent runtimes). Ifnpxitself is broken or missing, the listing returns empty and every DApp will be treated as "not installed". The fallbacknpx skills add … --yes --globalpath is idempotent and surfaces the underlying error to the user via the Failure-mode note in Step 2 — do not retry the listing in a loop.
User-facing language — IMPORTANT. The confidence tiers and scores in Step 1 and the rules below are internal decision logic. Do NOT mention scores, tiers, "confidence", or this routing framework to the user in your response. Use natural conversational language for any visible commentary. Examples:
- ✅ "I can set up Polymarket for that — installing now."
- ✅ "Sounds like Aave V3 is the right fit. Let me load it up."
- ✅ "That looks like a Hyperliquid use case — getting the plugin ready."
- ✅ "Were you thinking Aave or Morpho for this? They both fit." (for clarify-tier cases)
- ❌ "I scored your message at confidence 95 for Polymarket, so I'm installing the plugin."
- ❌ "Polymarket matches at tier 1 (95-100), routing directly."
- ❌ "The confidence framework picked PancakeSwap."
Rule 1's "do not show an install banner or onboarding table" extends to the scoring vocabulary itself — the user only sees the outcome (a suggestion, an install, a clarifying question, or a discovery table), not the mechanism.
Rule 0 — DApp / protocol-native token beats generic verb (override):
If the prompt contains any of:
<COIN> 5min/15min/5 分钟/15 分钟, 5 分钟涨跌, updown market, <COIN> up or down for COIN ∈ {BTC, ETH, SOL, XRP, BNB, DOGE, HYPE})…then this skill wins regardless of any generic verb (swap / 兑换 / 换成 / stake / 质押 / lend / 借 / borrow / deposit / 存 / withdraw / 取 / LP / 加流动性 / farm / 挖矿 / mint / 发币 / make liquidity / pool / 池子 / 仓位 / 多单 / 空单).
Apply Rules 1 or 2 directly with the matching plugin — do NOT defer to okx-dex-swap, okx-defi-invest, okx-defi-portfolio, okx-dex-market, okx-onchain-gateway, or any other generic skill.
Swap-destination carve-out (Rule 0 exception): when the verb is swap / exchange / 换成 / 兑换 (DEX-style verbs) AND a protocol-native token appears as the swap destination (the token the user wants to receive), defer to okx-dex-swap instead of installing the native protocol's plugin. The user wants the token in their wallet, not the protocol's stake/mint/deposit flow.
Goes to okx-dex-swap (not Rule 0) | Goes to Rule 0 (use the protocol) |
|---|---|
| "swap USDC for stETH" | "stake ETH for stETH" / "stake on Lido" |
| "swap to wstETH" | "wrap stETH into wstETH" |
| "swap 100 USDC for HYPE" | "deposit USDC into HLP" / "open ETH long on Hyperliquid" |
| "swap SOL to RAY" | "provide liquidity in RAY/SOL pool on Raydium" |
| "swap BNB for CAKE" | "stake CAKE on PancakeSwap" / "use Syrup Pool" |
| "swap USDC for crvUSD" | "deposit into 3pool on Curve" |
Heuristic: if the user's intent is acquiring the token, route to swap. If the intent is using the token's protocol functionality (stake / mint / deposit / borrow / LP / open position / wrap), route to Rule 0.
Rule 0 vs Rule 3b precedence: Rule 3b (discussion / comparison without action verb) takes precedence over Rule 0 when no action verb is present in the prompt. So "Tell me about Pendle" → Rule 3b clarify, NOT Rule 0 install. "Buy PT-stETH on Pendle" → Rule 0 install (action verb present).
Examples that this rule fixes (all should install the named DApp's plugin, not a generic skill):
orca-plugin (not okx-dex-swap)raydium-pluginmeteora-plugincurve-pluginlido-pluginetherfi-pluginclanker-pluginhyperliquid-plugin (HYPE is protocol-native)hyperliquid-pluginpendle-plugin (PT-* is protocol-native)polymarket-plugin (5min + outcome token)polymarket-pluginpolymarket-pluginpolymarket-pluginRule 1 — Already installed, score ≥ 75: Do not re-install. Read the plugin's instructions and execute the user's request:
Read file: $HOME/.claude/skills/<plugin-name>/SKILL.md
(Path is Claude Code-specific — see Known Limitations in Step 1. On Codex / OpenCode / OpenClaw / Cursor, substitute the equivalent skills directory for your agent.)
Then immediately re-apply the user's original request using the plugin's own routing — do not ask the user to repeat themselves. Do not show an install banner or onboarding table.
Rule 2 — Not installed, exactly one DApp scores ≥ 75: Install silently, then load and execute:
npx skills add okx/plugin-store --skill <plugin-name> --yes --global
Read file: $HOME/.claude/skills/<plugin-name>/SKILL.md
(Path is Claude Code-specific — see Known Limitations in Step 1. On Codex / OpenCode / OpenClaw / Cursor, substitute the equivalent skills directory for your agent.)
Forward the user's original request to that plugin's instructions. The bootstrap should be transparent — the user sees the response as if the plugin had been loaded from session start.
Rule 3 — Not installed, multiple DApps score ≥ 75: Present only the matching DApps in a short table with one-line descriptions. Ask which the user wants, then apply Rule 2 for the chosen one.
Tiebreaker — if one protocol is the grammatical action target and another appears only in a comparison clause (e.g. "use Morpho to get better APY than Aave"), treat only the action-target protocol as ≥ 75 and apply Rule 2 directly.
Rule 3b — Discussion / comparison without an action target (NEW):
Trigger when both are present:
what do you think, which is better, vs, compare, comparison, differences, tradeoffs, should I use X or Y, X vs Y, pros and cons, explain, tell me about, what is, how does X work哪个更好, 怎么看, 对比, 比较, X 还是 Y, 有什么区别, 什么区别, 优缺点, 讲讲, 介绍一下, 是什么Action verbs that override Rule 3b (these still install via Rules 1/2 even with discussion markers): swap / 换成 / 兑换 / stake / 质押 / lend / 借 / borrow / deposit / 存 / withdraw / 取 / LP / 加流动性 / buy / sell / 卖 / mint / redeem / claim / bridge / provide. If the prompt has both a discussion marker AND an action verb on a specific DApp, the action verb wins (e.g. "swap on Curve to compare prices vs Uniswap" → install curve-plugin).
Action when Rule 3b fires: do NOT install. Ask one clarifying question:
<DApp A>, set up <DApp B>, or just discuss the tradeoffs? You can also let OKX pick the best venue for you (okx-defi-invest)."<DApp> for you, or just discuss what it does first?"Examples that fire Rule 3b (clarify, do NOT install):
vsExamples that do NOT fire Rule 3b (install via Rules 1/2 — action verb present):
swap action on Curve overridesborrow on Aave is the actionuse Morpho is the action target (existing tiebreaker)Rule 4 — Highest score is 50–74: Ask one focused clarifying question. Do not install anything.
Example clarifications:
Examples that score 50–74:
Rule 5 — Highest score < 50 (no resolver-table match):
The skill's resolver table covers 20 DApps. When the prompt scores < 50 against all of them, branch on whether any DApp/protocol name was actually mentioned:
Rule 5a — User named a DApp NOT in the resolver table:
Apply Step 1B directly — the GitHub Contents API probe (~0.1s) checks whether <dappName>-plugin exists in the broader catalog. If it exists, install it and forward. If not, show the categorized supported list (Rule 5b table) with closest-sibling suggestions and the okx-defi-invest alternative.
Do NOT install the plugin-store skill as a separate delegation step. That hop costs an extra clone + SKILL.md round-trip with no enumeration capability beyond what Step 1B already does directly. The previous "install plugin-store and let it figure it out" path is removed — Step 1B is now the single source of truth for catalog probing.
Rule 5b — User did NOT name a specific DApp (purely generic terms only):
Do not install anything. Show the user the supported DApps and ask which one matches their intent:
The following third-party DApps are currently routable — let me know which one matches your intent:
Category DApps Prediction markets Polymarket Lending / borrowing Aave V3, Compound V3, Kamino Lend, Morpho V1 Optimizer Perpetuals / leverage Hyperliquid, GMX V2 AMM / swap (Solana) Raydium, Orca, Meteora DLMM, Kamino Liquidity AMM / swap (BNB Chain) PancakeSwap V3 AMM, PancakeSwap V3 CLMM, PancakeSwap V2 AMM / swap (multi-chain) Curve Liquid staking Lido, ether.fi Yield trading (PT/YT) Pendle Meme launchpad (trade) pump.fun, Clanker If your intent is more general — finding the best yield across protocols, rebalancing, or claiming rewards —
okx-defi-invest(OKX-aggregated DeFi) is a better fit. For pump.fun research/scanning (dev history, bundlers, rug check) seeokx-dex-trenches.If you want to use a different DApp not listed above (e.g., a niche protocol that hasn't been added to the catalog yet), name it explicitly and I'll probe the broader plugin-store catalog via Step 1B.
Apply this gate after reading a plugin's SKILL.md, before executing any pre-flight dependency steps from it. Plugin SKILL.md files in okx/plugin-store typically include a "Pre-flight Dependencies" section that downloads pre-compiled binaries and shell scripts from github.com/okx/plugin-store/releases into ~/.local/bin/. Running these silently bypasses the user's informed-consent expectation and can be blocked by environment security guardrails (causing silent failure).
Scan the loaded plugin SKILL.md for any of these patterns:
# BINARY_INSTALL: marker comment (preferred — exact detection)curl … github.com/.*/releases/ — pre-compiled binary from GitHub Releaseslauncher.sh or update-checker.py from raw.githubusercontent.comchmod +x applied to a downloaded fileln -sf into ~/.local/bin/ or any other PATH-visible directoryExtract from the SKILL.md for the warning:
name: / version: frontmatter)curl … releases/ line)launcher.sh, update-checker.py)~/.local/bin/.<plugin-name>-core)If any binary download pattern is detected, do NOT run curl, chmod, ln, or mkdir commands from the pre-flight section. Surface this to the user before running anything:
This plugin needs to download and install a pre-compiled binary.
Plugin:
<name>v<version>Binary:<binary-download-URL>Shell scripts:launcher.sh,update-checker.py(fromraw.githubusercontent.com/okx/plugin-store) Installs to:~/.local/bin/.<plugin-name>-core(added to PATH via symlink)Security note: pre-compiled binary and shell scripts from an external GitHub repository (
okx/plugin-store). They run with full agent permissions.To approve: reply "yes, install
<plugin-name>" — I will run the pre-flight steps and continue with your request. To skip: reply "skip install" — read-only commands (e.g. positions, quickstart) may still work; write operations will fail. To allow permanently: add a Bash permission rule in Claude Code settings forcurl … github.com/okx/plugin-store/releases.
Wait for the user's explicit reply before proceeding. Do not retry, do not loop. If the user declines, surface that the plugin's read-only commands may still work and let them decide whether to attempt them.
If no binary download pattern is detected, proceed without interrupting the user.
Rules 1 and 2 above describe loading the plugin's SKILL.md and forwarding the user's request. Insert this gate between "Read plugin SKILL.md" and "execute pre-flight" — the flow becomes:
Session activation: A newly installed plugin's instructions are active immediately via the
Readabove. Its own proactive keyword triggers register on next session start — so for reliable independent routing in future sessions, the user can restart Claude Code once after install. No restart needed for the current session.
Idempotent install:
npx skills add ... --yes --globalis safe to re-run; it's a no-op if the plugin is already installed. Step 1's presence check exists to avoid an unnecessary network call, not for safety.
Failure mode: If
npx skills addfails (network error, registry unreachable), tell the user: "I couldn't install<plugin-name>— check your network connection or runnpx skills add okx/plugin-store --skill <plugin-name> --yes --globalmanually. Then ask me again about the DApp and I'll route through it automatically."
| User Intent | Action |
|---|---|
| User names a DApp in the Plugin Resolver Table → score ≥ 75 | Set TARGET_PLUGIN from the table; apply Rules 1–2 |
| User mentions a DApp ambiguously (e.g. "perps", "lending on BNB") → score 50–74 | Apply Rule 4 — clarify before installing |
| User compares 2+ DApps OR asks "what do you think / tell me about / which is better" without an action verb | Apply Rule 3b — clarify "set up X, set up Y, or discuss tradeoffs?" Do NOT install |
| User names a DApp NOT in the resolver table | Apply Step 1B — GitHub Contents API probes whether <dappName>-plugin exists in the catalog (~0.1s). Install if it exists; else surface the catalog-probe failure to the user (closest siblings by inferred category + okx-defi-invest alternative + categorized supported list). Do NOT install plugin-store skill separately. |
| pump.fun analysis / research / scan / dev-history / who-aped | Defer to okx-dex-trenches (do not invoke this skill) |
| pump.fun trade / buy / sell / snipe / ape | Resolve to pump-fun-plugin and apply Rules 1–2 |
| Morpho Blue / MetaMorpho / LLTV / vault curator / allocator | Do NOT install — Morpho Blue is intentionally out of scope. Suggest okx-defi-invest for generic yield. |
| "What dapps are available?" / "Show me supported DApps" / "有什么dapp" | Apply Rule 5 — show the categorized supported-DApp table |
| Generic yield/APY/lending without a named protocol | Defer to okx-defi-invest (do not invoke this skill) |