# Skills

Swapper Toolkit is a skill pack that gives AI agents and coding assistants the ability to perform DeFi operations — depositing funds, bridging assets across chains, and managing crypto wallets — directly from your development environment.

It works with [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Cursor](https://cursor.com), [Windsurf](https://windsurf.com), [OpenClaw](https://openclaw.com), [CrewAI](https://crewai.com), [AutoGPT](https://autogpt.net), and other AI agent frameworks.

***

### Installation

Install the full toolkit with a single command:

```bash
npx skills add swapperfinance/swapper-toolkit
```

Once installed, skills are available as slash commands in your AI assistant.

***

### Available Skills

#### `/swapper-deposit`

Deposit and bridge funds into a wallet or protocol using Swapper Finance.

**Triggers when:**

* You ask to deposit, fund, top-up, or bridge assets into a wallet
* The agent detects mid-task that a wallet has insufficient funds, missing tokens, or needs funding before another operation can proceed
* You ask to convert fiat (card payment) to crypto and deposit into DeFi
* You want to deposit into a lending protocol (Aave, Compound), staking protocol, or liquidity pool
* A cross-chain transfer is needed to get funds to the right chain before executing a strategy
* You ask to fund a wallet before executing a DeFi strategy
* You need to onboard with no existing crypto — card payment to DeFi in one step
* The agent needs to prepare funds for a multi-step DeFi workflow

**Capabilities:**

* Direct deposits to any wallet address
* Cross-chain bridge transfers (Ethereum, Base, Arbitrum, Optimism, Polygon, Fast, and more)
* Protocol deposits — lending, staking, liquidity pools
* Fiat on-ramp funding (where supported)

#### Example usage

**User:** "Deposit $100 USDC into Aave on Base"

**Agent:**

```
Using Swapper Deposit Skill...
→ Chain: Base (8453)
→ Token: USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
→ Protocol: Aave
→ Amount: $100
→ Generating deposit link...

✓ Deposit link generated. Opening in your browser — confirm the transaction there.
```

**User:** "Fund my wallet with $50 ETH on Arbitrum"

**Agent:**

```
Using Swapper Deposit Skill...
→ Chain: Arbitrum (42161)
→ Token: ETH (native)
→ Wallet: 0xAB12...9f3D
→ Amount: $50
→ Generating deposit link...

✓ Deposit link generated. Opening in your browser.
```

**Supported chains:**

| Chain     | Chain ID |
| --------- | -------- |
| Ethereum  | `1`      |
| Base      | `8453`   |
| Arbitrum  | `42161`  |
| Optimism  | `10`     |
| Polygon   | `137`    |
| Fast      | `fast`   |
| Solana    | `solana` |
| HyperEVM  | `999`    |
| BNB Chain | `56`     |
| Avalanche | `43114`  |

***

### SDK Integration

If you're building an application and want to embed the deposit flow directly, the skill can also generate SDK integration code for you.

#### Install the SDK

```bash
npm i @swapper-finance/deposit-sdk
```

#### Embedded container

```typescript
import { SwapperIframe } from "@swapper-finance/deposit-sdk";

const swapper = new SwapperIframe({
  container: "#swapper-container", // CSS selector or HTMLElement
  integratorId: "your-integrator-id",
  dstChainId: "8453",
  dstTokenAddr: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  depositWalletAddress: "0x2A018F2506acaEEE2C10632514Fc5DCa9eE2c28A",
  styles: { themeMode: "light" },
  supportedDepositOptions: ["transferCrypto", "depositWithCash"],
});
```

#### Modal popup

```typescript
import { openSwapperModal } from "@swapper-finance/deposit-sdk";

const modal = openSwapperModal({
  integratorId: "your-integrator-id",
  dstChainId: "8453",
  dstTokenAddr: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  depositWalletAddress: "0x2A018F2506acaEEE2C10632514Fc5DCa9eE2c28A",
  styles: { themeMode: "dark" },
  supportedDepositOptions: ["transferCrypto", "depositWithCash"],
  modalStyle: { borderRadius: "16px" },
  onClose: () => console.log("Closed"),
});
```

#### Raw iframe

```html
<iframe
  src="https://deposit.swapper.finance?integratorId=YOUR_ID&dstChainId=8453&dstTokenAddr=0x...&depositWalletAddress=0x..."
  title="Swapper Deposits Widget"
  allow="camera"
  sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
></iframe>
```

Both the `allow` and `sandbox` attributes are required for the on-ramp integration to work properly.

***

### Safety

All skills enforce strict safety rules:

* **Explicit confirmation** — Every transaction requires user approval before execution. Nothing is auto-approved.
* **Transparent fees** — Slippage, gas fees, and risks are surfaced before you confirm.
* **Key security** — Private keys and mnemonics are never stored in plain text.

***

#### Powered by

* **Chainlink CRE** (Runtime Environment) — orchestrates the full deposit workflow: compliance, payment authorization, conversion, and settlement in a single verifiable flow
* **Chainlink CCIP** (Cross-Chain Interoperability Protocol) — routes cross-chain transfers securely across 60+ blockchains
* **Mastercard** — global card payment processing covering 170+ countries

***

#### Coming Soon

**`/swapper-swap` — Token Swap**

Swap tokens across chains and DEXs. Cross-chain swaps via Chainlink CCIP. Same-chain and cross-chain, optimal routing, slippage protection.

**`/swapper-wallet` — Wallet Management**

Create, fund, and manage agent wallets. Smart wallet creation with account abstraction, multi-chain setup, balance checking.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.swapper.finance/ai-agents/skills.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
