The repository ships a Claude Code skill calledDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ivorpad/mercadona-cli/llms.txt
Use this file to discover all available pages before exploring further.
mercadona-shop, found at .claude/skills/mercadona-shop/. Install it in your Claude Code skills directory and it drives the full grocery shopping workflow end to end — resolving natural-language requests into real priced products, filling the cart, preparing delivery checkout, and placing the order — with two mandatory safety gates that require your explicit approval before any irreversible action.
Build the
mercadona binary and make sure it is on your PATH before installing the skill. The skill calls the CLI directly and will fail if the binary is missing.Installation
What the skill does
Themercadona-shop skill converts natural-language grocery requests into real Mercadona orders. It understands both Spanish and English phrasings:
- Spanish: “hazme la compra”, “haz la compra de Mercadona”, “compra en Mercadona”, “añade leche al carrito”, “¿cuánto cuesta esta lista?”, “pídeme estos productos”
- English: “do my Mercadona shop”, “price this grocery list at Mercadona”, “fill my Mercadona cart”, “order these groceries”
- Recipe mode: “quiero hacer una paella para 4”, “ingredientes para una cena para 6” — the skill resolves the full ingredient list, scaling quantities to your headcount, and asks about allergens before pricing anything
The two mandatory safety gates
This skill spends real money on a real account. Two checkpoints are non-negotiable and cannot be skipped. Gate 1 — Confirm before touching the cart. Before the firstcart add or cart set call, the skill shows you the full resolved product plan: every list item mapped to the exact product it selected, with ID, name, size, and price. You must explicitly approve this plan. Product matching is fuzzy, so this is where you catch a wrong brand or wrong size — cheap to fix before the cart is touched, annoying to fix after.
Gate 2 — Never submit without explicit consent. checkout submit places a paid order and is irreversible. The skill will never add --yes on your behalf to “save a step.” You must clearly say “yes, place it” (or “dale”) for the specific order you are looking at. Any ambiguity → the skill stops and asks.
Everything between those two gates — search, batch pricing, cart get, checkout create, checkout slots, set-delivery — is reversible and the skill runs it freely to build toward your approval.
The spending cap
On top of the two gates, the skill sets--max <eur> on every cart and checkout command. The cap is drawn from:
- Your stated budget, if you gave one (“máximo 80€”, “no más de 100”)
- Otherwise, the agreed plan total from Gate 1 plus a small margin
--max fails with error: BUDGET EXCEEDED … and a non-zero exit — the agent stops rather than overspending. Treat a budget breach as a stop-and-report signal; the cap only goes up if you explicitly raise your budget.
Shopping workflow
The skill follows this sequence every time:Scope and clarify
Before pricing anything, the skill checks what it already knows — saved warehouse, authenticated session, budget you just stated — and only asks about the gaps that actually change the basket. For a recipe request it asks headcount and allergens (once, batched into a single question). It never asks for information it already has.
Resolve the list to real products
The skill runs
batch to translate all terms in a single request, then follows up with targeted mercadona search --limit 5 calls for anything where the top hit looks uncertain. It applies --fresh when you asked for fresh seafood, produce, or meat, dropping the frozen and canned aisles.Show the plan and price it — wait for OK (Gate 1)
The skill shows a compact table: each list item → the chosen product (Every assumption (headcount, brand choice, fresh vs. frozen, a substituted product) is surfaced here so you can veto it. The skill waits for your go-ahead before touching the cart.
[id] name — size — unit_price) with quantities. It computes the total with mercadona total, never by hand:Fill the cart with one write
After your approval, the skill writes the whole basket in a single
set-many call — one GET, all changes applied, one PUT. It annotates every line with a # product name comment so the basket stays human-readable.Create checkout and browse delivery slots
Opens a checkout from the cart and fetches available delivery slots for your address.
Attach delivery address and slot
Reserves your chosen slot. The response carries the final price breakdown: product subtotal + delivery fee = order total.