/okx-defi
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,
$ npx -y skills add okx/onchainos-skills --skill okx-defi --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/okx-defi
Context preview
The summary Claude sees to decide when to auto-load this skill.
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,
SKILL.md
okx-defi.SKILL.mdname: okx-defi
description: "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)."
license: MIT
metadata:
author: okx
version: "4.4.10"
homepage: "https://web3.okx.com"
OKX DeFi (experimental merge of okx-defi-invest + okx-defi-portfolio)
Multi-chain, OKX-aggregated DeFi in two capabilities behind one skill. Both wrap the same `onchainos defi` CLI command group.
Pre-flight Checks
> Read `../okx-agentic-wallet/_shared/preflight.md`. If that file does not exist, read `_shared/preflight.md` instead.
Intent Routing
| User Intent | Reference | |---|---| | Discover / search DeFi products, find best APY | [invest.md](references/invest.md) | | Product detail (APY, TVL, accepted tokens) | [invest.md](references/invest.md) | | Deposit / stake / provide liquidity | [invest.md](references/invest.md) | | Withdraw / redeem a position (full or partial) | [invest.md](references/invest.md) | | Claim rewards (platform / investment / V3 fee / bonus / unlocked principal) | [invest.md](references/invest.md) | | APY history, TVL history, V3 depth / price charts | [invest.md](references/invest.md) | | View DeFi positions / holdings overview (持仓) | [portfolio.md](references/portfolio.md) | | Per-protocol position detail (持仓详情) | [portfolio.md](references/portfolio.md) | | Exact parameters / return schemas — invest & charts commands | [invest-cli-reference.md](references/invest-cli-reference.md) | | Exact parameters / return schemas — positions commands | [portfolio-cli-reference.md](references/portfolio-cli-reference.md) | | Errors / failed deposits / expired calldata | [invest-troubleshooting.md](references/invest-troubleshooting.md) | | Errors / empty positions / address-format issues | [portfolio-troubleshooting.md](references/portfolio-troubleshooting.md) |
Typical flow spans both: view positions (Portfolio) → redeem or claim (Invest). Read both reference files when the request chains them.
Skill Routing
- For DApp-named investing/lending/staking/positions ("on Aave", "my Hyperliquid balance") → use `okx-dapp-discovery`
- For token price/chart or token search by name/contract → use `okx-dex-market`
- For DEX spot swap execution → use `okx-agentic-wallet`
- For wallet token balances → use `okx-agentic-wallet`
- For broadcasting signed transactions → use `okx-agentic-wallet`
- For Agentic Wallet login, balance, contract-call → use `okx-agentic-wallet`
Chain Support
CLI resolves chain names automatically (e.g. `ethereum` → `1`, `bsc` → `56`, `solana` → `501`). Full alias table: `references/portfolio.md` §Chain Support.
Step 0: Address Resolution (shared by both capabilities)
When the user does NOT provide a wallet address, resolve it automatically from the Agentic Wallet **before** running any defi command:
1. onchainos wallet status → check if logged in, get active account
2. onchainos wallet addresses → get addresses grouped by chain category:
- XLayer addresses
- EVM addresses (Ethereum, BSC, Polygon, etc.)
- Solana addresses
3. Match address to target chain:
- EVM chains → use EVM address
- Solana → use Solana address
- XLayer → use XLayer addressRules:
- If the user provides an explicit address, use it directly — skip this step
- If wallet is not logged in, ask the user to log in first (→ `okx-agentic-wallet`) or provide an address manually
- If the user says "check all accounts" or "all wallets", use `wallet balance --all` to get all account IDs, then `wallet switch <id>` + `wallet addresses` for each account
- Always confirm the resolved address with the user before proceeding if the account has multiple addresses of the same type
Address-Chain Compatibility (shared — CRITICAL)
The `--address` and chain parameters must be compatible. EVM addresses (`0x…`) can only query EVM chains; Solana addresses (base58) can only query `solana`. Never mix them — the API will return error 84019 (Address format error).
- `0x…` address → only pass EVM chains: `ethereum,bsc,polygon,arbitrum,base,xlayer,avalanche,optimism,fantom,linea,scroll,zksync`
- base58 address → only pass `solana`
- Sui address → only pass `sui`; Tron address (`T…`) → only pass `tron`; TON address → only pass `ton`
- If the user wants positions across both EVM and Solana, make **two separate calls** with the respective addresses
Global Notes
- The wallet address parameter for ALL defi commands is `--address`
- `defi positions` uses `--chains` (plural, comma-separated); `defi position-detail` uses `--chain` (singular)
- For CLI parameter details, see `references/invest-cli-reference.md` (invest & charts) and `references/portfolio-cli-reference.md` (positions)
Read more
name: okx-defi description: "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)." license: MIT metadata: author: okx version: "4.4.10" homepage: "https://web3.okx.com"
OKX DeFi (experimental merge of okx-defi-invest + okx-defi-portfolio)
Multi-chain, OKX-aggregated DeFi in two capabilities behind one skill. Both wrap the same `onchainos defi` CLI command group.
Pre-flight Checks
> Read `../okx-agentic-wallet/_shared/preflight.md`. If that file does not exist, read `_shared/preflight.md` instead.
Intent Routing
| User Intent | Reference | |---|---| | Discover / search DeFi products, find best APY | [invest.md](references/invest.md) | | Product detail (APY, TVL, accepted tokens) | [invest.md](references/invest.md) | | Deposit / stake / provide liquidity | [invest.md](references/invest.md) | | Withdraw / redeem a position (full or partial) | [invest.md](references/invest.md) | | Claim rewards (platform / investment / V3 fee / bonus / unlocked principal) | [invest.md](references/invest.md) | | APY history, TVL history, V3 depth / price charts | [invest.md](references/invest.md) | | View DeFi positions / holdings overview (持仓) | [portfolio.md](references/portfolio.md) | | Per-protocol position detail (持仓详情) | [portfolio.md](references/portfolio.md) | | Exact parameters / return schemas — invest & charts commands | [invest-cli-reference.md](references/invest-cli-reference.md) | | Exact parameters / return schemas — positions commands | [portfolio-cli-reference.md](references/portfolio-cli-reference.md) | | Errors / failed deposits / expired calldata | [invest-troubleshooting.md](references/invest-troubleshooting.md) | | Errors / empty positions / address-format issues | [portfolio-troubleshooting.md](references/portfolio-troubleshooting.md) |
Typical flow spans both: view positions (Portfolio) → redeem or claim (Invest). Read both reference files when the request chains them.
Skill Routing
- For DApp-named investing/lending/staking/positions ("on Aave", "my Hyperliquid balance") → use `okx-dapp-discovery`
- For token price/chart or token search by name/contract → use `okx-dex-market`
- For DEX spot swap execution → use `okx-agentic-wallet`
- For wallet token balances → use `okx-agentic-wallet`
- For broadcasting signed transactions → use `okx-agentic-wallet`
- For Agentic Wallet login, balance, contract-call → use `okx-agentic-wallet`
Chain Support
CLI resolves chain names automatically (e.g. `ethereum` → `1`, `bsc` → `56`, `solana` → `501`). Full alias table: `references/portfolio.md` §Chain Support.
Step 0: Address Resolution (shared by both capabilities)
When the user does NOT provide a wallet address, resolve it automatically from the Agentic Wallet **before** running any defi command:
1. onchainos wallet status → check if logged in, get active account
2. onchainos wallet addresses → get addresses grouped by chain category:
- XLayer addresses
- EVM addresses (Ethereum, BSC, Polygon, etc.)
- Solana addresses
3. Match address to target chain:
- EVM chains → use EVM address
- Solana → use Solana address
- XLayer → use XLayer addressRules:
- If the user provides an explicit address, use it directly — skip this step
- If wallet is not logged in, ask the user to log in first (→ `okx-agentic-wallet`) or provide an address manually
- If the user says "check all accounts" or "all wallets", use `wallet balance --all` to get all account IDs, then `wallet switch <id>` + `wallet addresses` for each account
- Always confirm the resolved address with the user before proceeding if the account has multiple addresses of the same type
Address-Chain Compatibility (shared — CRITICAL)
The `--address` and chain parameters must be compatible. EVM addresses (`0x…`) can only query EVM chains; Solana addresses (base58) can only query `solana`. Never mix them — the API will return error 84019 (Address format error).
- `0x…` address → only pass EVM chains: `ethereum,bsc,polygon,arbitrum,base,xlayer,avalanche,optimism,fantom,linea,scroll,zksync`
- base58 address → only pass `solana`
- Sui address → only pass `sui`; Tron address (`T…`) → only pass `tron`; TON address → only pass `ton`
- If the user wants positions across both EVM and Solana, make **two separate calls** with the respective addresses
Global Notes
- The wallet address parameter for ALL defi commands is `--address`
- `defi positions` uses `--chains` (plural, comma-separated); `defi position-detail` uses `--chain` (singular)
- For CLI parameter details, see `references/invest-cli-reference.md` (invest & charts) and `references/portfolio-cli-reference.md` (positions)
onchainos skills for AI coding assistants. Provides token search, market data, wallet balance queries, swap execution, transaction broadcasting, leaderboard rankings, token cluster analysis, and direct third-party DApp routing across 20+ blockchains.
Repo: okx/onchainos-skills
Other skills on onchainos-skills.
- /okx-activity
OKX.AI Trading Hackathon (交易黑客松 / OKX.AI 交易黑客松 / 报名黑客松 / 黑客马拉松) registration. Use when the user wants to register for / sign up for / enter / join / 报名 / 参加 / 参赛 the OKX.AI trading hackathon — e.g. 'Register me for the OKX.AI Trading Hackathon', '我要参加黑客松', '帮我报名 OKX.AI 的交易黑客松' —
Open skill - /okx-agent-payments-protocol
Use when an agent hits HTTP 402 / payment-required, or the user mentions x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Payment, permit2, upto, metered billing, a payment channel / voucher / session, channelId / channel_id, opening / closing
Open skill - /okx-agentic-wallet
OKX Agentic Wallet — the single skill for the user's wallet and on-chain execution. Use it whenever the user wants to operate their wallet or execute an on-chain action, including: login & accounts, balance / holdings, wallet address / deposit / receive, send / transfer,
Open skill - /okx-ai
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
Open skill - /okx-dapp-discovery
Plugin router for 20 third-party DeFi protocols (Polymarket, Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kamino, Orca, Meteora, Clanker, pump.fun, Uniswap) and their protocol-native tokens (HYPE, HLP, eETH, weETH, stETH, wstETH,
Open skill - /okx-dex-market
HARD BLOCK — never use for prediction-market/Polymarket UpDown queries; route to okx-dapp-discovery when a named DApp (Polymarket/Aave/Hyperliquid/PancakeSwap/Morpho) appears with a timeframe, or 涨跌/updown for BTC/ETH/SOL/XRP/BNB/DOGE/HYPE. Otherwise, read-only on-chain DEX
Open skill

