ts-day-specific-forecasting

ts-day-specific-forecasting is a skill for Claude Code, Codex from topprismdata/cultivating-ml-agent. It costs 204 tokens per session (2,377 once invoked), scanned A, original, MIT.

A forecasting approach that trains a separate model for each future time step. Each model uses features calculated from the last known date instead of repeatedly reusing filled-in lag values.

In plain words
What is it for?
Use it for multi-step time-series forecasting in retail, web traffic, and similar tasks where predictions must have the right scale.
Why use it?
It prevents stale lag features from causing multi-day forecasts to underpredict the true size of future values.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for multi-step time-series forecasting in retail, web traffic, and similar tasks where predictions must have the right scale.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/topprismdata/cultivating-ml-agent/ts-day-specific-forecasting
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add topprismdata/cultivating-ml-agent --skill ts-day-specific-forecasting
Clone the repo
git clone --depth 1 https://github.com/topprismdata/cultivating-ml-agent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ts-day-specific-forecasting

README.md
[![agentmods](https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/ts-day-specific-forecasting/github.svg)](https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/ts-day-specific-forecasting)
Your own site
<a href="https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/ts-day-specific-forecasting"><img src="https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/ts-day-specific-forecasting/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ts-day-specific-forecasting

Your own site · 80×15
<a href="https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/ts-day-specific-forecasting"><img src="https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/ts-day-specific-forecasting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 204 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,377 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00204 $0.02377
Opus 5 $0.00102 $0.01189
Sonnet 5 $0.00041 $0.00475
Haiku 4.5 $0.00020 $0.00238

Measured 7d ago against content hash 32b5aaa27813, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ts-day-specific-forecasting scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/examples/ts-day-specific-forecasting/SKILL.md · 208 lines

How it starts

The opening of the file, as written. The whole thing — 208 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Day-Specific Direct Forecasting for Multi-Step Time Series

Problem

In multi-step time series forecasting (predicting N days ahead), a single unified model suffers from stale lag features at test time. All N days get the same ffill'd lag values (constant), causing the model to underpredict by 5-10x. Even with geometric mean post-processing (see ts-lag-stale-underprediction), the model only provides "ranking signal" — the magnitude comes from target encoding, not the model itself.

Context / Trigger Conditions

Use when:

  • Predicting N days (N > 1) into the future with lag/rolling features
  • A single unified model underpredicts at test time due to stale lag features
  • Post-processing blends (geometric mean with TE) are needed but feel like a workaround
  • CV score is good but LB score is 3-10x worse
  • You want the model itself to produce correct-magnitude predictions

Common in: Kaggle time series competitions (Store Sales, M5, Web Traffic), retail demand forecasting, any multi-step prediction with autoregressive features.

Solution

Core Idea: Train N Separate Models

Instead of 1 model that predicts all N days, train N separate models where:

  • Model_d predicts "sales d days from the reference date"
  • Features are ALWAYS computed from the last known training date
  • At test time, ALL lag features reference real, known data — no ffill needed

Implementation

# For each prediction day d (1 to N):
for d in range(1, N + 1):
    # Training: features from date t → target = sales on date t+d
    ref_dates = [t for t in all_dates if t + d is still in training data]
    target_dates = [t + timedelta(days=d) for t in ref_dates]

    # Reference features (from date t, always known)
    ref_data = train_features[train_features["date"].isin(ref_dates)]

    # Target sales (d days ahead)
    target_data = train_features[train_features["date"].isin(target_dates)]

    # Merge on (store, family, target_date)
    merged = ref_data.merge(target_data, on=["store_nbr", "family", "target_date"])

    # Add TARGET-DATE features (calendar, holidays, promotions on target date)
    merged["target_day_of_week"] = merged["target_date"].dt.dayofweek
    merged["target_month"] = merged["target_date"].dt.month
    merged["target_is_weekend"] = (merged["target_day_of_week"] >= 5).astype(int)

    # Add TARGET-DATE target encoding
    # te_sf_dow_mean for the TARGET day_of_week, not the reference day
    merged = merged.merge(te_sf_dow, on=["store_nbr", "family", "target_day_of_week"])

    # Train model_d on this data
    model_d = lgb.LGBMRegressor(...)
    model_d.fit(X_train, np.log1p(y_train), eval_set=[(X_val, np.log1p(y_val))])

Read the full file on GitHub · 208 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 208 lines · 204 tokens per session scan A 32b5aaa27813

Subscribe to this mod's changes

ts-day-specific-forecasting is a skill published in the GitHub repository topprismdata/cultivating-ml-agent (5 stars, last pushed 13d ago), licensed MIT. It adds 204 tokens to every session and 2,377 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

huggingface-hub

Hugging Face Hub CLI (hf) — search, download, and upload models and datasets, manage repos, query datasets with SQL, deploy inference endpoints, manage Spaces and buckets.

braxtonROSE4/zorro-agent · 43 tokens

tensorboard

Visualize training metrics, debug models with histograms, compare experiments, visualize model graphs, and profile performance with TensorBoard - Google's ML visualization toolkit.

davila7/claude-code-templates · 32 tokens

mlflow

Track ML experiments, manage model registry with versioning, deploy models to production, and reproduce experiments with MLflow - framework-agnostic ML lifecycle platform.

davila7/claude-code-templates · 33 tokens

datachain-knowledge

Use whenever datasets, cloud storage buckets, or data pipelines are mentioned — creating, saving, querying, listing, exploring, deleting, or processing data in S3, GCS, Azure Blob, or local storage. Also use when running any script that may create datasets as a side effect. Maintains a knowledge base at dc-knowledge/…

datachain-ai/datachain · 104 tokens

prompt-scanner

A scanner for text sent to an AI agent, looking for prompt injection and jailbreak attempts. Prompt injection is text that tries to override an agent's instructions; a jailbreak tries to bypass its safety limits.

alibaba/anolisa · 103 tokens

install-openviking-memory

Install and configure the OpenViking long-term memory plugin for OpenClaw via natural conversation. Once installed, the plugin automatically captures facts from chats and recalls relevant context before each reply (auto-capture + auto-recall, cross-session). Covers prerequisites, install through OpenClaw's plugin…

volcengine/OpenViking · 191 tokens