accept-agent-payments
Use when a developer wants to monetize an API, endpoint, service, model, dataset, tool, or agent-facing resource with Circle USDC…
Build crypto wallets using Circle Modular Wallets SDK with passkey authentication, gasless transactions, and extensible module architecture. Use when: creating crypto wallets with passkey-based (WebAuthn) registration and login, sending gasless transactions using Circle Gas
$ npx -y skills add circlefin/skills --skill use-modular-wallets --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/use-modular-walletsContext preview
The summary Claude sees to decide when to auto-load this skill.
Build crypto wallets using Circle Modular Wallets SDK with passkey authentication, gasless transactions, and extensible module architecture. Use when: creating crypto wallets with passkey-based (WebAuthn) registration and login, sending gasless transactions using Circle Gas
name: use-modular-wallets description: "Build crypto wallets using Circle Modular Wallets SDK with passkey authentication, gasless transactions, and extensible module architecture. Use when: creating crypto wallets with passkey-based (WebAuthn) registration and login, sending gasless transactions using Circle Gas Station paymaster, batching multiple transactions into a single user operation, implementing passkey recovery using BIP-39 mnemonic phrases, building advanced onchain wallets with custom modules (multisig, subscriptions, session keys). Triggers on: MSCA, passkey authentication, WebAuthn, paymaster, Gas Station, ERC-4337, ERC-6900, toCircleSmartAccount, toModularTransport, sendUserOperation, 2D nonce, passkey recovery, EIP-1193 provider." requirements: runtimes: [] connectors: []
Modular Wallets are flexible smart contract accounts (MSCAs) that extend functionality through installable modules. Built on ERC-4337 (account abstraction) and ERC-6900 (modular smart contract framework), they support passkey authentication, gasless transactions, batch operations, and custom logic modules (multisig, subscriptions, session keys). MSCAs are lazily deployed -- gas fees for account creation are deferred until the first outbound transaction.
npm install @circle-fin/modular-wallets-core viem # Passkey recovery also needs bip39: npm install bip39
Write or merge into the project's env file when scaffolding Modular Wallets:
# .env.local (Next.js) or .env (Vite) # Paste your Client Key from Console → Keys → Client Keys (shown once; starts with TEST_API_KEY:) NEXT_PUBLIC_CLIENT_KEY= NEXT_PUBLIC_CLIENT_URL=https://modular-sdk.circle.com/v1/rpc/w3s/buidl VITE_CLIENT_KEY= VITE_CLIENT_URL=https://modular-sdk.circle.com/v1/rpc/w3s/buidl
Use the `NEXT_PUBLIC_*` pair for Next.js or the `VITE_*` pair for Vite — not both. Client URL is fixed — do not ask the user to copy it from Console. Chain paths (e.g. `/arcTestnet`) are appended in code via `toModularTransport`, not in the env var.
Before using the SDK, complete setup (see [Console Setup](https://developers.circle.com/wallets/modular/console-setup.md)):
1. Install the SDK and set the client env vars (see Installation and Environment Variables above). 2. In Console → Keys → Client Keys, create a Client Key. 3. Configure the Passkey Domain (passkeys are domain-bound).
| Chain | Mainnet | Testnet | | --- | --- | --- | | Arc | Yes | Yes | | Arbitrum | Yes | Yes | | Avalanche | Yes | Yes | | Base | Yes | Yes | | Monad | Yes | Yes | | Optimism | Yes | Yes | | Polygon | Yes | Yes | | Unichain | Yes | Yes |
For the latest supported blockchains: https://developers.circle.com/wallets/account-types.md (MSCA chain restrictions are in Rules below.)
The `toModularTransport` URL requires the chain path segment appended to the client URL:
| Chain | Mainnet Path | Testnet Path | | --- | --- | --- | | Arbitrum | `/arbitrum` | `/arbitrumSepolia` | | Arc | `/arc` | `/arcTestnet` | | Avalanche | `/avalanche` | `/avalancheFuji` | | Base | `/base` | `/baseSepolia` | | Monad | `/monad` | `/monadTestnet` | | Optimism | `/optimism` | `/optimismSepolia` | | Polygon | `/polygon` | `/polygonAmoy` | | Unichain | `/unichain` | `/unichainSepolia` |
Example: `toModularTransport(\`${clientUrl}/polygonAmoy\`, clientKey)` for Polygon Amoy testnet.
> **Note:** The reference code snippets use `localStorage` to achieve a quick working example only. Do not use `localStorage` in production.
READ the corresponding reference based on the user's request:
User operations submitted via `sendUserOperation` follow an asynchronous state machine. The SDK's `waitForUserOperationReceipt` handles polling automatically. To query states directly, use the [List User Operations API](https://developers.circle.com/api-reference/wallets/buidl/list-user-ops.md).
**Happy path:** `SENT` -> `CONFIRMED` -> `COMPLETE`
**States:**
**Error reasons on `FAILED`:**
Ship stablecoin apps faster with Circle Skills: best-practice guidance for USDC payments, crosschain transfers, wallets, and smart contracts, plus Circle's MCP server for real-time SDK and documentation context.
Use when a developer wants to monetize an API, endpoint, service, model, dataset, tool, or agent-facing resource with Circle USDC…
View spending policy on a Circle agent wallet — per-transaction, daily, weekly, and monthly USDC caps via the `circle` CLI. Use…
Build browser or server token bridging across chains with Circle App Kit or standalone Bridge Kit. Bridges USDC across CCTP…
Set up and integrate Circle Onramp, the hosted widget that lets end users buy crypto with fiat (bank transfer, debit card, Apple…
Fund a Circle agent wallet with USDC via the `circle` CLI. payments are gas-abstracted. users can pay with USDC only, no ETH…
Use this skill when the user wants to call a paid API, look something up online, search for data, get prices, odds, or stats, or…