shopify-admin-demand-forecast-reorder
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "shopify-admin-demand-forecast-reorder" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-3bb75110956e51072ada77066765d03b19e8d893abf93be35a8d424f81a51e92. Verify the upstream source and version against https://github.com/40RTY-ai/shopify-admin-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Read-only: forecasts demand per SKU based on sales velocity and seasonality, then computes reorder points and recommended purchase order quantities.
Introduction source: third_party · 40RTY-ai · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Read-only: forecasts demand per SKU using sales velocity and seasonality, then calculates reorder points and suggested purchase order quantities.
- Inputs and outputs
- CSV file `reorder_plan_<YYYY-MM-DD>.csv` with columns: `variant_id`, `sku`, `product_title`, `vendor`, `current_stock`, `daily_velocity`, `trend`, `days_of_stock`, `stockout_date`, `reorder_point`, `reorder_qty`, `order_by_date`, `est_cost`
- Software, accounts and paid services
- Authenticated Shopify CLI session: `shopify store auth --store <domain> --scopes read_orders,read_products,read_inventory` API scopes: `read_orders`, `read_products`, `read_inventory`
- Testing
- Not tested
Browse files
Frontmatter
name: shopify-admin-demand-forecast-reorder
role: merchandising
description: "Read-only: forecasts demand per SKU using sales velocity and seasonality, then calculates reorder points and suggested purchase order quantities."
toolkit: shopify-admin, shopify-admin-execution
api_version: "2025-01"
graphql_operations:
- orders:query
- productVariants:query
- inventoryItems:query
- inventoryLevels:query
status: stable
compatibility: Claude Code, Cursor, Codex, Gemini CLIPurpose
Forecasts future demand for each SKU based on historical sales velocity, trend analysis, and optional seasonality adjustments. Calculates reorder points (when to order) and suggested reorder quantities (how much to order) factoring in vendor lead times and safety stock. Read-only — no mutations.
Prerequisites
- Authenticated Shopify CLI session:
shopify store auth --store <domain> --scopes read_orders,read_products,read_inventory - API scopes:
read_orders,read_products,read_inventory
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| store | string | yes | — | Store domain |
| days_back | integer | no | 90 | Historical sales window for velocity calculation |
| forecast_days | integer | no | 30 | Days into the future to forecast demand |
| lead_time_days | integer | no | 14 | Default vendor lead time in days |
| safety_stock_days | integer | no | 7 | Extra days of safety stock buffer |
| vendor_filter | string | no | — | Scope to specific vendor |
| only_low_stock | boolean | no | false | Only show items projected to stock out within forecast window |
| format | string | no | human | Output format: human or json |
Safety
ℹ️ Read-only skill — no mutations are executed. Safe to run at any time.
Workflow Steps
-
OPERATION:
orders— query Inputs:query: "created_at:>='<NOW - days_back days>'",first: 250, selectcreatedAt,lineItems { variant { id }, quantity }, pagination cursor Expected output: All orders with line items for sales velocity calculation -
Calculate per-variant sales velocity:
- Daily sales rate = total units sold / days_back
- Weekly trend: compare last 30 days vs prior 30 days for trend direction
- Forecasted demand = daily_rate × forecast_days × trend_multiplier
-
OPERATION:
productVariants— query Inputs: All variant IDs with sales history,first: 250, pagination cursor Expected output: Variant details (SKU, title, product title, vendor) -
OPERATION:
inventoryLevels— query Inputs: Inventory item IDs for stocked variants Expected output: Current available quantities per location -
Calculate reorder metrics:
- Days of Stock = current_inventory / daily_sales_rate
- Reorder Point = (lead_time_days + safety_stock_days) × daily_sales_rate
- Reorder Quantity = forecast_days × daily_sales_rate + safety_stock - current_inventory
- Stockout Date = today + (current_inventory / daily_sales_rate) days
- Order-By Date = stockout_date - lead_time_days
-
Sort by urgency: items closest to stockout first
GraphQL Operations
# orders:query — validated against api_version 2025-01
query SalesHistory($query: String!, $after: String) {
orders(first: 250, after: $after, query: $query) {
edges {
node {
createdAt
lineItems(first: 50) {
edges {
node {
quantity
variant { id }
}
}
}
}
}
pageInfo { hasNextPage endCursor }
}
}
# productVariants:query — validated against api_version 2025-01
query VariantInfo($ids: [ID!]!) {
nodes(ids: $ids) {
... on ProductVariant {
id
sku
title
product { id title vendor }
inventoryQuantity
inventoryItem { id }
}
}
}
# inventoryItems:query — validated against api_version 2025-01
query InventoryItemDetails($ids: [ID!]!) {
nodes(ids: $ids) {
... on InventoryItem {
id
unitCost { amount currencyCode }
tracked
inventoryLevels(first: 10) {
edges {
node {
quantities(names: ["available"]) {
name
quantity
}
location { id name }
}
}
}
}
}
}
# inventoryLevels:query — validated against api_version 2025-01
query LocationInventory($locationId: ID!, $after: String) {
location(id: $locationId) {
inventoryLevels(first: 250, after: $after) {
edges {
node {
quantities(names: ["available"]) { name quantity }
item { id variant { id sku product { title } } }
}
}
pageInfo { hasNextPage endCursor }
}
}
}
Session Tracking
Claude MUST emit the following output at each stage. This is mandatory.
On start, emit:
╔══════════════════════════════════════════════╗
║ SKILL: Demand Forecast & Reorder Planner ║
║ Store: <store domain> ║
║ Started: <YYYY-MM-DD HH:MM UTC> ║
╚══════════════════════════════════════════════╝
After each step, emit:
[N/TOTAL] <QUERY|MUTATION> <OperationName>
→ Params: <brief summary of key inputs>
→ Result: <count or outcome>
On completion, emit:
For format: human (default):
══════════════════════════════════════════════
DEMAND FORECAST & REORDER PLAN (<days_back>d history → <forecast_days>d forecast)
SKUs analyzed: <n>
Avg daily velocity: <n> units/day
─────────────────────────────
⚠️ URGENT (stockout <7 days):
"<product>" SKU:<sku> Stock:<n> Days left:<n> ORDER BY: <date>
Reorder qty: <n> units Est. cost: $<n>
⏰ PLAN AHEAD (stockout 7-30 days):
"<product>" SKU:<sku> Stock:<n> Days left:<n> ORDER BY: <date>
✅ HEALTHY (>30 days stock):
<n> SKUs with adequate stock
Output: reorder_plan_<date>.csv
══════════════════════════════════════════════
For format: json, emit:
{
"skill": "demand-forecast-reorder",
"store": "<domain>",
"history_days": 90,
"forecast_days": 30,
"lead_time_days": 14,
"skus_analyzed": 0,
"urgent_reorders": [],
"planned_reorders": [],
"healthy_skus": 0,
"output_file": "reorder_plan_<date>.csv"
}
Output Format
CSV file reorder_plan_<YYYY-MM-DD>.csv with columns:
variant_id, sku, product_title, vendor, current_stock, daily_velocity, trend, days_of_stock, stockout_date, reorder_point, reorder_qty, order_by_date, est_cost
Error Handling
| Error | Cause | Recovery |
|---|---|---|
THROTTLED |
API rate limit exceeded | Wait 2 seconds, retry up to 3 times |
| Zero sales velocity | Product never sold in window | Skip from reorder calc — flag as "no demand data" |
| No inventory tracking | Variant not tracked | Skip — cannot forecast untracked items |
Best Practices
- Set
lead_time_daysper vendor if possible; default 14 is conservative. - Use
safety_stock_days: 14for high-value or slow-ship items. - Run weekly and pipe output into a purchase order workflow.
- Cross-reference with
stock-velocity-reportfor velocity validation. - Use with
dead-stock-identifierto avoid reordering items that aren't selling. - For seasonal products, use a longer
days_back(180-365) to capture seasonal patterns.
Version history
-
v1.1.0
GitHub ↗
Original release notes
## 🤖 New category: Agentic Commerce Readiness The fix-it side of the [**agentiq.report**](https://agentiq.report) audit. The audit tells operators *where* AI shopping agents (ChatGPT, Gemini, Perplexity, agentic checkout) can't find, read, or recommend their store. This release adds **10 skills that remediate those findings** via the native Shopify Admin GraphQL toolkit — closing the loop: **audit finds the gap → run the matching skill → re-audit confirms.** Every skill declares the audit **signals** it fixes (`audit_signals` frontmatter), so a finding in the report maps directly to the skill that resolves it. ### Skills - **`agentic-readiness-audit`** — flagship, read-only store-side scorecard that routes each gap to its fix skill - **`agentic-product-jsonld-backfill`** — barcode/GTIN, vendor, product type for complete Product JSON-LD - **`agentic-image-alt-text`** — descriptive alt text on product media - **`agentic-description-enrichment`** — fact-rich descriptions for AI quoting - **`agentic-metafields-setup`** — define + populate agentic metafields for filtering - **`agentic-product-taxonomy`** — Shopify Standard Product Taxonomy categories - **`agentic-crawler-access`** — allow GPTBot/ClaudeBot/PerplexityBot… in `robots.txt.liquid` - **`agentic-llms-txt`** — publish a curated `/llms.txt` for AI assistants - **`agentic-organization-schema`** — Organization JSON-LD (sameAs, contactPoint) into the theme - **`agentic-policy-readability`** — machine-readable shipping/returns policies Plus a weekly **`agentic-readiness-monitor`** routine that re-audits and alerts on regressions. ### Stats **116 skills across 11 categories** (was 106/10), **21 routines** (was 20). All GraphQL validated against the live Admin 2025-01 schema; `pnpm validate:index` passes (116 skills, 64 operations). ### Notes Theme-editing and policy skills default to `dry_run`/`audit` mode, write inside managed `# BEGIN/END` blocks, and recommend duplicating the theme first.
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决电商运营核心痛点:库存管理和采购决策
- 提供端到端需求预测和再订货建议
- 面向 Shopify 商家的实用工具
Highlights
- 触发词精准完整:demand forecast, reorder, SKU
- 边界清晰:限定 Shopify 管理后台只读操作
- description 位置正确且内容完整
Highlights
- 6个明确工作流步骤,结构清晰
- 完整的 GraphQL 操作示例和输出格式
- frontmatter 完整包含所有必要元数据
Highlights
- Shopify Admin API 来源明确且版本指定
- 异常处理覆盖 THROTTLED、零销售、无库存跟踪等场景
- 明确标注只读操作,安全可靠
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Authenticated Shopify CLI session: `shopify store auth --store <domain> --scopes read_orders,read_products,read_inventory` API scopes: `read_orders`, `read_products`, `read_inventory`
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.