okx-defi
Skill này làm gì
Skill này cho phép agent tìm sản phẩm DeFi có lợi suất và quản lý việc gửi, rút, nhận phần thưởng thông qua các lệnh onchainos defi. Skill dành cho người dùng crypto muốn có một điểm truy cập DeFi duy nhất, không gắn với một giao thức cụ thể.
Khi nào nên dùng
- ✓Khi bạn muốn tìm sản phẩm DeFi có lợi suất tốt nhất cho một token.
- ✓Khi bạn muốn gửi, staking, rút tiền hoặc nhận phần thưởng mà không cần nêu tên giao thức cụ thể.
- ✓Khi bạn muốn xem tổng quan về tài sản và vị thế DeFi của mình.
Liên kết skill
https://github.com/internet-court/internet-court-skill/blob/main/vendored/okx/okx-defi/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể tìm sản phẩm DeFi có lợi suất tốt nhất cho USDC của tôi và cho tôi xem các vị thế DeFi hiện tại không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent tìm trong danh sách sản phẩm tổng hợp, đọc chi tiết như APY và các token được chấp nhận, rồi chạy gửi hoặc rút bằng các lệnh defi. Agent cũng cho bạn xem các vị thế và chi tiết của chúng.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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.mdinstead.
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 --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 (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 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)- For CLI parameter details, se
Câu hỏi thường gặp
Nếu tôi nêu tên một giao thức cụ thể thì sao?
Skill khuyên chuyển các giao thức có tên như Aave sang skill khám phá dApp.
Nó có hiển thị lịch sử lợi suất trước đây không?
Có. Skill bao quát lịch sử APY, lịch sử TVL và biểu đồ giá.
Lỗi và các lần gửi tiền thất bại được giải thích ở đâu?
Skill có một tài liệu xử lý sự cố cho lỗi và các lần gửi tiền thất bại.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 7.0k
- Vị trí xếp hạng
- #13663
- Giấy phép
- —
- Cập nhật
- 26/10/2026
Bình luận
- …
Thêm skill từ kho mã này
internet-court
7.0kGiúp agent của bạn thanh toán, thuê hoặc giao dịch an toàn với một agent AI khác hoặc dịch vụ trả phí, và chỉ đến hướng dẫn chuyên sâu phù hợp.
genlayer-erc7710-connector
7.0kGiúp agent của bạn kết nối kết quả đánh giá AI với hệ thống quyền hạn, để một đánh giá xấu có thể hạn chế hoặc hủy quyền của agent.
genlayer-intelligent-contracts
7.0kGiúp agent của bạn xác định quy tắc, bằng chứng và đầu ra của một AI judge kiểm tra xem agent khác có làm đúng nhiệm vụ được ủy quyền hay không.
x402-erc7710
7.0kGiúp agent của bạn trả tiền cho dịch vụ web theo từng yêu cầu, và thiết lập chi tiêu định kỳ nằm trong ngân sách quyền hạn.
Skill tương tự
blucli
394kGiúp agent của bạn tìm, phát, tạm dừng, nhóm và chỉnh âm lượng loa Bluesound và NAD qua lệnh blu.
camsnap
394kGiúp agent của bạn chụp ảnh, quay clip ngắn hoặc lấy sự kiện chuyển động từ camera mạng và webcam nội bộ mà bạn đã thiết lập.
eightctl
394kGiúp agent của bạn kiểm tra và điều khiển thiết bị Eight Sleep pod, gồm nhiệt độ, báo thức và lịch ngủ.