Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
40rty-ai avatar

Shopify Admin Return Reason Analysis

  • 7 installs
  • 173 repo stars
  • Updated June 26, 2026
  • 40rty-ai/shopify-admin-skills

shopify-admin-return-reason-analysis is a Claude Code skill that aggregates Shopify return reasons by product and SKU to surface quality and listing issues.

About

shopify-admin-return-reason-analysis aggregates return requests over a date window by reason code, product, and SKU to show which products are returned most and why. A merchandiser or ops owner runs it to spot product quality or listing issues. It is read-only and outputs a summary plus a CSV.

  • Aggregates return reasons by reason code, product, and SKU
  • Surfaces products with the highest return rates and most common reasons
  • Read-only; exports a return_reasons CSV

Shopify Admin Return Reason Analysis by the numbers

  • 7 all-time installs (skills.sh)
  • Ranked #1,587 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Data as of Aug 1, 2026 (Skillselion catalog sync)
At a glance

shopify-admin-return-reason-analysis capabilities & compatibility

Free; needs a Shopify CLI session with read_orders and read_returns scopes

Capabilities
returns analytics · return reason analysis · product quality
Use cases
data analysis
Runs
Runs locally
Pricing
Free
From the docs

What shopify-admin-return-reason-analysis says it does

Queries all return requests within a date window and aggregates them by return reason code, product, and SKU.
SKILL.md
Surfaces which products have the highest return rates and which reasons (wrong size, damaged, not as described, etc.) are most common.
SKILL.md
npx skills add https://github.com/40rty-ai/shopify-admin-skills --skill shopify-admin-return-reason-analysis

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs7
repo stars173
Last updatedJune 26, 2026
Repository40rty-ai/shopify-admin-skills

What it does

A merchant analyzes return reasons across orders to identify problem products and listing gaps.

Who is it for?

Merchandisers finding which products drive returns and why

Skip if: Modifying returns or issuing refunds (read-only)

When should I use this skill?

You want to know which products are returned most and the top return reasons

What you get

A ranked breakdown of returns by reason, product, and SKU with an overall return rate.

  • return_reasons CSV report
  • top-reasons and top-products-by-return-volume summary

By the numbers

  • default 30-day lookback window
  • default min_returns of 3 per product

Files

SKILL.mdMarkdownGitHub ↗

Purpose

Queries all return requests within a date window and aggregates them by return reason code, product, and SKU. Surfaces which products have the highest return rates and which reasons (wrong size, damaged, not as described, etc.) are most common. Read-only — no mutations.

Prerequisites

  • Authenticated Shopify CLI session: shopify store auth --store <domain> --scopes read_orders,read_returns
  • API scopes: read_orders, read_returns

Parameters

ParameterTypeRequiredDefaultDescription
storestringyesStore domain (e.g., mystore.myshopify.com)
days_backintegerno30Lookback window for return requests
min_returnsintegerno3Minimum returns per product to include in output
formatstringnohumanOutput format: human or json

Safety

ℹ️ Read-only skill — no mutations are executed. Safe to run at any time.

Workflow Steps

1. OPERATION: returns — query Inputs: query: "created_at:>='<NOW - days_back days>'", first: 250, pagination cursor Expected output: Return objects with returnLineItems { returnReason, refundableQuantity, fulfillmentLineItem { lineItem { product { title } variant { sku } } } }; paginate until hasNextPage: false

2. Aggregate by: return reason → product → SKU; calculate return count and % of total returns per bucket

3. OPERATION: orders — query (for return rate context) Inputs: Same date window, first: 250; count total orders as denominator for return rate calculation

GraphQL Operations

# returns:query — validated against api_version 2025-01
query ReturnsAnalysis($query: String!, $after: String) {
  returns(first: 250, after: $after, query: $query) {
    edges {
      node {
        id
        status
        createdAt
        order {
          id
          name
        }
        returnLineItems(first: 50) {
          edges {
            node {
              id
              quantity
              returnReason
              returnReasonNote
              fulfillmentLineItem {
                lineItem {
                  product {
                    id
                    title
                  }
                  variant {
                    id
                    sku
                    title
                  }
                }
              }
            }
          }
        }
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
# orders:query — validated against api_version 2025-01
query OrderCountForPeriod($query: String!) {
  orders(first: 1, query: $query) {
    pageInfo {
      hasNextPage
    }
  }
  ordersCount: orders(first: 250, query: $query) {
    edges {
      node {
        id
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

Session Tracking

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

On start, emit:

╔══════════════════════════════════════════════╗
║  SKILL: Return Reason Analysis               ║
║  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):

══════════════════════════════════════════════
RETURN REASON ANALYSIS  (<days_back> days)
  Total returns:   <n>
  Total orders:    <n>
  Return rate:     <pct>%

  Top Reasons
  ─────────────────────────────────────────
  Wrong size/fit        <n>  (<pct>%)
  Not as described      <n>  (<pct>%)
  Damaged/defective     <n>  (<pct>%)
  Changed mind          <n>  (<pct>%)
  Other                 <n>  (<pct>%)

  Top Products by Return Volume
  ─────────────────────────────────────────
  <Product Title>   <n> returns  (<SKU>)
  Output: return_reasons_<date>.csv
══════════════════════════════════════════════

For format: json, emit:

{
  "skill": "return-reason-analysis",
  "store": "<domain>",
  "period_days": 30,
  "total_returns": 0,
  "total_orders": 0,
  "return_rate_pct": 0,
  "by_reason": [],
  "by_product": [],
  "output_file": "return_reasons_<date>.csv"
}

Output Format

CSV file return_reasons_<YYYY-MM-DD>.csv with columns: return_id, order_name, product_title, sku, quantity, return_reason, reason_note, created_at

Error Handling

ErrorCauseRecovery
THROTTLEDAPI rate limit exceededWait 2 seconds, retry up to 3 times
No returns in windowNo return requests in periodExit with summary: 0 returns
Missing product/variant on line itemDeleted productLog as "deleted product", include in reason counts

Best Practices

  • Cross-reference high-return products with their listing descriptions and images — "not as described" returns often indicate a copy or photography issue.
  • Use min_returns: 10 for larger stores to focus on statistically significant patterns rather than one-off complaints.
  • Run monthly and compare period-over-period to track whether merchandising or product quality improvements are reducing specific return reasons.
  • Pair with exchange-vs-refund-ratio to understand whether high-return products are recovering revenue via exchanges.

Related skills

FAQ

What return rate does it compute?

It counts total orders in the window as the denominator to compute a return rate percentage.

Can I limit noisy products?

Yes, min_returns (default 3) sets the minimum returns per product to include in output.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.