Skip to content
Skillpedia
Misc7.0k Β· #13663

okx-defi

What it does

This skill lets the agent search for DeFi yield products and manage deposits, withdrawals, and rewards through the onchainos defi commands. It is for crypto users who want a single entry point for DeFi that is not tied to one protocol.

When to use it

  • βœ“When you want to find DeFi products with the best yield for a token.
  • βœ“When you want to deposit, stake, withdraw, or claim rewards without naming a specific protocol.
  • βœ“When you want an overview of your DeFi holdings and positions.

Skill link

https://github.com/internet-court/internet-court-skill/blob/main/vendored/okx/okx-defi/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/internet-court/internet-court-skill/blob/main/vendored/okx/okx-defi/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œCan you find the best-yielding DeFi product for my USDC and show me my current DeFi positions?”

5 new skills a week. 1 minute to read.

How it works

The agent searches the aggregated product list, reads details such as APY and accepted tokens, and runs deposits or withdrawals with the defi commands. It also shows your positions and their details.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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

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 address

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 --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, se
FAQ

What if I name a specific protocol?

The skill says to route named protocols such as Aave to the dApp discovery skill instead.

Does it show past yield history?

Yes. It covers APY history, TVL history, and price charts.

Where are errors and failed deposits explained?

The skill has a troubleshooting reference for errors and failed deposits.

Details

Original description by the author

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', 'A

repo: internet-court/internet-court-skill

Popularity

GitHub stars
7.0k
Ranking position
#13663
License
β€”
Updated
10/26/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills