/ai-analyst-plus:forecastfrom ai-analyst-plus
Generates time-series forecasts and projections for metrics. Handles seasonality detection, model selection, confidence intervals, and validation against naive baselines.
Ships in ai-analyst-plus. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
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.
/forecast/forecast {metric} — forecast the named metric
/forecast {metric} periods=30 — specify forecast horizon
/forecast {metric} method=holt_winters — specify method
Before diving into the forecast, ask clarifying questions if the user hasn't specified:
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.
.knowledge/datasets/{active}/metrics/) or from user specification.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):
Run multiple methods and compare:
naive_forecast(series, periods, method='last')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.exponential_smoothing(series, forecast_periods=periods); the forecast key in the result holds the future values (holt-style continuation from the final fitted state).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.
Build the chart with matplotlib, following the visualization-patterns skill's SWD style:
#F7F6F2 figure and axes background, no top/right spines, no grid, sans-serif, dpi 150)#D97706, linewidth 2)working/forecast_{metric}_{DATE}.png with fig.savefig(path, dpi=150, bbox_inches="tight") and close the figureStructure the output based on business context from Step 0:
Always include:
Business context translation:
The forecast numbers are necessary but not sufficient. Your job is to answer "so what?" for the user's planning context.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub ai-analyst-lab/ai-analyst-plugin --plugin ai-analyst-plus47 skills in this plugin
/always-compareNever present a metric or number in isolation; anchor every number to a comparison (prior period, benchmark, or another segment) or state that none is available. Use every time you show a number: rates, counts, revenue, averages, query results, chart labels, summary stats. Trigger on output containing "the rate is", "we saw", "total", "average", "conversion", "revenue", "users", "sessions", "churn", "AOV", "NPS", or any figure pulled from data./analysis-designTurn a vague hunch or stakeholder request into a rigorous analysis plan via a staged pipeline (hypothesis sharpening, confound scan, V1, feedback, V2 redesign). Trigger on "I think X caused Y", "design an analysis for", "what's driving", "V2 after feedback", "stakeholder comments", "redesign the analysis". Vs question-framing (the lightweight framing gate before every analysis): use THIS only for a real hunch, confound scan, or V1 to V2 redesign./analyst-coreOperating rules for every data analysis. Apply for ANY data-analysis intent: "analyze", "investigate", "why did X change", "compare", "report on", "dashboard", "metrics", "funnel", "retention", "revenue", "conversion", "trend", "segment", "forecast", "how are we doing", "dig into", "break down", or any question about data, a metric, a CSV, or a table. Sets the method and routes to the other skills; load before any analytical question.Other plugins' skills for the same job