Agent skill · Data & Analytics

timesfm-forecasting

Zero-shot time series forecasting with Google's TimesFM foundation model. Use for any univariate time series (sales, sensors, energy, vitals, weather) without training a custom model. Supports CSV/DataFrame/array inputs with point forecasts and prediction intervals. Includes a preflight system checker script to verify RAM/GPU before first use.

LeonChaoXgithub.com/LeonChaoXGitHub ↗
claude-codecan modify filesships scriptsMIT
Install
npx skills add LeonChaoX/qinyan-academic-skills --skill timesfm-forecasting --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 27
SKILL.md size: 29 KB
Bundled scripts: yes
Allowed tools: ReadWriteEditBash
Path: skills/09-机器学习与人工智能/timesfm-forecasting/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 759
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Forecasts univariate time series without training a custom model, returning a point forecast plus prediction intervals. It provides a mechanism to batch-forecast multiple series and supports inputs from CSV, DataFrame, or arrays. It also enforces a preflight system checker to verify RAM, GPU, disk space, Python version, and existing installations before loading the model.

How it works

  • Uses TimesFM as a pretrained decoder-only foundation model for zero-shot forecasting.
  • Requires a mandatory preflight check via python scripts/check_system.py to ensure resources meet thresholds (RAM, GPU, disk, Python version, and dependencies).
  • Installation steps include verifying the system, installing TimesFM with uv pip install timesfm[torch] or pip install timesfm[torch], installing PyTorch for the target hardware, and then importing and querying timesfm to ensure installation succeeded.
  • Forecasting is configured with timesfm.ForecastConfig, controlling context length, horizon, input normalization, quantile head usage, quantile crossing fixes, and other stability tweaks.
  • Output consists of two arrays: point_forecast (median) and quantile_forecast (10 quantiles) for probabilistic interpretation.
  • It supports covariates via forecast_with_covariates() and note that anomaly detection is not built-in but can be inferred from prediction intervals.

When to use it

  • When forecasting any univariate time series (sales, demand, sensor, vitals, price, weather) without training a model.
  • When probabilistic forecasts with calibrated prediction intervals are required.
  • When you have time series of varying length up to the model’s context limits and/or need batch forecasting across many series.
  • When you prefer a foundation-model approach over classical ARIMA/ETS parameter tuning.

What it can touch

  • The skill interacts with system-level checks and a local Python environment:
    • Executes python scripts/check_system.py to verify resources.
    • Installs Python packages via uv pip install timesfm[torch] or pip install timesfm[torch] and pip install torch>=2.0.0 ....
    • Uses import timesfm and timesfm.TimesFM_2p5_200M_torch.from_pretrained(...) to load the model.
  • Forecasting operations use model.forecast() and model.forecast_with_covariates() with inputs as numeric arrays (e.g., 1-D time series).
  • Data preparation uses common Python data structures like lists of arrays derived from CSV/DataFrame inputs.

Caveats

  • The model weights (~800 MB) are downloaded on first use from HuggingFace and cached; the repository does not store weights.
  • TimesFM requires resources above certain thresholds (RAM, VRAM) and the preflight checker enforces this before loading.
  • TimesFM does not include built-in anomaly detection; anomaly detection must be derived from quantile intervals (e.g., whether values fall outside 90% CI).
  • Multivariate forecasting or time-series classification/clustering is not supported by this dedicated TimesFM workflow; it targets univariate series.
From the SKILL.md

# TimesFM Forecasting ## Overview TimesFM (Time Series Foundation Model) is a pretrained decoder-only foundation model developed by Google Research for time-series forecasting. It works **zero-shot** — feed it any univariate time series and it returns point forecasts with calibrated quantile prediction intervals, no training required. This skill wraps TimesFM for safe, agent-friendly local inference. It includes a **mandatory preflight system checker** that verifies RAM, GPU memory, and disk space before the model is ever loaded so the agent never crashes a user's machine. > **Key numbers**: TimesFM 2.5 uses 200M parameters (~800 MB on disk, ~1.5 GB in RAM on > CPU, ~1 GB VRAM on GPU). The archived v1/v2 500M-parameter model needs ~32 GB RAM. > Always run the system checker first. ## When to Use This Skill Use this skill when: - Forecasting **any univariate time series** (sales, demand, sensor, vitals, price, weather) - You need **zero-shot forecasting** without training a custom model - You want **probabilistic forecasts** with calibrated prediction intervals (quantiles) - You have time series of **any length** (the model handles 1–16,384 context points) - You need to **batch-fore

What's inside
Steps it walks through
  1. Overview
  2. When to Use This Skill
  3. ⚠️ Mandatory Preflight: System Requirements Check
  4. Hardware Requirements by Model Version
  5. 🔧 Installation
  6. Step 1: Verify System (always first)
  7. Step 2: Install TimesFM
  8. Step 3: Install PyTorch for Your Hardware
  9. Step 4: Verify Installation
  10. 🎯 Quick Start
  11. Minimal Example (5 Lines)
  12. Forecast from CSV
  13. Forecast with Covariates (XReg)
  14. Anomaly Detection (via Quantile Intervals)
Ships with 24 files
  • examples/anomaly-detection/detect_anomalies.py
  • examples/anomaly-detection/output/anomaly_detection.json
  • examples/anomaly-detection/output/anomaly_detection.png
  • examples/covariates-forecasting/demo_covariates.py
  • examples/covariates-forecasting/output/covariates_data.png
  • examples/covariates-forecasting/output/covariates_metadata.json
  • examples/covariates-forecasting/output/sales_with_covariates.csv
  • examples/global-temperature/README.md
  • examples/global-temperature/generate_animation_data.py
  • examples/global-temperature/generate_gif.py
  • examples/global-temperature/generate_html.py
  • examples/global-temperature/output/animation_data.json
  • examples/global-temperature/output/forecast_animation.gif
  • examples/global-temperature/output/forecast_output.csv
  • examples/global-temperature/output/forecast_output.json
  • examples/global-temperature/output/forecast_visualization.png
  • examples/global-temperature/output/interactive_forecast.html
  • examples/global-temperature/run_example.sh
  • examples/global-temperature/run_forecast.py
  • examples/global-temperature/temperature_anomaly.csv
  • examples/global-temperature/visualize_forecast.py
  • references/api_reference.md
  • references/data_preparation.md
  • references/system_requirements.md
first 24 of 27
Commands it runs
python scripts/check_system.py
Using uv (recommended by this repo)
uv pip install timesfm[torch]
Or using pip
pip install timesfm[torch]
For JAX/Flax backend (faster on TPU/GPU)
uv pip install timesfm[flax]
CUDA 12.1 (NVIDIA GPU)
pip install torch>=2.0.0 --index-url https://download.pytorch.org/whl/cu121
CPU only
More from qinyan-academic-skills
All skills →
About this skill
What does the timesfm-forecasting skill do?

Zero-shot time series forecasting with Google's TimesFM foundation model. Use for any univariate time series (sales, sensors, energy, vitals, weather) without training a custom model. Supports CSV/DataFrame/array inputs with point forecasts and prediction intervals. Includes a preflight system checker script to verify RAM/GPU before first use.

How do I install it?

Run `npx skills add LeonChaoX/qinyan-academic-skills --skill timesfm-forecasting --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From LeonChaoX/qinyan-academic-skills, a repository with 759 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going