Agent skill

OKX DeFi Invest and Portfolio

by internet-court in internet-court/internet-court-skill

Finds DeFi yield products through OKX, runs deposits, withdrawals and reward claims, and shows existing DeFi positions across chains, for requests that name no specific dApp.

MITAuto-check passedBusiness, Finance & HR

Install OKX DeFi Invest and Portfolio

skills CLI
$ npx skills add internet-court/internet-court-skill --skill okx-defi -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install internet-court/internet-court-skill okx-defi --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/internet-court/internet-court-skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/vendored/okx/okx-defi .claude/skills/okx-defi && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
okx-defi
GitHub stars
6.6k
Used in
1 other repo
Token cost
~1.4k tokens
SKILL.md length
447 words
Files
9 (incl. references)
Skills in repo
80
Repo updated
First seen
Licence
MIT

At a glance

Finds DeFi yield products through OKX, runs deposits, withdrawals and reward claims, and shows existing DeFi positions across chains, for requests that name no specific dApp.

  • Searching for DeFi products with the highest yield
  • SKILL.md covers Pre-flight Checks, Intent Routing, Skill Routing and Chain Support, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Staking, depositing or providing liquidity through OKX

What it does

Two capabilities share one skill, both wrapping the onchainos defi command group. The invest side searches products by yield, shows product detail, deposits or stakes, provides liquidity, redeems positions fully or partly, claims rewards and charts APY, TVL and liquidity depth. The portfolio side lists positions with per-protocol detail.

An intent table routes each request to reference files for investing, portfolio, exact CLI parameters and troubleshooting, and a typical session views positions first and then redeems or claims. Requests that name a protocol such as Aave or Lido, plus DEX swaps, token prices and wallet balances, go to other skills. The CLI resolves chain names, pre-flight checks run first, and the merged skill is labeled experimental.

When your agent uses it

  • Searching for DeFi products with the highest yield
  • Staking, depositing or providing liquidity through OKX
  • Redeeming a DeFi position or claiming accrued rewards
  • Reviewing DeFi holdings and per-protocol position detail
  • Looking at APY or TVL history for a product

Example prompts

  • “Find the top yield products for USDC and show their APY and TVL.”
  • “Show my DeFi positions on Ethereum and Solana.”
  • “Withdraw my full position from the first staking product and claim any pending rewards.”

Requirements

  • The onchainos CLI
  • The pre-flight setup shared with the okx-agentic-wallet skill

What it can do on your machine

Read from SKILL.md and the folder at commit fa89195. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

OKX DeFi Invest and Portfolio loads about 1.4k tokens when it runs, and up to ~15k if it reads all its reference files. Until then it costs about 241 tokens; SKILL.md has 447 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~241
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~15k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from internet-court/internet-court-skill at commit fa89195, republished under its MIT licence (© internet-court). 447 words, ~1,425 tokens.

Download SKILL.mdSave it as .claude/skills/okx-defi/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
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
metadata.version
4.4.10
metadata.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 IntentReference
Discover / search DeFi products, find best APYinvest.md
Product detail (APY, TVL, accepted tokens)invest.md
Deposit / stake / provide liquidityinvest.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 chartsinvest.md
View DeFi positions / holdings overview (持仓)portfolio.md
Per-protocol position detail (持仓详情)portfolio.md
Exact parameters / return schemas — invest & charts commandsinvest-cli-reference.md
Exact parameters / return schemas — positions commandsportfolio-cli-reference.md
Errors / failed deposits / expired calldatainvest-troubleshooting.md
Errors / empty positions / address-format issuesportfolio-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.

Show full SKILL.md (229 more words)Show less

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, see references/invest-cli-reference.md (invest & charts) and references/portfolio-cli-reference.md (positions)

© internet-court, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (references) in vendored/okx/okx-defi of internet-court/internet-court-skill.

  • SKILL.md
  • LICENSE
  • _shared/preflight.md
  • references/invest-cli-reference.md
  • references/invest-troubleshooting.md
  • references/invest.md
  • references/portfolio-cli-reference.md
  • references/portfolio-troubleshooting.md
  • references/portfolio.md

Open the folder on GitHubat commit fa89195

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in internet-court/internet-court-skill, which our catalogue first saw on October 7, 2026.

Compare with similar skills

OKX DeFi Invest and Portfolio next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

OKX DeFi Invest and Portfolio compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
OKX DeFi Invest and Portfolio this skillinternet-court/internet-court-skill6.6k1 repos~1.4kAutomated safety check: PassMIT
OKX Market DataHKUDS/Vibe-Trading35k—~1.3kAutomated safety check: PassMIT
Okx Cex Earnokx/agent-skills1872 repos~3.3kAutomated safety check: PassMIT
Okx Cex Marketdex-original/okx-agent-trade-kit1101 repos~2.7kAutomated safety check: PassMIT
Okx Cex Smartmoneydex-original/okx-agent-trade-kit1101 repos~1.4kAutomated safety check: PassMIT
Okx Sentiment Trackerdex-original/okx-agent-trade-kit1101 repos~3.8kAutomated safety check: PassMIT

Similar skills

  • OKX Market Data

    HKUDS/Vibe-Trading

    Retrieves public OKX cryptocurrency market data such as spot prices, candlesticks, funding rates and open interest through the OKX V5 REST API, with no authentication.

    35k GitHub stars~1.3k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Okx Cex Earn

    okx/agent-skills

    Manages OKX Simple Earn (flexible savings/lending), Flash Earn, On-chain Earn (staking/DeFi), Dual Investment (DCD/双币赢), and AutoEarn (自动赚币) via the okx CLI.

    187 GitHub starsUsed in 2 repos~3.3k tokens
    Business, Finance & HRAuto-check passed
  • Okx Cex Market

    dex-original/okx-agent-trade-kit

    A skill your agent uses when the user asks for: price of any asset, ticker, order book, candles, OHLCV, funding rate, open interest, OI change scanner, market screener (top movers, high-volume…

    110 GitHub starsUsed in 1 repo~2.7k tokens
    Business, Finance & HRAuto-check passed
  • Okx Cex Smartmoney

    dex-original/okx-agent-trade-kit

    Smart Money analytics on OKX: leaderboard traders, position tracking, trade records, aggregated consensus signals, and signal history.

    110 GitHub starsUsed in 1 repo~1.4k tokens
    Business, Finance & HRAuto-check passed
  • Okx Sentiment Tracker

    dex-original/okx-agent-trade-kit

    A skill your agent uses when the user asks about: 'any crypto news', 'latest news', 'market update', 'daily briefing', 'BTC news', 'ETH news', 'news on SOL', 'search SEC ETF', 'regulation news'…

    110 GitHub starsUsed in 1 repo~3.8k tokens
    Business, Finance & HRAuto-check passed
  • CCXT Crypto Market Data

    HKUDS/Vibe-Trading

    Fetches public crypto market data (candles, tickers, order books, trades) from 100+ exchanges through CCXT, and serves as the fallback when OKX is unavailable.

    35k GitHub stars~544 tokensUpdated today
    Business, Finance & HRAuto-check passed

More from internet-court/internet-court-skill

All 80 skills in this repo
  • Kleros IPFS Upload

    internet-court/internet-court-skill

    Uploads one Kleros-related file per paid request to IPFS through the Kleros x402 gateway for 0.01 USDC on Base, returning a CID that Kleros contracts can reference.

    6.6k GitHub stars~4.9k tokensUpdated 1 mo ago
    Auto-check: notes
  • 0G Compute Network Guide

    internet-court/internet-court-skill

    Guides building on the 0G Compute Network, a decentralized GPU marketplace for AI inference and fine-tuning, with SDK patterns and CLI commands.

    6.6k GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • PNP Prediction Markets on Solana

    internet-court/internet-court-skill

    Creates, trades and settles permissionless prediction markets on Solana with any SPL token as collateral, including social-media and custom-oracle markets.

    6.6k GitHub stars~7.5k tokensUpdated 1 mo ago
    Auto-check: notes
  • BNB Chain MCP Server

    internet-court/internet-court-skill

    Connects an agent to the BNB Chain MCP server to read blocks and contracts, move tokens and NFTs, register ERC-8004 agents and use Greenfield storage.

    6.6k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • GenLayer ERC-7710 Connector

    internet-court/internet-court-skill

    Specifies how a GenLayer Intelligent Contract decision about an agent's performance becomes an ERC-7710 revocation or policy change, through a relayer or bridge and an EVM controller.

    6.6k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • GenLayer Agent Supervision Adapter

    internet-court/internet-court-skill

    Specifies how a GenLayer Intelligent Contract should supervise an AI agent, with review rubrics, evidence schemas and continue, warn, constrain or revoke decisions.

    6.6k GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed

Works with

Questions about OKX DeFi Invest and Portfolio

What does OKX DeFi Invest and Portfolio do?

Finds DeFi yield products through OKX, runs deposits, withdrawals and reward claims, and shows existing DeFi positions across chains, for requests that name no specific dApp. Two capabilities share one skill, both wrapping the onchainos defi command group. The invest side searches products by yield, shows product detail, deposits or stakes, provides liquidity, redeems positions fully or partly, claims rewards and charts APY, TVL and liquidity depth.

When should I use OKX DeFi Invest and Portfolio?

OKX DeFi Invest and Portfolio fits situations like: searching for DeFi products with the highest yield; staking, depositing or providing liquidity through OKX; redeeming a DeFi position or claiming accrued rewards; reviewing DeFi holdings and per-protocol position detail.

How do I install OKX DeFi Invest and Portfolio in Claude Code?

Run `npx skills add internet-court/internet-court-skill --skill okx-defi -a claude-code`. Or copy the skill folder (vendored/okx/okx-defi in internet-court/internet-court-skill) into .claude/skills/okx-defi in your project. Claude Code loads it when a task matches its description.

How do I install OKX DeFi Invest and Portfolio in Codex?

Run `npx skills add internet-court/internet-court-skill --skill okx-defi -a codex`. Or copy the skill folder (vendored/okx/okx-defi in internet-court/internet-court-skill) into .agents/skills/okx-defi in your project. Codex loads it when a task matches its description.

Can I use OKX DeFi Invest and Portfolio in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add internet-court/internet-court-skill --skill okx-defi -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/okx-defi, .gemini/skills/okx-defi, .github/skills/okx-defi and .opencode/skills/okx-defi in your project.

What does OKX DeFi Invest and Portfolio need to run?

SKILL.md names no scripts, command-line tools or credentials: OKX DeFi Invest and Portfolio is instructions for the agent only. Our summary lists: The onchainos CLI; The pre-flight setup shared with the okx-agentic-wallet skill.

Does OKX DeFi Invest and Portfolio access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is OKX DeFi Invest and Portfolio safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does OKX DeFi Invest and Portfolio use?

OKX DeFi Invest and Portfolio is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does OKX DeFi Invest and Portfolio use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 14k tokens, read only when the agent opens those files.

What are the alternatives to OKX DeFi Invest and Portfolio?

Skills that share tags, products or a category with OKX DeFi Invest and Portfolio: OKX Market Data (HKUDS/Vibe-Trading, 35k stars), Okx Cex Earn (okx/agent-skills, 187 stars), Okx Cex Market (dex-original/okx-agent-trade-kit, 110 stars) and Okx Cex Smartmoney (dex-original/okx-agent-trade-kit, 110 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains OKX DeFi Invest and Portfolio?

internet-court (a GitHub organization) maintains it in internet-court/internet-court-skill, which has 6,551 GitHub stars. The repository holds 80 skills in this directory. The repository was last updated on August 19, 2026.

Source: internet-court/internet-court-skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.