swap-tokens

Generate server-side token swap code using Circle App Kit or Swap Kit SDKs.

3|1|Updated May 17, 2026
One-click install
npx skills add https://github.com/levantuy/arc-quantum --skill swap-tokens-levantuy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swap-tokens
Source: https://github.com/levantuy/arc-quantum/tree/main/.agents/skills/swap-tokens
Command: npx skills add https://github.com/levantuy/arc-quantum --skill swap-tokens-levantuy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @circle-fin/app-kit, @circle-fin/swap-kit, @circle-fin/adapter-viem-v2, @circle-fin/adapter-solana-kit, @circle-fin/adapter-circle-wallets, viem, and includes references (resource) components.

What problem does it solve? Building token swap functionality requires navigating SDK selection, wallet adapter configuration, slippage protection, and fee setup across multiple chains. This Skill guides you through the correct decisions and generates working server-side swap code with Circle's App Kit or Swap Kit SDKs. ## Core Features & Use Cases - SDK and Adapter Selection: Walks through a decision guide to choose between App Kit (swap + bridge + send) and standalone Swap Kit, plus the right wallet adapter (Viem, Solana Kit, or Circle Wallets). - Swap Implementation Patterns: Provides reference implementations for same-chain swaps on EVM chains and Solana, rate estimation, slippage and stop-limit configuration, and custom developer fees. - Cross-Chain Token Movement: Combines swap and bridge calls via App Kit for multi-step cross-chain patterns (e.g., USDT on Ethereum to DAI on Base). - Use Case: Convert USDT to USDC on Ethereum by generating a server-side TypeScript script that estimates the rate, applies a 1% slippage tolerance, and executes the swap with your private key adapter. ## Quick Start Ask the assistant to generate code that swaps 100 USDT to USDC on Ethereum using Circle App Kit with a Viem private key adapter.

Frequently Asked Questions about swap-tokens

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I swap tokens with Circle App Kit?

Install @circle-fin/app-kit with a wallet adapter like @circle-fin/adapter-viem-v2, then call kit.swap() with the chain, tokenIn, tokenOut, amountIn, and your kit key in the config. Swaps run server-side only because the kit key cannot be exposed to client-side code.

What is the difference between Circle App Kit and Swap Kit?

App Kit (@circle-fin/app-kit) is an all-inclusive SDK covering swap, bridge, and send, while Swap Kit (@circle-fin/swap-kit) is a lighter standalone package for swap-only use cases. App Kit is recommended unless you explicitly need swap-only functionality.

Which chains and tokens does Circle swap support?

Swaps run on mainnet chains including Ethereum, Base, Arbitrum, Solana, and Polygon, plus Arc Testnet. Supported token aliases include USDC, EURC, USDT, PYUSD, DAI, WBTC, WETH, and WSOL, and any token can be specified by contract address.

How do I set slippage tolerance or a stop limit on a swap?

Pass slippageBps in the swap config for relative tolerance in basis points (default 300 bps), or set stopLimit for an absolute minimum output amount. When both are set, stopLimit takes precedence.

Can I do cross-chain token swaps with Swap Kit?

No, cross-chain token movement requires App Kit because Swap Kit does not include bridge capability. The pattern combines separate swap and bridge calls, using USDC as the intermediate token since bridge only supports USDC.

Why can't I use browser wallets like wagmi for Circle swaps?

Swaps require a kit key, which is a server-side-only credential that cannot be exposed to client-side code. Client-side wallet connections such as wagmi, ConnectKit, or browser wallets are not supported; use a private key adapter or Circle Wallets adapter on the server.