Spot Shopify products that are about to sell out

Every weekday: Shopify variants below your stock threshold, with days of stock left at the current sales pace, and a question about what to reorder.

Runs
Weekdays at 9:00
Uses
Shopify
Posts
Asks you

From your apps to your board

How the skill works: your agent reads low variants from Shopify; store domain, low stock at from What you tell it, weekdays at 9:00, and gives you a question for you and a telegram ping and the report in the chat.

Reads

  • ShopifyLow variants
  • What you tell itStore domain, Low stock at
reads
Your agentClaude Code, Codex, Cursor or GeminiWeekdays at 9:00
posts

You get

  • A question for youOn your board, answered with a tap
  • A Telegram pingOnly when it needs your answer, if you connect Telegram
  • The report in the chatEvery run, with or without Briefkin

What you get

  • How many variants are under the threshold, and which runs out first.
  • Per variant: available, units sold in 28 days, days of stock left.
  • A suggested reorder quantity covering 45 days of sales.
  • The question: draft the reorder, change the threshold, or leave it.

The card on the right is a sample. Yours shows your own numbers and updates in place every run.

What lands on your board

Acme StoreShopify low stock alert · Claude Code

5 variants low on stock, 2 out within 4 days

Should I draft a reorder for these variants?

5 variants are under 10 units. Stoneware bowl (Speckled) sells out in about 2 days.

VariantAvailableSold in 28 daysDays leftReorder
Stoneware bowl / Speckled6842135
Espresso cup / Sage9634101
Wool throw / Mustard414823
Canvas apron / Rust8221035
Brass candle holder7121619
Resolve
An example with made-up numbers. Your agent posts your real ones.

What it does

A stock count on its own says little. Six units of a bowl that sells three a day is an emergency; six units of a throw that sells one a week is fine. Shopify shows the count and leaves the pace to you.

This skill puts the two together for every tracked variant under your threshold, skips the ones with a delivery already on the way, and asks before anything happens. The answer can be as simple as "draft the reorder email to the supplier".

How it works

  1. 1Find the low variants

    Query productVariants(first: 250, query: "inventory_quantity:<10 product_status:active") with displayName, sku, inventoryQuantity and inventoryItem { tracked inventoryLevels(first: 10) { nodes { location { name } quantities(names: ["available", "incoming"]) { name quantity } } } }.

  2. 2Measure the sales pace

    Pull orders from the last 28 days, for example orders(query: "created_at:>=2026-09-18"), skip canceled and test orders, and sum lineItems.quantity by variant.id.

  3. 3

    3Work out days left

    Days left is available stock divided by the daily pace (units sold in 28 days divided by 28). Flag variants under the threshold or under 14 days, and leave out any whose incoming quantity already covers the next 30 days.

  4. 4

    4Ask what to reorder

    Post the list by days left and ask what to do. On a yes, draft the reorder (variant, SKU, a quantity for 45 days of sales) as an email to the supplier or a purchase order note, and change nothing in Shopify.

  5. Post it to the board

    With BRIEFKIN_TOKEN set, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.

Install and run it

Pick your agent, where the data comes from and how to schedule it; the commands below follow.

Agent
Data
Schedule
  1. Install the skill

    One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.

    shellcurl -fsSL https://briefkin.dev/skills/shopify-low-stock-alert/install | sh
  2. Run it

    Ask Claude Code:

    promptRun the shopify-low-stock-alert skill

    Or paste the prompt instead of installing:

    promptUsing the Shopify Admin GraphQL API (read only), find active, tracked product variants with fewer than 10 units available, summed across locations. For each, count units sold in the last 28 days from orders (skip canceled and test orders) and work out days of stock left as available divided by daily sales. Leave out variants whose incoming stock already covers 30 days. List them sorted by days left with available, sold in 28 days, days left and a suggested reorder quantity for 45 days of sales. Then ask me whether to draft the reorder. Don't change anything in Shopify.
  3. Put it on a schedule

    Weekdays at 9:00, from cron on any machine where Claude Code is signed in:

    crontab0 9 * * 1-5 claude -p "Run the shopify-low-stock-alert skill"

    Add it with crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.

  4. Send it to your board

    Connect Briefkin once with curl -fsSL https://briefkin.dev/install | sh and every run lands on your board as a question for you. How setup works

View the SKILL.mdRaw file
SKILL.md---
name: shopify-low-stock-alert
description: "Every weekday: Shopify variants below your stock threshold, with days of stock left at the current sales pace, and a question about what to reorder. Use when the user asks for this, or when it runs on a schedule."
---

# Shopify low stock alert

Every weekday: Shopify variants below your stock threshold, with days of stock left at the current sales pace, and a question about what to reorder.

A stock count on its own says little. Six units of a bowl that sells three a day is an emergency; six units of a throw that sells one a week is fine. Shopify shows the count and leaves the pace to you.

This skill puts the two together for every tracked variant under your threshold, skips the ones with a delivery already on the way, and asks before anything happens. The answer can be as simple as "draft the reorder email to the supplier".

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- A Shopify custom app token with `read_products`, `read_inventory` and `read_orders` in `SHOPIFY_ADMIN_TOKEN`, or a Shopify connector that can query inventory.
- Your threshold, if 10 units is wrong for your catalog, and each product's supplier if you want the reorder drafted.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Find the low variants** (Shopify): Query `productVariants(first: 250, query: "inventory_quantity:<10 product_status:active")` with `displayName`, `sku`, `inventoryQuantity` and `inventoryItem { tracked inventoryLevels(first: 10) { nodes { location { name } quantities(names: ["available", "incoming"]) { name quantity } } } }`.
2. **Measure the sales pace** (Shopify): Pull orders from the last 28 days, for example `orders(query: "created_at:>=2026-09-18")`, skip canceled and test orders, and sum `lineItems.quantity` by `variant.id`.
3. **Work out days left**: Days left is available stock divided by the daily pace (units sold in 28 days divided by 28). Flag variants under the threshold or under 14 days, and leave out any whose `incoming` quantity already covers the next 30 days.
4. **Ask what to reorder**: Post the list by days left and ask what to do. On a yes, draft the reorder (variant, SKU, a quantity for 45 days of sales) as an email to the supplier or a purchase order note, and change nothing in Shopify.

## Route B: the browser

### What you need

- Signed in to Shopify as the owner or a staff member with **Products**, **Inventory** and **Reports** permissions, with the store chosen if the account has several.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://admin.shopify.com/. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **List the low variants**: Open the store from admin.shopify.com, then **Products > Inventory**. Pick **All locations** in the location picker, add a filter on **Quantity** with **Available** less than `10`, and sort by Available ascending. Read each variant's SKU, available and the **Incoming** column.
2. **Get the sales pace**: Go to **Analytics > Reports** and open **Sales by product variant SKU**. Set the date to **Last 30 days** and read **Net items sold** for each SKU from step 1; the search box on the report finds a SKU quickly.
3. **Work out days left**: Days left is available divided by the daily pace (items sold divided by 30). Keep variants under 14 days or under the threshold, and drop any whose incoming stock covers the next 30 days. Shopify's own **Days of inventory remaining** tile on the Products page gives a cross-check.
4. **Ask before anything is ordered**: List the variants by days left with a reorder quantity for 45 days of sales and ask what to do. On a yes, the agent drafts the reorder email or purchase order text; it changes nothing in Shopify.

Note: The Inventory page lists variants 50 at a time; a catalog with hundreds of low variants is quicker through the API. The sales report uses the last 30 days where the API route uses 28, so days left can differ by a few percent. Variants that don't track inventory show no quantity and are left out.

## The report

- How many variants are under the threshold, and which runs out first.
- Per variant: available, units sold in 28 days, days of stock left.
- A suggested reorder quantity covering 45 days of sales.
- The question: draft the reorder, change the threshold, or leave it.

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "shopify-low-stock-alert/<date of this run, e.g. 2026-10-16>",
  "item_key": "shopify-low-stock-alert",
  "project": "Acme Store",
  "source": "Shopify low stock alert skill",
  "kind": "action",
  "title": "5 variants low on stock, 2 out within 4 days",
  "summary": "**5** variants are under 10 units. Stoneware bowl (Speckled) sells out in about **2 days**.",
  "action": {
    "request": "Should I draft a reorder for these variants?",
    "options": [
      "Draft reorder for all 5",
      "Only the 2 under a week",
      "Raise threshold to 20 units",
      "Not now"
    ]
  },
  "widget": {
    "type": "Table",
    "props": {
      "columns": [
        "Variant",
        "Available",
        "Sold in 28 days",
        "Days left",
        "Reorder"
      ],
      "align": [
        "left",
        "right",
        "right",
        "right",
        "right"
      ],
      "rows": [
        [
          "Stoneware bowl / Speckled",
          6,
          84,
          2,
          135
        ],
        [
          "Espresso cup / Sage",
          9,
          63,
          4,
          101
        ],
        [
          "Wool throw / Mustard",
          4,
          14,
          8,
          23
        ],
        [
          "Canvas apron / Rust",
          8,
          22,
          10,
          35
        ],
        [
          "Brass candle holder",
          7,
          12,
          16,
          19
        ]
      ]
    }
  }
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

## Run it on a schedule

Suggested: Weekdays at 9:00 (`0 9 * * 1-5`). From cron, with the agent signed in on that machine:

```bash
0 9 * * 1-5 claude -p "Run the shopify-low-stock-alert skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/shopify-low-stock-alert#schedule

Source: https://briefkin.dev/skills/shopify-low-stock-alert

What your agent needs

  • A Shopify custom app token with read_products, read_inventory and read_orders in SHOPIFY_ADMIN_TOKEN, or a Shopify connector that can query inventory.

  • Your threshold, if 10 units is wrong for your catalog, and each product's supplier if you want the reorder drafted.

Connecting Shopify

  1. Shopify AI Toolkit. Shopify's plugins for Claude Code, Codex and Cursor run store tasks through Shopify CLI's authenticated store context. Its Dev MCP server (npx -y @shopify/dev-mcp@latest) covers docs and API schemas, not your store's orders; for store data, community MCP servers exist.
  2. Admin API with an app token. Create an app for the store, install it with read scopes such as read_orders, read_products and read_inventory, and store SHOPIFY_STORE_DOMAIN (acme.myshopify.com) and SHOPIFY_ACCESS_TOKEN. Requests go to https://acme.myshopify.com/admin/api/2026-10/graphql.json with the X-Shopify-Access-Token header. Orders older than 60 days also need read_all_orders.

Request only read_ scopes when you install the app; Shopify enforces them per token, so the agent can't edit products, refund or cancel orders.

Questions

Does it count stock at every location?

It sums available across all locations by default, which suits a single warehouse. If you ship from several, name the location and the agent checks that one, since stock in a shop you don't ship from won't fill online orders.

What about products that don't track inventory?

They are skipped. A variant whose inventoryItem.tracked is false reports a meaningless count, so days left can't be worked out. Print-on-demand and digital products usually fall in this group.

Do I need Briefkin to use the Shopify low stock alert skill?

No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a asks you, so you can glance at it instead of asking again.

Which agents can run it?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.

Can it work without an API or MCP server, from my browser?

Yes. Switch the data source to "Your browser" and the steps change to the Shopify pages themselves: the agent opens admin.shopify.com in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.

Answer your agents from one board, or from Telegram

Skills are free to use with any agent. Briefkin is where their results land: one board for every report, number and question your agents send, with a ping when something needs you.

Free during the open beta. No card.