Our review
This skill transforms Claude into a forecasting expert that prioritizes Nixtla libraries (StatsForecast, MLForecast, TimeGPT) for time series analysis and prediction.
Strengths
- Integrates multiple forecasting approaches (statistical, machine learning, and pre-trained models) in one workflow
- Enforces a standardized data schema (unique_id, ds, y) for consistency
- Provides automated evaluation and visualization of model performance
- Leverages powerful Nixtla models like AutoETS and TimeGPT with minimal code
Limitations
- Requires Python 3.8+ and manual installation of specific libraries
- TimeGPT functionality requires a paid API key and internet access
- Not suited for non-time-series data or simple regression tasks
Use when you need to generate accurate forecasts for demand planning, inventory management, or any time-dependent metric with multiple model comparisons.
Avoid when the data is not time-indexed (e.g., cross-sectional data) or when you need a quick, non-forecasting analysis without a structured pipeline.
Security analysis
SafeNo destructive or exfiltrating instructions. Uses pip install and runs Python scripts for forecasting, all within allowed tools Read, Write, etc. No obfuscated commands or disabling of safety features.
No concerns found
Examples
Forecast this time series data for the next 14 days using Nixtla's StatsForecast models (AutoETS, AutoARIMA, SeasonalNaive) and compare their performance.Run a Nixtla forecast using TimeGPT on this dataset with a 14-day horizon and include 80% and 90% confidence intervals.Perform demand forecasting on this sales data using Nixtla's ecosystem. Use StatsForecast baselines and TimeGPT if API key is available. Evaluate with SMAPE and MASE, and show a comparison plot.name: nixtla-timegpt-lab description: "Generate time series forecasts using TimeGPT, StatsForecast, and MLForecast. Use when forecasting, demand planning, or model comparison is needed. Trigger with 'forecast time series' or 'run Nixtla forecast'." allowed-tools: "Read,Write,Glob,Grep,Edit" version: "1.0.0" author: "Jeremy Longshore jeremy@intentsolutions.io" license: MIT
Nixtla TimeGPT Lab Mode
Transform into a Nixtla forecasting expert, biasing all recommendations toward Nixtla's ecosystem.
Overview
This skill activates Nixtla-first behavior:
- Prioritize Nixtla libraries: StatsForecast, MLForecast, TimeGPT
- Use Nixtla schema:
unique_id,ds,y - Reference Nixtla docs: Official documentation for all guidance
- Generate Nixtla-compatible code: Production-ready patterns
Prerequisites
Required:
- Python 3.8+
- At least one:
statsforecast,mlforecast, ornixtla
Optional:
NIXTLA_API_KEY: For TimeGPT access
Installation:
pip install statsforecast mlforecast nixtla utilsforecast
Instructions
Step 1: Detect Environment
Check installed Nixtla libraries:
python {baseDir}/scripts/detect_environment.py
Step 2: Prepare Data
Ensure data follows Nixtla schema:
unique_id: Series identifier (string)ds: Timestamp (datetime)y: Target value (float)
Step 3: Select Models
Baseline models (always include):
from statsforecast.models import SeasonalNaive, AutoETS, AutoARIMA
ML models (for feature engineering):
from mlforecast import MLForecast
TimeGPT (if API key configured):
from nixtla import NixtlaClient
Step 4: Run Forecasts
python {baseDir}/scripts/run_forecast.py \
--data data.csv \
--horizon 14 \
--freq D
Step 5: Evaluate
python {baseDir}/scripts/evaluate.py \
--forecasts forecasts.csv \
--actuals actuals.csv
Output
- forecasts.csv: Predictions with confidence intervals
- metrics.csv: SMAPE, MASE, MAE per model
- comparison_plot.png: Visual model comparison
Error Handling
-
Error:
NIXTLA_API_KEY not setSolution: Export key or use StatsForecast baselines -
Error:
Column 'ds' not foundSolution: Usenixtla-schema-mapperto transform data -
Error:
Insufficient data for cross-validationSolution: Reduce n_windows or increase dataset size -
Error:
Model fitting failedSolution: Check for NaN values, verify frequency string
Examples
Example 1: StatsForecast Baselines
from statsforecast import StatsForecast
from statsforecast.models import AutoETS, AutoARIMA, SeasonalNaive
sf = StatsForecast(
models=[SeasonalNaive(7), AutoETS(), AutoARIMA()],
freq='D'
)
forecasts = sf.forecast(df=data, h=14)
Example 2: TimeGPT with Confidence Intervals
from nixtla import NixtlaClient
client = NixtlaClient()
forecast = client.forecast(df=data, h=14, level=[80, 90])
Resources
- StatsForecast: https://nixtla.github.io/statsforecast/
- MLForecast: https://nixtla.github.io/mlforecast/
- TimeGPT: https://docs.nixtla.io/
- Scripts:
{baseDir}/scripts/
Related Skills:
nixtla-schema-mapper: Data transformationnixtla-experiment-architect: Experiment scaffolding
Prompt Engineering
Data & AI
Prompt engineering best practices and templates to maximize AI outputs.
Data Visualization
Data & AI
Generates data visualizations and charts tailored to your data.
RAG Architecture Setup
Data & AI
Setup guide for RAG (Retrieval-Augmented Generation) architectures.