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 nirholas/x402-grocery --skill shop-grocery-apigit clone --depth 1 https://github.com/nirholas/x402-groceryWrote 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/nirholas/x402-grocery/shop-grocery-api)<a href="https://agentmods.dev/skills/nirholas/x402-grocery/shop-grocery-api"><img src="https://agentmods.dev/badge/skills/nirholas/x402-grocery/shop-grocery-api/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/nirholas/x402-grocery/shop-grocery-api"><img src="https://agentmods.dev/badge/skills/nirholas/x402-grocery/shop-grocery-api.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.00059 | $0.00741 |
| Opus 5.5 | $0.00024 | $0.00296 |
| Sonnet 5.5 | $0.00012 | $0.00148 |
| Haiku 4.5 | $0.00006 | $0.00074 |
Grade A, and why
shop-grocery-api scanned grade A with 1 finding 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 19d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -s localhost:4021/health How it starts
The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Shop with the x402-grocery API
x402-grocery is an Express service with two paid routes. Each paid route returns its artifact in the 200 body. Payment is x402 (HTTP 402) in USDC on Base or Solana.
Paying is irreversible. Before any paid call, show the user the route, price, network and payTo address from the 402 response, and wait for an explicit yes.
Run it
From a clone (the package is not published to npm):
git clone https://github.com/nirholas/x402-grocery
cd x402-grocery
npm install
npm run dev # tsx src/server.ts, http://localhost:4021 (PORT overrides)
Live data needs KROGER_CLIENT_ID and KROGER_CLIENT_SECRET (free Kroger developer account). Without
both, the service answers from a deterministic fixture catalog and sets "source": "fixture" in
every response. Always read source (also shown by GET /health) and tell the user when the data is
fixture data, not live Kroger prices.
Payment env vars: PAY_TO_ADDRESS and NETWORK (base-sepolia default, base for mainnet),
SOLANA_PAY_TO_ADDRESS and SOLANA_NETWORK, FACILITATOR_URL, SOLANA_FACILITATOR_URL.
Routes
| Route | Price | Result |
|---|---|---|
GET /products?q=<term> |
$0.002 | Products with regular and promo price, size, aisle, stock |
POST /cart |
$0.005 | Priced cart: matched items, substitutions, line totals, subtotal, tax, grand total |
GET /health |
free | Liveness, data source, configured rails |
GET /.well-known/x402 |
free | Discovery manifest |
/products takes q (required, else 400 missing_query), limit (1 to 50, default 10) and
locationId (Kroger store id). /cart takes
{"items":[{"query":"whole milk","quantity":2}],"locationId":"..."} with 1 to 50 items. Upstream
failures return 502 upstream_error.
Paying
An unpaid call returns 402 with an accepts array listing both rails. Sign the entry your wallet
supports and retry with the base64 X-PAYMENT header. The settlement receipt is in the
X-PAYMENT-RESPONSE header and in the body's payment field. The reference client is
npm run client (examples/agent-client.ts, uses x402-fetch).
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.
- 19d ago First seen · 62 lines · 59 tokens per session scan A 7ac6bc769146
shop-grocery-api is a skill published in the GitHub repository nirholas/x402-grocery (7 stars, last pushed 11d ago), licensed Apache-2.0. It adds 59 tokens to every session and 741 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-11.
shop-grocery-api compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| shop-grocery-apinirholas/x402-grocery | Skill | 7 | 11d ago | Apache-2.0 | A | 59 | Claude Code |
| x402-commerce-toolsnirholas/x402-mcp-commerce | Skill | 8 | 11d ago | Apache-2.0 | A | 64 | Claude Code |
| scvd-personal-shopperseancrecord/scvd-general-store-repo | Skill | 3 | 7d ago | MIT | A | 73 | Claude Code |
| corbits-marketplacemoonpay/skills | Skill | 112 | 1mo ago | MIT | A | 76 | Claude Code, Codex |
| medusa-paymentsOrcaQubits/agentic-commerce-skills-plugins | Skill | 41 | 17d ago | MIT | A | 42 | Claude Code |
| sf-paymentsOrcaQubits/agentic-commerce-skills-plugins | Skill | 41 | 17d ago | MIT | A | 67 | Claude Code |
| ap2-human-not-present-flowOrcaQubits/agentic-commerce-skills-plugins | Skill | 41 | 17d ago | MIT | A | 47 | Claude Code |