Skills - For Local Agents
Pre-built agent skills for trading and managing liquidity via KyberSwap APIs from local AI coding agents
Structured context files that give AI coding agents the ability to trade, manage liquidity, and query DeFi data across 18 EVM chains via KyberSwap APIs.
Skills are markdown files that AI agents read and follow as procedural instructions. No SDK, no library — the agent reads the skill, understands the workflow, and executes it using standard tools (curl, cast, jq).
Repository: github.com/KyberNetwork/kyberswap-skills
Install
/install-plugin <https://github.com/kyberswap/kyberswap-skills>Or load locally for development:
claude --plugin-dir /path/to/kyberswap-skillsNo API keys required. KyberSwap APIs are public.
Alternative methods:
Install KyberSwap Skills in one command:
npx skills add KyberNetwork/kyberswap-skillsThis method currently supports swap and price discovery & market data skills. Limit order and Zap will be added soon.
How Skills Work
The execution flow is always the same:
User Request → Agent reads SKILL.md → API calls (curl) → User confirmation → On-chain execution (cast)The agent receives a user request (e.g., “swap 1 ETH to USDC on Base”).
The agent reads the relevant
SKILL.mdfile.The skill contains step-by-step instructions: resolve tokens, call the API, format the response, ask for confirmation.
The agent follows the instructions using standard tools —
curlfor API calls,castfor on-chain execution.State-changing actions always require explicit user confirmation (unless using a
fastvariant).
Available Skills
Price Discovery & Market Data
quote
Get the best swap route and expected output for a token pair. Includes gas estimates, route path, and safety checks.
token-info
Look up token metadata, live USD price, decimals, and security assessment (honeypot/fee-on-transfer detection). Supports batch queries.
pool-info
Query liquidity pool details — TVL, 24h volume, fee tier, APR, LP APR, and token pair info across all indexed DEXes.
Swap Lifecycle
swap-build
Build a swap transaction with encoded calldata. Applies intelligent slippage defaults. Requires user confirmation.
swap-simulate
Dry-run a swap transaction using cast call — no gas spent, no state changed. Validates the route before execution.
swap-execute
Broadcast a built swap transaction on-chain via Foundry’s cast send. Supports keystore, env var, Ledger, and Trezor wallets.
swap-status
Check whether a submitted transaction succeeded or failed. Decodes revert reasons for failed transactions.
swap-approve
Manage ERC-20 token approvals for the KyberSwap router. Check, set, or revoke allowances. Handles the USDT zero-first special case.
Swap Fast Path
swap-execute-fast
Build and execute a swap in one step with no confirmation prompts. Uses shell scripts. For trusted automation only.
Gasless Limit Orders
limit-order
Create, query, and cancel gasless limit orders. Orders are signed off-chain via EIP-712 and settled on-chain when filled. Supports gasless and hard cancellation.
order-manager
View and analyze limit orders across all statuses — open, partially filled, filled, cancelled, expired. Shows fill progress and portfolio summary.
Limit Order Fast Path
limit-order-fast
Sign and create a limit order in one step with no confirmation. For trusted automation only.
Concentrated Liquidity
zap
Zap into or out of concentrated liquidity positions in one transaction. Handles token ratio calculation, swaps, and deposits automatically. Supports 71 DEX protocols.
position-manager
View and analyze DeFi liquidity positions across chains — in-range/out-of-range status, APR, unclaimed fees, and actionable suggestions.
Zap Fast Path
zap-fast
Build and execute a zap in one step with no confirmation. For trusted automation only.
Diagnostics
error-handling
Comprehensive error diagnosis and resolution guide covering API errors, pre-transaction failures, and on-chain reverts.
Safety Model
Skills follow a safe by default pattern:
Safe path (
quote,swap-build,swap-execute,limit-order,zap): Every state-changing action requires explicit user confirmation. The agent presents transaction details and waits for approval.Fast path (
swap-execute-fast,limit-order-fast,zap-fast): Skip all confirmations. MarkedEXTREMELY DANGEROUS. Designed for trusted automation pipelines where the operator controls the parameters.Read-only (
token-info,pool-info,position-manager,order-manager,swap-simulate,swap-status): Never modify blockchain state.
Built-in safety checks on all paths:
Honeypot detection
Fee-on-transfer (FOT) warnings
Address validation (rejects zero address and native sentinel for ERC-20 operations)
Router address verification
Dust/uneconomical trade warnings (sub-$0.10)
Price impact evaluation
Supported Exchanges and Networks
Refer to Supported Exchanges and Networks.
Architecture
Skills connect to three KyberSwap API services:
Aggregator API
aggregator-api.kyberswap.com
Swap routing and calldata building
Token API
token-api.kyberswap.com
Token metadata, pricing, honeypot detection
Earn Service
earn-service.kyberswap.com
Pool information and position management
All API requests include the X-Client-Id: ai-agent-skills header.
On-chain execution uses Foundry’s cast for transaction broadcasting, simulation, and receipt retrieval.
Key Contracts
Token Resolution
For tokens not in the built-in registry, the resolution chain is:
KyberSwap Token API — whitelisted tokens
CoinGecko API — search by symbol, verify decimals
Manual user input
Prerequisites
Foundry (cast)
swap-execute, swap-simulate, swap-status, all -fast variants
curl, jq
All -fast script-based skills
bc
limit-order-fast
Wallet
On-chain execution — keystore, $PRIVATE_KEY, Ledger, or Trezor
Workflows
Get a quote:
Swap tokens:
Create a limit order:
Add liquidity:
Last updated
Was this helpful?