ap2-dev-patterns

ap2-dev-patterns is a skill for Claude Code, Codex from OrcaQubits/agentic-commerce-skills-plugins. It costs 54 tokens per session (1,416 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/orcaqubits/agentic-commerce-skills-plugins/ap2-dev-patterns
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, Codex.

Or install ap2-agentic-payments, the plugin that ships this one along with the rest of its 18 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.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.svg" alt="Measured on agentmods" 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,416 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00054 $0.01416
Opus 5 $0.00027 $0.00708
Sonnet 5 $0.00011 $0.00283
Haiku 4.5 $0.00005 $0.00142

Measured 3d ago against content hash 7bbff95267e3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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/specification/ for the latest protocol details
  2. Fetch https://ap2-protocol.org/topics/ap2-and-ucp/ for UCP integration patterns
  3. Fetch https://ap2-protocol.org/topics/ap2-and-x402/ 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 Cart Mandatecheckout_mandate is a UCP-specific concept that wraps the commerce checkout authorization, while AP2's Cart 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. 3d 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 (38 stars, last pushed 3mo ago), licensed MIT. It adds 54 tokens to every session and 1,416 once invoked, about $0.0003 per session on Opus 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

chaingpt

Build with the ChainGPT Web3 AI developer platform. Full API/SDK reference and project scaffolding for: Web3 AI Chatbot & LLM, AI NFT Generator, Smart Contract Generator, Smart Contract Auditor, AI Crypto News, AgenticOS Twitter agents, and Solidity LLM. Use when building blockchain apps, Web3 chatbots, NFT tools…

internet-court/internet-court-skill · 132 tokens

lifi

LI.FI REST API for cross-chain and same-chain token swaps, bridging, DeFi deposits (Composer), yield discovery (Earn), and intent-based execution (Intents). USE THIS SKILL WHEN USER WANTS TO: Swap tokens between different blockchains (e.g., "swap USDC on Ethereum to ETH on Arbitrum") Bridge tokens to another chain…

internet-court/internet-court-skill · 299 tokens

near-api-js

Guide for developing with near-api-js v7 - the JavaScript/TypeScript library for NEAR blockchain interaction. Use when: (1) building apps that interact with NEAR blockchain, (2) creating/signing transactions, (3) calling smart contracts, (4) managing accounts and keys, (5) working with NEAR RPC API, (6) handling…

internet-court/internet-court-skill · 159 tokens

x402-erc7710

Design and implement demos combining x402 HTTP payments with ERC-7710 smart contract delegations and ERC-7715 wallet permission requests for subscriptions, bounded agent budgets, recurring spend, pay-per-use APIs, and agentic commerce.

internet-court/internet-court-skill · 53 tokens

kleros-curate

Interact with Kleros Curate registries across Ethereum Mainnet, Gnosis Chain, and Sepolia. Use when the user mentions Curate, Light Curate/LightGeneralizedTCR/LGTCR, Stake Curate/PermanentGTCR/PGTCR, Scout, token-curated registry/TCR, token lists, address/CDN tags, Goldsky, MetaEvidence, Verify Your List, or Curate…

internet-court/internet-court-skill · 216 tokens

magicblock

Design, implement, and debug MagicBlock applications on Solana. Covers Ephemeral Rollups with delegated state; ER/PER architecture and settlement; private payments and token flows; oracles and randomness; scheduling and temporary authority; security and local validation. Use for MagicBlock product selection…

internet-court/internet-court-skill · 70 tokens