1
---
2
name: sales-pipeline-coverage-and-forecast-checker
3
description: Checks a B2B sales pipeline from a CRM CSV: quarter gap to quota, pipeline coverage, commit, best case, weighted and risk-adjusted forecasts, a per-owner view, and deals that make the forecast unreliable (past close dates, stale, stuck, pushed, no next step, concentration). Stdlib Python.
4
---
5
6
# Sales Pipeline Coverage and Forecast Checker
7
8
You help founders who still run sales, first sales leaders and small B2B teams answer two questions every week: "Will we hit the quarter?" and "Do we have enough pipeline to get there?" CRM dashboards show a big total that feels reassuring; you turn it into an honest number by checking coverage against the remaining gap, separating commit from hope, and pointing at the specific deals that make the forecast unreliable.
9
10
You work with deal-level CRM exports only (account names, amounts, stages, dates). You do not need contact details or personal data, and you never judge individual sellers from one quarter's numbers: flags are about deal hygiene, not people.
11
12
## Files in this skill
13
14
- `scripts/pipeline_check.py` - reads a deals CSV and a settings JSON, computes closed won, gap, open pipeline and coverage for a quarter, commit / best case / weighted / risk-adjusted forecasts, stage and owner breakdowns, and flags P01-P06 plus invalid rows (E01); `--as-of`, `--quarter`, `--format text|md|csv|json`; `--self-test` runs 24 checks (Python 3.8+ standard library only)
15
- `references/forecast-method.md` - how coverage and each forecast are calculated, sensible stage probabilities and coverage targets, and how to calibrate them from your own history
16
- `references/pipeline-hygiene.md` - what each flag usually means and the question to ask the deal owner
17
- `templates/forecast-brief.md` - a one-page weekly forecast note for the team or the board
18
- `examples/deals.csv` + `examples/settings.json` - a fictional healthcare SaaS startup in its Q4
19
20
## Workflow
21
22
### 1. Gather inputs
23
Ask for a CRM export (HubSpot, Pipedrive, Salesforce, Close, Attio or a spreadsheet) with one row per deal and these columns: `deal_id, account, owner, stage, amount, close_date, stage_entered, last_activity, next_step, pushes` (dates as YYYY-MM-DD; `pushes` = how many times the close date moved; use 0 if unknown). Then agree the settings: currency, quota per quarter, stage names with win probabilities, forecast category (pipeline, best_case, commit, won, lost) and maximum days per stage, coverage target, stale-activity days, push limit and concentration limit. If the user has no history, start with the defaults in `examples/settings.json` and say so.
24
25
### 2. Run the check
26
```
27
python3 scripts/pipeline_check.py deals.csv --settings settings.json
28
python3 scripts/pipeline_check.py deals.csv --settings settings.json --as-of 2026-11-27 --quarter 2026-Q4
29
python3 scripts/pipeline_check.py deals.csv --settings settings.json --quarter 2027-Q1
30
python3 scripts/pipeline_check.py deals.csv --settings settings.json --format md > forecast.md
31
python3 scripts/pipeline_check.py deals.csv --settings settings.json --format csv > flags.csv
32
python3 scripts/pipeline_check.py --self-test
33
```
34
Exit code 0 = no flags, 1 = flags or invalid rows, 2 = unreadable input or missing columns.
35
36
| Code | Meaning |
37
|---|---|
38
| P01 | close date in the past but the deal is still open (counted in the current quarter until fixed) |
39
| P02 | no activity for `stale_days` or more |
40
| P03 | stage probability 50% or higher but no next step written down |
41
| P04 | longer in the current stage than its `max_days` |
42
| P05 | close date pushed `push_limit` times or more |
43
| P06 | one deal is `concentration_pct` or more of the quarter's open pipeline |
44
| E01 | invalid row (unknown stage, bad amount or date, negative values) |
45
46
### 3. Interpret
47
- Coverage is open pipeline closing this quarter divided by the remaining gap (quota minus closed won), not by the full quota. Below about 2x late in a quarter means the number is at risk; early in a quarter aim for 3x or more.
48
- Read the forecasts as a range: commit is the floor you would bet on, best case is the ceiling, weighted is a statistical middle, and risk-adjusted halves the probability of deals with P01, P02 or P05 flags.
49
- A big gap between weighted and risk-adjusted means the pipeline needs cleaning more than it needs new deals.
50
- P06 is not bad by itself, but the plan must still work if that deal slips.
51
- Flags cover the open deals of the analyzed quarter; run `--quarter` for next quarter too, so slipped deals are checked where they now sit.
52
53
### 4. Act
54
Use `references/pipeline-hygiene.md` to turn flags into owner questions ("What has to happen for this to close by December 19, and who on their side decides?"). Fix close dates and stages in the CRM, then re-run. If coverage is short, the script's "add X of qualified pipeline" line gives a concrete target for prospecting and for next quarter.
55
56
### 5. Report
57
Fill `templates/forecast-brief.md`: the forecast range, coverage, the three deals that decide the quarter, the hygiene fixes, and what is needed for next quarter's pipeline.
58
59
## Example
60
```
61
python3 scripts/pipeline_check.py examples/deals.csv --settings examples/settings.json
62
```
63
Result (as of 2026-11-27): quota USD 260k, closed won USD 85k, gap USD 175k; USD 364k open in 9 deals gives 2.08x coverage, so USD 161k more qualified pipeline is needed for 3x. Forecast range: commit USD 194k (74.6%), weighted USD 222k, risk-adjusted USD 213k (81.8%), best case USD 294k. Flags: Cedar Family Practice is past its close date, stale and pushed 3 times; Lakeside Vision Care is in Negotiation without a next step and pushed twice; Metro Urgent Care has sat in Proposal for 44 days; Greenfield Hospital Group alone is 38% of open pipeline.
64
65
## Limits
66
- The output is only as good as the CRM data; stale stages and optimistic close dates are the most common errors, which is why the flags exist.
67
- Stage probabilities are assumptions until calibrated with at least a few quarters of your own win rates (see `references/forecast-method.md`).
68
- Amounts are treated as one currency and one-off bookings; for multi-year or usage-based deals, agree what "amount" means (first-year ACV is common).
69
- This is a planning aid, not financial reporting or a performance review tool.
70
71