Pins this version in aipm.package.json and aipm-lock.json.
aipm add @okx/okx-defi@1.0.0
Without project tracking
Writes the skill files only. Add --no-init to skip aipm.package.json and the lockfile.
aipm add @okx/okx-defi@1.0.0 --no-init
How to use
Install the skill above, then run this in your AI tool:
/okx-defi <your description>
About
Discover and manage multi-chain, OKX-aggregated DeFi products and positions through the `onchainos defi` CLI group.
Source
What gets added to your project
Preview every file this package writes on install before you run the command above.
Summary
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, CLM...
Skill instructions
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.
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:
code
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
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
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.
Add this badge to a GitHub README so readers can open the package page and install the same version.
[](https://www.aipm-registry.com/skills/okx/okx-defi/1.0.0?utm_source=github&utm_medium=readme&utm_campaign=package_badge)
This imported publisher has not claimed its AIPM account. A connected account confirms account control, but it does not guarantee that a package is safe.
AI assistant context
What this skill is for
@okx/okx-defi@1.0.0 is an AIPM skill package for All tools. Use it when a project needs the reusable AI behavior described as: 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, CLM...
Run aipm add @okx/okx-defi@1.0.0 in a project that has AIPM initialized.
Supported tools
@okx/okx-defi@1.0.0 supports All tools.
Before installing
AIPM skills can add files to your project. Review the package name, target, description, license, and publisher before installing. Use a clean branch when trying a new skill.