agentpay-guard: Skill for Claude Code

.claude/skills/adversarial-review/SKILL.md

adversarial-review is a skill for Claude Code from theMobiusStrip/agentpay-guard. It costs 143 tokens per session (989 once invoked), scanned A, original, MIT.

Instructions for an independent security review of changes to a specific custody system, including code that controls spending, release, and duplicate requests.

In plain words
What is it for?
Use it when reviewing changes covered by SECURITY.md and the listed custody files; it checks the relevant diff against the system's security rules.
Why use it?
A fresh reviewer can look for failures that the person who wrote the change may overlook, such as bypasses, unsafe defaults, or overly broad claims.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents; mentions AGENTS.md.

This is theMobiusStrip/agentpay-guard's own configuration. It tells Claude Code how to work on agentpay-guard itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agentpay-guard configures →

Reuse

Borrowing it

Nothing to install: this file belongs to theMobiusStrip/agentpay-guard. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/theMobiusStrip/agentpay-guard/main/.claude/skills/adversarial-review/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/theMobiusStrip/agentpay-guard

Made for: Claude Code.

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 adversarial-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/themobiusstrip/agentpay-guard/adversarial-review/github.svg)](https://agentmods.dev/skills/themobiusstrip/agentpay-guard/adversarial-review)
Your own site
<a href="https://agentmods.dev/skills/themobiusstrip/agentpay-guard/adversarial-review"><img src="https://agentmods.dev/badge/skills/themobiusstrip/agentpay-guard/adversarial-review/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 adversarial-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/themobiusstrip/agentpay-guard/adversarial-review"><img src="https://agentmods.dev/badge/skills/themobiusstrip/agentpay-guard/adversarial-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 143 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 989 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.00143 $0.00989
Opus 5 $0.00072 $0.00495
Sonnet 5 $0.00029 $0.00198
Haiku 4.5 $0.00014 $0.00099

Measured 9d ago against content hash 9bf65decc07d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

adversarial-review 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 9d 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.

.claude/skills/adversarial-review/SKILL.md · 76 lines

How it starts

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

Adversarial review — custody spine

The writing context does not get to grade its own work: it shares its own blind spots, which is exactly how a real overspend or fail-open slips through. The reviewer MUST be a separate subagent with fresh context.

Scope = the custody spine: the files in AGENTS.md → Security (the atomic store, evaluate.ts, guard.ts, policy/*.ts, and the x402-idempotency-middleware). If the diff doesn't touch those, say so and stop — a broad code review is a different tool (/code-review).

1. Scope the diff

Collect the diff for the custody-spine files from the merge-base with the default branch to HEAD (or the working-tree diff if uncommitted). If none of those files changed, report "no custody-spine changes" and stop.

2. Independent review (Agent tool — a subagent that did NOT write this code)

Spawn a reviewer subagent. Give it: SECURITY.md, the AGENTS.md → Security invariant table, the diff, and the files it touches. Instruct it to attack like a staff custody/security engineer, not to confirm. For each hunk, find a concrete way this change either widens an item in SECURITY.md's "Honest limitations" or breaks a Security-table invariant. Hunt specifically for:

  • Cap overspend / double-count in any interleaving — window-slide (pending reservation stops holding cap before terminal), settled spend dropped or double-counted, aggregate/per-payee accounting wrong.
  • Early releasereleaseExpired freeing a still-settleable reservation; skew applied in the wrong direction; safeReleaseAt not covering the signed validBefore.
  • Fail-open — a guard hook path that returns void/undefined (⇒ allow) on error instead of { abort: true }; an envelope/intent/dedup check bypassable.
  • Lifecycle mis-correlationonFailure releasing a signed authorization's hold; ignored transition() CAS returns; nonce/FIFO correlation crossing concurrent identical payments.
  • Replay — the middleware keying on the client-supplied payment-identifier instead of the payer-signed authorization; a crash permanently stranding a payment; a stale worker overwriting a fresh grant.
  • Honest-scope overclaim — a doc/comment claiming a guarantee the code doesn't provide, or relabeling arm A as "documented", or dropping a DrainBench fairness disclosure.

Read the full file on GitHub · 76 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. 9d ago First seen · 76 lines · 143 tokens per session scan A 9bf65decc07d

Subscribe to this mod's changes

adversarial-review is a skill published in the GitHub repository theMobiusStrip/agentpay-guard (2 stars, last pushed 1mo ago), licensed MIT. It adds 143 tokens to every session and 989 once invoked, about $0.0007 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-31.