Margin defense for anyone who discounts

Your “30% margin” is hidingthe deals losing money.

A blended margin number is an average — and averages hide the tail of deals running thin, below floor, or outright negative. The Margin Leak Auditor sweeps your whole deal book and pulls those deals out by name, on the real pocket margin after every discount, freight charge, and rebate.

Plus four skills to stop the leak — guard discounts, review quotes, trace cost-change impact, diagnose where margin’s going. It defends the prices you’ve set; it doesn’t decide them.

Get the Auditor — $79one-time · runs on a CSV from your CRM or ERP · 30-day refund
Five skills · One runnable auditor
Margin Leak Auditor
Runnable · HOLD / CLEAR
Discount Guard
Guard the floor
Quote Margin Reviewer
All-in quote margin
Cost-Change Impact Analyzer
What flips underwater
Leak Diagnosis
Cause, not symptom
Works alongside
Salesforce · HubSpot · QuickBooks · NetSuite · Excel · Sheets · any deal-book CSV
01.The Problem

The leak you can’t see in the average.

You know your blended margin. What you don’t know is which deals are dragging it down — because the healthy ones average out the bleeding ones, and the number looks fine. McKinsey’s research on the price waterfall found off-invoice leakage alone averages around 16% of list price, and once on-invoice discounts are added, total erosion often tops 40%. The deals that crossed the line are sitting inside your average right now, invisible.

And the leak compounds quietly: one more point of discount to close, free freight on a small order, a bundled give-away, a customer who negotiated net-60 years ago and now pays in 70 days. None of it shows on the invoice. All of it comes out of what you actually pocket.

The average lies

A blended '30% margin' is a mean, and a mean hides its tail. The losing deals don't show up — the healthy ones average them out — so a book that looks fine can be quietly carrying deals below cost.

~16% off-invoice

McKinsey's price-waterfall work found off-invoice leakage — freight, rebates, fees, terms — averages roughly 16% of list price, none of it visible on the invoice. Most teams never read the price past the invoice line.

It compounds

One more point of discount to close, free freight on a small order, a give-away, a stale net-60 that's now net-70. Each is small; together they ratchet the realized margin down where no single report shows it.

02.The Five Skills

Five skills for margin defense.

Sweep the book, guard the discount, vet the quote, model the cost change, diagnose the cause. One runnable centerpiece and four skills around it — every one single-purpose and composable.

Runnable · HOLD / CLEAR
Margin Leak Auditor
margin-leak-auditor
Triggers

“audit my margins,” “which deals are losing money,” “are we below floor”

Ships a real, runnable script. Sweeps your deal book or price list and flags every line whose realized (pocket) margin is below floor — LOSS, BELOW-FLOOR, THIN, DEEP-DISCOUNT. Quantifies the dollars leaking, contrasts it with your blended margin, and returns HOLD / CLEAR. Exits non-zero so it gates quote approval.

Guard the floor
Discount Guard
discount-guard
Triggers

“can I give this discount,” “is this approved,” “customer wants X% off”

Checks a discount before the quote ships: does it keep pocket margin above floor, and is it within the rep's authority? Returns approve / escalate / below-floor — and the largest discount that would still hold the floor, so there's a number to counter with.

All-in quote margin
Quote Margin Reviewer
quote-margin-reviewer
Triggers

“review this quote,” “is this quote profitable,” “before I send this”

Reviews a single quote line by line for all-in pocket margin — catching the freight, rush, give-aways, services, and payment terms that don't show on the unit price. Shows the apparent margin vs the real one, and names the lines below floor.

What flips underwater
Cost-Change Impact Analyzer
cost-change-impact-analyzer
Triggers

“our supplier raised prices,” “costs went up,” “what does this do to margins”

When a cost moves — supplier increase, freight, FX — recomputes pocket margin and names exactly which SKUs and deals just flipped underwater or thin. Quantifies the hit and shows what price move would restore the floor (as information, not a directive).

Cause, not symptom
Leak Diagnosis
leak-diagnosis
Triggers

“why is our margin down,” “where are we leaking,” “what's driving the erosion”

Traces a margin gap to its cause — discounting, cost creep, mix shift, give-aways, freight, or payment terms — biggest driver first. Separates a mix problem from a pricing problem (opposite fixes), so you treat the cause, not the symptom.

03.The Auditor in Action

The auditor actually runs. Here’s real output.

This is the included margin-leak-auditor.py run against the six-deal sample book at a 30% floor — not a screenshot of a promise. Look at the headline: the book blends to 17.4% pocket margin, but two deals are actually losing money and one sits at 9.8%. It named them and quantified ~$4,975 leaking below floor.

margin-leak-auditor/scripts/margin-leak-auditor.py
stdlib · no install
$ python scripts/margin-leak-auditor.py deals-sample.csv --floor 30 --max-discount 25

 HOLD   lines: 6  | loss 2  below-floor 1  thin 2  deep-disc 0  ok 1
  blended pocket margin 17.4%  |  margin leaking below floor: 4,975.00
--------------------------------------------------------------------------------
FIX BEFORE YOU BOOK IT (loss / below floor) (3)
  • [LOSS] D-102 — Big-box account: LOSS: pocket margin -800.00 (-17.0%).
    Selling at or below all-in cost — reprice or walk.
  • [LOSS] D-104 — Loss leader: LOSS: pocket margin -170.00 (-37.8%).
    Selling at or below all-in cost — reprice or walk.
  • [BELOW-FLOOR] D-105 — Volume deal: BELOW FLOOR: pocket margin 9.8% vs
    floor 30% (short 20.2 pts). Leaking 2,460.00 vs floor.

REVIEW (thin, deep discount, data gaps) (2)
  • [THIN] D-101 — Acme reorder: THIN: pocket margin 32.9% is within 5 pts
    of the 30% floor. One cost bump from breaching it.
  • [THIN] D-103 — Standard SMB: THIN: pocket margin 34.1% is within 5 pts
    of the 30% floor. One cost bump from breaching it.

Verdict: HOLD. ~4,975.00 in margin is below floor — recover it by repricing
the lines above.
$ echo $?
1

Reads a CSV exported from your CRM or ERP, matches your column names flexibly, separates fix-before-you-book losses from review items, and quantifies the leak. JSON mode for tooling; --strict makes thin and deep-discount lines block too.

04.The Standard

Built on the price waterfall — the realized-margin framework.

The method comes from McKinsey’s Marn & Rosiello (Harvard Business Review, 1992). A price doesn’t stay at list — it cascades down to what you actually pocket. Most teams stop reading at the invoice price; the auditor follows it all the way down.

01List price

The published / catalog price — where most analysis starts.

02− on-invoice discounts

Volume breaks, promos, customer-specific deals.

03= Invoice price

What the customer is billed. Most teams stop here. That's the mistake.

04− off-invoice deductions

Freight, rebates, fees, allowances, payment-terms cost.

05= Pocket price − cost

What you actually keep. Pocket margin = (pocket − cost) ÷ pocket.

A sourced primer is included — and the engine works in margin (% of price), never silently mixing in markup (% of cost), a common and expensive error.

05.Set vs Defend

Set the price, or defend it — two different jobs.

If you’ve seen our “Should I Raise My Prices?” Decision Kit, here’s how this is different. Most businesses want both.

“Should I Raise My Prices?” Kit
Decide the price
  • ·Models a deliberate price increase
  • ·Forward-looking, occasional decision
  • ·“By how much, and what loss can I absorb?”
  • ·A spreadsheet you sit down with
Margin Leak Auditor
Defend the price
  • ·Sweeps actual deals for margin below floor
  • ·Ongoing, operational check on real transactions
  • ·“Which deals are violating the price I set?”
  • ·Skills + a runnable auditor on your CSV

The Kit decides where to set the price; the Auditor catches every deal quietly violating the price you already set. Neither replaces the other.

06.What This Is — And Isn't

Clear about the lane. No inflated promises.

What's in
  • 5 production-grade SKILL.md skills with NEVER/ALWAYS guardrails and worked examples.
  • A real, runnable margin-leak-auditor.py — stdlib, HOLD/CLEAR, leak quantification, exit codes, flexible CSV.
  • A sourced pocket-margin / price-waterfall primer, with the margin-vs-markup trap spelled out.
  • Per-skill references: discount authority, all-in cost checklist, cost-change playbook, leakage sources.
  • An AGENTS.md companion for standing margin discipline — pocket margin, no fabricated costs, stay out of price-setting.
  • A README covering Claude Code, Codex, Cursor, Gemini, and Copilot installation.
What's out
  • Not a price-setting tool — it defends your floor; it won't tell you what to charge or to raise prices.
  • No invented numbers — a missing cost is flagged, never guessed into a fake margin.
  • No markup/margin confusion — it works in margin (% of price) throughout.
  • Not an accounting system or ERP — it does the margin judgment around your data, not the books.
  • No SaaS, no monthly fee, no telemetry — your deal and cost data never leave your environment.
07.Who It's For

If you discount or hold a price list, margin leaks.

Anyone who discounts

If reps or you give discounts to close, margin leaks at the discount line. Guard it before the quote ships, and sweep the book for what already slipped through.

Distributors & resellers

Thin margins, freight, and rebates make pocket margin the only number that matters — the average flatters the losers. The auditor pulls them out by name.

Agencies & services firms

Bundled hours, scope give-aways, and blended rates hide losing engagements inside a healthy-looking average. The auditor names them.

08.Common Questions

The questions finance and sales leads actually ask.

It finds the deals and SKUs that are quietly losing money — the ones your blended margin number hides. Five Claude skills: a runnable auditor that sweeps your whole deal book or price list for realized (pocket) margin below floor; a discount guard that checks a discount before a quote goes out; a quote margin reviewer that catches hidden cost drivers in a single quote; a cost-change impact analyzer that finds which products flip underwater when a cost rises; and a leak diagnosis skill that traces a margin gap to its cause. It runs on a CSV you export from your CRM, ERP, or spreadsheet.

Step up to the cockpit

Margin is one lever; cash is the whole game. Cash-Flow Sentinel reads your actual inflows and obligations and flags a runway risk weeks out — the founder-grade Executive Suite that grades the whole company, not one leak. $249.

5 skills · 1 runnable auditor · $79

Run it on your own deal book.

Export a deal book or price list to a CSV and run the auditor against your real floor. If it says CLEAR, you’ve confirmed your book is healthy. If it surfaces one deal quietly losing money, the recovered margin dwarfs the price. Installs in Claude Code, Pro, Codex, and Cursor. Thirty-day refund either way.

Sold by RedHub AI LLC · Secured by Stripe · redhub.ai