Logo vun Forecast

Forecast

Organisatioun
ai-analyst-lab
forecast

Generate time-series forecasts and projections for metrics. Trigger on "/forecast", "what will X look like next month?", "forecast DAU for Q2", "project revenue", "estimate future growth", "predict next quarter", "where are we headed?", "extrapolate this trend", "what will happen if this continues?". Handles seasonality detection, model selection, confidence intervals, and validation against naive baselines.

Iwwersiicht

Editeurai-analyst-lab
Repositoryai-analyst-plugin
Skill-Nummforecast
Stären
34
Forks
13
Matgeliwwert Fichieren
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum ai-analyst-lab op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Forecast an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/ai-analyst-lab/ai-analyst-plugin/tree/main/ai-analyst-plus/skills/forecast
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst-plugin.git /tmp/ai-analyst-plugin
mkdir -p .claude/skills
cp -r /tmp/ai-analyst-plugin/ai-analyst-plus/skills/forecast .claude/skills/forecast
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Forecast an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Forecast automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Forecast net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Skill: Forecast

Purpose

Generate time-series forecasts for key metrics using the forecasting library bundled with this skill (scripts/forecast_helpers.py). Supports naive

If the skill install path cannot be resolved (some sandboxed environments): read the script file(s) from this skill, write a copy into a scripts/ folder inside the working folder, and run from there. The scripts are self-contained. baselines, seasonality detection, and exponential smoothing — enough to answer "what should we expect next?" without complex modeling.

When to Use

  • User asks "what will revenue look like next month?" or "forecast DAU"
  • After trend analysis reveals a pattern worth projecting
  • When sizing an opportunity that depends on future values
  • Invoked as /forecast

Invocation

/forecast {metric} — forecast the named metric /forecast {metric} periods=30 — specify forecast horizon /forecast {metric} method=holt_winters — specify method

Instructions

Step 0: Understand the Business Context

Before diving into the forecast, ask clarifying questions if the user hasn't specified:

  • What decision depends on this forecast? (e.g., capacity planning, budgeting, staffing, resource allocation)
  • Who will use it? (exec summary vs technical deep-dive)
  • What's the forecast horizon? (7 days, 30 days, 90 days, a quarter?)
  • Are there known upcoming changes? (product launches, campaigns, seasonal events that would invalidate "business as usual" assumptions)

This context shapes how you present results. Capacity planning needs volume impacts and staffing recommendations. Budget planning needs totals and scenario ranges. Executive audiences need decision-focused summaries.

Step 1: Prepare the Data

  1. Identify the metric and its source table from the metric dictionary (.knowledge/datasets/{active}/metrics/) or from user specification.
  2. Query the data aggregated to the appropriate granularity (daily/weekly/monthly).
  3. Create a pandas Series with DatetimeIndex.
  4. Clean: forward-fill NaN, drop leading nulls.
  5. Validate data sufficiency: Require at least 14 data points for short-term forecasts, 30+ for seasonal forecasts, 60+ for quarterly projections. If insufficient, report: "Not enough history for forecasting — need at least {required} points, have {actual}." Explain what additional data would enable (e.g., "With 30+ days we could detect weekly seasonality").

Step 2: Detect Seasonality

Run detect_seasonality() from the bundled scripts/forecast_helpers.py (add On trending series, detrend first (subtract a fitted linear trend) before the ACF scan; a strong trend can swamp the seasonal signal at lag 12. this skill's scripts/ directory to sys.path, then from forecast_helpers import detect_seasonality, naive_forecast, exponential_smoothing):

  • If seasonality detected, report: "Found {strength} {period}-day seasonality."
  • Store the dominant period for use in Step 3.

Step 3: Generate Forecasts

Run multiple methods and compare:

  1. Naive (last value): naive_forecast(series, periods, method='last')
  2. Naive (seasonal): If seasonality detected: naive_forecast(series, periods, method='seasonal_naive', seasonal_period=dominant_period). Always pass the detected period; if no cycle is given or inferable the function raises a ValueError rather than guessing a cycle.
  3. Exponential smoothing (auto): exponential_smoothing(series, forecast_periods=periods); the forecast key in the result holds the future values (holt-style continuation from the final fitted state).
  4. Holt-Winters: If seasonality detected and enough data: exponential_smoothing(series, seasonal_period=dominant_period, forecast_periods=periods)

Compare MSE across methods and select the best-fit method. Every candidate above produces future values (result["forecast"]), so the selected method is always one that can actually forecast, not just fit.

Step 4: Generate Chart

Build the chart with matplotlib, following the visualization-patterns skill's SWD style:

  1. Apply the SWD base style first (warm off-white #F7F6F2 figure and axes background, no top/right spines, no grid, sans-serif, dpi 150)
  2. Plot historical data as a solid line (Action Amber #D97706, linewidth 2)
  3. Plot forecast as a dashed line with lighter alpha
  4. Add confidence band (±1 std of residuals) as shaded area
  5. Mark the historical/forecast boundary with a vertical dashed line
  6. Give it a bold left-aligned action title stating the forward-looking takeaway (optional gray subtitle for context)
  7. Save to working/forecast_{metric}_{DATE}.png with fig.savefig(path, dpi=150, bbox_inches="tight") and close the figure

Step 5: Present Results

Structure the output based on business context from Step 0:

Always include:

  • Data validation summary: "{N} days of historical data analyzed, sufficient for {horizon}-day forecast"
  • Best method and why (lowest MSE on validation holdout)
  • Seasonality findings (if detected)
  • Forecast values for key milestones (next 7/14/30/60/90 days as relevant)
  • Confidence intervals (±1σ and ±2σ)
  • Standard caveats: "Forecasts assume past patterns continue. External factors not modeled."

Business context translation:

  • Capacity planning: Translate forecast to volume impacts (e.g., "+4% conversion → +4% order volume → scale fulfillment by 4%"). Provide staffing/resource recommendations with risk buffers.
  • Budget planning: Provide period totals (monthly, quarterly) with upside/downside scenarios. Include sensitivity to key assumptions.
  • Monitoring/alerting: Suggest thresholds for when actuals diverge from forecast (e.g., "If Week 1 revenue < $X, revisit assumptions").
  • Exec summary: Lead with the decision implication, then support with numbers. Example: "No team scaling needed — conversion increase (+4% over 2 weeks) is within current capacity."

The forecast numbers are necessary but not sufficient. Your job is to answer "so what?" for the user's planning context.

Rules

  1. Always run at least 2 methods for comparison. The user needs to know the forecast isn't arbitrary — showing that one method outperforms others builds confidence.
  2. Never present a forecast without stating assumptions. Every forecast has an expiration date and boundary conditions. Make them explicit.
  3. Always include a naive baseline. Users need to see if the model adds value beyond "just use the last value." If naive performs nearly as well, say so — simpler is better.
  4. Flag if residuals show systematic patterns. Autocorrelated residuals mean the model is missing something (trend, seasonality, structural break). Don't paper over this — it affects forecast reliability.
  5. If the data has a structural break, warn that forecasts may be unreliable. A sudden spike or drop in the last N days means the historical pattern may not continue. Surface this uncertainty.
  6. Translate to business impact automatically. Don't just report "4.09% conversion on Day 14" — connect it to the planning question: "4.09% conversion (+4% vs today) means approximately +4% order volume, which is within your current fulfillment capacity." The forecast is a means to a decision, not the end goal.

Edge Cases

  • Constant series: Report "No variation — forecast is the constant value"
  • Strong trend + no seasonality: Use Holt's (double) exponential smoothing
  • Very short history (<30 points): Only use naive methods, warn about accuracy
  • Data gaps: Interpolate or warn, depending on gap size

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Forecast?

Generate time-series forecasts and projections for metrics. Trigger on "/forecast", "what will X look like next month?", "forecast DAU for Q2", "project revenue", "estimate future growth", "predict next quarter", "where are we headed?", "extrapolate this trend", "what will happen if this continues?". Handles seasonality detection, model selection, confidence intervals, and validation against naive baselines.

Firwat Forecast op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Forecast besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Forecast an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/ai-analyst-lab/ai-analyst-plugin/tree/main/ai-analyst-plus/skills/forecast an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Forecast benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Forecast benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Forecast domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Forecast gratis?

Jo. De Skill gëtt vum ai-analyst-lab ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇