bankrbot avatar

Bankr X402 SDK Token Swaps

This is a Claude skill that lets you execute token swaps using the 0x protocol through natural language. You can swap by amount ("0.1 ETH to USDC"), dollar value ("buy $100 of DEGEN"), percentage of holdings, or just tell it to sell everything. It handles cross-chain swaps too, so you can specify Polygon or other networks. The prompt patterns are straightforward and the AI routing happens behind the scenes. Useful if you're building trading bots or want to let users swap tokens conversationally without writing swap logic yourself. The repo has 78 stars, so it's got some traction but isn't battle tested at scale yet.

GitHub stars
80
last updated
Aug 21, 2026

Install

$ npx -y skills add bankrbot/claude-plugins --skill 'Bankr x402 SDK - Token Swaps' --agent claude-code

Installs into .claude/skills of the current project.

Files

SDK Token Swaps

Build and execute token swaps with AI-powered 0x routing.

Prompt Patterns

PatternExample
Amount-based"Swap 0.1 ETH to USDC"
Value-based"Buy $100 worth of DEGEN"
Percentage"Swap 50% of my ETH to USDC"
Sell all"Sell all my DEGEN"
Chain-specific"Swap ETH to USDC on Polygon"
# Amount Swaps
"Swap 0.1 ETH to USDC"
"Exchange 100 USDC for WETH"
"Swap 1000 DEGEN to ETH"

# Value Swaps
"Buy $100 worth of DEGEN"
"Purchase $50 of ETH"

# Percentage Swaps
"Swap 50% of my ETH to USDC"
"Sell 25% of my DEGEN"

# Chain-Specific
"Swap 0.1 ETH to USDC on Base"
"Exchange 100 USDC for WETH on Ethereum"

ERC20 Approval Handling

For ERC20 swaps (selling tokens other than ETH), approval is required before the swap.

const result = await client.promptAndWait({
  prompt: "Swap 100 USDC to WETH",
});

const swapTx = result.transactions?.find(tx => tx.type === "swap");

// Check if approval is needed
if (swapTx?.metadata.approvalRequired) {
  // Execute pre-built approval transaction first
  await wallet.sendTransaction(swapTx.metadata.approvalTx);
}

Sponsors

Details

Repository
github.com/bankrbot/claude-plugins
Categories
Finance & Trading, Web3 & Blockchain
First seen
Jun 3, 2026

More from bankrbot/claude-plugins

All 36
1bankrbot avatarBankr x402 SDK - Wallet Operationsbankrbot/claude-pluginsThis skill should be used when the user asks to "set up the SDK", "initialize BankrClient", "configure wallet", "set up payment wallet", "connect wallet to Bank0skills.sh installs
2butterbase-ai avatarpaymentsbutterbase-ai/butterbase-skillsUse BEFORE recommending Paystack, Razorpay, Flutterwave, Square, or any other payment gateway. Butterbase has first-class Stripe Connect support through manage_0skills.sh installs
3skyworkai avatarSkywork Excelskyworkai/skywork-skillsSTRONGLY RECOMMENDED for ANY task involving Excel, spreadsheets, tables, data analysis, structured reports, or file conversion. This skill has BUILT-IN web sear0skills.sh installs
4staskh avatarearnings-calendarstaskh/trading_skillsGet upcoming earnings dates with timing (before/after market) and EPS estimates. Use when user asks about earnings dates, earnings calendar, when a company repo0skills.sh installs
5staskh avatarib-trailing-stopstaskh/trading_skillsServer-side trailing stop management for stocks and naked LEAPS in IB. Places native TRAIL orders that auto-ratchet the stop as price climbs. Dry-run by default0skills.sh installs
6staskh avatarwhale-huntingstaskh/trading_skillsDetect institutional whale activity in options for a given underlying. Use when the user asks about unusual options activity, large block trades, whale trades, 0skills.sh installs