skills/tier-5-automation/revenue-forecaster/SKILL.md
Weekly revenue / sales forecasting for small businesses with multiple locations or product lines. Blends recent trend + seasonal baseline + YoY growth with per-entity holiday multipliers and week-of-month adjustments. Ships autoresearch-compatible eval and parameters so you can tune it on your own historical data.
npx skillsauth add pbc-os/agent-skills-public revenue-forecasterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Predict next week's revenue. Project 13 weeks of cash. Stress-test scenarios. Tune it yourself with autoresearch.
Most SMB forecasting is either a gut number or a wild spreadsheet. This skill gives your agent a real parametric forecast model that handles the things that actually matter for small businesses:
references/data-adapters.md for Google Sheets, BigQuery, and Square API patterns.Bring your data — Export a CSV with three columns:
week_start,entity,revenue
2025-10-06,Main Street,48350.00
2025-10-06,Downtown,32110.00
2025-10-13,Main Street,51200.00
...
week_start must be the Monday of the week (ISO week start). entity is your location, shop, product line, or any other unit you want forecasted independently. revenue is that week's total.
Copy the starter parameters — cp templates/parameters.json config/parameters.json and edit it if you already know things about your business (e.g., Shop A has a Christmas spike of 2×).
Run a forecast:
python3 scripts/forecast.py --data data/history.csv --params config/parameters.json
Output is JSON to stdout with one entry per entity: point estimate, confidence range, component breakdown, and the methodology note so you can explain the number.
Pair with autoresearch (optional but recommended) — The scripts ship with scripts/eval.py, which is a backtesting evaluator that the autoresearch skill can drive to tune your parameters. The parameters that ship with this skill are sensible defaults, not optimized to your business — autoresearch is how you close that gap.
The scripts expect a single CSV with one row per entity per week. The built-in reader in scripts/forecast.py handles CSV by default. For other sources:
google-sheets skill to pull a range, pipe it as CSV into forecast.py.bq query --format csv and redirect into the script.GET /v2/payouts) to dump weekly payout history to a CSV.(week_start, entity, revenue) works.See references/data-adapters.md for copy-pasteable patterns for each of the above.
The same forecast.py entry point supports multiple modes via --mode:
| Mode | What it produces | When to use |
|---|---|---|
| weekly (default) | Point estimate + range + component breakdown for the current week, per entity | Weekly cash planning, AP run inputs |
| thirteen-week | Rolling 13-week cash projection with optional recurring obligations | Runway questions, big expense planning, approaching seasonal dips |
| daily | Weekly forecast distributed across days using day-of-week multipliers from recent history | Daily cash flow, "will deposits cover Friday payroll?" |
| stress | Applies a configurable shock (e.g., -30% for 3 weeks) on top of the weekly forecast | "What if sales drop?", summer slump prep, vendor payment planning |
Examples:
# Weekly forecast (default)
python3 scripts/forecast.py --data data/history.csv
# 13-week rolling projection, including recurring obligations
python3 scripts/forecast.py --data data/history.csv --mode thirteen-week \
--obligations config/recurring_obligations.json
# Daily breakdown for the current week
python3 scripts/forecast.py --data data/history.csv --mode daily
# Stress test: 30% drop for 3 weeks starting now
python3 scripts/forecast.py --data data/history.csv --mode stress \
--shock -0.30 --shock-weeks 3
The defaults in templates/parameters.json are reasonable starting points — they are not tuned to your business. The whole point of shipping this with an eval script is so you can find the right parameters for your data.
Scaffold an autoresearch session — follow the autoresearch skill workflow. Point it at:
research.md → copy templates/research.md as your research file; edit the domain-knowledge section with what you know about your business (e.g., "Labor Day is dead for us", "Dec 24 is our biggest day").eval script → scripts/eval.py (already read-only-safe — it never modifies parameters)parameters file → config/parameters.jsonexperiments/ → a new directory the agent createsarchive.json, coverage.json → the agent creates these on first runRun the loop. The autoresearch skill handles the three-agent pipeline (researcher, critic, meta-reviewer). Start with 10–20 experiments.
Watch the meta-reviewer. The first big wins usually come from structural changes the researcher wouldn't find on its own: adding a holiday multiplier you didn't know existed, enabling week-of-month adjustments, tightening the outlier threshold. The meta-reviewer is the mechanism that surfaces these.
See references/methodology.md for a deep dive on each parameter and what it controls.
The parameters file has two sections: global defaults and per-entity overrides. Every field in the global section can be overridden per entity.
{
"blending": {
"recent_weight": 0.82,
"seasonal_weight": 0.16,
"yoy_weight": 0.02
},
"blending_no_yoy": {
"recent_weight": 1.00,
"seasonal_weight": 0.00
},
"lookback": {
"recent_weeks": 4,
"variability_weeks": 12,
"seasonal_min_weeks": 3
},
"exponential_weighting": {
"decay_factor": 1.0
},
"outlier_handling": {
"trim_holiday_weeks": true,
"holiday_threshold_pct": 1.30
},
"week_of_month": {
"enabled": false,
"week_1_adj": 0.0,
"week_2_adj": 0.0,
"week_3_adj": 0.0,
"week_4_adj": 0.0
},
"holidays": {
"enabled": true,
"thanksgiving_mult": 1.0,
"christmas_mult": 1.0,
"new_years_mult": 1.0,
"mlk_week_mult": 1.0,
"early_jan_mult": 1.0,
"late_jan_mult": 1.0,
"memorial_day_mult": 1.0,
"july_4th_mult": 1.0,
"labor_day_mult": 1.0,
"easter_passover_mult": 1.0
},
"growth_adjustment": {
"n_months_avg": 6
},
"data_filters": {
"global": {
"min_weekly_revenue": 0,
"data_start_date": null
}
},
"per_entity": {
"Main Street": {
"holidays": {
"christmas_mult": 2.05,
"thanksgiving_mult": 1.94
},
"week_of_month": {
"enabled": true,
"week_3_adj": 0.075
}
},
"Downtown": {
"exponential_weighting": { "decay_factor": 0.95 },
"data_filters": {
"data_start_date": "2024-09-02"
}
}
}
}
The full schema with field-by-field documentation is in references/methodology.md. The starter file at templates/parameters.json has all the knobs at neutral defaults so the model will run out of the box — autoresearch is what moves them away from neutral.
forecast.py --mode weekly emits JSON like this (one entry per entity):
{
"forecast_date": "2026-04-07",
"forecast_week": "2026-04-06",
"entities": {
"Main Street": {
"point_estimate": 48350.00,
"confidence_range": { "low": 45200.00, "high": 51500.00 },
"components": {
"recent_4wk_avg": 48100.00,
"seasonal_avg": 46800.00,
"yoy_growth_rate": 0.042,
"yoy_adjusted": 48765.60,
"week_of_month": 1,
"week_of_month_adj": -0.05
},
"methodology": {
"weights": "82% recent + 16% seasonal + 2% YoY (6mo growth: 4.2%) | week 1 adj: -5.0%",
"model_version": "1.0.0"
}
}
}
}
The structure is deliberately verbose — the components and methodology blocks are so the agent can explain the forecast, not just report it. When the business owner asks "why is this number low?", the answer should be "week 1 of the month typically runs 5% under the 4-week average at Main Street," not "the model says so."
autoresearch — Tune parameters on your own historical data. This is the intended pairing.morning-briefing — Include this week's forecast in the daily digest.google-sheets — Read historical data from a sheet, pipe into forecast.py.google-ads — Compare forecasted revenue to ad spend for a rough CAC/ROAS view.semantic-layer-audit — Document which data source you're feeding to the forecaster and why.scripts/eval.py during an autoresearch session — that's the thing keeping the researcher honest. If the eval is wrong, fix it once and then freeze it again.The forecasting methodology in this skill — blended recent/seasonal/YoY with per-entity holiday multipliers and week-of-month adjustments — was developed at Prospect Butcher Co and tuned on real multi-location sales history through many autoresearch iterations, taking forecast error from double digits down to low single-digit MAPE. The generalizations in this public version (pluggable data adapters, entity-agnostic naming, parameter files decoupled from any specific POS) are a cleanup of that work into something any SMB can point at its own data.
If you extend this skill with a new data adapter, a new forecast mode, or a genuinely new parameter that moves accuracy on real data, PRs welcome.
Forecasting is the bridge between "what happened" and "what should we do next." Make the bridge a little less wobbly.
tools
Generate and iteratively refine USPTO-style patent figure drawings from provisional patent application markdown files, using nano-banana for v1 generation and targeted single-fix edits for v2+ iteration.
data-ai
Analyze email, calendar, and file patterns to discover repeatable workflows that AI agents can automate.
testing
Automated daily digest for small business owners. Combines email triage, calendar agenda, open tasks, and business KPIs into a single morning briefing. Composable — works with whatever data sources are available. Urgent emails require body inspection and explicit escalation signals — never classified from sender/timing metadata alone.
testing
Convert a planning doc or spec into a phase-based task structure for autonomous multi-session execution. Asks whether the agent should run in orchestrator mode (self-verifies and continues across phase boundaries) or phase-checkpoint mode (stops at each phase for human verification), then generates the right claude-prompt.md and claude-task.json. Built on the patterns from Anthropic's effective-harnesses-for-long-running-agents engineering blog.