x402-stellar-kit: Instructions file for Codex

AGENTS.md

x402-stellar-kit AGENTS.md is an instructions file for Codex, OpenCode from CodeStrux/x402-stellar-kit. It costs 3,410 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for x402-stellar-kit, a TypeScript kit for charging for web resources and paying those charges on the Stellar network. The instructions define how payment requests, approvals, signing, and settlement must be separated.

In plain words
What is it for?
Use them when modifying the kit, adding paid HTTP endpoints, handling payment approval, or connecting accounts across a custody boundary.
Why use it?
They prevent an agent from authorizing payments, bypassing denials, changing payment details, or treating a request as proof that money was sent.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is CodeStrux/x402-stellar-kit's own configuration. It tells Codex and OpenCode how to work on x402-stellar-kit 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 x402-stellar-kit configures →

Reuse

Borrowing it

Nothing to install: this file belongs to CodeStrux/x402-stellar-kit. 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/CodeStrux/x402-stellar-kit/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/CodeStrux/x402-stellar-kit

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 x402-stellar-kit AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/codestrux/x402-stellar-kit/agents-md"><img src="https://agentmods.dev/badge/instructions/codestrux/x402-stellar-kit/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,410 This file is loaded in full into every session.
When invoked 3,410 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.03410 $0.03410
Opus 5.5 $0.01364 $0.01364
Sonnet 5.5 $0.00682 $0.00682
Haiku 4.5 $0.00341 $0.00341

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

Security

Grade A, and why

x402-stellar-kit 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 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.

AGENTS.md · 216 lines

How it starts

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

Working with x402-stellar-kit

x402-stellar-kit is an offline-first TypeScript kit for charging for HTTP resources and paying x402 challenges on Stellar. It separates framework request handling, deterministic spending policy, external approval, signing, binding verification, and settlement. This repository is testnet-oriented teaching software, not a production custody system.

The one invariant

An agent may request a payment; it can never authorize one. Deterministic policy runs before any approver, and an approver can only narrow an approval_required decision—it cannot turn a policy denial into permission. Never edit limits, switch recipients/assets/networks, split a payment, or retry around a denial just to make a payment pass.

The approval challenge is intentHash, the SHA-256 hash of seven fields: network, scheme, asset, payee, amount, resource URL, and timeout. Anything outside those fields is not authorized.

Production seams

Seam Why it exists Supply in production
Approver Keeps external human or organizational approval separate from deterministic policy. A fail-closed approval service bound to intentHash; use PromptApprover only for a watched TTY and AutoApprover only with unattended limits set conservatively.
Facilitator Verifies a payment and performs settlement for the resource server. A trusted HTTPS HttpFacilitator or an operator-owned LocalFacilitator with explicit Stellar resource limits. One LocalFacilitator instance is the unit of fee-source serialization: it settles one payment at a time, so throughput is bounded by ledger close. Two instances sharing a sourceKeypair still collide on the sequence number, and no in-process lock can prevent that — give each its own fee source.
Signer Isolates key custody and verifies that signed transaction fields still match the approved intent. A dedicated signer backed by appropriate secret storage or hardware/KMS custody; never expose key material through application or agent responses. A supplied signer must emit transfer(from: Address, to: Address, amount: i128) with those exact ScVal types — a u64/u128 amount or a string-typed party is refused as POL-DRIFT before transmission, not silently forwarded for the host to reject after the payer is already committed.
WindowStore Reserves, commits, and conservatively retains uncertain spend against the rolling cap. One durable, shared store for every replica that shares a budget; MemoryWindowStore is process-local teaching/test state. Every method is asynchronous, so a real database is reachable. reserve receives the cap and returns { accepted }: it decides, and must do so atomically—one statement, one transaction, or a lock. A read followed by a write reopens the race the signature exists to close, and no single-process test can tell the difference.

Read the full file on GitHub · 216 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 · 216 lines · 3,410 tokens per session scan A 4fa3993d7920

Subscribe to this mod's changes

x402-stellar-kit AGENTS.md is an instructions file published in the GitHub repository CodeStrux/x402-stellar-kit (0 stars, last pushed 28d ago), licensed Apache-2.0. It adds 3,410 tokens to every session, about $0.0136 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

x402-stellar-kit AGENTS.md compared with instructions from other repositories

x402-stellar-kit AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
x402-stellar-kit AGENTS.mdCodeStrux/x402-stellar-kitInstructions file028d agoApache-2.0A3,410Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,649GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot