Agent skill

Timesfm Forecasting

by K-Dense-AI in K-Dense-AI/scientific-agent-skills

Performs zero-shot time-series forecasting with Google's TimesFM, including regular-grid CSV preparation, quantile forecasts, XReg covariates, and held-out evaluation.

Apache-2.0Auto-check: notesData & Analytics

Install Timesfm Forecasting

skills CLI
$ npx skills add K-Dense-AI/scientific-agent-skills --skill timesfm-forecasting -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install K-Dense-AI/scientific-agent-skills timesfm-forecasting --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/K-Dense-AI/scientific-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/timesfm-forecasting .claude/skills/timesfm-forecasting && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
timesfm-forecasting
GitHub stars
48k
Used in
1 other repo
Token cost
~2.4k tokens
SKILL.md length
822 words
Files
22 (incl. scripts, references)
Skills in repo
153
Repo updated
First seen
Licence
Apache-2.0

At a glance

Performs zero-shot time-series forecasting with Google's TimesFM, including regular-grid CSV preparation, quantile forecasts, XReg covariates, and held-out evaluation.

  • Works in 6 steps: Establish cadence, units, forecast… → Validate a sorted, unique, regular time… → Run python scripts/check_system.py… → …
  • Tasks that involve Forecasting and time series
  • SKILL.md covers Choose the model/API first, Workflow, Installation and TimesFM 2.5 quick start, plus 3 more sections
  • Runs Python and Shell scripts from its folder; calls python and uv

What it does

Timesfm Forecasting is an agent skill from K-Dense-AI/scientific-agent-skills. Performs zero-shot time-series forecasting with Google's TimesFM, including regular-grid CSV preparation, quantile forecasts, XReg covariates, and held-out evaluation. Uses the Apache-licensed TimesFM 2.5 checkpoint by default and documents the distinct TimesFM 3.0 multivariate API and weight-license requirements.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 26 other files, including scripts and reference files (for example `examples/anomaly-detection/detect_anomalies.py`, `examples/covariates-forecasting/demo_covariates.py` and `examples/global-temperature/README.md`). Compatibility notes: Requires Python 3.10+ and timesfm 3.0.2 with PyTorch; CSV tooling also needs NumPy and pandas. Network access and cache space are needed for initial Hugging…

It sits in Data & Analytics, covering Forecasting and time series. The repository describes itself as: Turn any AI agent into an AI Scientist. The 1 Agent Skills library for science, used by 250,000+ scientists worldwide. 177 ready-to-use validated skills plus 100+ scientific… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Forecasting and time series

Example prompts

  • “Use the timesfm-forecasting skill to perform zero-shot time-series forecasting with Google's TimesFM, including regular-grid CSV preparation…”
  • “/timesfm-forecasting”

Requirements

  • Python 3
  • A Bash shell
  • Compatibility (from SKILL.md): Requires Python 3.10+ and timesfm 3.0.2 with PyTorch; CSV tooling also needs NumPy and pandas. Network access and cache space are needed for initial Hugging Face checkpoint download. Optional XReg needs JAX and scikit-learn; current JAX requires Python 3.12+.
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Establish cadence, units, forecast origin, horizon, known-at-origin covariates,
  2. Validate a sorted, unique, regular time grid. Do not dropna() internal gaps
  3. Run python scripts/check_system.py before downloading/loading weights.
  4. Load the chosen checkpoint with a recorded immutable revision. For 2.5,
  5. Forecast, validate shapes/finite values/quantile ordering and export the
  6. Evaluate across rolling origins with preprocessing fitted independently per

What it can do on your machine

Read from SKILL.md and the folder at commit 92ace75. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python and Shell, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • huggingface.co
    • pytorch.org
    • pypi.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires Python 3.10+ and timesfm 3.0.2 with PyTorch; CSV tooling also needs NumPy and pandas. Network access and cache space are needed for initial Hugging Face checkpoint download. Optional XReg needs JAX and scikit-learn; current JAX requires Python 3.12+.

    From compatibility in the SKILL.md frontmatter.

Context cost

Timesfm Forecasting loads about 2.4k tokens when it runs, and up to ~9.2k if it reads all its reference files. Until then it costs about 84 tokens; SKILL.md has 822 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~84
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Edit, Bash

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from K-Dense-AI/scientific-agent-skills at commit 92ace75, republished under its Apache-2.0 licence (© K-Dense-AI). 822 words, ~2,380 tokens.

Download SKILL.mdSave it as .claude/skills/timesfm-forecasting/SKILL.md (or your agent's skills folder). This skill also uses 21 other files; get the full folder from GitHub.
name
timesfm-forecasting
description
Performs zero-shot time-series forecasting with Google's TimesFM, including regular-grid CSV preparation, quantile forecasts, XReg covariates, and held-out evaluation. Uses the Apache-licensed TimesFM 2.5 checkpoint by default and documents the distinct TimesFM 3.0 multivariate API and weight-license requirements.
allowed-tools
Read, Write, Edit, Bash
compatibility
Requires Python 3.10+ and timesfm 3.0.2 with PyTorch; CSV tooling also needs NumPy and pandas. Network access and cache space are needed for initial Hugging Face checkpoint download. Optional XReg needs JAX and scikit-learn; current JAX requires Python 3.12+.
license
Apache-2.0 license
metadata.version
3.0
metadata.skill-author
Clayton Young / Superior Byte Works, LLC (@borealBytes)
metadata.last-reviewed
2026-10-01
metadata.tested-package
timesfm 3.0.2

TimesFM Forecasting

Choose the model/API first

The Python package version is 3.0.2; checkpoint versions are separate.

CheckpointInterfaceQuantile outputUsage terms
2.5, 200Mtimesfm.TimesFM_2p5_200M_torch, compile, forecastmean + 9 deciles, median index 5Apache-2.0 weights; bundled CLI default
3.0, about 330Mtimesfm3.TimesFM3Forecaster, predict / predict_batch9 deciles, median index 4Downloaded weights restricted to non-commercial, non-production use

Upstream identifies 3.0 as the latest model. This skill retains 2.5 as its default local workflow because its Apache-licensed weights have different usage terms. For 3.0 multivariate targets, past-only covariates or Apple MLX, read references/timesfm3.md before adapting code. Authorized Google Cloud services have separate terms; a Cloud entitlement does not change the license of downloaded weights. See the upstream license notice.

Use TimesFM for forecasting an ordered temporal target without task-specific model training. It is not a causal effect estimator, clinical detector, or physics-based climate model. Zero-shot describes fitting; it does not establish absence of benchmark overlap in pretraining or good accuracy in a new domain.

Workflow

  1. Establish cadence, units, forecast origin, horizon, known-at-origin covariates, evaluation cutoffs and a naive/seasonal-naive baseline.
  2. Validate a sorted, unique, regular time grid. Do not dropna() internal gaps: that changes temporal spacing. Reject nonfinite inputs, or explicitly impute inside each training history. Never fill using held-out future targets.
  3. Run python scripts/check_system.py before downloading/loading weights. Its available-RAM and cache-volume thresholds are heuristics, not a guarantee against OOM. Start with batch size 1; measure actual peak usage.
  4. Load the chosen checkpoint with a recorded immutable revision. For 2.5, compile explicit positive context/horizon settings; zero does not mean “use the maximum.” Keep patch-rounded context + horizon <=16,384 and horizon <=1,024 when using the continuous quantile head.
  5. Forecast, validate shapes/finite values/quantile ordering and export the forecast origin, frequency, configuration and checkpoint revision.
  6. Evaluate across rolling origins with preprocessing fitted independently per origin. Report accuracy, interval coverage and interval width by horizon; label quantile intervals nominal until calibrated on relevant data.

Installation

Run in a separate environment. The commands below target the reviewed release. Shell extras and version constraints must be quoted, particularly in zsh.

bash
uv venv .venv-timesfm
uv pip install --python .venv-timesfm/bin/python "timesfm[torch]==3.0.2" numpy pandas
.venv-timesfm/bin/python scripts/check_system.py

Use the current PyTorch installation selector for a CUDA wheel matching the host. The 2.5 loader in this release chooses cuda:0 if CUDA exists, otherwise CPU; detecting MPS does not enable MPS inference. Do not use model.to(...) on the wrapper as if it were an nn.Module. For CPU-only XReg, install jax and scikit-learn alongside the PyTorch profile; the upstream [xreg] extra requests jax[cuda], which is not appropriate for macOS. Flax is a separate optional backend; it is not required by the bundled scripts.

python
from importlib.metadata import version
import timesfm
print(version("timesfm"))  # package has no guaranteed timesfm.__version__
assert hasattr(timesfm, "TimesFM_2p5_200M_torch")

TimesFM 2.5 quick start

The checkpoint-load examples are illustrative: validation of this refresh used native package code with tiny random models and controlled decode fixtures, without downloading pretrained weights. That verifies mechanics, not accuracy.

python
import numpy as np
import timesfm

model = timesfm.TimesFM_2p5_200M_torch.from_pretrained(
    "google/timesfm-2.5-200m-pytorch",
    revision="1d952420fba87f3c6dee4f240de0f1a0fbc790e3",
    torch_compile=False,  # avoid compilation startup during an initial smoke run
)
model.compile(timesfm.ForecastConfig(
    max_context=512, max_horizon=128, per_core_batch_size=1,
    normalize_inputs=True, use_continuous_quantile_head=True,
    force_flip_invariance=True, infer_is_positive=False,
    fix_quantile_crossing=True,
))
histories = [np.sin(np.linspace(0, 20, 200)).astype(np.float32)]
# 2.5 may append dummy series to its input list during batching; pass a fresh list.
point, q = model.forecast(horizon=24, inputs=list(histories))
assert point.shape == (1, 24) and q.shape == (1, 24, 10)
assert np.isfinite(q).all() and np.all(np.diff(q[..., 1:], axis=-1) >= 0)
assert np.allclose(point, q[..., 5])
lower_80, upper_80 = q[..., 1], q[..., 9]  # q10-q90: nominal 80% PI
lower_60, upper_60 = q[..., 2], q[..., 8]  # q20-q80: nominal 60% PI

Set infer_is_positive=True only for a target domain that is truly nonnegative. A positive observed window does not establish that temperature anomalies, returns or residuals cannot become negative. Monotonic quantiles and a continuous quantile head do not establish interval calibration.

Show full SKILL.md (320 more words)Show less

CSV helper

bash
python scripts/forecast_csv.py monthly_sales.csv \
  --date-col date --freq MS --value-cols sales,revenue \
  --horizon 12 --batch-size 1 --nonnegative --output forecasts.csv

forecast_csv.py validates before loading, sorts dates, rejects duplicate headers/dates, checks the complete regular grid and preserves missing positions. Missing values fail by default; --missing interpolate fills only internal gaps, never leading/trailing values. Without --date-col, row order is assumed to be the regular grid and output uses steps. Numeric IDs must be excluded using --value-cols. --max-context controls history truncation; --horizon is limited to 1..1,024 for this quantile-head workflow.

Outputs retain forecast, median, lower_80, upper_80, lower_60, upper_60. A .metadata.json sidecar records origin, cadence, model revision and config. Old skill releases mislabeled q10-q90/q20-q80 as 90%/80%; migrate old outer *_90 to *_80 and old inner *_80 to *_60 simultaneously. Old generated example forecasts were removed because their mapping/provenance was invalid.

Covariates and anomaly screening

For 2.5 XReg, compile return_backcast=True, retain targets and covariates on identical grids and provide dynamic covariates over context and horizon. "xreg + timesfm" fits regression on targets, then forecasts regression residuals. "timesfm + xreg" forecasts first, then fits regression on backcast residuals. The latter needs more than one input patch (32 observations). In package 3.0.2, the implementation returns lists of combined point and quantile forecasts; an inherited docstring incorrectly describes the second return as XReg-only. See references/api_reference.md for the complete call.

Quantile exceedances may screen for unusual observations, but even calibrated 80% intervals exclude about 20% of ordinary observations marginally. They do not supply anomaly probabilities, familywise control or validated alarm severity. Retrospective detrended Z scores also differ from prospective anomaly detection.

References and examples

Primary review sources: official source, 3.0.2 distribution, 2.5 model card, 3.0 model card.

© K-Dense-AI, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 21 other files (scripts, references) in skills/timesfm-forecasting of K-Dense-AI/scientific-agent-skills.

  • SKILL.md
  • examples/anomaly-detection/detect_anomalies.py
  • examples/covariates-forecasting/demo_covariates.py
  • 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/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/examples_and_validation.md
  • references/output_and_config.md
  • references/performance_tuning.md
  • … and 6 more

Open the folder on GitHubat commit 92ace75

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in K-Dense-AI/scientific-agent-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Timesfm Forecasting next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Timesfm Forecasting compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Timesfm Forecasting this skillK-Dense-AI/scientific-agent-skills48k1 repos~2.4kAutomated safety check: NotesApache-2.0
TimesFM Forecastinggoogle-research/timesfm34k—~4.7kAutomated safety check: PassApache-2.0
StatsmodelszLanqing/codex-claude-academic-skills4.7k15 repos~4.9kAutomated safety check: PassBSD-3-Clause
Timesfm ForecastingzLanqing/codex-claude-academic-skills4.7k3 repos~7.5kAutomated safety check: NotesApache-2.0
Find Hypertable Candidatestimescale/pg-aiguide1.9k1 repos~2.6kAutomated safety check: PassApache-2.0
Pensieve Searcharkohut/pensieve1.4k—~8.2kAutomated safety check: PassApache-2.0

Similar skills

  • TimesFM Forecasting

    google-research/timesfm

    Forecasts any univariate time series zero-shot with Google's TimesFM model, returning point forecasts and calibrated prediction intervals without training.

    34k GitHub stars~4.7k tokensUpdated 11 days ago
    Data & AnalyticsAuto-check passed
  • Statsmodels

    zLanqing/codex-claude-academic-skills

    Statistical models library for Python. An agent skill from zLanqing/codex-claude-academic-skills.

    4.7k GitHub starsUsed in 15 repos~4.9k tokens
    Data & AnalyticsAuto-check passed
  • Timesfm Forecasting

    zLanqing/codex-claude-academic-skills

    Zero-shot time series forecasting with Google's TimesFM foundation model.

    4.7k GitHub starsUsed in 3 repos~7.5k tokens
    Data & AnalyticsAuto-check: notes
  • Find Hypertable Candidates

    timescale/pg-aiguide

    A skill your agent uses to analyze an existing PostgreSQL database and identify which tables should be converted to Timescale/TimescaleDB hypertables.

    1.9k GitHub starsUsed in 1 repo~2.6k tokens
    Data & AnalyticsAuto-check passed
  • Pensieve Search

    arkohut/pensieve

    Search the user's local Pensieve screenshot archive by text, app, or time range.

    1.4k GitHub stars~8.2k tokensUpdated 2 mo ago
    Data & AnalyticsAuto-check passed
  • Alphaear Predictor

    ninehills/skills

    Market prediction skill using Kronos. An agent skill from ninehills/skills.

    280 GitHub starsUsed in 1 repo~531 tokens
    Data & AnalyticsAuto-check passed

More from K-Dense-AI/scientific-agent-skills

All 153 skills in this repo
  • 13C Metabolic Flux Analysis

    K-Dense-AI/scientific-agent-skills

    Estimates reaction fluxes inside cells from steady-state carbon-13 labeling data with a bundled mfapy-based solver, and reports which fluxes the data pin down.

    48k GitHub starsUsed in 1 repo~3.2k tokens
    Auto-check passed
  • Analytical Method Validation Planner

    K-Dense-AI/scientific-agent-skills

    Plans, runs, and documents analytical method validation, verification, or transfer studies under ICH Q2(R2)/Q14, USP, ICH M10, CLSI EP, or ISO/IEC 17025.

    48k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check: notes
  • Cantera Ignition Delay

    K-Dense-AI/scientific-agent-skills

    Runs Cantera constant-volume or constant-pressure ignition simulations and reports temperature-based ignition delay with mechanism provenance and checks.

    48k GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • DiffDock Molecular Docking

    K-Dense-AI/scientific-agent-skills

    Predicts how small molecules bind to a protein with DiffDock, covering batch docking, pose ranking by confidence and checks on the results; not for binding affinity.

    48k GitHub starsUsed in 1 repo~3k tokens
    Auto-check: notes
  • HypoGeniC Hypothesis Generation

    K-Dense-AI/scientific-agent-skills

    Plans and audits runs of the HypoGeniC and HypoRefine packages, which propose hypotheses from labeled text datasets, with local checks before any model call.

    48k GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes
  • ISO Standards Readiness Evidence

    K-Dense-AI/scientific-agent-skills

    Organizes scope, controlled documents, risk files and traceability into draft evidence for human review against ISO 13485, 14971, 17025 and 15189.

    48k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check: notes

Questions about Timesfm Forecasting

What does Timesfm Forecasting do?

Performs zero-shot time-series forecasting with Google's TimesFM, including regular-grid CSV preparation, quantile forecasts, XReg covariates, and held-out evaluation. Timesfm Forecasting is an agent skill from K-Dense-AI/scientific-agent-skills. Performs zero-shot time-series forecasting with Google's TimesFM, including regular-grid CSV preparation, quantile forecasts, XReg covariates, and held-out evaluation.

When should I use Timesfm Forecasting?

Timesfm Forecasting fits situations like: tasks that involve Forecasting and time series.

How do I install Timesfm Forecasting in Claude Code?

Run `npx skills add K-Dense-AI/scientific-agent-skills --skill timesfm-forecasting -a claude-code`. Or copy the skill folder (skills/timesfm-forecasting in K-Dense-AI/scientific-agent-skills) into .claude/skills/timesfm-forecasting in your project. Claude Code loads it when a task matches its description.

How do I install Timesfm Forecasting in Codex?

Run `npx skills add K-Dense-AI/scientific-agent-skills --skill timesfm-forecasting -a codex`. Or copy the skill folder (skills/timesfm-forecasting in K-Dense-AI/scientific-agent-skills) into .agents/skills/timesfm-forecasting in your project. Codex loads it when a task matches its description.

Can I use Timesfm Forecasting in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add K-Dense-AI/scientific-agent-skills --skill timesfm-forecasting -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/timesfm-forecasting, .gemini/skills/timesfm-forecasting, .github/skills/timesfm-forecasting and .opencode/skills/timesfm-forecasting in your project.

What does Timesfm Forecasting need to run?

Going by SKILL.md and its folder, Timesfm Forecasting needs Python and a shell for the scripts in its folder and the command-line tools its instructions call (python and uv). Our summary lists: Python 3; A Bash shell. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash. Compatibility (from SKILL.md): Requires Python 3.10+ and timesfm 3.0.2 with PyTorch; CSV tooling also needs NumPy and pandas. Network access and cache space are needed for initial Hugging Face checkpoint download. Optional XReg needs JAX and scikit-learn; current JAX requires Python 3.12+..

Does Timesfm Forecasting access the network?

SKILL.md names 4 domains. As links in the text: github.com, huggingface.co, pytorch.org and pypi.org. This is read from the text; nothing was executed.

Is Timesfm Forecasting safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Timesfm Forecasting use?

Timesfm Forecasting is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Timesfm Forecasting use?

About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.8k tokens, read only when the agent opens those files.

What are the alternatives to Timesfm Forecasting?

Skills that share tags, products or a category with Timesfm Forecasting: TimesFM Forecasting (google-research/timesfm, 34k stars), Statsmodels (zLanqing/codex-claude-academic-skills, 4.7k stars), Timesfm Forecasting (zLanqing/codex-claude-academic-skills, 4.7k stars) and Find Hypertable Candidates (timescale/pg-aiguide, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Timesfm Forecasting?

K-Dense-AI (a GitHub organization) maintains it in K-Dense-AI/scientific-agent-skills, which has 48,215 GitHub stars. The repository holds 153 skills in this directory. The repository was last updated on October 5, 2026.

Source: K-Dense-AI/scientific-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.