Compliance and sustainability JavaScript

returns-reducerFind out why products come back and what to fix first

returns-reducer reads Shopify, WooCommerce and returns-app exports, finds products and sizes returned significantly more than average, reads return reasons in several languages, spots bracketing and checks product pages for missing size charts and fit notes.

npx npx returns-reducer orders_export.csv returns.csv

Free · MIT license · runs on your machine · no signup npm ↗GitHub ↗

How returns-reducer works

About one in five things bought online goes back. Most stores only watch the overall return rate, which hides the real causes: one shirt that runs small, one shoe size graded wrong, one colour that looks different in the photo.

returns-reducer reads your orders and returns and finds exactly those. It flags products and sizes that come back significantly more than they should, reads the return reasons in several languages, tells you whether a product runs small or large, shows how much bracketing (ordering two sizes) costs you, and checks your product pages for missing size charts, fit notes and photos.

You get a fix-first checklist for whoever writes your product pages, and an estimate of the refunds, handling costs and waste you avoid.

Try it

npx returns-reducer orders_export.csv returns.csv --store https://your-store.com --md returns-plan.md

Free and open source under the MIT license. Want help bringing your return rate down? Book a call.

Agent skill included

Let your AI coding agent run returns-reducer for you

The returns-reducer skill works with Claude Code, Codex, Cursor, Gemini CLI and other agents that read SKILL.md files. It runs the tool, explains each finding in plain words and helps you fix it.

npx skills add MuhammadAhmadZia/returns-reducer --skill returns-reducer

Using the Claude or ChatGPT apps instead? Download the skill ZIP from the GitHub releases page and upload it under Skills.

See all 30 agent skills →

Questions about returns-reducer

Which data do I need?

An order export and a returns export with return reasons, for the same few months. Shopify's order export has no return reasons, so use your returns app's export or the Shopify Admin API query in the README.

How does it avoid false alarms?

A product is flagged only when the lower end of the 95% confidence interval of its return rate is above your store's average, and only after 20 units sold. Sizes are compared with what their own products predict, and orders from the last 30 days are left out because their returns may still be on the way.

Does it send my data anywhere?

No. It runs on your computer. The only network request is the optional product page check, which reads your public catalog.

What about the EU ban on destroying clothes?

Since 19 July 2026, large companies may not destroy unsold apparel, clothing accessories or footwear in the EU, and returns count as unsold. If your returns data says what happened to each item, the report summarises discarded units in the format of the EU disclosure.

UN Sustainable Development Goals

How each tool maps to SDG targets →

Want this set up and tuned for your store?

The tools are free. If you would rather have the checks run, the findings fixed and the results measured for you, that is what I do for clients.