okx/onchainos-skills/okx-defi
Claude Code and agent skill by okx/onchainos-skills
- community
Checking that the SKILL.md file is still in the repository.
Discover and manage OKX-aggregated DeFi products and positions across protocols and chains. Use for generic or venue-agnostic yield, APY, or TVL discovery and history; DeFi deposits, staking, liquidity, withdrawals, rewards, lending, CLMM analysis; and DeFi portfolio or position views. Requests targeting a named protocol belong to DApp discovery. Triggers include earn yield, best APY, DeFi product, APY/TVL history, deposit, stake, withdraw, redeem, provide or remove liquidity, claim rewards, bo…
Install
npx vskill@latest install okx/onchainos-skills/okx-defiSKILL.md
OKX DeFi
Discover and manage multi-chain, OKX-aggregated DeFi products and positions through the onchainos defi CLI group.
Preflight
Preflight checks: At the start of each thread, complete the checks in ../okx-agentic-wallet/_shared/preflight.md. If missing, read _shared/preflight.md.
Intent Routing
Load only the reference files required by the selected route.
| User Intent | Reference | |
|---|---|---|
| Discover / search DeFi products, find best APY | invest.md | |
| Product detail (APY, TVL, accepted tokens) | invest.md | |
| Deposit / stake / provide liquidity | invest.md | |
| Withdraw / redeem a position (full or partial) | invest.md | |
| Claim rewards (platform / investment / V3 fee / bonus / unlocked principal) | invest.md | |
| APY history, TVL history, V3 depth / price charts | invest.md | |
| View DeFi positions / holdings overview | portfolio.md | |
| Per-protocol position detail | portfolio.md | |
| Exact parameters / return schemas — invest, shared support, and charts commands | invest-cli-reference.md | |
| Exact parameters / return schemas — positions commands | portfolio-cli-reference.md | |
| Errors / failed deposits / expired calldata | invest-troubleshooting.md | |
| Errors / empty positions / address-format issues | portfolio-troubleshooting.md |
Typical flow spans both: view positions (Portfolio) → redeem or claim (Invest). Read both reference files when the request chains them.
Route a named third-party DApp request—including protocol-specific APY, TVL, volume, history, or timeframe analysis—to okx-dapp-discovery. Generic cross-protocol yield/APY/TVL and V3-liquidity analysis stays here. Route token search/price/chart requests to okx-dex-market, and spot swaps, wallet balances, login, contract calls, or transaction broadcasts to okx-agentic-wallet.
Chain Name Support
The CLI resolves chain names automatically (for example, ethereum → 1, bsc → 56, solana → 501). Use the Chain Support table in portfolio.md for the DeFi-specific aliases.
Security
Address Resolution
When the user does NOT provide a wallet address, resolve it automatically from the Agentic Wallet before running any defi command:
Rules:
- 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 --allto get all account IDs, thenwallet switch <id>+wallet addressesfor 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
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 passtron; TON address → only passton - 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 positionsuses--chains(plural, comma-separated);defi position-detailuses--chain(singular)- Before reporting completion, verify the selected command succeeded, apply the output format and safety checks from its routed reference, and report any partial or failed on-chain step explicitly.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/okx-defi/SKILL.md
Popularity
- Repository stars
- 331
- Repository forks
- 72
- 7-day trend score
- 29
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/okx/onchainos-skills/okx-defi)