Learn-skills.dev trade
Swap tokens using Fibrous aggregation on Base, Citrea, HyperEVM, or Monad. Finds optimal route, simulates before execution.
install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/ahmetenesdur/fibx-agentic-wallet-skills/trade" ~/.claude/skills/neversight-learn-skills-dev-trade && rm -rf "$T"
manifest:
data/skills-md/ahmetenesdur/fibx-agentic-wallet-skills/trade/SKILL.mdsource content
Trade / Swap Tokens
Exchange one token for another via Fibrous aggregation. The CLI finds the best route, handles token approvals, simulates the swap, and executes.
Prerequisites
- Active session required.
- Sufficient balance of the source token + gas fees.
Rules
- BEFORE any trade, you MUST run
andnpx fibx@latest status
to verify connectivity and source token balance.npx fibx@latest balance - If the user specifies a chain, you MUST include
. If not specified, default to--chain <name>
and state it.base - Default slippage is 0.5%. To change it, you MUST ask the user for confirmation before using
.--slippage - The CLI defaults to exact approval for ERC-20 tokens. NEVER use
unless the user explicitly requests it.--approve-max - AFTER a successful trade, you MUST verify the transaction using
with the sametx-status
flag.--chain
Chain Reference
| Chain | Flag | Native Token |
|---|---|---|
| Base | | ETH |
| Citrea | | cBTC |
| HyperEVM | | HYPE |
| Monad | | MON |
Commands
npx fibx@latest trade <amount> <from_token> <to_token> [--chain <chain>] [--slippage <n>] [--approve-max] [--json]
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| number | Amount of source token to swap | Yes |
| string | Source token symbol (e.g. , ) | Yes |
| string | Target token symbol (e.g. , ) | Yes |
| string | , , , or | No |
| number | Slippage tolerance in % (e.g. ) | No |
| flag | Use infinite approval instead of exact | No |
| flag | Output as JSON | No |
Default chain:
base. Default slippage: 0.5.
Examples
User: "Swap 0.1 ETH for USDC"
npx fibx@latest status npx fibx@latest balance npx fibx@latest trade 0.1 ETH USDC npx fibx@latest tx-status <hash>
User: "Buy USDC with 1 MON on Monad"
npx fibx@latest status npx fibx@latest balance --chain monad npx fibx@latest trade 1 MON USDC --chain monad npx fibx@latest tx-status <hash> --chain monad
Error Handling
| Error | Action |
|---|---|
| Liquidity may be too low or pair doesn't exist on the chain. |
| Check and suggest a smaller amount. |
| Price moved unfavorably — suggest retrying with . |
| Route is invalid or would revert. Do not retry blindly. |
| Run skill first. |