Skills#
Beyond simply "retrieving documentation," Skills encapsulate domain knowledge and engineering workflows into stable capabilities.
They enable the Agent not only to answer "how to write the docs," but also to handle "which endpoint to choose, what the next step is, and how to deal with errors."
Why OnchainOS Trade Skills for AI#
- Covers the full DEX swap lifecycle: supported chains → liquidity sources → approve → quote → swap → sign → broadcast.
- Provides an Intent Router: maps user instructions ("swap 0.1 ETH for USDC", "get me a quote for 500 USDT → SOL", "what DEXs are available on Arbitrum?") to the correct API and the appropriate first action.
- Plug-and-play for AI agents: structured, framework-agnostic capability modules that directly encapsulate the OKX DEX API for AI Agents. Each Skill corresponds to a specific capability (e.g., generating transaction execution data, fetching quotes, querying token information) and defines clear input/output schemas, enabling seamless integration into any Agent architecture.
Quickstart#
Markdown
skills:npx skills add okx/onchainos-skills
For more details, please refer to the GitHub repository.
Example interactions#
Once the Skills is uploaded to your agent, an Agent can respond to natural-language instructions like:
Markdown
What chains support DEX swaps?
# Call dex-aggregator-supported-chains
Markdown
Which DEXs are available on X-layer?
# Call dex-liquidity
Markdown
How much USDC will I get for 1 ETH on X-layer?
# Call dex-quote
Markdown
I need to approve USDT before swapping, generate the calldata
# Call dex-approve-transaction
Markdown
Build a swap transaction: 100 USDT → ETH, wallet 0xd8dA..., slippage 0.5%
# Call dex-swap
Markdown
Swap 2 SOL for USDC on Solana, wallet DYw8...
# Call dex-solana-swap-instruction
