DTC Contribution Margin by Channel

A Claude skill that works out contribution margin for each sales channel from exports or warehouse tables you provide. It asks for your definitions before it calculates anything.

Runs in your own Claude account

What it does

  1. 1Confirms the period, refund date basis, reporting time zone, revenue rules, cost sources and who owns the definition.
  2. 2Checks the grain of each export and separates sales channel, fulfillment provider and source system so one purchase is counted once.
  3. 3Maps products to a canonical item with pack quantities and dated costs, and reports sales with missing cost separately.
  4. 4Runs duplicate checks on joins, refunds and shipping before summing, then calculates net revenue and contribution margin by channel.
  5. 5Ties channel net sales back to each platform report and flags fees and refunds that may still change.

What it needs

  • Order, refund and fee exports from Shopify, Amazon and TikTok Shop, or the warehouse table and column names.
  • Product costs, ideally with effective dates, and fulfillment costs from 3PL or shipping invoices.
  • Your rules for refund date, time zone, shipping, subsidies and test orders, or agreement to use the stated defaults.

Prompts to try

  • “Here are last month's Shopify, Amazon and TikTok Shop exports. Calculate contribution margin by channel.”
  • “Our Amazon margin looks too low next to Shopify. Check whether costs are assigned to the right channel.”
  • “Write SQL for contribution margin by channel from these Snowflake tables, using refund date for returns.”

What you get back: A contribution margin table by channel with the definitions used, duplicate and tie-out checks, a list of exceptions, and the numbers that may still change.

How to install it

Claude on the web or desktop
Download the .zip. In Claude, open Settings, find Skills under Capabilities, and upload the file. Then ask Claude one of the prompts above.
Claude Code
Unzip the folder into ~/.claude/skills/ so the file sits at ~/.claude/skills/dtc-contribution-margin/SKILL.md. Claude Code picks it up in the next session.
Read it first
The skill is a plain text file of instructions. Open SKILL.md to see exactly what it tells Claude to do before you install it.
Change it
Edit the definitions or the output format to match how your team counts things. It is yours to adapt.

Common questions

Does contribution margin include ad spend?

Not in this skill. Contribution margin is before marketing. If you ask it to subtract ad spend, it labels the result contribution after marketing and shows both.

Why does it ask about refund dates?

A refund processed this month can belong to last month's order. Counting it on the refund date and on the order date are both valid, but they put the reduction in different months, so the skill asks which one you want and labels the measure.

Which Amazon fees does it use?

Posted fee events for margin by SKU and settlement reports for cash. It keeps estimated fees, such as the storage fee estimate, out of charged costs.

What happens when a product has no cost?

The skill does not treat missing cost as zero. It reports margin on known-cost sales with the coverage, and lists the sales and units left out.

Want Claude connected to your own data?

We set up read-only access to Snowflake, the curated tables Claude should use, and checks so the answers match your reports.

Book a Call