agentpay-guard: Instructions file for Codex

AGENTS.md

agentpay-guard AGENTS.md is an instructions file for Codex, OpenCode from theMobiusStrip/agentpay-guard. It costs 2,426 tokens per session, scanned A, original, MIT.

A set of instructions for AI agents working on agentpay-guard, a project that protects agent payments and checks for replayed requests. It also includes DrainBench, a benchmark for measuring adversarial harm, and is organized as an npm workspaces monorepo, meaning several packages share one repository.

In plain words
What is it for?
Use it when working on the payment guard, replay middleware, proxy, benchmark, examples, documentation, or related tests, and when checking the repository's build and security rules.
Why use it?
It gives agents the project's definition, package boundaries, security expectations, and required commands in one place. This reduces the chance of changing the wrong package or overlooking verification requirements.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

This is theMobiusStrip/agentpay-guard's own configuration. It tells Codex and OpenCode 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/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/theMobiusStrip/agentpay-guard

Made for: Codex, OpenCode.

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 agentpay-guard AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/themobiusstrip/agentpay-guard/agents-md"><img src="https://agentmods.dev/badge/instructions/themobiusstrip/agentpay-guard/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,426 This file is loaded in full into every session.
When invoked 2,426 The same file — it is already loaded in full.
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.02426 $0.02426
Opus 5.5 $0.00970 $0.00970
Sonnet 5.5 $0.00485 $0.00485
Haiku 4.5 $0.00243 $0.00243

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

Security

Grade A, and why

agentpay-guard AGENTS.md 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.

AGENTS.md · 177 lines

How it starts

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

AGENTS.md — agentpay-guard

Guidance for AI agents (Claude Code, Codex, Cursor, …) working in this repo. CLAUDE.md imports this file, so this is the single source of truth.

What this is

A stateful, agent-agnostic x402 v2 policy plugin (agentpay-guard) + a server-side replay middleware + DrainBench, a reproducible adversarial harm-metric benchmark. npm workspaces monorepo. See README.md for the full story.

Layout

packages/agentpay-guard/               client plugin + restart-safe SQLite entry (publishable)
packages/x402-idempotency-middleware/  server replay middleware (publishable)
packages/agentpay-proxy/               guarded payment proxy service (publishable; CLI + MCP)
packages/drainbench/                   benchmark harness + agent scaffold (private)
examples/                              claude-proxy + raw-viem (offline) + paid-site merchant demo
spike/                                 G0 hook probe (offline) + e2e harness (needs funds)
bench/                                 reproducibility bundle, arm-A baseline, results
docs/reference/                        durable: threat model + attack taxonomy
SECURITY.md                            authoritative security model (read before custody edits)

(docs/process/ — milestone notes — and docs/tutorials/ are private/gitignored, absent in a fresh clone.)

Commands

npm ci && npm run build          # build all publishable packages
npx vitest run                   # full test suite (all packages)
npx tsc -b                       # typecheck published packages
npx tsc -p spike/tsconfig.json                       # typecheck spike
npx tsc -p packages/drainbench/tsconfig.json --noEmit # typecheck bench harness
npx tsc -p examples/tsconfig.json                    # typecheck examples
npx tsc -p bench/tsconfig.json                       # typecheck pinned arm-A
npm run lint                                         # type-aware eslint, all projects
npm run -w @agentpay-guard/spike hook-probe          # offline SDK probe (no funds)
npm run -w @agentpay-guard/drainbench bench          # deterministic A/B -> bench/results/
npm run -w @agentpay-guard/drainbench agent-demo     # stochastic demonstration

Read the full file on GitHub · 177 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 · 177 lines · 2,426 tokens per session scan A 33b72bd68ce1

Subscribe to this mod's changes

agentpay-guard AGENTS.md is an instructions file published in the GitHub repository theMobiusStrip/agentpay-guard (2 stars, last pushed 3mo ago), licensed MIT. It adds 2,426 tokens to every session, about $0.0097 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

Other instructions, from other repositories