shopify-admin-agentic-…
Edit the theme's robots.txt.liquid to explicitly allow AI crawlers (GPTBot, ClaudeBot,…
Read-only: cross-references inventory levels with order velocity to flag items with positive stock but zero sales in N days.
$ npx -y skills add 40rty-ai/shopify-admin-skills --skill shopify-admin-dead-stock-identifier --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/shopify-admin-dead-stock-identifierContext preview
The summary Claude sees to decide when to auto-load this skill.
Read-only: cross-references inventory levels with order velocity to flag items with positive stock but zero sales in N days.
name: shopify-admin-dead-stock-identifier role: merchandising description: "Read-only: cross-references inventory levels with order velocity to flag items with positive stock but zero sales in N days." toolkit: shopify-admin, shopify-admin-execution api_version: "2025-01" graphql_operations: - productVariants:query - orders:query - inventoryItems:query status: stable compatibility: Claude Code, Cursor, Codex, Gemini CLI
Identifies SKUs that have positive inventory on hand but have not sold any units in a configurable lookback window. Dead stock ties up capital, warehouse space, and carrying costs. Read-only — no mutations. Provides the data foundation for a markdown or clearance decision.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | store | string | yes | — | Store domain (e.g., mystore.myshopify.com) | | days_back | integer | no | 90 | Sales lookback window — SKUs with no sales in this period are flagged | | min_quantity | integer | no | 1 | Minimum on-hand quantity to include (exclude truly zero-stock) | | vendor_filter | string | no | — | Optional vendor to scope the audit | | format | string | no | human | Output format: `human` or `json` |
> ℹ️ Read-only skill — no mutations are executed. Safe to run at any time.
1. **OPERATION:** `productVariants` — query **Inputs:** `first: 250`, `query: <vendor_filter if set>`, select `sku`, `inventoryQuantity`, `inventoryItem { id }`, pagination cursor **Expected output:** All variants with stock levels; paginate until `hasNextPage: false`
2. Filter to variants with `inventoryQuantity >= min_quantity`
3. **OPERATION:** `orders` — query **Inputs:** `query: "created_at:>='<NOW - days_back days>'"`, `first: 250`, select `lineItems { variant { id }, quantity }`, pagination cursor **Expected output:** All line items sold in the window to build a "sold variant IDs" set
4. **OPERATION:** `inventoryItems` — query **Inputs:** Batch of `inventoryItemIds` for stocked variants **Expected output:** Inventory item cost data for dead stock value calculation
5. Cross-reference: variants in step 2 that are NOT in the sold set from step 3 → dead stock
# productVariants:query — validated against api_version 2025-01
query VariantsWithStock($query: String, $after: String) {
productVariants(first: 250, after: $after, query: $query) {
edges {
node {
id
sku
inventoryQuantity
product {
id
title
vendor
status
}
inventoryItem {
id
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}# orders:query — validated against api_version 2025-01
query OrderLineItemsInPeriod($query: String!, $after: String) {
orders(first: 250, after: $after, query: $query) {
edges {
node {
lineItems(first: 50) {
edges {
node {
quantity
variant {
id
}
}
}
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}# inventoryItems:query — validated against api_version 2025-01
query InventoryItemCosts($ids: [ID!]!) {
nodes(ids: $ids) {
... on InventoryItem {
id
unitCost {
amount
currencyCode
}
tracked
}
}
}**Claude MUST emit the following output at each stage. This is mandatory.**
**On start**, emit:
╔══════════════════════════════════════════════╗ ║ SKILL: Dead Stock Identifier ║ ║ 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):
══════════════════════════════════════════════
DEAD STOCK REPORT (no sales in <days_back> days)
SKUs with stock: <n>
SKUs with zero sales: <n> (<pct>%)
Est. dead stock value: $<amount>
Top dead stock by value:
"<product>" SKU: <sku> Qty: <n> Value: $<n>
Output: dead_stock_<date>.csv
══════════════════════════════════════════════For `format: json`, emit:
{
"skill": "dead-stock-identifier",
"store": "<domain>",
"period_days": 90,
"stocked_skus": 0,
"dead_stock_skus": 0,
"dead_stock_pct": 0,
"estimated_value": 0,
"currency": "USD",
"output_file": "dead_stock_<date>.csv"
}CSV file `dead_stock_<YYYY-MM-DD>.csv` with columns: `variant_id`, `sku`, `product_title`, `vendor`, `quantity_on_hand`, `days_since_last_sale`, `unit_cost`, `total_cost_value`
| Error | Cause | Recovery | |-------|-------|----------| | `THROTTLED` | API rate limit exceeded | Wait 2 seconds, retry up to 3 times | | No orders in window | New store or very slow period | All stocked SKUs will be flagged — expected | | Variant without inventory item | Bundle or virtual product | Skip inventory cost, include in list |
Community-maintained AI agent skills for operating Shopify stores — workflows, optimization, reports and more
Edit the theme's robots.txt.liquid to explicitly allow AI crawlers (GPTBot, ClaudeBot,…
Rewrite thin product descriptions into structured, fact-rich copy (materials, fit, use-cases,…
Generate and set descriptive alt text on product images so AI agents (which can't 'see'…
Generate and publish an /llms.txt guide (brand summary, flagship products, key policies,…
Define and populate agentic-commerce metafields (material, attributes, key features, specs,…
Inject an Organization JSON-LD block (name, logo, sameAs social links, contactPoint) into the…