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.
npx skills add tolgayayci/rail402 --skill skillgit clone --depth 1 https://github.com/tolgayayci/rail402Wrote 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.
[](https://agentmods.dev/skills/tolgayayci/rail402/skill)<a href="https://agentmods.dev/skills/tolgayayci/rail402/skill"><img src="https://agentmods.dev/badge/skills/tolgayayci/rail402/skill/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.
<a href="https://agentmods.dev/skills/tolgayayci/rail402/skill"><img src="https://agentmods.dev/badge/skills/tolgayayci/rail402/skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00072 | $0.00987 |
| Opus 5 | $0.00036 | $0.00494 |
| Sonnet 5 | $0.00014 | $0.00197 |
| Haiku 4.5 | $0.00007 | $0.00099 |
Grade A, and why
rail402-cli 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.
How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
rail402 — command-line x402 payments on Stellar
rail402 lets you (or an agent you drive) discover paid APIs, pay for them under a spend cap, and
verify the settlement on Stellar, entirely from the shell. It speaks x402 v2, sponsors fees (the
buyer needs no XLM), and defaults to Rail402's hosted testnet infrastructure — all free, no API keys.
Install
npm install -g @rail402.dev/cli # or prefix any command with: npx @rail402.dev/cli
The rules that keep spending safe
- Every payment needs an explicit
--maxcap, a decimal in the asset's units (--max 0.10= 0.10 USDC). The CLI refuses to spend more, and never pays an unbounded amount. - Store the key in an env var, never interactively:
export RAIL402_SECRET=S.... Agents cannot type a password. - Always pass
--json. Output is then one object:{ "ok": true, "data": {...} }on success, or{ "ok": false, "error": { "code", "reason", "retryable" } }on failure. Branch onokand readerror.code— do not parse human prose. - Testnet only. Low stakes by construction.
The loop
# 1. Get a funded testnet account (only once). Save the secret it prints.
rail402 fund --json
export RAIL402_SECRET=<secret-from-step-1>
# (For real USDC, fund the address at https://faucet.circle.com — friendbot only gives XLM.)
# 2. Discover a paid API in natural language.
rail402 search "convert usdc amounts to stroops" --json
# 3. Discover the cheapest match AND pay it, capped:
rail402 buy "convert usdc amounts to stroops" --max 0.10 --json
# → data.paid.transaction is the settlement hash; data.body is the API's response.
# …or pay a specific URL you already have (add query params the endpoint needs):
rail402 pay "https://api.example/convert" --max 0.10 --query amount=100 --json
# 4. Verify the settlement on the explorer.
rail402 tx <transaction-hash> --json
Reading results
- Paid successfully:
data.paidis present —{ amount (atomic units), asset, transaction }— anddata.bodyis the resource's response.data.exploreris a link to the settlement. - Reached but not charged:
data.paidis absent anddata.statusis the resource's HTTP status (e.g. a400because a required query param was missing — add it with--query k=vand retry). - Refused:
okisfalse. Commonerror.codevalues:mcp_budget_exceeded— the price is above your--max; raise the cap or pick another resource.mcp_budget_required— you forgot--max.config_no_signer— noRAIL402_SECRETset; runrail402 fundfirst.mcp_resource_not_found— nothing in the Bazaar matched within budget.mcp_upstream_error— a network/HTTP problem (retryable: true).
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.
- 9d ago First seen · 78 lines · 72 tokens per session scan A c14d11c312f4
rail402-cli is a skill published in the GitHub repository tolgayayci/rail402 (0 stars, last pushed 6d ago), licensed Apache-2.0. It adds 72 tokens to every session and 987 once invoked, about $0.0004 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.
Other skills, from other repositories
nirium-agentic-payments
Scaffold and run an x402 paid API server on Stellar with open-source client libraries: charge AI agents per API call with x402Serve(), a function from the nirium SDK that runs entirely on your own server, scaffold that server with nirium-cli in one command, and separately read live protocol data through the nirium-mcp…
x402-stellar-payments
Use when asked to "pay for" a URL, add a "paid endpoint", handle HTTP 402, or work with x402 payments on Stellar.
stellar-forge
Eval-driven coding harness for building production Stellar dApps. Routes tasks to 6 specialist agents, verifies output with structured evals, steers on failure, e2e-tests with Stellar Agentic Kit hooks, and knowledge-graphs every project. Use when building any Stellar app — tokens, DeFi, NFTs, payment APIs, or full…
agentic-payments
Agentic and machine-to-machine payments on Stellar. Covers x402 (HTTP 402 paid APIs) and MPP (Machine Payments Protocol) Charge/Channel modes.
starknet-mini-pay
Simple P2P payments on Starknet. Generate QR codes, payment links, invoices, and transfer ETH/STRK/USDC. Like Lightning, but native.
starknet-tongo
Confidential ERC20 payments on Starknet using Tongo protocol. Fund, transfer, withdraw, and rollover encrypted token balances with zero-knowledge proofs. Use when the user needs privacy-preserving transactions, confidential payments, encrypted balances, or auditable private transfers on Starknet.