ap2-agent-authorization

ap2-agent-authorization is a skill for Claude Code from OrcaQubits/agentic-commerce-skills-plugins. It costs 67 tokens per session (949 once invoked), scanned A, original, MIT.

A guide to the AP2 Agent Authorization Framework, which defines how a person gives an agent limited, verifiable permission to act for them. It covers signed records that link the person, agent, and allowed action.

In plain words
What is it for?
Use it to design authorization and delegation flows for agents, including different rules for when a person is present or absent.
Why use it?
It helps prevent an agent from making purchases or other decisions outside the permission the person granted.

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 to design authorization and delegation flows for agents, including different rules for when a person is present or absent.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/orcaqubits/agentic-commerce-skills-plugins/ap2-agent-authorization
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-agent-authorization
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-agent-authorization

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/orcaqubits/agentic-commerce-skills-plugins/ap2-agent-authorization"><img src="https://agentmods.dev/badge/skills/orcaqubits/agentic-commerce-skills-plugins/ap2-agent-authorization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 949 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.00067 $0.00949
Opus 5.5 $0.00027 $0.00380
Sonnet 5.5 $0.00013 $0.00190
Haiku 4.5 $0.00007 $0.00095

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

Security

Grade A, and why

ap2-agent-authorization 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-agent-authorization/SKILL.md · 65 lines

How it starts

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

AP2 Agent Authorization Framework

Before writing code

Fetch live docs:

  1. Fetch https://ap2-protocol.org/ap2/agent_authorization/ for the framework itself — this is the foundational model everything else sits on.
  2. Fetch https://ap2-protocol.org/ap2/specification/ for the current mandate types and their schemas.
  3. Fetch https://ap2-protocol.org/glossary/ — AP2's terminology has changed across releases and the glossary is the fastest way to catch a rename.
  4. Web-search site:github.com google-agentic-commerce AP2 mandate open closed for reference types under code/.

Terminology warning: AP2 renamed and restructured core objects between releases. Confirm the current names against the live glossary before writing any type. Never carry an object name forward from an older tutorial, blog post, or this skill.

Conceptual Architecture

The problem it solves

Even well-behaving agents need to have their behavior tightly constrained above what a normal authorization model would require of human users.

A human authenticating to a site is authorizing themselves. An agent acting for a human is a delegation, and delegation needs an explicit, verifiable, bounded grant. The Agent Authorization Framework is that grant.

Mandates are the authorization objects

Mandates represent user-approved permissions delegated to an agent, and they chain cryptographically to prove authorization end to end. The framework defines two states:

State Bound to a transaction? Contains Bound to
Open No Constraints on what a valid closed mandate may contain A particular agent
Closed Yes — via Key Binding JWT The specific action being authorized A specific transaction, presented to a verifier

Open and closed are not two different objects; they are two states of the same authorization, and the open→closed transition is where the agent's discretion gets spent.

Read the full file on GitHub · 65 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 First seen · 65 lines · 67 tokens per session scan A 550af3645dae

Subscribe to this mod's changes

ap2-agent-authorization is a skill published in the GitHub repository OrcaQubits/agentic-commerce-skills-plugins (39 stars, last pushed 1mo ago), licensed MIT. It adds 67 tokens to every session and 949 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-09-15.

Related

Other skills, from other repositories

mppx

TypeScript SDK for the Payment HTTP Authentication Scheme. Handles 402 Payment Required flows with Tempo, Stripe, and other payment methods. Use when integrating payments or mppx into a client or server application.

internet-court/internet-court-skill · 45 tokens

archestra-dev-frontend

Use when modifying Archestra frontend Next.js/React code, UI components, forms, TanStack Query hooks, generated API client usage, frontend copy, or documentation links.

archestra-ai/archestra · 40 tokens

archestra-dev-testing

Use for test selection and quality across backend, frontend, and e2e; load its backend reference for Vitest projects, mocking, DB fixtures, and performance.

archestra-ai/archestra · 38 tokens

managing-archestra-releases

Runs rolling beta releases, stable patches, and complete stable-line cutovers. Use when backporting fixes, cutting or retiring release branches, configuring release protections, testing artifacts, recovering failed runs, or approving releases.

archestra-ai/archestra · 51 tokens

migrate-to-archestra

Migrate an existing agentic PoC/pilot (Claude Code project files, MCP configs, hooks, local tools, openclaw config, or similar hand-rolled setup artifacts) into an Archestra instance. Use when the user wants to move, port, or convert an existing agentic setup into an Archestra pilot.

archestra-ai/archestra · 73 tokens

archestra-dev-interactions-migrations

Use BEFORE writing or running any Drizzle migration that touches the interactions table (or any other very large, write-hot table). The interactions table is the platform's biggest, append-heavy table — every LLM proxy call writes a row — so a careless migration can take a write-blocking lock and stall the proxy.…

archestra-ai/archestra · 118 tokens