shop-grocery-api

shop-grocery-api is a skill for Claude Code from nirholas/x402-grocery. It costs 59 tokens per session (741 once invoked), scanned A, original, Apache-2.0.

A client for an HTTP grocery-search service that uses Kroger product data. It can find products and price a basket, with payment per request in USDC, a cryptocurrency, on Base or Solana.

In plain words
What is it for?
Use it to search grocery products, check prices and promotions, inspect aisles, or calculate the cost of a basket.
Why use it?
It provides current grocery data when Kroger credentials are configured and clearly distinguishes live results from local fixture data when they are not. Paid requests are irreversible and require confirmation first.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the x402-grocery plugin — 1 skill shipped together

Good fit Use it to search grocery products, check prices and promotions, inspect aisles, or calculate the cost of a basket.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nirholas/x402-grocery/shop-grocery-api
Install

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.

Any agent
npx skills add nirholas/x402-grocery --skill shop-grocery-api
Clone the repo
git clone --depth 1 https://github.com/nirholas/x402-grocery

Made for: Claude Code.

Or install x402-grocery, the plugin that ships this one along with the rest of its 1 skill.

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 shop-grocery-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/nirholas/x402-grocery/shop-grocery-api/github.svg)](https://agentmods.dev/skills/nirholas/x402-grocery/shop-grocery-api)
Your own site
<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.

agentmods 80×15 button for shop-grocery-api

Your own site · 80×15
<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>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 741 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00059 $0.00741
Opus 5.5 $0.00024 $0.00296
Sonnet 5.5 $0.00012 $0.00148
Haiku 4.5 $0.00006 $0.00074

Measured 19d ago against content hash 7ac6bc769146, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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
plugins/x402-grocery/skills/shop-grocery-api/SKILL.md · 62 lines

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).

Read the full file on GitHub · 62 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. 19d ago First seen · 62 lines · 59 tokens per session scan A 7ac6bc769146

Subscribe to this mod's changes

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.

Related

shop-grocery-api compared with skills from other repositories

shop-grocery-api next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
shop-grocery-apinirholas/x402-grocerySkill711d agoApache-2.0A59Claude Code
x402-commerce-toolsnirholas/x402-mcp-commerceSkill811d agoApache-2.0A64Claude Code
scvd-personal-shopperseancrecord/scvd-general-store-repoSkill37d agoMITA73Claude Code
corbits-marketplacemoonpay/skillsSkill1121mo agoMITA76Claude Code, Codex
medusa-paymentsOrcaQubits/agentic-commerce-skills-pluginsSkill4117d agoMITA42Claude Code
sf-paymentsOrcaQubits/agentic-commerce-skills-pluginsSkill4117d agoMITA67Claude Code
ap2-human-not-present-flowOrcaQubits/agentic-commerce-skills-pluginsSkill4117d agoMITA47Claude Code