Weekly forecast rollup
@revopslab/weekly-forecast-rollup
Roll an opportunity export from HubSpot, Salesforce, or any CRM into closed won, commit, best case, and pipeline by rep and team for the quarter, then compare with last week: what moved, which deals slipped or were pulled in, upgrades, downgrades, new, won, lost, and dropped deals.
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
- 1{
- 2 "name": "weekly-forecast-rollup",
- 3 "owner": "revopslab",
- 4 "version": "1.0.0",
- 5 "type": "skill",
- 6 "description": "Roll an opportunity export from HubSpot, Salesforce, or any CRM into closed won, commit, best case, and pipeline by rep and team for the quarter, then compare with last week: what moved, which deals slipped or were pulled in, upgrades, downgrades, new, won, lost, and dropped deals.",
- 7 "category": "revops",
- 8 "license": "MIT",
- 9 "compat": [
- 10 "claude-code"
- 11 ],
- 12 "permissions": {
- 13 "shell": [
- 14 "node scripts/forecast-rollup.mjs"
- 15 ],
- 16 "files": {
- 17 "read": [
- 18 "./data/**"
- 19 ],
- 20 "write": [
- 21 "./out/**"
- 22 ]
- 23 }
- 24 },
- 25 "tests": {
- 26 "cases": [
- 27 {
- 28 "name": "rolls up by rep and team and finds week-over-week changes",
- 29 "inputs": {
- 30 "data/opps-this-week.csv": "Opportunity ID,Opportunity Name,Opportunity Owner,Owner Role,Amount,Close Date,Stage,Forecast Category\nO1,Northwind Traders: expansion,Rep A,East,\"50,000\",2026-11-03,Closed Won,Closed\nO2,Contoso Robotics: new logo,Rep A,East,30000,2027-01-15,Proposal,Best Case\nO3,Fabrikam Health: platform,Rep B,West,72000,2026-12-15,Negotiation,Commit\nO4,Tailspin Toys: pilot,Rep B,West,20000,2026-11-30,Closed Lost,Omitted\nO5,Adventure Works: renewal + upsell,Rep C,West,40000,2026-12-20,Negotiation,Commit\nO6,Litware: starter,Rep C,West,15000,2026-10-15,Closed Won,Closed\nO8,Wide World Importers: new logo,Rep B,West,60000,2026-12-18,Proposal,Best Case\n",
- 31 "data/opps-last-week.csv": "Opportunity ID,Opportunity Name,Opportunity Owner,Owner Role,Amount,Close Date,Stage,Forecast Category\nO1,Northwind Traders: expansion,Rep A,East,\"50,000\",2026-11-20,Negotiation,Commit\nO2,Contoso Robotics: new logo,Rep A,East,30000,2026-12-10,Proposal,Best Case\nO3,Fabrikam Health: platform,Rep B,West,80000,2026-12-15,Negotiation,Commit\nO4,Tailspin Toys: pilot,Rep B,West,20000,2026-11-30,Discovery,Pipeline\nO5,Adventure Works: renewal + upsell,Rep C,West,40000,2026-12-20,Proposal,Best Case\nO6,Litware: starter,Rep C,West,15000,2026-10-15,Closed Won,Closed\nO7,Proseware: new logo,Rep A,East,25000,2026-12-01,Proposal,Pipeline\n"
- 32 },
- 33 "checks": [
- 34 {
- 35 "type": "command_exits_zero",
- 36 "command": "node scripts/forecast-rollup.mjs data/opps-this-week.csv data/opps-last-week.csv --period-start 2026-10-01 --period-end 2026-12-31 --out out"
- 37 },
- 38 {
- 39 "type": "file_contains",
- 40 "path": "out/forecast.md",
- 41 "text": "2026-12-10 to 2027-01-15, OUT OF PERIOD"
- 42 },
- 43 {
- 44 "type": "output_matches_schema",
- 45 "path": "out/forecast.json",
- 46 "schema": {
- 47 "type": "object",
- 48 "required": [
- 49 "totals",
- 50 "by_owner",
- 51 "by_team",
- 52 "week_over_week",
- 53 "changes"
- 54 ],
- 55 "properties": {
- 56 "totals": {
- 57 "type": "object",
- 58 "properties": {
- 59 "closed_won": {
- 60 "const": 65000
- 61 },
- 62 "commit": {
- 63 "const": 112000
- 64 },
- 65 "best_case": {
- 66 "const": 60000
- 67 },
- 68 "pipeline": {
- 69 "const": 0
- 70 },
- 71 "forecast": {
- 72 "const": 177000
- 73 }
- 74 }
- 75 },
- 76 "week_over_week": {
- 77 "type": "object",
- 78 "properties": {
- 79 "total": {
- 80 "type": "object",
- 81 "properties": {
- 82 "change": {
- 83 "type": "object",
- 84 "properties": {
- 85 "forecast": {
- 86 "const": 32000
- 87 }
- 88 }
- 89 }
- 90 }
- 91 }
- 92 }
- 93 },
- 94 "changes": {
- 95 "type": "object",
- 96 "properties": {
- 97 "slipped": {
- 98 "type": "array",
- 99 "minItems": 1,
- 100 "maxItems": 1
- 101 },
- 102 "lost": {
- 103 "type": "array",
- 104 "minItems": 1,
- 105 "maxItems": 1
- 106 },
- 107 "won": {
- 108 "type": "array",
- 109 "minItems": 1,
- 110 "maxItems": 1
- 111 },
- 112 "upgraded": {
- 113 "type": "array",
- 114 "minItems": 1,
- 115 "maxItems": 1
- 116 },
- 117 "new": {
- 118 "type": "array",
- 119 "minItems": 1,
- 120 "maxItems": 1
- 121 },
- 122 "dropped": {
- 123 "type": "array",
- 124 "minItems": 1,
- 125 "maxItems": 1
- 126 },
- 127 "amount_changed": {
- 128 "type": "array",
- 129 "minItems": 1,
- 130 "maxItems": 1
- 131 }
- 132 }
- 133 }
- 134 }
- 135 }
- 136 }
- 137 ]
- 138 },
- 139 {
- 140 "name": "HubSpot-style columns, single export, missing category counted as pipeline",
- 141 "inputs": {
- 142 "data/deals.csv": "Record ID,Deal Name,Deal owner,Amount,Close Date,Deal Stage,Forecast category\n11,Alpha,Rep D,10000,11/20/2026,Contract sent,Commit\n12,Beta,Rep D,5000,12/05/2026,Qualified,\n13,Gamma,Rep E,7000,2027-02-01,Qualified,Best case\n"
- 143 },
- 144 "checks": [
- 145 {
- 146 "type": "command_exits_zero",
- 147 "command": "node scripts/forecast-rollup.mjs data/deals.csv --period-start 2026-10-01 --period-end 2026-12-31 --out out"
- 148 },
- 149 {
- 150 "type": "output_matches_schema",
- 151 "path": "out/forecast.json",
- 152 "schema": {
- 153 "type": "object",
- 154 "properties": {
- 155 "totals": {
- 156 "type": "object",
- 157 "properties": {
- 158 "commit": {
- 159 "const": 10000
- 160 },
- 161 "pipeline": {
- 162 "const": 5000
- 163 },
- 164 "best_case": {
- 165 "const": 0
- 166 },
- 167 "deals": {
- 168 "const": 2
- 169 }
- 170 }
- 171 },
- 172 "week_over_week": {
- 173 "type": "null"
- 174 },
- 175 "data_problems": {
- 176 "type": "array",
- 177 "minItems": 1,
- 178 "maxItems": 1
- 179 }
- 180 }
- 181 }
- 182 }
- 183 ]
- 184 }
- 185 ]
- 186 }
- 187}
