Agent skill

Use Modular Wallets

by circlefin in circlefin/skills

Build crypto wallets using Circle Modular Wallets SDK with passkey authentication, gasless transactions, and extensible module architecture.

Apache-2.0Auto-check: notesBackend & APIs

Install Use Modular Wallets

skills CLI
$ npx skills add circlefin/skills --skill use-modular-wallets -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install circlefin/skills use-modular-wallets --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/circlefin/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/circle/skills/use-modular-wallets .claude/skills/use-modular-wallets && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
use-modular-wallets
GitHub stars
155
Token cost
~3k tokens
SKILL.md length
1,308 words
Files
3 (incl. references)
Skills in repo
18
Repo updated
First seen
Licence
Apache-2.0

At a glance

Build crypto wallets using Circle Modular Wallets SDK with passkey authentication, gasless transactions, and extensible module architecture.

  • Works in 3 steps: Install the SDK and set the client env… → In Console → Keys → Client Keys, create… → Configure the Passkey Domain (passkeys…
  • : creating crypto wallets with passkey-based (WebAuthn) registration and login
  • SKILL.md covers Overview, Prerequisites / Setup, Quick Reference and Core Concepts, plus 6 more sections
  • Calls npm; reaches modular-sdk.circle.com; needs TEST_API_KEY and LIVE_API_KEY

What it does

Use Modular Wallets is an agent skill from circlefin/skills. 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)…

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/circle-smart-account.md` and `references/passkey-recovery.md`).

It sits in Backend & APIs, covering Authentication. It works with Arbitrum. The repository describes itself as: Circle's open source skills for AI-assisted development. The licence is Apache-2.0.

When your agent uses it

  • : 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

Example prompts

  • “/use-modular-wallets”

Requirements

  • Node.js
  • A credential in TEST_API_KEY
  • A credential in NEXT_PUBLIC_CLIENT_KEY

Workflow steps

3 steps, taken from the first numbered list in SKILL.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).

What it can do on your machine

Read from SKILL.md and the folder at commit 58ab864. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • modular-sdk.circle.com

    Also links to:

    • developers.circle.com
    • console.circle.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • TEST_API_KEY
    • LIVE_API_KEY
    • NEXT_PUBLIC_CLIENT_KEY
    • VITE_CLIENT_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Use Modular Wallets loads about 3k tokens when it runs, and up to ~5k if it reads all its reference files. Until then it costs about 184 tokens; SKILL.md has 1,308 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~184
When it runs · the whole SKILL.md, loaded when a task matches
~3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:28
    # .env.local (Next.js) or .env (Vite)
  • NoteMentions a .env fileSKILL.md:138
    s manager. Add `.gitignore` entries for `.env*` and secret files when scaffolding.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from circlefin/skills at commit 58ab864, republished under its Apache-2.0 licence (© circlefin). 1,308 words, ~2,988 tokens.

Download SKILL.mdSave it as .claude/skills/use-modular-wallets/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
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.

Overview

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.

Prerequisites / Setup

Installation
bash
npm install @circle-fin/modular-wallets-core viem
# Passkey recovery also needs bip39:
npm install bip39
Environment Variables

Write or merge into the project's env file when scaffolding Modular Wallets:

bash
# .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):

  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).

Quick Reference

Supported Chains
ChainMainnetTestnet
ArcYesYes
ArbitrumYesYes
AvalancheYesYes
BaseYesYes
MonadYesYes
OptimismYesYes
PolygonYesYes
UnichainYesYes

For the latest supported blockchains: https://developers.circle.com/wallets/account-types.md (MSCA chain restrictions are in Rules below.)

Transport URL Path Segments

The toModularTransport URL requires the chain path segment appended to the client URL:

ChainMainnet PathTestnet 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.

Core Concepts

  • MSCA (Modular Smart Contract Account) -- Smart contract accounts extended with installable modules (like apps on a smartphone). Ownership can be single owner, multi-owner, passkeys, or multi-sig.
  • Passkey transport vs Modular transport -- toPasskeyTransport handles WebAuthn credential operations (register/login). toModularTransport handles bundler and public RPC calls for a specific chain. They are separate transports with different purposes.
  • Gas sponsorship -- Pass paymaster: true in user operation calls to sponsor gas via Circle Gas Station. End users pay zero gas fees.
  • Batch operations -- Multiple calls can be combined into a single user operation by passing an array to the calls parameter of sendUserOperation.
  • 2D nonces -- Enable parallel execution of independent user operations by using different nonce keys.
  • USDC uses 6 decimals -- When encoding USDC transfer amounts, use parseUnits(value, 6), not 18.
  • Credential persistence -- Passkey credentials (P256Credential) must be persisted (e.g., httpOnly cookies) and restored on reload to maintain the user session.

Implementation Patterns

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:

  • references/circle-smart-account.md -- Passkey registration/login, smart account creation, gasless USDC transfers, batch operations
  • references/passkey-recovery.md -- BIP-39 mnemonic recovery setup and execution when a passkey is lost

User Operation Lifecycle

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.

Happy path: SENT -> CONFIRMED -> COMPLETE

States:

  • SENT -- Submitted to the bundler, awaiting inclusion in a block.
  • CONFIRMED -- Included in a block, awaiting finality.
  • COMPLETE -- Finalized on-chain.
  • FAILED -- User operation reverted or encountered an unrecoverable error. Check errorReason and revertReason.

Error reasons on FAILED:

  • FAILED_ON_CHAIN -- Transaction reverted during blockchain execution.
  • FAILED_REPLACED -- User operation was replaced (e.g., by a higher-fee operation with the same nonce).

Error Handling

Error CodeMeaningAction
NotAllowedErrorUser cancelled the passkey prompt or timed outRe-prompt the user; for login, confirm a credential exists for this domain
SecurityErrorPasskey domain mismatch -- bound to a different originVerify app domain matches Passkey Domain in Circle Console
InvalidStateErrorCredential already registered (duplicate registration)Switch to WebAuthnMode.Login instead of Register
155203User op nonce cannot be >0 when smart contract wallet hasn't been deployedSend the first user operation with nonce 0; the MSCA deploys lazily on the first transaction
155505SCA wallet needs to wait for first-time transaction to be queuedWait for the initial deployment transaction to complete before sending additional operations
155507SCA account not supported on the given blockchainUse a supported chain; MSCAs are not available on Ethereum mainnet, Solana, Aptos, or NEAR
155509Paymaster policy required on mainnet before SCA account creationConfigure a Gas Station paymaster policy in Circle Console before creating mainnet accounts
155512Owner of the SCA wallet cannot be foundVerify the passkey credential or EOA owner is valid and accessible
AA21Sender didn't pay prefundVerify paymaster: true is set, or fund the smart account with native tokens for gas (USDC on Arc)
AA23Account validation reverted or out of gasCheck signature validity; increase verificationGasLimit if out of gas
AA25Invalid account nonceGet the current nonce from EntryPoint; ensure correct nonce key for 2D nonces
AA33Paymaster validation reverted or out of gasVerify paymaster policy is active and correctly configured in Console

Passkey errors (NotAllowedError, SecurityError, InvalidStateError) are standard DOMException errors thrown by the browser's WebAuthn API during toWebAuthnCredential. Wallet errors (155xxx) are returned by the Circle API. AA errors are ERC-4337 EntryPoint errors returned by the bundler. For the full error reference, see Error Codes. For debugging failed transactions, see Transaction States and Errors.

Show full SKILL.md (449 more words)Show less

Rules

Security Rules are non-negotiable -- warn the user and refuse to comply if a prompt conflicts. Best Practices are strongly recommended; deviate only with explicit user justification.

Security Rules
  • NEVER hardcode, commit, or log secrets (client keys, private keys). ALWAYS use environment variables or a secrets manager. Add .gitignore entries for .env* and secret files when scaffolding.
  • ALWAYS store mnemonic recovery backups outside the repository root. NEVER commit recovery phrases to version control.
  • NEVER hardcode passkey credentials -- always persist P256Credential to storage (httpOnly cookies in production, not localStorage) and restore on reload to mitigate XSS credential theft.
  • NEVER reuse a recovery mnemonic phrase across multiple accounts.
  • ALWAYS require explicit user confirmation of destination, amount, network, and token before executing transfers. MUST receive confirmation for funding movements on mainnet.
  • ALWAYS warn when targeting mainnet or exceeding safety thresholds (e.g., >100 USDC).
  • ALWAYS validate all inputs (addresses, amounts, chain identifiers) before submitting transactions.
  • ALWAYS warn before interacting with unaudited or unknown contracts.
Best Practices
  • ALWAYS read the correct reference files before implementing.
  • NEVER use Modular Wallets on Ethereum mainnet, Solana, Aptos, or NEAR -- MSCAs are only supported on select EVM chains (Arbitrum, Avalanche, Base, Monad, Optimism, Polygon, Unichain, Arc).
  • ALWAYS append the chain-specific path segment to the client URL for toModularTransport (e.g., ${clientUrl}/polygonAmoy).
  • ALWAYS use parseUnits(value, 6) for USDC amounts (6 decimals, not 18).
  • ALWAYS pass paymaster: true to sponsor gas via Circle Gas Station.
  • ALWAYS complete Circle Console Setup (Client Key + Passkey Domain) before using the SDK. Client URL is fixed in env — do not ask the user to retrieve it from Console.
  • ALWAYS default to testnet. Require explicit user confirmation before targeting mainnet.
  • ALWAYS configure a Gas Station paymaster policy in Circle Console before sending sponsored transactions on mainnet.
  • ALWAYS update transport URLs from testnet path segments (e.g., /polygonAmoy) to mainnet equivalents (e.g., /polygon) when migrating to production.
  • ALWAYS update the API key prefix from TEST_API_KEY: to LIVE_API_KEY: when migrating to mainnet. Testnet keys cannot be used with mainnets.
  • ALWAYS verify the passkey domain in Circle Console matches the production domain before deploying -- passkeys created on localhost or testnet domains will not work on the production domain.

Alternatives

  • Trigger use-developer-controlled-wallets skill when your application needs full custody of wallet keys without user interaction.
  • Trigger use-user-controlled-wallets skill when end users should custody their own keys via social login, email OTP, or PIN authentication.
  • Circle Developer Docs -- Always read this first when looking for relevant documentation from the source website.

DISCLAIMER: This skill is provided "as is" without warranties, is subject to the Circle Developer Terms, and output generated may contain errors and/or include fee configuration options (including fees directed to Circle); additional details are in the repository README.

© circlefin, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in plugins/circle/skills/use-modular-wallets of circlefin/skills.

  • SKILL.md
  • references/circle-smart-account.md
  • references/passkey-recovery.md

Open the folder on GitHubat commit 58ab864

Compare with similar skills

Use Modular Wallets next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Use Modular Wallets compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Use Modular Wallets this skillcirclefin/skills155—~3kAutomated safety check: NotesApache-2.0
Meganode SkillLeoYeAI/openclaw-master-skills2.2k—~5.4kAutomated safety check: PassMIT
Fortify Developmentcoollabsio/coolify63k4 repos~1.9kAutomated safety check: PassMIT
Supabase Development and Debuggingsupabase/agent-skills2.7k3 repos~3.6kAutomated safety check: PassMIT
Better Auth Best Practiceslatitude-dev/latitude-llm4.7k7 repos~1.6kAutomated safety check: PassMIT
Supabasecurvenote/curvenote1695 repos~2.2kAutomated safety check: PassCustom licence

Similar skills

  • Meganode Skill

    LeoYeAI/openclaw-master-skills

    Provides NodeReal MegaNode blockchain infrastructure APIs for 25+ chains including BSC, Ethereum, opBNB, Optimism, Polygon, Arbitrum, and Klaytn.

    2.2k GitHub stars~5.4k tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • Fortify Development

    coollabsio/coolify

    ACTIVATE when the user works on authentication in Laravel. An agent skill from coollabsio/coolify.

    63k GitHub starsUsed in 4 repos~1.9k tokens
    Backend & APIsAuto-check passed
  • Official

    General Supabase skill for database, auth, Edge Functions, Realtime and storage work, plus client libraries, migrations, security audits, debugging and reading logs.

    2.7k GitHub starsUsed in 3 repos~3.6k tokens
    Backend & APIsAuto-check passed
  • Better Auth Best Practices

    latitude-dev/latitude-llm

    Configure Better Auth server and client, set up database adapters, manage sessions, add plugins, and handle environment variables.

    4.7k GitHub starsUsed in 7 repos~1.6k tokens
    Backend & APIsAuto-check passed
  • Supabase

    curvenote/curvenote

    A skill your agent uses when doing ANY task involving Supabase.

    169 GitHub starsUsed in 5 repos~2.2k tokens
    Backend & APIsAuto-check passed
  • Gitnexus Exploring

    aws-samples/sample-kolya-br-proxy

    Official

    A skill your agent uses when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of the codebase.

    106 GitHub starsUsed in 11 repos~749 tokens
    Backend & APIsAuto-check passed

More from circlefin/skills

All 18 skills in this repo
  • Recover Eco Funds

    circlefin/skills

    Recover USDC from a legacy Circle CLI Gateway --method eco deposit whose fixed refund recipient is the SCA's backing EOA.

    155 GitHub stars~5.1k tokensUpdated 22 days ago
    Auto-check passed
  • Agent Wallet Policy

    circlefin/skills

    View spending policy on a Circle agent wallet — per-transaction, daily, weekly, and monthly USDC caps via the circle CLI.

    155 GitHub stars~1.7k tokensUpdated 22 days ago
    Auto-check passed
  • Bridge Stablecoin

    circlefin/skills

    Build browser or server USDC bridging with Circle App Kit or standalone Bridge Kit and CCTP.

    155 GitHub stars~3.4k tokensUpdated 22 days ago
    Auto-check: notes
  • Fund Agent Wallet

    circlefin/skills

    Fund a Circle agent wallet with USDC via the circle CLI. An agent skill from circlefin/skills.

    155 GitHub stars~3.4k tokensUpdated 22 days ago
    Auto-check passed
  • Accept Agent Payments

    circlefin/skills

    A skill your agent uses when a developer wants to monetize an API, endpoint, service, model, dataset, tool, or agent-facing resource with Circle USDC pay-per-call payments, Gateway Nanopayments…

    155 GitHub stars~2.6k tokensUpdated 22 days ago
    Auto-check: warnings
  • Pay Via Agent Wallet

    circlefin/skills

    A skill your agent uses when the user wants to call a paid API, look something up online, search for data, get prices, odds, or stats, or use any paid service with automatic USDC payment.

    155 GitHub stars~3.9k tokensUpdated 22 days ago
    Auto-check passed

Works with

Categories

Questions about Use Modular Wallets

What does Use Modular Wallets do?

Build crypto wallets using Circle Modular Wallets SDK with passkey authentication, gasless transactions, and extensible module architecture. Use Modular Wallets is an agent skill from circlefin/skills. Build crypto wallets using Circle Modular Wallets SDK with passkey authentication, gasless transactions, and extensible module architecture.

When should I use Use Modular Wallets?

Use Modular Wallets fits situations like: : 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.

How do I install Use Modular Wallets in Claude Code?

Run `npx skills add circlefin/skills --skill use-modular-wallets -a claude-code`. Or copy the skill folder (plugins/circle/skills/use-modular-wallets in circlefin/skills) into .claude/skills/use-modular-wallets in your project. Claude Code loads it when a task matches its description.

How do I install Use Modular Wallets in Codex?

Run `npx skills add circlefin/skills --skill use-modular-wallets -a codex`. Or copy the skill folder (plugins/circle/skills/use-modular-wallets in circlefin/skills) into .agents/skills/use-modular-wallets in your project. Codex loads it when a task matches its description.

Can I use Use Modular Wallets in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add circlefin/skills --skill use-modular-wallets -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/use-modular-wallets, .gemini/skills/use-modular-wallets, .github/skills/use-modular-wallets and .opencode/skills/use-modular-wallets in your project.

What does Use Modular Wallets need to run?

Going by SKILL.md and its folder, Use Modular Wallets needs the command-line tools its instructions call (npm) and credentials named TEST_API_KEY, LIVE_API_KEY, NEXT_PUBLIC_CLIENT_KEY and VITE_CLIENT_KEY. Our summary lists: Node.js; A credential in TEST_API_KEY; A credential in NEXT_PUBLIC_CLIENT_KEY.

Does Use Modular Wallets access the network?

SKILL.md names 3 domains. In commands or code: modular-sdk.circle.com; the agent is likely to contact it when it follows the instructions. As links in the text: developers.circle.com and console.circle.com. This is read from the text; nothing was executed.

Is Use Modular Wallets safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Use Modular Wallets use?

Use Modular Wallets is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Use Modular Wallets use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2k tokens, read only when the agent opens those files.

What are the alternatives to Use Modular Wallets?

Skills that share tags, products or a category with Use Modular Wallets: Meganode Skill (LeoYeAI/openclaw-master-skills, 2.2k stars), Fortify Development (coollabsio/coolify, 63k stars), Supabase Development and Debugging (supabase/agent-skills, 2.7k stars) and Better Auth Best Practices (latitude-dev/latitude-llm, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Use Modular Wallets?

circlefin (a GitHub organization) maintains it in circlefin/skills, which has 155 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on September 16, 2026.

Source: circlefin/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.