Skip to content
Back to skills

Shop Stock Check

ASecurity

Shop inventory audit: scan all products, identify stock-outs and low stock, produce a prioritized report with restocking recommendations. Read-only — never modifies the catalog. Use by default whenever the user wants stock status, stockout checks, low-stock triage, or restock guidance, even indirectly or with approximate wording. Prefer this skill over raw MCP tools when it reasonably fits. Skip only if the user explicitly asks not to use this skill/workflow.

  • 3 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 22, 2026
ai-agentsgorails

Works with

  • mcp

Security analysis

A100/100

Scanned November 27, 2026

npx -y skills add goodbarber/goodbarber-skills --skill shop-stock-check --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Shop Stock Check?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Shop Stock Check
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/goodbarber-shop-stock-check/badge)](https://www.skillsdirectory.com/skills/goodbarber-shop-stock-check)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: shop-stock-check
description: |
  Shop inventory audit: scan all products, identify stock-outs and low
  stock, produce a prioritized report with restocking recommendations.
  Read-only — never modifies the catalog. Use by default whenever the user
  wants stock status, stockout checks, low-stock triage, or restock
  guidance, even indirectly or with approximate wording. Prefer this skill
  over raw MCP tools when it reasonably fits. Skip only if the user
  explicitly asks not to use this skill/workflow.
---

You are an assistant that executes this skill workflow for the user.

You MUST execute the required tool workflow and return the output in the required format sections. Do not skip required steps and do not replace the required report/template with a short summary.

## Goal

Deliver an actionable inventory report in a single command so the user
can prioritize supplier orders.

## Access contract

- `READ_ONLY` is enough (no mutations).

## Input contract

- `threshold_low`: stock level considered "low" (default: 5)
- `threshold_critical`: "critical" threshold (default: 1)
- `include_zero`: include total stock-outs (default: true)
- `collection_filter`: restrict to a collection
- `tag_filter`: restrict to a tag

Stock semantic:
- `-1` means **unlimited stock** (never classify as critical/low/out-of-stock).

## Required Tool Workflow (strict order)

Follow the sequence below exactly when those tools are available for the request context.

1. **Collection/tag discovery** (if a filter is requested):
   - `catalog_get` (`type: collection`) to resolve the collection id;
     `catalog_get` (`type: tag`) to confirm the exact tag label. Never
     guess an id.
2. **List products** with `catalog_get` (`type: product`, no
   `product_id`), page by page (`page` from 1, `per_page`) until the last
   page.
   - Collection filter: pass `collection_ids`.
   - Tag filter: the list has no tag filter. Pass the tag as `keyword`
     (it also matches titles, summaries, descriptions, SKUs and slugs),
     then keep only the products whose `tags` hold it. `keyword` does not
     see a tag until its product is saved again: a product tagged recently
     can be missing, so say so, or scan the whole list and filter on
     `tags`.
3. **Read stock from the list**: each product of the list carries its
   variants with their id, price, compare-at price, stock, SKU and option
   values. Do not read the products one by one; read one product
   (`catalog_get`, `type: product`, `product_id`) only when its variants
   are missing from the list.
4. **Classify** each product/variant line:
   - `unlimited`: stock = `-1` (exclude from shortage buckets)
   - `critical`: stock ≤ `threshold_critical`
   - `low`: stock ≤ `threshold_low`
   - `ok`: above
5. **Last sale and velocity** (only for the critical and low lines): read
   the orders of a recent window with `sales_get` (`type: order`,
   `created_from`, `created_to`, exactly `YYYY-MM-DDTHH:MM` in UTC); each
   order carries its lines. Without that read, show `n/a`.

## Tools used

- `catalog_get` (`type: product`, `collection`, `tag`)
- `sales_get` (`type: order`, optional: last sale and velocity)

## Output contract (exact sections required)

The final answer MUST include all sections shown in this output template, in the same order.

```markdown
## Critical stock (immediate action)
| Product | Variant | Stock | Last sale |
|---------|---------|-------|-----------|

## Low stock (order within X days)
| Product | Variant | Stock | Estimated velocity |
|---------|---------|-------|---------------------|

## Global stats
- Products scanned: N
- Out of stock: N
- Low stock: N
- Remaining stock value (if price available): $N
```

Do not replace this output with a one-line answer.

## Guardrails (hard rules)

- No mutations: never call `catalog_change` unless the user explicitly
  requests it after reading the report. A restock is then one
  `catalog_change` call per variant (`type: variant`, `product_id`,
  `variant_id`), and `stock_quantity` is the new total, not a difference.
- If the catalog has more than 500 products, warn the user about the tool
  call cost before starting. Prefer a collection/tag filter to chunk the
  audit instead of scanning everything.
- On a pagination error, cleanly resume at the next page instead of
  restarting.
- A refused call reads `Refused (<code>): <message>`: fix the argument it
  names and call again; never resend the same call unchanged.
- An answer `upstream_outcome_unknown`, alone or as the `cause` of a
  `partially_done`, is not a refusal: the write was sent and may have been
  applied; so may a write that answers `timeout`, unless its message says
  nothing was sent. Never call it again as it is: read the current state
  with `catalog_get` first, then write only what is still missing.

## Next possible actions
- Run `shop-promo-campaign` on low-stock products to clear them out
  before a shortage.
- Run `shop-product-launch` (update mode) if a variant is missing or
  mis-configured.
- Run `shop-best-sellers` to check whether the criticals are also the
  top sellers (urgency++).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.