Sales Commission Calculator Skill

Turn a deals export and a plan file into payouts per rep: tiers, accelerators past quota, split deals, caps and clawbacks inside the window. Duplicate deals, splits that don't add to 100% and unknown reps are flagged before anyone gets paid.

Sales Commission Calculator Skill cover

What it catches

SituationCodeLevel
Same deal ID exported twice (repeat ignored)duplicate_deal_iderror
Won deal with no ownerdeal_without_reperror
Split doesn't add to 100% (deal held)split_not_100error
No close datemissing_close_dateerror
Rep not in the plan (default plan used)unknown_repwarning
Negative deal amountnegative_amountwarning
Refund/cancel inside the clawback windowclawbackinfo
Cancel after the window (no clawback)clawback_window_passedinfo
Attainment over 100% (accelerators)accelerator_reachedinfo
Cap reduced the payoutcap_appliedinfo
Closed outside the perioddeal_outside_periodinfo

Proven on a labeled example

examples/northwind-oct-2026/ is a fictional SaaS team's October: 16 deals for 3 reps on a 10% / 15% / 20% plan (quota 50k, Maya 60k), with a 60/40 split, a multi-year SPIFF, a renewal, a deal exported twice, a refund 49 days after close (clawback) and one 109 days after (none), a deal with no owner, a rep missing from the plan, a November deal and a 90% split. expected.json labels the payouts (Alex 7,700, Maya 5,350, Sam 9,750 after a 1,200 clawback, Jordan 700); the tests assert those, the marginal tier math, caps, quarters and row order.

What you get

Outputs in out/: payouts.csv, statements/<rep>.md, deal_lines.csv, findings.csv, report.md, summary.json. Exit 0 = ready for payroll review; 1 = errors to fix first; 2 = an input problem. --show-plan prints the plan in use.

Real Sales Commission Calculator Skill report and passing tests from the labeled example

Quick start

./run_tests.sh
python3 -m commission --deals examples/northwind-oct-2026/deals_export.csv --plan examples/northwind-oct-2026/plan.json --period 2026-10 --out out/

Inputs

  • Deal export CSV from HubSpot, Salesforce, Pipedrive or a sheet: Deal ID, Owner, Close Date, Amount; optional Type (new/expansion/renewal), Status, Cancel Date, Split ("A:60|B:40"), Multi Year.
  • Plan JSON: quota, tiers (marginal, by attainment), renewal rate, whether renewals count to quota, SPIFFs, clawback days, cap; per-rep overrides.

Use it from your agent

  • Claude Code plugin: this folder is a plugin (.claude-plugin/plugin.json). Try it with claude --plugin-dir ./sales-commission-calculator-skill, or add the folder to your own plugin marketplace.
  • Skill only: copy skills/sales-commission-calculator/ into ~/.claude/skills/ (or your agent's skills folder) and keep this folder where the agent can run python3 -m commission.
  • No agent: the CLI works on its own; --help lists every flag.

Honest limits

  • One period per run (month or quarter); annual true-ups and draws aren't modeled.
  • Clawbacks use the base rate; if your plan claws back at the rate originally paid, adjust the plan file.
  • It calculates from the export; it doesn't connect to the CRM or payroll.
  • Your signed comp plan governs; this is a calculation aid, not legal or payroll advice.

Requirements

Python 3.9+ (tested on 3.10 and 3.13), no dependencies.

Format and license

Zip, 16 KB, v1.0, 14 files. Use and modify it for yourself and for clients you serve; no resale or redistribution of the kit itself. Full terms in LICENSE.txt.

FAQ

Which CRM?
Any CSV export with deal id, rep, amount and close date (HubSpot, Salesforce, Pipedrive).
Does it pay anyone?
No; it writes statements for you to approve.
Is this payroll or tax advice?
No.
How do I get the files?
Right after payment, Stripe’s confirmation page shows your download link.
Refunds?
Email hello@youraitools.co within 14 days if it doesn’t work and we can’t fix it.
Can I pay with crypto?
Yes. Pay the same price in USDC or USDT on Base, Ethereum, Arbitrum, Optimism, Polygon or Solana from the "Pay with crypto" button, with no account or KYC. We check the payment on-chain and show your download links as soon as it confirms.

Get Sales Commission Calculator Skill

Calculate sales commissions from a CRM deals export: tiered rates, accelerators, split deals, caps and clawbacks, with a statement per rep. $29 once.

Pairs well with

Download$29

Recipe Costing + Menu Engineering Skill

Recipe costing with yield, food cost % per plate, menu engineering classes (Stars, Plowhorses, Puzzles, Dogs) and target prices from your sales mix. $29 once.

View Recipe Costing + Menu Engineering Skill
Download$29

Freight Invoice Audit Skill

Audit carrier freight invoices against shipments and your fuel schedule: duplicates, math errors, wrong fuel surcharge, unapproved accessorials. $29 once.

View Freight Invoice Audit Skill
Download$69

Accounts Payable Audit Skills Bundle

Accounts payable audit on your own exports: three-way match, duplicate payments, vendor master, expense and freight invoice audits, QBO JE import check. 5 kits, $69 ($118 separately).

View Accounts Payable Audit Skills Bundle

Related