Skip to content
Skill

Ap2

Lets an agent build or review AP2 signed payment mandates for shopping, merchants

Ap2 is an open-source agent skill for finance and payments. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
5
Last commit
License
MIT
Listing updated

Similar skills

About Ap2

This skill guides an AI coding agent through the Agent Payments Protocol v0.2, which lets a shopping agent prove a user approved a specific purchase using signed Checkout and Payment Mandates built as SD-JWT verifiable credentials. It covers the roles involved (shopping agent, merchant, credential provider, payment processor and trusted surface), the Human Present and Human Not Present flows, and the open and closed mandate types with their constraints.

The skill sets out a step-by-step workflow: choose the protocol version and roles, assemble mandate content, obtain user-signed mandates, then present and verify them, with each verifier returning a signed receipt. Its invariants stress deterministic verification in code rather than LLM output, binding checkout hashes, key binding with cnf and sd_hash, rejecting unknown constraints and avoiding double spend. Reference files cover schemas, dispute evidence, integration with UCP, A2A and MCP, legacy v0.1 upgrades, and comparisons with Visa Trusted Agent Protocol, ACP and x402 v2.

Using it assumes familiarity with SD-JWT, OpenID4VP and TypeScript, since the bundled verification sketch is in TypeScript. It ships no scripts, and it is pinned to AP2 v0.2 as a draft build while the protocol moves into FIDO standardization.

When your agent uses it

AP2 Agent Payments Protocol: authorize AI agent payments with signed Checkout and Payment Mandates (SD-JWT verifiable digital credentials), following AP2 v0.2 (current, draft posture build; no preview). Use when building or reviewing a shopping agent, merchant, credential provider, payment processor or trusted surface in agent-initiated payments: open and closed mandates, mandate.checkout.1 and mandate.payment.1, checkout_jwt and checkout_hash, constraints such as checkout.line_items, payment.amount_range, payment.budget and payment.agent_recurrence, Human Present and Human Not Present flows, key binding with cnf and sd_hash, OpenID4VP delegation, mandate receipts, double-spend and dispute evidence, and how AP2 relates to A2A, MCP and UCP. Also upgrades v0.1 Intent and Cart Mandates and compares Visa Trusted Agent Protocol, Agentic Commerce Protocol (ACP) and x402 v2. Triggers: ap2, agent payments protocol, agentic payments, payment mandate, intent mandate, cart mandate, checkout mandate, verifiable intent.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 7 files (71 KB) on GitHub on 2 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the better-supabase plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add ScaleDockHQ/better-supabase
/plugin install better-supabase@better-supabase

Or copy only this skill to ~/.claude/skills/ap2:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/ap2 &&
cp -R "$tmp/.agents/skills/ap2" ~/.claude/skills/ap2 &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/ap2 inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/ap2 to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/ap2 &&
cp -R "$tmp/.agents/skills/ap2" ~/.agents/skills/ap2 &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/ap2 inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/ap2 to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/ap2 &&
cp -R "$tmp/.agents/skills/ap2" ~/.cursor/skills/ap2 &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/ap2 inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/ScaleDockHQ/better-supabase.git --path .agents/skills/ap2

Or copy the folder to ~/.gemini/skills/ap2 yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/ap2:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/ap2 &&
cp -R "$tmp/.agents/skills/ap2" ~/.copilot/skills/ap2 &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/ap2 inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/ScaleDockHQ/better-supabase.git

Then copy better-supabase/.agents/skills/ap2 into your agent's skills folder as ap2. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Mandate authorization model
Explains open and closed Checkout and Payment Mandates as SD-JWT credentials and how they bind together.
Role-based verification
Sets out the checks each role in an AP2 transaction must run and the receipts it returns.
Human present and absent flows
Covers purchases where the user approves live and autonomous purchases approved in advance.
Constraint evaluation rules
Lists constraint types such as line items, amount ranges, budgets and recurrence, and how unknown ones fail.
Protocol version upgrade
Gives a checklist for moving v0.1 Intent and Cart Mandates to the v0.2 format.
Security and dispute evidence
Covers double-spend prevention, payment credential release and storing receipts for disputes.

Good for

  • Add AP2 Checkout Mandate verification to a merchant's checkout
  • Review how a shopping agent handles user-signed payment mandates
  • Plan an upgrade from AP2 v0.1 mandates to v0.2
  • Design an autonomous purchase flow with open payment mandates and spending limits
  • Compare AP2 with x402 or Agentic Commerce Protocol for agent payments

Ap2 FAQ

Which AP2 version does the skill target?

It targets AP2 v0.2, pinned to repository tag v0.2.0 and described as a draft posture build, while AP2 v0.1 is treated as legacy to upgrade from.

What does the skill need from the user?

It asks for the target version, the role being built, the delegation model, the commerce protocol carrying AP2 and the revision, unless the user names another.

Is the skill open source?

Yes, it is licensed under MIT.

Which agent clients does Ap2 work with?

It is a plain SKILL.md folder in the shared agent skills format, so it applies to all listed clients.

How do I install Ap2 in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/ap2 to use it in all your projects, or to .claude/skills/ap2 in one project. Or install the better-supabase plugin, which includes it: /plugin marketplace add ScaleDockHQ/better-supabase, then /plugin install better-supabase@better-supabase.

Does Ap2 run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Ap2?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Ap2?

The closest alternatives to Ap2 are Agent payment x402, Axiom payments, Accept agent payments, Adyen knowledge patch and Pay with app.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from ScaleDockHQ/better-supabase

  1. Apply the CommonMark 0.31.2 spec when parsing or rendering Markdown

    • Open source
    • 5 GitHub stars
    • Files and documents
  2. Publish Agent Cards and run agent-to-agent calls over the A2A 1.0 protocol

    • Open source
    • 5 GitHub stars
    • Developer tools
  3. Lets an agent stream runs, tool calls and shared state to user-facing apps over AG-UI 1.0

    • Open source
    • 5 GitHub stars
    • Developer tools
  4. Lets an AI agent drive Chrome or Chromium through a fast browser automation CLI

    • Open source
    • 5 GitHub stars
    • Browser automation
  5. Guides an agent to write, review and validate SKILL.md skills against the Agent Skills

    • Open source
    • 5 GitHub stars
    • Developer tools
  6. Write, place, migrate and review AGENTS.md instruction files for coding agents

    • Open source
    • 5 GitHub stars
    • Developer tools