ap2

ap2 is a skill for Claude Code from Tyler-R-Kendrick/agent-skills. It costs 86 tokens per session (1,030 once invoked), scanned A, original, MIT.

A protocol for purchases made by an AI agent on a user’s behalf. AP2 stands for Agent Payments Protocol and defines user-approved spending rules, shopping carts, and payment authorization.

In plain words
What is it for?
Use it to implement agent-led shopping, enforce budgets or merchant restrictions, authorize a specific cart, and connect merchants with payment providers.
Why use it?
It records what an agent is allowed to buy and what the user finally approved, helping merchants and payment providers verify the transaction.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the agent-skills plugin — 57 skills shipped together

Good fit Use it to implement agent-led shopping, enforce budgets or merchant restrictions, authorize a specific cart, and connect merchants with payment providers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tyler-r-kendrick/agent-skills/ap2
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 Tyler-R-Kendrick/agent-skills --skill ap2
Clone the repo
git clone --depth 1 https://github.com/Tyler-R-Kendrick/agent-skills

Made for: Claude Code.

Or install agent-skills, the plugin that ships this one along with the rest of its 57 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/tyler-r-kendrick/agent-skills/ap2/github.svg)](https://agentmods.dev/skills/tyler-r-kendrick/agent-skills/ap2)
Your own site
<a href="https://agentmods.dev/skills/tyler-r-kendrick/agent-skills/ap2"><img src="https://agentmods.dev/badge/skills/tyler-r-kendrick/agent-skills/ap2/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/tyler-r-kendrick/agent-skills/ap2"><img src="https://agentmods.dev/badge/skills/tyler-r-kendrick/agent-skills/ap2.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,030 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.00086 $0.01030
Opus 5.5 $0.00034 $0.00412
Sonnet 5.5 $0.00017 $0.00206
Haiku 4.5 $0.00009 $0.00103

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

Security

Grade A, and why

ap2 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 2mo 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.

skills/ai/ap2/SKILL.md · 91 lines

How it starts

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

AP2 — Agent Payments Protocol

Overview

AP2 is an open protocol from Google for secure, interoperable AI-driven commerce. It provides a common language for transactions between agents and merchants, preventing a fragmented payments ecosystem. AP2 is designed as an extension for A2A and MCP, adding a secure commerce layer on top of agent communication.

Core Concepts

Intent Mandate

Captures the conditions under which an AI agent can make a purchase on behalf of the user:

  • Budget limits (per-transaction, daily, monthly)
  • Allowed merchant categories
  • Product type restrictions
  • Time-based constraints

Cart Mandate

Captures the user's final, explicit authorization for a specific cart:

  • Itemized list of products/services
  • Total price and currency
  • User's cryptographic signature (non-repudiable proof of intent)
  • Payment method reference

Payment Flow

User            Agent           Merchant        Payment Provider
  │               │                │                  │
  │── "Buy X" ───►│                │                  │
  │               │── browse ─────►│                  │
  │               │◄── product ────│                  │
  │               │                │                  │
  │◄── confirm? ──│                │                  │
  │── approve ───►│  (Cart Mandate signed)            │
  │               │── purchase ───►│                  │
  │               │                │── charge ───────►│
  │               │                │◄── receipt ──────│
  │               │◄── receipt ────│                  │
  │◄── done ──────│                │                  │

Key Design Principles

Principle Description
User control Users set spending limits and approve purchases via signed mandates
Verifiable credentials Cryptographic signatures provide non-repudiable proof of authorization
Protocol-agnostic payments Supports pull methods (credit/debit cards) initially, with push methods (bank transfers, wallets) planned
Compliant by design Built-in support for regulatory requirements (PCI, PSD2)

Read the full file on GitHub · 91 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. 2mo ago First seen · 91 lines · 86 tokens per session scan A 5ebbe0225c0c

Subscribe to this mod's changes

ap2 is a skill published in the GitHub repository Tyler-R-Kendrick/agent-skills (13 stars, last pushed 5mo ago), licensed MIT. It adds 86 tokens to every session and 1,030 once invoked, about $0.0003 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-31.

Related

ap2 compared with skills from other repositories

ap2 next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ap2Tyler-R-Kendrick/agent-skillsSkill135mo agoMITA86Claude Code
asc-ppp-pricingrorkai/app-store-connect-cli-skillsSkill1.1k2d agoMITA45Claude Code
snaplii-cliSnaplii-Inc/agent-to-merchant-paymentsSkill8122d agoApache-2.0A184Claude Code
stripeCraftOS-dev/CraftBotSkill4022d agoMITA79Claude Code, Codex
ai-slopwaybarrios/opencode-power-packSkill5515d agoMITA61Claude Code
stripemagnus919/agent-skillsSkill1662d agoMITA116Claude Code, Codex
asc-ppp-pricinghanamizuki/solopreneurSkill1564d agoMITA45Claude Code