ap2-dev-patterns

ap2-dev-patterns is a skill for Claude Code from OrcaQubits/agentic-commerce-skills-plugins. It costs 54 tokens per session (1,409 once invoked), scanned A, original, MIT.

A guide to AP2, a protocol for payments made through cooperating AI agents, including shopping, merchant, credential, and payment agents. It also covers UCP integration and x402 cryptocurrency payments.

In plain words
What is it for?
Use it when designing or implementing multi-agent payment flows, UCP integrations, x402 payments, or mock-provider tests.
Why use it?
It helps organize the many parts of an agent payment system, including testing and production deployment.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the ap2-agentic-payments plugin — 20 skills, 1 agent shipped together

Good fit Use it when designing or implementing multi-agent payment flows, UCP integrations, x402 payments, or mock-provider tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/orcaqubits/agentic-commerce-skills-plugins/ap2-dev-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add OrcaQubits/agentic-commerce-skills-plugins --skill ap2-dev-patterns
Clone the repo
git clone --depth 1 https://github.com/OrcaQubits/agentic-commerce-skills-plugins

Made for: Claude Code.

Or install ap2-agentic-payments, the plugin that ships this one along with the rest of its 20 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ap2-dev-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/orcaqubits/agentic-commerce-skills-plugins/ap2-dev-patterns/github.svg)](https://agentmods.dev/skills/orcaqubits/agentic-commerce-skills-plugins/ap2-dev-patterns)
Your own site
<a href="https://agentmods.dev/skills/orcaqubits/agentic-commerce-skills-plugins/ap2-dev-patterns"><img src="https://agentmods.dev/badge/skills/orcaqubits/agentic-commerce-skills-plugins/ap2-dev-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ap2-dev-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/orcaqubits/agentic-commerce-skills-plugins/ap2-dev-patterns"><img src="https://agentmods.dev/badge/skills/orcaqubits/agentic-commerce-skills-plugins/ap2-dev-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,409 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.01409
Opus 5.5 $0.00022 $0.00564
Sonnet 5.5 $0.00011 $0.00282
Haiku 4.5 $0.00005 $0.00141

Measured 1mo ago against content hash 2bb310aac12a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ap2-dev-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ap2-agentic-payments/skills/ap2-dev-patterns/SKILL.md · 154 lines

How it starts

The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AP2 Development Patterns

Before writing code

Fetch live docs:

  1. Fetch https://ap2-protocol.org/ap2/specification/ for the latest protocol details
  2. Fetch https://ap2-protocol.org/overview/ for UCP integration patterns
  3. Fetch https://ap2-protocol.org/overview/ for x402 crypto integration
  4. Web-search site:github.com google-agentic-commerce AP2 samples for reference architectures

Conceptual Architecture

Multi-Agent Payment Architecture

The standard AP2 architecture involves four agents communicating via A2A:

┌──────────────────────────────────────────────────┐
│                    User                           │
│          (trusted device surface)                 │
└──────────┬───────────────────────────────────────┘
           │ intent + signatures
┌──────────▼───────────────────────────────────────┐
│            Shopping Agent (SA)                     │
│    Orchestrator — coordinates the full flow        │
└──┬──────────────┬────────────────────────────────┘
   │              │
   │ A2A          │ A2A
   │              │
┌──▼──────┐  ┌───▼──────────┐
│ Merchant │  │ Credentials  │
│ Agent    │  │ Provider     │
│          │  │              │
│ catalog  │  │ payment      │
│ cart     │  │ methods      │
│ signing  │  │ tokenization │
└────┬─────┘  └──────────────┘
     │
     │ (Merchant → MPP)
     │
┌────▼─────────────┐
│ Merchant Payment  │
│ Processor (MPP)   │
│                   │
│ authorization     │
│ settlement        │
│ Payment Mandate   │
│ challenges        │
└────────┬──────────┘
         │
    ┌────▼──────────┐
    │ Network/Issuer │
    │ (Visa, MC,     │
    │  banks)        │
    └────────────────┘

Important: The SA communicates with the Merchant and the CP via A2A. The Merchant communicates with the MPP. The SA does not directly communicate with the MPP.

UCP Integration Pattern

UCP (Universal Commerce Protocol) operationalizes AP2:

  • UCP's Checkout object maps to a commerce-level checkout flow
  • UCP's checkout_mandate is distinct from (but related to) AP2's Checkout Mandate — checkout_mandate is a UCP-specific concept that wraps the commerce checkout authorization, while AP2's Checkout Mandate is the cryptographically signed VDC binding user consent to specific transaction terms
  • UCP's /complete_checkout API = AP2's payment authorization step
  • PaymentMandate (constructed by the MPP) proves payment authorization for the network/issuer

Read the full file on GitHub · 154 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed 2bb310aac12a
  2. 1mo ago First seen · 154 lines · 54 tokens per session scan A 7bbff95267e3

Subscribe to this mod's changes

ap2-dev-patterns is a skill published in the GitHub repository OrcaQubits/agentic-commerce-skills-plugins (39 stars, last pushed 1mo ago), licensed MIT. It adds 54 tokens to every session and 1,409 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

metengine-data-agent

Real-time smart money analytics API for Polymarket prediction markets, Hyperliquid perpetual futures, and Meteora Solana LP/AMM pools. 63 endpoints. Pay-per-request via x402 on Solana Mainnet USDC. No API keys.

internet-court/internet-court-skill · 57 tokens

okx-agent-payments-protocol

Use when an agent hits HTTP 402 / payment-required, or the user mentions x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Payment, permit2, upto, metered billing, a payment channel / voucher / session, channelId / channelid, opening / closing / topping up / settling / refunding a…

internet-court/internet-court-skill · 231 tokens

write-contract

Write production-quality GenLayer intelligent contracts. Always pins concrete GenVM runner version hashes and never uses local-only test/latest runner aliases. Covers equivalence principles, storage rules, LLM resilience, and cross-contract interaction.

internet-court/internet-court-skill · 46 tokens

jupiter-lend

Interact with Jupiter Lend Protocol. Read-only SDK (@jup-ag/lend-read) for querying liquidity pools, lending markets (jlTokens), and vaults. Write SDK (@jup-ag/lend) for lending (deposit/withdraw) and vault operations (deposit collateral, borrow, repay, manage positions).

internet-court/internet-court-skill · 68 tokens

okx-dapp-discovery

Plugin router for 20 third-party DeFi protocols (Polymarket, Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kamino, Orca, Meteora, Clanker, pump.fun, Uniswap) and their protocol-native tokens (HYPE, HLP, eETH, weETH, stETH, wstETH, LDO, GHO, CAKE, CRV, COMP, RAY, ETHFI…

internet-court/internet-court-skill · 351 tokens

agent-wallet

Give the AI agent its own EVM wallet with admin-controlled policies the agent CANNOT bypass even under prompt injection. Encrypted keystore (AES-256-GCM, scrypt KDF), policy file the agent has no tool to write, deterministic policy gate on every signing operation, optional local HTTP dashboard. Triggers: agent wallet…

internet-court/internet-court-skill · 109 tokens