yoy-364day-features

yoy-364day-features is a skill for Claude Code, Codex from topprismdata/cultivating-ml-agent. It costs 96 tokens per session (803 once invoked), scanned A, original, MIT.

A time-series forecasting technique that uses values from 364 days earlier to capture yearly patterns while keeping the same weekday alignment.

In plain words
What is it for?
Creating year-over-year features for retail and sales forecasting, including prior-year values, averages, and comparison ratios.
Why use it?
It helps forecasts account for annual seasonality, such as sales patterns that repeat around the same week each year.

Skill for Claude CodeCodex

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

Good fit Creating year-over-year features for retail and sales forecasting, including prior-year values, averages, and comparison ratios.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/topprismdata/cultivating-ml-agent/yoy-364day-features
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 yoy-364day-features
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 yoy-364day-features

README.md
[![agentmods](https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/yoy-364day-features/github.svg)](https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/yoy-364day-features)
Your own site
<a href="https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/yoy-364day-features"><img src="https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/yoy-364day-features/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 yoy-364day-features

Your own site · 80×15
<a href="https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/yoy-364day-features"><img src="https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/yoy-364day-features.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 803 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.00096 $0.00803
Opus 5 $0.00048 $0.00402
Sonnet 5 $0.00019 $0.00161
Haiku 4.5 $0.00010 $0.00080

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

Security

Grade A, and why

yoy-364day-features 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/yoy-364day-features/SKILL.md · 75 lines

How it starts

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

YoY 364-Day Features for Time Series

Core Idea

Use sales/values from exactly 364 days ago (52 weeks) as features. This aligns day-of-week perfectly (364 = 52 × 7), capturing annual seasonality while maintaining weekly structure.

Feature Set (4 features)

# For each (store, family) on reference date t:
yoy_sales_364 = sales[t - 364]                          # Same day-of-week last year
yoy_sales_364_7d_avg = mean(sales[t-370 : t-364])       # 7-day avg around same week last year
yoy_ratio_1y = sales_lag_1 / (yoy_sales_364 + 1)        # Current vs last year momentum
yoy_ratio_7d = rolling_mean_7 / (yoy_sales_364_7d_avg + 1)  # Recent trend vs last year

Implementation

# Build YoY lookup: map each date to sales from 364 days ago
sales_df = train_raw[["store_nbr", "family", "date", "sales"]].copy()
sales_df["yoy_date"] = sales_df["date"] + pd.Timedelta(days=364)

yoy_lookup = sales_df.rename(columns={
    "date": "yoy_ref_date", "sales": "yoy_sales_364"
})[["store_nbr", "family", "yoy_ref_date", "yoy_sales_364"]]

# Merge into training data
merged = merged.merge(
    yoy_lookup, left_on=["store_nbr", "family", "date"],
    right_on=["store_nbr", "family", "yoy_ref_date"], how="left"
)

# 7-day average around same week last year
yoy_7d = sales_df.groupby(["store_nbr", "family"]).apply(
    lambda g: g.set_index("date")["sales"].rolling(7, min_periods=1).mean().shift(364)
).reset_index()

Evidence

Kaggle Store Sales (Favorita), April 2026:

Version Features LB
R11c (baseline) 82 base 0.39824
R12 multilevel +18 family/store aggregation 0.39874 (+0.00050 worse)
R13 YoY +4 YoY 364-day 0.39779 (-0.00045 better)

Feature importance: yoy_sales_364_7d_avg = 2577 (high), yoy_sales_364 = 1204.

Key Insight

Why 364 and not 365? Because 364 = 52 × 7, so day_of_week is guaranteed to match. This matters for retail data where weekday/weekend sales differ dramatically. Using 365 would shift day-of-week by 1 (or 2 for leap years), introducing noise.

Read the full file on GitHub · 75 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 · 75 lines · 96 tokens per session scan A 8826913ba4e7

Subscribe to this mod's changes

yoy-364day-features is a skill published in the GitHub repository topprismdata/cultivating-ml-agent (5 stars, last pushed 13d ago), licensed MIT. It adds 96 tokens to every session and 803 once invoked, about $0.0005 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