# Grocery Api

> Use the local groc HTTP API to search Sainsbury's groceries, search favourites, add/update/remove basket items, and view basket.

- **Type:** Skill
- **Install:** `agentstack add skill-abracadabra50-open-supermarkets-api`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [abracadabra50](https://agentstack.voostack.com/s/abracadabra50)
- **Installs:** 0
- **Category:** [Search](https://agentstack.voostack.com/c/search)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [abracadabra50](https://github.com/abracadabra50)
- **Source:** https://github.com/abracadabra50/open-supermarkets/tree/main/skills/api

## Install

```sh
agentstack add skill-abracadabra50-open-supermarkets-api
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Grocery API Skill

Use this skill when the user asks about Sainsbury's groceries, favourites, searching products, adding/updating/removing basket items, or viewing the basket.

The local API must already be running on port `7876`:

```bash
GROC_API_PORT=7876 npm run api
```

## Commands

Run from the repo root:

```bash
node skills/api/wrapper.js fav-search "milk"
node skills/api/wrapper.js search "milk"
node skills/api/wrapper.js favourites
node skills/api/wrapper.js basket
node skills/api/wrapper.js add  [qty]
node skills/api/wrapper.js remove 
node skills/api/wrapper.js update  
```

All commands return JSON from the local API.

## Add-to-basket workflow

When the user asks to add an item to the basket:

1. First search favourites:

   ```bash
   node skills/api/wrapper.js fav-search "USER ITEM"
   ```

2. If there is a clear favourite result that matches the user's intent, add it directly:

   ```bash
   node skills/api/wrapper.js add  [qty]
   ```

3. If there are multiple plausible favourite results, ask the user which one to add. Include names, prices, and product IDs.

4. If there are no good favourite matches, or if the user explicitly asks to look outside favourites, use regular search:

   ```bash
   node skills/api/wrapper.js search "USER ITEM"
   ```

5. For regular search results, always confirm with the user before adding anything to the basket.

6. After adding, show or summarize the basket:

   ```bash
   node skills/api/wrapper.js basket
   ```

## Remove/update workflow

When the user asks to remove or update an item:

1. First inspect the basket to get basket item IDs:

   ```bash
   node skills/api/wrapper.js basket
   ```

2. Use the basket `item_id`, not the product ID:

   ```bash
   node skills/api/wrapper.js remove 
   node skills/api/wrapper.js update  
   ```

3. If the item to change is ambiguous, ask the user which basket item they mean.

4. After removing or updating, show or summarize the basket.

## Notes

- Prefer favourites over regular search for add requests.
- Do not add ambiguous items without asking.
- Do not use regular search additions without confirmation.
- Use the `product_uid` as the product ID for `add`.
- Use the basket `item_id` for `remove` and `update`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [abracadabra50](https://github.com/abracadabra50)
- **Source:** [abracadabra50/open-supermarkets](https://github.com/abracadabra50/open-supermarkets)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-abracadabra50-open-supermarkets-api
- Seller: https://agentstack.voostack.com/s/abracadabra50
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
