Shopify Admin Variant Performance Report logo

Shopify Admin Variant Performance Report

Organization
40RTY-ai
shopify-admin-variant-performance-report

Rank every product variant by revenue, units sold, and refund rate, then cross-reference against current inventory to identify dead weight vs. top performers.

Overview

Publisher40RTY-ai
Repositoryshopify-admin-skills
Skill nameshopify-admin-variant-performance-report
Stars
200
Forks
22
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by 40RTY-ai on GitHub. Read the source before you install it.

Installation

Install the Shopify Admin Variant Performance Report AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/40RTY-ai/shopify-admin-skills/tree/main/skills/merchandising/shopify-admin-variant-performance-report
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/40RTY-ai/shopify-admin-skills.git /tmp/shopify-admin-skills
mkdir -p .claude/skills
cp -r /tmp/shopify-admin-skills/skills/merchandising/shopify-admin-variant-performance-report .claude/skills/shopify-admin-variant-performance-report
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Shopify Admin Variant Performance Report in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Shopify Admin Variant Performance Report on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Shopify Admin Variant Performance Report is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Purpose

Goes beyond product-level revenue by ranking every individual variant (size, color, option combination) on revenue, units sold, and refund rate, then joining against live inventory levels. Reveals which specific SKUs are driving the business and which are tying up capital on the shelf. Read-only — no mutations are executed.

Prerequisites

  • Authenticated Shopify CLI session: shopify auth login --store <domain>
  • API scopes: read_orders, read_products (validator-confirmed: orders query traverses variant→product graph)

Parameters

ParameterTypeRequiredDefaultDescription
storestringyes—Store domain (e.g., mystore.myshopify.com)
formatstringnohumanOutput format: human or json
dry_runboolnofalsePreview operations without executing mutations
date_range_startstringyes—Start date in ISO 8601 (e.g., 2025-01-01)
date_range_endstringyes—End date in ISO 8601 (e.g., 2025-01-31)
top_nintegerno30Number of top and bottom variants to display
sort_bystringnorevenueRanking metric: revenue, units, or refund_rate
min_unitsintegerno1Exclude variants with fewer than N units sold in the period

Workflow Steps

  1. OPERATION: orders — query Inputs: first: 250, query: "created_at:>='<date_range_start>' created_at:<='<date_range_end>'", pagination cursor; select lineItems with variant { id, sku, title, selectedOptions }, quantity, originalTotalSet; and refunds.refundLineItems with variant id and subtotalSet Expected output: All orders in range; paginate until hasNextPage: false; aggregate in-memory per variant.id: units sold, gross revenue, refunded units, refunded amount, refund rate

  2. OPERATION: productVariants — query Inputs: List of variant IDs collected in step 1, first: 250, pagination cursor; select id, sku, title, selectedOptions, inventoryQuantity, product { id, title }, price Expected output: Current inventory levels and metadata for each sold variant; joined with step-1 aggregates; variants present in inventory but with zero sales are flagged as dead stock candidates

  3. In-memory computation: Sort merged dataset by sort_by metric; compute revenue-per-inventory-unit ratio (net revenue ÷ inventory quantity) to highlight variants earning little relative to shelf space; split output into top-N performers and bottom-N by the same metric

GraphQL Operations

graphql
# orders:query (variant line items + refunds) — validated against api_version 2025-01
query OrdersForVariantPerformance($first: Int!, $after: String, $query: String) {
  orders(first: $first, after: $after, query: $query) {
    edges {
      node {
        id
        createdAt
        lineItems(first: 50) {
          edges {
            node {
              quantity
              originalTotalSet {
                shopMoney { amount currencyCode }
              }
              variant {
                id
                sku
                title
                selectedOptions { name value }
                product { id title }
              }
            }
          }
        }
        refunds {
          refundLineItems(first: 50) {
            edges {
              node {
                quantity
                subtotalSet {
                  shopMoney { amount currencyCode }
                }
                lineItem {
                  variant { id }
                }
              }
            }
          }
        }
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
graphql
# productVariants:query (inventory snapshot) — validated against api_version 2025-01
query VariantInventorySnapshot($first: Int!, $after: String, $query: String) {
  productVariants(first: $first, after: $after, query: $query) {
    edges {
      node {
        id
        sku
        title
        price
        selectedOptions { name value }
        inventoryQuantity
        product {
          id
          title
        }
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

Session Tracking

Claude MUST emit the following output at each stage. This is mandatory.

On start, emit:

╔══════════════════════════════════════════════╗
║  SKILL: variant-performance-report           ║
║  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):

══════════════════════════════════════════════
OUTCOME SUMMARY
  Orders processed:     <n>
  Variants analysed:    <n>
  Date range:           <start> to <end>
  Sort by:              <metric>
  Errors:               0
  Output:               variant_performance_<date>.csv
══════════════════════════════════════════════

For format: json, emit:

json
{
  "skill": "variant-performance-report",
  "store": "<domain>",
  "started_at": "<ISO8601>",
  "completed_at": "<ISO8601>",
  "dry_run": false,
  "steps": [
    { "step": 1, "operation": "OrdersForVariantPerformance", "type": "query", "params_summary": "<date_range_start> to <date_range_end>", "result_summary": "<n> orders, <n> variants aggregated", "skipped": false },
    { "step": 2, "operation": "VariantInventorySnapshot", "type": "query", "params_summary": "<n> variant IDs", "result_summary": "<n> variants with inventory data", "skipped": false }
  ],
  "outcome": {
    "orders_processed": 0,
    "variants_analysed": 0,
    "date_range_start": "<date_range_start>",
    "date_range_end": "<date_range_end>",
    "sort_by": "revenue",
    "top_performers": [],
    "dead_weight": [],
    "errors": 0,
    "output_file": "variant_performance_<date>.csv"
  }
}

Output Format

CSV file variant_performance_<YYYY-MM-DD>.csv with one row per variant:

ColumnDescription
product_idShopify product GID
product_titleProduct name
variant_idShopify variant GID
variant_titleOption combination (e.g., "Blue / Large")
skuVariant SKU
units_soldTotal units sold in period
gross_revenueRevenue before refunds
refunded_amountTotal refund value
net_revenueGross minus refunds
refund_rate_pctRefunded units ÷ sold units × 100
inventory_qtyCurrent stock on hand
revenue_per_inventory_unitNet revenue ÷ inventory qty (blank if inventory = 0)

For format: human, two ranked tables are printed inline:

  1. Top performers — top top_n variants by sort_by metric
  2. Dead weight — bottom top_n variants by revenue_per_inventory_unit (≥ min_units sold, inventory > 0)

Error Handling

ErrorCauseRecovery
THROTTLEDAPI rate limit from paginating large order historyWait 2 s, retry up to 3 times; narrow date range if persistent
variant is null on line itemProduct or variant was deleted after purchaseAggregate by line item title with variant_id: null; still counted in totals
inventoryQuantity is nullVariant uses fulfillment service (no tracked inventory)Record as inventory_qty: null; exclude from revenue-per-unit ratio
No orders returnedNo orders in date rangeWiden date range

Best Practices

  1. Run with a 30–90 day window first. Very wide windows produce large pagination chains and slow down step 1 significantly.
  2. The revenue_per_inventory_unit column is the sharpest signal for dead weight — a high inventory count with near-zero revenue is a clear markdown candidate.
  3. High refund_rate_pct on a specific size or color often points to a fit or quality issue — investigate before reordering that option.
  4. Use min_units: 5 to filter out statistical noise from variants with very few sales before making merchandising decisions.
  5. Pair with dead-stock-identifier for a broader view of inventory health beyond the sales period captured here.

Frequently asked questions

What does the Shopify Admin Variant Performance Report AI skill do?

Rank every product variant by revenue, units sold, and refund rate, then cross-reference against current inventory to identify dead weight vs. top performers.

Why use Shopify Admin Variant Performance Report on TypingMind?

Because you install it once and use it with any model. Shopify Admin Variant Performance Report is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Shopify Admin Variant Performance Report in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/40RTY-ai/shopify-admin-skills/tree/main/skills/merchandising/shopify-admin-variant-performance-report. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Shopify Admin Variant Performance Report?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Shopify Admin Variant Performance Report?

As many as you like. As long as a model supports skills, you can use Shopify Admin Variant Performance Report with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Shopify Admin Variant Performance Report AI skill free?

Yes. It is published on GitHub by 40RTY-ai under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇