Agent skill

Forecasting

by ericrisco in ericrisco/rsc-harness

A skill your agent uses when projecting history forward — sales, demand, units, revenue, signups, traffic — into a defensible number with an error band: method by data shape, rolling-origin…

MITAuto-check passedData & Analytics

Install Forecasting

skills CLI
$ npx skills add ericrisco/rsc-harness --skill forecasting -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ericrisco/rsc-harness forecasting --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/forecasting .claude/skills/forecasting && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
forecasting
GitHub stars
167
Token cost
~2.8k tokens
SKILL.md length
1,228 words
Files
6 (incl. scripts, references)
Skills in repo
227
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when projecting history forward — sales, demand, units, revenue, signups, traffic — into a defensible number with an error band: method by data shape, rolling-origin…

  • Works in 3 steps: A script that reads the history and… → A CSV/Parquet with columns ds, forecast,… → A one-paragraph accuracy readout: WAPE +…
  • Projecting history forward — sales
  • SKILL.md covers The deliverable contract, The loop, Method selection and Accuracy and honesty, plus 4 more sections
  • Runs Shell scripts from its folder

What it does

Forecasting is an agent skill from ericrisco/rsc-harness. Use when projecting history forward — sales, demand, units, revenue, signups, traffic — into a defensible number with an error band: method by data shape, rolling-origin backtest, MASE vs the naive baseline. NOT an assumption-driven P&L or runway model (that is financial-model), NOT sizing reorder points or safety stock (that is inventory).

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `evals/README.md`, `evals/cases.yaml` and `references/accuracy-and-backtesting.md`).

It sits in Data & Analytics, covering Forecasting and time series, Financial modeling and Trading and backtesting. The repository describes itself as: Your agent invents things because it has no memory, and can't touch your database because it has no arms. rsc is the meta-harness that gives it both, plus the trade to know the… The licence is MIT.

When your agent uses it

  • Projecting history forward — sales
  • Traffic — into a defensible number with an error band: method by data shape
  • Rolling-origin backtest
  • MASE vs the naive baseline

Example prompts

  • “/forecasting”

Requirements

  • Python 3
  • A Bash shell

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. A script that reads the history and regenerates the forecast (no manual steps).
  2. A CSV/Parquet with columns ds, forecast, lo, hi — timestamp, point, interval bounds.
  3. A one-paragraph accuracy readout: WAPE + bias from a rolling-origin backtest, and MASE vs the naive baseline (MASE < 1.0 = you beat naive…

What it can do on your machine

Read from SKILL.md and the folder at commit e3d5b33. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Forecasting loads about 2.8k tokens when it runs, and up to ~4.6k if it reads all its reference files. Until then it costs about 90 tokens; SKILL.md has 1,228 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ericrisco/rsc-harness at commit e3d5b33, republished under its MIT licence (© ericrisco). 1,228 words, ~2,758 tokens.

Download SKILL.mdSave it as .claude/skills/forecasting/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
forecasting
description
Use when projecting history forward — sales, demand, units, revenue, signups, traffic — into a defensible number with an error band: method by data shape, rolling-origin backtest, MASE vs the naive baseline. NOT an assumption-driven P&L or runway model (that is `financial-model`), NOT sizing reorder points or safety stock (that is `inventory`).
tags
forecasting, demand-planning, time-series, sales-forecast, statsforecast
recommends
inventory, financial-model, unit-economics, data-cleaning, analyze, duckdb
origin
risco

Forecasting

A forecast that cannot beat "repeat last period" is noise. Baseline first, fancy second. The naive forecast is free, instant, and the bar every model must clear — if your AutoARIMA loses to last-quarter-repeated, ship the repeat and say so.

You are not done when a model produces a number. You are done when you can defend the number: which method, why that method for this data, how it scored against the naive baseline in a backtest, and the interval around the point. A point estimate with no error band is a guess wearing a lab coat.

The deliverable contract

Every forecast you ship is a reproducible artifact, not a number pasted in chat:

  1. A script that reads the history and regenerates the forecast (no manual steps).
  2. A CSV/Parquet with columns ds, forecast, lo, hi — timestamp, point, interval bounds.
  3. A one-paragraph accuracy readout: WAPE + bias from a rolling-origin backtest, and MASE vs the naive baseline (MASE < 1.0 = you beat naive; ≥ 1.0 = ship the naive forecast instead).

If you cannot produce all three, you have not forecast — you have guessed. scripts/verify.sh checks the artifact has these columns, the right row count, and an accuracy line.

The loop

Run these in order. Skipping step 3 is the most common failure.

  1. Frame it. Pin down the horizon h (how many periods forward), the granularity (daily / weekly / monthly), and exactly what is being predicted (units? revenue? per-SKU or aggregate?). Forecast at the level you will act on — if you reorder per SKU, forecast per SKU, then sanity-check against the aggregate.
  2. Establish the series. Regular timestamps, one row per period, gaps filled explicitly (a missing month is not zero unless it truly is). Flag promotions, stockouts, and outliers — they distort the signal. If the input is dirty (dupes, missing rows, mixed units), stop and hand off to data-cleaning before modeling. Garbage history, garbage forecast.
  3. Build the naive + seasonal-naive baseline. This is the bar. Naive = repeat last value. Seasonal-naive = repeat the value from one season ago (e.g. last December for this December). Compute its backtest error now — every fancier method must beat it or lose.
  4. Pick the method by data shape (table below). Do not reach for ARIMA on instinct.
  5. Backtest with rolling-origin cross-validation. Never a single holdout. Compute WAPE + bias + MASE vs the naive baseline across multiple cutoffs.
  6. Report. Point + interval, the one-line method rationale, the accuracy readout. Then hand off downstream (inventory, financial-model).

Method selection

Match the method to the shape of the history, not to what sounds sophisticated. statsforecast (Nixtla, v2.0.3) provides all of these with built-in intervals.

Data shapeMethodstatsforecast callWhy
Flat, no trend or seasonMoving average or SESAutoCES() / 3-period MANothing to model; a mean is honest.
Trend, with or without seasonETSAutoETS(season_length=m)ETS captures level+trend+season cleanly, no manual order.
Strong known seasonality / autocorrelationARIMAAutoARIMA(season_length=m)Handles autocorrelated errors; ~20x faster than pmdarima.
Many zeros (intermittent / lumpy demand)Croston / SBACrostonOptimized()SES is provably wrong on sporadic demand (Croston 1972); SBA debiases it.
< 2 full seasonal cycles of historySeasonalNaive onlySeasonalNaive(season_length=m)Too little data to fit a model. Do not fit one. Full stop.

When in doubt between two, fit both plus the baseline in one StatsForecast run and let the backtest decide. Theta (AutoTheta) is a strong, cheap default that often wins on monthly business series.

Accuracy and honesty

The metrics are not decoration — they decide what you ship.

  • WAPE, not MAPE. MAPE divides by the actual, so it explodes and misleads whenever actuals approach zero (constant in SKU and intermittent data). WAPE = total absolute error / total actual volume — volume-weighted and stable. It is the default magnitude metric.
  • Pair WAPE with bias. WAPE is how big the error is; bias is the direction — whether you systematically over- or under-forecast. A 10% WAPE with +9% bias means you are almost always forecasting high, an actionable problem quite different from random error.
  • MASE < 1.0 is the pass/fail line. MASE is scale-free: your error over the naive forecast's error. Below 1.0 you beat naive; at or above it, ship the naive forecast instead. The single most important number in the readout.
  • Rolling-origin, never a single holdout. Time-series CV repeats the train/test split across multiple cutoffs (expanding window), a far more reliable estimate than one lucky/unlucky split. Use cross_validation(h=…, n_windows=…).
  • Always emit an interval. A point forecast cannot express uncertainty, and point metrics cannot evaluate a distribution. Report level=[80] or [95]. The interval is half the deliverable, not optional polish.

Formulas (WAPE, MASE, bias, pinball, coverage), rolling-origin mechanics, and how to read a backtest table are in references/accuracy-and-backtesting.md. Per-method when-to-use and the exact statsforecast one-liner for each are in references/methods-cheatsheet.md.

Show full SKILL.md (447 more words)Show less

Minimal pipeline

The full pipeline: long-format dataframe, fit competing methods + baseline, backtest, forecast with an interval, write the artifact.

python
# pip install statsforecast  (Nixtla, v2.0.3)
import pandas as pd
from statsforecast import StatsForecast
from statsforecast.models import SeasonalNaive, AutoETS, AutoARIMA

# long format: unique_id, ds, y  (one row per series per period)
df = pd.read_csv("history.csv", parse_dates=["ds"])
m, h = 12, 12  # monthly seasonality; forecast 12 periods ahead

sf = StatsForecast(
    models=[SeasonalNaive(season_length=m), AutoETS(season_length=m), AutoARIMA(season_length=m)],
    freq="MS",
)

# rolling-origin backtest BEFORE trusting any forecast
cv = sf.cross_validation(df=df, h=h, n_windows=3, step_size=h)
def wape(a, f): return (a - f).abs().sum() / a.abs().sum()
for col in ["SeasonalNaive", "AutoETS", "AutoARIMA"]:
    print(col, "WAPE", round(wape(cv["y"], cv[col]), 4))  # pick the lowest that beats SeasonalNaive

# refit on full history, forecast with an 80% interval
fc = sf.forecast(df=df, h=h, level=[80])
# choose the winning model column from the backtest; here AutoETS as example
out = fc.rename(columns={"AutoETS": "forecast", "AutoETS-lo-80": "lo", "AutoETS-hi-80": "hi"})
out[["ds", "forecast", "lo", "hi"]].to_csv("forecast.csv", index=False)

Zero-dependency fallback when you cannot install statsforecast — a seasonal-naive baseline in pure pandas. This is also the thing every model must beat, so it is always worth computing:

python
import pandas as pd

def seasonal_naive(y: pd.Series, m: int, h: int) -> pd.Series:
    """Repeat the last full season forward h periods."""
    last_season = y.iloc[-m:].to_numpy()
    return pd.Series([last_season[i % m] for i in range(h)])

s = pd.read_csv("history.csv", parse_dates=["ds"]).set_index("ds")["y"]
fc = seasonal_naive(s, m=12, h=12)
# crude interval from historical residual spread; honest is better than absent
resid_std = (s - s.shift(12)).dropna().std()
out = pd.DataFrame({"forecast": fc, "lo": fc - 1.28 * resid_std, "hi": fc + 1.28 * resid_std})
out.to_csv("forecast.csv", index=False)

Edge cases

  • New product, no history. Do not fit a model on three points. Use analogues — a comparable product's curve scaled to expected volume — and say it is an assumption, not a forecast.
  • Short history (< 2 seasonal cycles). SeasonalNaive only. A fitted model will overfit noise and report a falsely tight interval.
  • Structural breaks. A pricing change, a relaunch, a regime shift. Do not train across the break — train on the post-break segment, even if it is short, or the model averages two different worlds.
  • Promotions and outliers. A promo spike is not baseline demand. Mark promo periods and either model them as a regressor or exclude them from the level estimate; otherwise the forecast inherits a spike that will not recur.
  • Granularity. Forecast at the level you act on. If you must report higher, aggregate the forecasts — and check the aggregate is plausible (this often catches per-SKU nonsense).
  • Hierarchy reconciliation. When SKU forecasts must sum to a category total, reconcile (bottom-up or MinT). Brief note here; the mechanics belong in references/methods-cheatsheet.md.

Anti-patterns

Anti-patternWhy it bitesDo instead
Report a single point numberA point hides uncertainty the reader needs to plan around.Report point + 80/95% interval
Tune ARIMA orders before any baselineIf you cannot beat the free baseline, the tuning was wasted.Compute naive/seasonal-naive first
Score with MAPE on intermittent demandMAPE explodes near zero actuals and lies about accuracy.Use WAPE + bias
Single train/test holdoutOne split is one sample; CV estimates real out-of-sample error.Rolling-origin CV (n_windows≥3)
Fit a model on 8 months of monthly dataToo few points; the model overfits and underreports its own error.SeasonalNaive only under 2 cycles
"The model picked it, so it's right"A forecast you cannot defend is worse than no forecast.State method + MASE vs naive
Trust SKU forecasts without checking the sumPer-SKU errors compound; the total exposes nonsense fast.Sanity-check vs the aggregate

Handoffs

  • ../inventory/SKILL.md — feed it the demand number; it sizes reorder points and safety stock. Forecasting produces the demand; it does not size the stock.
  • ../financial-model/SKILL.md — when the projection is driven by assumptions and drivers (pricing, hiring), not history, that is a model, not a forecast.
  • ../unit-economics/SKILL.md — contribution margin, CAC/LTV, payback. No time series, route there.
  • ../data-cleaning/SKILL.md — dirty input (dupes, missing rows, mixed units) goes here before you model.
  • ../analyze/SKILL.md — when the question is "why" or a backward-looking metric/aggregation rather than forward extrapolation.

© ericrisco, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in skills/forecasting of ericrisco/rsc-harness.

  • SKILL.md
  • evals/README.md
  • evals/cases.yaml
  • references/accuracy-and-backtesting.md
  • references/methods-cheatsheet.md
  • scripts/verify.sh

Open the folder on GitHubat commit e3d5b33

Compare with similar skills

Forecasting next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Forecasting compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Forecasting this skillericrisco/rsc-harness167—~2.8kAutomated safety check: PassMIT
Walk Forward Validationagiprolabs/claude-trading-skills410—~2.2kAutomated safety check: PassMIT
Options Spread Conviction EngineLeoYeAI/openclaw-master-skills2.2k—~5.7kAutomated safety check: NotesMIT
Actuarial Risk Modelingmagnus919/agent-skills113—~3.2kAutomated safety check: PassMIT
Quant Statistical MethodsHKUDS/Vibe-Trading35k—~4kAutomated safety check: PassMIT
Longbridge Quanthelsome/folio2691 repos~1.6kAutomated safety check: PassMIT

Similar skills

  • Walk Forward Validation

    agiprolabs/claude-trading-skills

    Walk-forward validation framework for trading strategies and ML models with time-series-aware splits, overfit detection, and regime-aware validation

    410 GitHub stars~2.2k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Options Spread Conviction Engine

    LeoYeAI/openclaw-master-skills

    Multi-regime options spread analysis engine with quantitative rigor.

    2.2k GitHub stars~5.7k tokensUpdated 2 mo ago
    Data & AnalyticsAuto-check: notes
  • Actuarial Risk Modeling

    magnus919/agent-skills

    A skill your agent uses when analyzing, selecting, validating, or communicating models for insurance, actuarial, financial-risk, or other consequential uncertain outcomes.

    113 GitHub stars~3.2k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Quant Statistical Methods

    HKUDS/Vibe-Trading

    Guides your agent through unit-root, cointegration, GARCH, bootstrap and regression-diagnostic tests on financial time series, using a tested helper module.

    35k GitHub stars~4k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Longbridge Quant

    helsome/folio

    Quantitative strategy frameworks: pairs trading/cointegration, volatility regime strategies, seasonality/calendar effects, multi-factor models (IC/IR), factor research and screening, correlation…

    269 GitHub starsUsed in 1 repo~1.6k tokens
    Data & AnalyticsAuto-check passed
  • Charlie

    EveryInc/charlie-cfo-skill

    Your AI CFO for bootstrapped startups, named after Charlie Munger who embodied the principle that capital discipline is a competitive advantage.

    324 GitHub starsUsed in 1 repo~1.4k tokens
    Business, Finance & HRAuto-check passed

More from ericrisco/rsc-harness

All 227 skills in this repo
  • Ab Testing

    ericrisco/rsc-harness

    A skill your agent uses when designing or analyzing a controlled experiment — falsifiable hypothesis, sample size from an MDE, reading significance/CI/power, CUPED, or rescuing tests that won't go…

    167 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Accessibility

    ericrisco/rsc-harness

    A skill your agent uses when making a web UI conform to WCAG 2.2 Level AA — axe-core or Lighthouse a11y violations, keyboard operability, focus management, ARIA roles/names/live regions, contrast…

    167 GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Ads

    ericrisco/rsc-harness

    A skill your agent uses when running or fixing paid acquisition on Google or Meta — campaign structure (Performance Max, Demand Gen, Search, Advantage+), platform-fit creative, budget/scaling rules…

    167 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Agent Eval

    ericrisco/rsc-harness

    A skill your agent uses when measuring whether an LLM or agent system actually got better and gating merges on it: golden sets, fixing an inflated LLM-as-judge, scoring RAG (faithfulness, contextual…

    167 GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • AI Media

    ericrisco/rsc-harness

    A skill your agent uses when a creative goal must become a finished media file: pick and order generative-media models per modality — AI voiceover, image-to-video clips, score — then glue them with…

    167 GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Analytics

    ericrisco/rsc-harness

    A skill your agent uses when instrumenting product or web analytics — GA4/PostHog SDK wiring, event taxonomy, funnels, double-counted events, consent gating, PII scrubbing.

    167 GitHub stars~2.8k tokensUpdated today
    Auto-check passed

Questions about Forecasting

What does Forecasting do?

A skill your agent uses when projecting history forward — sales, demand, units, revenue, signups, traffic — into a defensible number with an error band: method by data shape, rolling-origin…. Forecasting is an agent skill from ericrisco/rsc-harness. Use when projecting history forward — sales, demand, units, revenue, signups, traffic — into a defensible number with an error band: method by data shape, rolling-origin backtest, MASE vs the naive baseline.

When should I use Forecasting?

Forecasting fits situations like: projecting history forward — sales; traffic — into a defensible number with an error band: method by data shape; rolling-origin backtest; MASE vs the naive baseline.

How do I install Forecasting in Claude Code?

Run `npx skills add ericrisco/rsc-harness --skill forecasting -a claude-code`. Or copy the skill folder (skills/forecasting in ericrisco/rsc-harness) into .claude/skills/forecasting in your project. Claude Code loads it when a task matches its description.

How do I install Forecasting in Codex?

Run `npx skills add ericrisco/rsc-harness --skill forecasting -a codex`. Or copy the skill folder (skills/forecasting in ericrisco/rsc-harness) into .agents/skills/forecasting in your project. Codex loads it when a task matches its description.

Can I use Forecasting in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ericrisco/rsc-harness --skill forecasting -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/forecasting, .gemini/skills/forecasting, .github/skills/forecasting and .opencode/skills/forecasting in your project.

What does Forecasting need to run?

Going by SKILL.md and its folder, Forecasting needs a shell for the scripts in its folder. Our summary lists: Python 3; A Bash shell.

Does Forecasting access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Forecasting safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Forecasting use?

Forecasting is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Forecasting use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.8k tokens, read only when the agent opens those files.

What are the alternatives to Forecasting?

Skills that share tags, products or a category with Forecasting: Walk Forward Validation (agiprolabs/claude-trading-skills, 410 stars), Options Spread Conviction Engine (LeoYeAI/openclaw-master-skills, 2.2k stars), Actuarial Risk Modeling (magnus919/agent-skills, 113 stars) and Quant Statistical Methods (HKUDS/Vibe-Trading, 35k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Forecasting?

ericrisco (a GitHub user) maintains it in ericrisco/rsc-harness, which has 167 GitHub stars. The repository holds 227 skills in this directory. The repository was last updated on October 7, 2026.

Source: ericrisco/rsc-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.