Skip to content
Back to skills

Nixtla Timegpt Lab

ASecurity

Provides expert Nixtla forecasting using TimeGPT, StatsForecast, and MLForecast. Generates time series forecasts, analyzes trends, compares models, performs cross-validation, and recommends best practices. Activates when user needs forecasting, time series analysis, sales prediction, demand planning, revenue forecasting, or M4 benchmarking.

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 2, 2026
ai-agentspythonbashgitapidocumentation

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned June 2, 2026

npx -y skills add majiayu000/claude-skill-registry --skill nixtla-timegpt-lab --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nixtla Timegpt Lab?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nixtla Timegpt Lab
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-nixtla-timegpt-lab/badge)](https://www.skillsdirectory.com/skills/majiayu000-nixtla-timegpt-lab)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: nixtla-timegpt-lab
description: Provides expert Nixtla forecasting using TimeGPT, StatsForecast, and MLForecast. Generates time series forecasts, analyzes trends, compares models, performs cross-validation, and recommends best practices. Activates when user needs forecasting, time series analysis, sales prediction, demand planning, revenue forecasting, or M4 benchmarking.
allowed-tools: "Read,Write,Glob,Grep,Edit"
version: "1.0.0"
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`, or `nixtla`

**Optional**:
- `NIXTLA_API_KEY`: For TimeGPT access

**Installation**:
```bash
pip install statsforecast mlforecast nixtla utilsforecast
```

## Instructions

### Step 1: Detect Environment

Check installed Nixtla libraries:
```bash
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):
```python
from statsforecast.models import SeasonalNaive, AutoETS, AutoARIMA
```

**ML models** (for feature engineering):
```python
from mlforecast import MLForecast
```

**TimeGPT** (if API key configured):
```python
from nixtla import NixtlaClient
```

### Step 4: Run Forecasts

```bash
python {baseDir}/scripts/run_forecast.py \
    --data data.csv \
    --horizon 14 \
    --freq D
```

### Step 5: Evaluate

```bash
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

1. **Error**: `NIXTLA_API_KEY not set`
   **Solution**: Export key or use StatsForecast baselines

2. **Error**: `Column 'ds' not found`
   **Solution**: Use `nixtla-schema-mapper` to transform data

3. **Error**: `Insufficient data for cross-validation`
   **Solution**: Reduce n_windows or increase dataset size

4. **Error**: `Model fitting failed`
   **Solution**: Check for NaN values, verify frequency string

## Examples

### Example 1: StatsForecast Baselines

```python
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

```python
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 transformation
- `nixtla-experiment-architect`: Experiment scaffolding

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.