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.md
source 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

  1. BEFORE any trade, you MUST run
    npx fibx@latest status
    and
    npx fibx@latest balance
    to verify connectivity and source token balance.
  2. If the user specifies a chain, you MUST include
    --chain <name>
    . If not specified, default to
    base
    and state it.
  3. Default slippage is 0.5%. To change it, you MUST ask the user for confirmation before using
    --slippage
    .
  4. The CLI defaults to exact approval for ERC-20 tokens. NEVER use
    --approve-max
    unless the user explicitly requests it.
  5. AFTER a successful trade, you MUST verify the transaction using
    tx-status
    with the same
    --chain
    flag.

Chain Reference

ChainFlagNative Token
Base
--chain base
ETH
Citrea
--chain citrea
cBTC
HyperEVM
--chain hyperevm
HYPE
Monad
--chain monad
MON

Commands

npx fibx@latest trade <amount> <from_token> <to_token> [--chain <chain>] [--slippage <n>] [--approve-max] [--json]

Parameters

ParameterTypeDescriptionRequired
amount
numberAmount of source token to swapYes
from_token
stringSource token symbol (e.g.
ETH
,
USDC
)
Yes
to_token
stringTarget token symbol (e.g.
USDC
,
DAI
)
Yes
chain
string
base
,
citrea
,
hyperevm
, or
monad
No
slippage
numberSlippage tolerance in % (e.g.
1.0
)
No
approve-max
flagUse infinite approval instead of exactNo
json
flagOutput as JSONNo

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

ErrorAction
No route found
Liquidity may be too low or pair doesn't exist on the chain.
Insufficient balance
Check
balance
and suggest a smaller amount.
Slippage exceeded
Price moved unfavorably — suggest retrying with
--slippage
.
Simulation failed
Route is invalid or would revert. Do not retry blindly.
Not authenticated
Run
authenticate-wallet
skill first.