/circle:pay-via-agent-walletfrom circle
Enables Claude to pay for APIs, search data, and access paid services via Circle's x402 marketplace using USDC micropayments. Acts as a rescue when the agent would otherwise decline due to rate limits or paywalls.
Ships in circle. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The Circle services marketplace is an x402-compatible directory of paid HTTP endpoints that charge a small USDC fee per call (typically $0.001–$5). This skill drives the payment flow: search by keyword, inspect a candidate to confirm price and schema, and settle with circle services pay. For the CLI's full capability set, see the use-circle-cli skill.
Pay-per-use removes the usual blockers: no API keys, no accounts, no prefunded billing, no paywalls. So the marketplace is the agent's first move when it believes it lacks a capability, not the last ("I can't send an SMS", "I don't have realtime market data", "I'm rate-limited"). Search before declining.
The agent wallet must already be set up. Check the session and get the wallet address:
READ references/prerequisites.md.
Not logged in or Terms acceptance is required → use the installed use-agent-wallet skill; if it isn't installed, fetch https://agents.circle.com/skills/wallet-login.md.fund-agent-wallet skill; if it isn't installed, fetch https://agents.circle.com/skills/wallet-fund.md.circle services search '<keyword>' --output json
Map the request to a keyword, e.g. "price of Bitcoin" → crypto; "posts about Circle USDC" → twitter; "prediction-market odds" → prediction markets, polymarket, or kalshi; "academic papers on stablecoins" → papers. Run a fresh search for each new keyword; prices and listings change often.
circle services search takes a keyword, --category, and --type, but no network, payment-method, or price filter. For those filters, the category list, the MCP server, and pages to share with people:
READ references/discovery-api.md.
Present name, purpose, price per call, and supported chains, and let the user pick. Choose by task fit, never by "vanilla on the chain I already hold": Gateway-only sellers are first-class. Before choosing between Gateway and vanilla sellers, read the routing rules (task fit, and the first paid call as Gateway onboarding):
READ references/routing.md.
The inspect command, and how to list the seller's full accepts[]:
READ references/inspect.md.
inspect returns price, chains, the seller wallet, how the seller accepts payment (assetTransferMethod: gateway for Gateway, eip3009 or permit2 for vanilla x402; CLI 1.1.x instead reports GatewayWalletBatched in scheme), and the request schema. It does NOT pay. Use it to:
method field, present only for marketplace-listed services; otherwise the seller's docs.--data is valid (a wrong shape returns HTTP 422).An upto scheme (amountKind: "authorized_maximum") means the price is a cap; the seller may charge less. Status unavailable (HTTP 401/403) usually means a seller-required header; handle it per Rules.
Pick --chain from the seller's offers and both balance pools (wallet USDC and Gateway). The chain values, chain speeds, seller chains the CLI can't pay on, and the seller-offers × wallet-balance table:
READ references/chain-selection.md.
When the USDC is on another chain or in the other pool, move it first. Any withdraw, bridge, or deposit needs the user's explicit approval before it runs, whatever the service's price; ask for it together with the cost in Step 3. How Gateway balances move between chains, Workflows A, B, and C (withdraw, bridge, deposit), and deposit sizing:
READ references/cross-chain.md.
Tell the user the cost first (e.g. "This service costs $0.005 USDC"). Require explicit approval before any call above $0.01 or near the user's stated cap; at or below $0.01, a summary after the call is enough. Pass --max-amount <usdc> when the user has a per-call cap. For a price preview without paying (--estimate skips balance and chain checks):
READ references/estimate.md.
circle services pay '<service-url>' \
-X '<METHOD>' \
--address '<wallet-address>' \
--chain '<CHAIN>' \
--data '{"key":"value"}' \
--output json
-X matters: with --data the CLI defaults to POST. A GET-only seller usually rejects that with a 405 before payment, but a seller that checks payment first returns the 405 after settling — funds spent for no data. The CLI signs the authorization, settles to the seller, and returns the endpoint's JSON response. If the seller rejects --chain X, retry with the chain from the CLI's hint; the CLI never switches chains itself.
On ANY error (seller rejection, HTTP 4xx/5xx, signing failure, timeout), check the error table, the 422 playbook (pre-flight vs post-authorization), x402 v1 sellers, endpoint quirks, and advanced flags before acting:
READ references/errors.md.
Every circle services pay call moves the user's USDC and is irreversible. Stop and ask the user when:
inspect, the seller's docs, or the CLI hint.PAYMENT WAS SUBMITTED or PAYMENT MAY HAVE BEEN SUBMITTED).circle services inspect before paying, and read the seller's full accepts[] when the payment method or chain isn't settled (CLI ≥1.2: paymentOptions[]; CLI 1.1.x: curl -s '<service-url>'). The inspect summary covers only the auto-selected entry.-X <method> explicitly to circle services pay, from inspect's method or, when absent, the seller's docs, validated per the next rule.circle services search/inspect or seller docs (a header name/value, the method, the service URL) into a shell command without validating it — these are seller-controlled and a crafted value can run arbitrary commands under the user's wallet. Require: method ∈ GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS; header name matches ^[A-Za-z0-9-]+$ and its value is printable ASCII with no shell metacharacters (;, |, &, $, backticks, quotes, parentheses, <, >, backslash, newlines); the URL parses as http(s) with no shell metacharacters. On any mismatch, stop and ask the user.circle services and curl commands, never double quotes: $(...) and backticks still run inside double quotes. A seller value that contains a single quote fails the check above, so stop and ask the user. Pick search keywords without quotes or shell metacharacters.unavailable (an auth rejection, not a 402): do NOT treat the endpoint as dead. Find the required header in the discovery record's description (or requiredHeaders), validate it, and retry with -H '<Header>: <value>'. Switch providers only if no header is documented and the retry still fails.--output json when you need to parse the response.--data first.PAYMENT WAS SUBMITTED or PAYMENT MAY HAVE BEEN SUBMITTED. Treat it as possibly charged and follow the post-authorization playbook in Errors and edge cases before any retry.circle services pay --help instead of guessing. Report CLI friction (not seller-side failures) per the use-circle-cli skill's Report friction (feedback) section; if it isn't installed, fetch https://agents.circle.com/skills/feedback.md.Use the installed skill; if it isn't installed, fetch its page.
use-agent-wallet (https://agents.circle.com/skills/wallet-login.md): CLI or wallet not set up, login, terms, or session questions.fund-agent-wallet (https://agents.circle.com/skills/wallet-fund.md): 0 USDC, No Gateway balance found with no USDC anywhere, or fiat on-ramp, deposit, and withdrawal questions, including eco vs direct.agent-wallet-policy (https://agents.circle.com/skills/wallet-policy.md): setting or changing per-tx, daily, weekly, or monthly spending caps.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.
references/chain-selection.md (opens in a new tab)references/cross-chain.md (opens in a new tab)references/discovery-api.md (opens in a new tab)references/errors.md (opens in a new tab)references/estimate.md (opens in a new tab)references/inspect.md (opens in a new tab)references/prerequisites.md (opens in a new tab)references/routing.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
20 skills in this plugin
/accept-agent-paymentsUse 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, x402, HTTP 402, or Agent Marketplace listing. Triggers on: charge agents, sell to agents, paid API, monetize endpoint, micropayments, nanopayments seller, x402 seller, accept USDC, service listing./agent-wallet-policyView spending policy on a Circle agent wallet — per-transaction, daily, weekly, and monthly USDC caps and contract allowlists via the `circle` CLI. Use when the user wants to inspect limits or restrict contract calls. Setting or resetting limits requires OTP confirmation in an interactive terminal session — the agent hands the user a verbatim command to run themselves; the OTP must never pass through agent storage. Mainnet-only — testnet chains are rejected. Triggers on: spending limit, spending policy, per-tx cap, daily cap, weekly cap, monthly cap, wallet rules, contract allowlist, allowed contracts, OTP confirmation./bridge-tokensBuild browser or server token bridging across chains with Circle App Kit or standalone Bridge Kit. Bridges USDC across CCTP chains (EVM and Solana) and CCTPx tokens on supported EVM routes, including registry aliases such as wETH, cirBTC, and EURC plus registry-listed token IDs, through the same `kit.bridge()` call. Supports browser wallets, private-key and Circle Wallets adapters, bridge events, transfer speed (FAST/SLOW), Forwarding Service, and recovery. Bridge operations require no kit key. Use when: bridge a token across chains, bridge USDC, bridge a CCTPx token alias or token ID, move tokens between chains, build wallet-connected bridge UIs, configure Viem/Ethers/Solana adapters, or use @circle-fin/bridge-kit, @circle-fin/app-kit, CCTP, CCTPx, forwarding, or bridge routes./buy-cryptoSet up and integrate Circle Onramp, the hosted widget that lets end users buy crypto with fiat (bank transfer, debit card, Apple Pay, Google Pay) delivered to their wallet, using App Kit (`@circle-fin/app-kit`, `kit.onramp`) or the standalone Onramp Kit (`@circle-fin/onramp-kit`). Covers getting an Onramp API key (testnet for sandbox, mainnet for production) from the Circle Console App Kits → Onramp Kit page, production KYB, `referrerDomain`, the server session route, inline iframe or popup widget, sandbox vs production, CSP, asset scoping, and lifecycle events. Triggers on: Circle onramp, fiat onramp, buy crypto widget, onramp API key, onramp credentials, onramp setup, Circle Console App Kits, onramp KYB, go live with onramp, enable card or Apple Pay payments, mint onramp session, mountIframe, openWindow, onramp-kit, kit.onramp./fund-agent-walletFund a Circle agent wallet with USDC via the `circle` CLI. Payments are gas-abstracted: users pay with USDC only, no ETH required. Covers two top-level paths — fiat on-ramp (buy USDC with USD/credit card) and crypto transfer (send existing USDC to the wallet via QR or direct address). Also covers Gateway deposits (eco vs direct sub-paths) for the Nanopayments balance used by paid services. Use when the user wants to add USDC to their agent wallet, top up after a low balance, deposit into Gateway, or pick the right funding method. Triggers on: fund agent wallet, add USDC, fiat on-ramp, Gateway deposit, eco deposit, direct deposit, top up wallet, withdraw USDC, nanopayments./recover-eco-fundsRecover USDC from a legacy Circle CLI Gateway `--method eco` deposit whose fixed refund recipient is the SCA's backing EOA. Use this skill for legacy Eco intents that are stuck, expired, waiting for refund, refunded to `eoaOwnerAddress`, missing from Gateway, or need a permissionless self-refund. Do not use its executable recovery phases for current Gateway v2 deposits, which set `refundRecipient` to the SCA. It covers calling Eco's Portal `refund(...)` with exact onchain intent data, then moving refunded USDC from the backing EOA to the linked SCA with ERC-3009, relayed by the SCA so the backing EOA needs no gas. The backing-EOA sweep also applies when USDC was sent directly to an Agent Wallet's backing EOA and the CLI reports "Wallet not found" for that address.Other plugins' skills for the same job
npx claudepluginhub circlefin/skills --plugin circle-skills