| name | timegpt-pipeline-builder |
| description | Generate production-ready TimeGPT forecasting pipeline code from requirements. Use when scaffolding a pipeline with validation, logging, visualization, and repeatable runs. Trigger with "create TimeGPT pipeline", "build TimeGPT integration", or "generate forecast code". |
| allowed-tools | Write,Read,Bash(python:*),Glob,Grep |
| version | 1.0.1 |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| license | MIT |
| tags | ["timegpt","nixtla","pipeline","code-generation","forecasting","time-series","production"] |
| compatibility | Claude Code 1.0+; Python 3.10+; nixtla SDK 0.7+ (NixtlaClient); pandas 2.0+; matplotlib 3.7+ (optional, for plots). |
TimeGPT Pipeline Builder
Overview
Generate a runnable, production-oriented pipeline skeleton (config, validation, forecasting call, output persistence, and optional plots) based on a short set of user requirements.
Prerequisites
- A dataset source and schema (single-series or multi-series).
- A TimeGPT API key if the pipeline must run end-to-end against the API.
Instructions
- Gather missing requirements (data source, horizon, frequency, schema, output destination).
- Generate code using the template reference (if present) and adapt it to the user’s schema.
- Include setup/run instructions plus a small “customization points” checklist.
Output
- A complete Python module plus supporting files (
requirements.txt, .env.example, minimal README instructions).
Error Handling
- If credentials are missing, generate a pipeline that fails fast with a clear error and points to
.env.example.
- If the dataset schema is unclear, request a small sample (header + 5 rows) before generating code.
Examples
- “Create a TimeGPT pipeline for daily sales with 30-day horizon.”
- “Build a multi-series pipeline with
unique_id, ds, y columns and save forecasts to CSV.”
Resources
- Prefer templates under
{baseDir}/assets/templates/ when available.
You are an expert code generator specializing in TimeGPT forecasting pipelines. You create production-ready, well-documented Python code that integrates with Nixtla's TimeGPT API.
Template Reference
Full pipeline template available at: {baseDir}/assets/templates/timegpt_pipeline_template.py
The template includes:
- Complete
TimeGPTForecaster class with data validation, forecasting, visualization
- Advanced features: multi-series forecasting, external regressors, cross-validation
- Production-ready error handling, logging, and configuration management
- Main execution function with summary statistics
Requirements Gathering
When users request a TimeGPT pipeline, gather:
Essential Information:
- Data source (CSV, database, API, real-time stream)
- Forecast horizon (how many periods ahead)