okx/onchainos-skills

okx-defi

For discovering and managing OKX-aggregated DeFi products and positions across protocols and chains.

Voir la source
Document Skill original

Rendu depuis le dépôt source en conservant titres, exemples, code, tableaux, liens et images.

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

At the start of each thread, complete the checks in ../okx-agentic-wallet/_shared/preflight.md. If missing, read _shared/preflight.md.

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. ethereum1, bsc56, solana501). 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, see references/invest-cli-reference.md (invest & charts) and references/portfolio-cli-reference.md (positions)
du même dépôt

Autres Skills

Tous les Skills
okx
Communauté

okx-agent-payments-protocol

For agent payments and paid endpoints via x402, MPP, payment links, a2a-pay, and HTTP-payment recurring or metered billing. Use it for HTTP 402/payment-required; paid Agent or A2MCP endpoints; x402/Permit2; MPP channels, vouchers, or sessions; HTTP-payment subscriptions; or paymentId/link operations or status. Trigger phrases: x402/x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Payment, x402 exact/exact+Permit2/upto/aggrdeferred, MPP charge/session, channelId/channelid, payment-channel voucher/topup/settle/refund, metered billing, paymentId, a2a, payment link, A2MCP, paid endpoint, and HTTP 402 period/permit2subscription.

installations
4
GitHub Stars
330
Mis à jour
4 sept.
okx
Communauté

okx-agentic-wallet

Use this skill whenever the user wants to use OKX Onchain OS / onchainos CLI / agentic wallet for wallet state or on-chain actions. Triggers: onchainos, Onchain OS wallet, agentic wallet; wallet login/status/account/address/balance/holdings/deposit/receive/send/transfer; on-chain swap/DEX trade/buy/sell/convert; bridge; Gas Station; contract calls; transaction history/status; Bitcoin UTXOs, BRC-20, inscriptions; signing; approvals; wallet export/policy; token or DApp security checks; or audit log.

installations
4
GitHub Stars
330
Mis à jour
4 sept.
okx
Communauté

okx-ai

Use OKX.AI to find and use tasks/services, manage tasks and subscriptions, or register as an Agent Service Provider (ASP) to offer services. Includes Agent identity/profile and service management; service/capability search; Marketplace task lifecycle management; feedback/reputation and Evaluator staking; task/service subscriptions; task watch; device routing; A2A chat/files; and setup/repair for missing or uninitialized okx-a2a. Trigger phrases: OKX.AI, OKX AI, or OKX-AI actions; find/search/recommend/hire agents or services; register/update/search/activate/deactivate a User, Agent, ASP (seller), or Evaluator; active tasks, task list, my subscriptions, subscription list; task/deliverable actions; IDs: agentId, AgentN, serviceId, jobId; multilingual subscription-signal receipt/resume. Exclude non-AI/local providers, introductions (okx-guide), payment subscriptions or 402/x402/paymentId (okx-agent-payments-protocol), and DeFi staking (okx-defi); clarify bare subscriptions.

installations
4
GitHub Stars
330
Mis à jour
4 sept.
okx
Communauté

okx-dapp-discovery

For discovering DApps and routing protocol requests to OKX plugins; it never signs or broadcasts. Use it for DApp discovery; supported DApp + action; multi-DApp comparison; Polymarket UpDown/prediction markets; protocol-native phrase + action; pump.fun writes; or unsupported-DApp alternatives. Trigger phrases: supported DApp names such as Polymarket, Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kamino, Orca, Meteora, Clanker, and pump.fun; protocol-native phrases such as HYPE/HLP, stETH/wstETH, CAKE, CRV, COMP, RAY, GHO, and PT-/YT-; paired with protocol actions or comparison intent. Never install without explicit approval or authorize a transaction. Generic yield routes to okx-defi; unnamed/market-side swaps to okx-agentic-wallet; prices, charts, and pump.fun reads to okx-dex-market; raw Agent Commerce signals to okx-ai. Unsupported DApps are never guessed or auto-installed.

installations
4
GitHub Stars
330
Mis à jour
4 sept.