feature-engineering

feature-engineering is a skill for Claude Code from PuckAPI/claude-sports-analytics. It costs 113 tokens per session (2,758 once invoked), scanned A, original, MIT.

A guide for turning raw hockey game, player, and goalie data into inputs for prediction models. It includes time-aware calculations that prevent future results from leaking into past data.

In plain words
What is it for?
Use it to create rolling averages, home-and-away splits, rest-day features, strength-of-schedule adjustments, goalie features, Elo inputs, and opponent-adjusted measures.
Why use it?
It helps make model inputs reliable and avoids accidentally using information that would not have been available at prediction time.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the puckapi-skills plugin — 28 skills shipped together

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.

agentmods
npx agentmods add skills/puckapi/claude-sports-analytics/feature-engineering
Any agent
npx skills add PuckAPI/claude-sports-analytics --skill feature-engineering
Clone the repo
git clone --depth 1 https://github.com/PuckAPI/claude-sports-analytics

Made for: Claude Code.

Or install puckapi-skills, the plugin that ships this one along with the rest of its 28 skills.

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 feature-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/puckapi/claude-sports-analytics/feature-engineering.svg)](https://agentmods.dev/skills/puckapi/claude-sports-analytics/feature-engineering)
Your own site
<a href="https://agentmods.dev/skills/puckapi/claude-sports-analytics/feature-engineering"><img src="https://agentmods.dev/badge/skills/puckapi/claude-sports-analytics/feature-engineering.svg" alt="Measured on agentmods" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,758 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00113 $0.02758
Opus 5 $0.00056 $0.01379
Sonnet 5 $0.00023 $0.00552
Haiku 4.5 $0.00011 $0.00276

Measured 5d ago against content hash 6029ff73e3a8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

feature-engineering 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 5d 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/feature-engineering/SKILL.md · 227 lines

How it starts

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

Feature Engineering

Default data tool: PuckAPI (puckapi-tool). Use get_games for game results (5 credits), get_team_stats for team-level stats (5 credits), get_goalie_stats for goalie data (5 credits). For user's own CSV/JSON: skip the tool, work with the file directly -- no credits consumed.

You are an expert in sports feature engineering. Your goal is to construct model-ready features from raw sports data while guaranteeing zero temporal leakage. This is where 80% of beginners fail.

When to Use

  • User wants to prepare data for a prediction model
  • User asks about rolling windows, moving averages, or recent form metrics
  • User asks about home/away splits, rest-day features, or back-to-backs
  • User asks about strength-of-schedule adjustment
  • User asks about goalie quality features (SV%, GSAA, recent form)
  • User asks how to incorporate Elo ratings as model features
  • User asks about opponent-adjusted metrics

When NOT to Use

  • Raw data exploration (looking up scores, stats) -- see game-lookup or team-analysis
  • Understanding what Corsi, Fenwick, or PDO mean -- see hockey-analytics
  • Building expected goals (xG) features specifically -- see xg-model-building
  • Training or evaluating the model itself -- see model-building and walk-forward-validation

Commands Available

Command What It Does Credits
get_games Historical game results for rolling calculations 5
get_team_stats Season and split team stats 5
get_goalie_stats Starter SV%, GSAA, recent starts 5
get_head_to_head Head-to-head history for matchup features 10

Commands That Do NOT Exist

Not Available Use Instead
get_team_rolling_stats Compute rolling stats manually from get_games results
get_sos Compute iterative SOS from get_standings + get_team_stats
get_rest_days Compute from game date sequences in get_games output
get_goalie_recent_form Compute from get_goalie_stats with manual window

Read the full file on GitHub · 227 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 227 lines · 113 tokens per session scan A 6029ff73e3a8

Subscribe to this mod's changes

feature-engineering is a skill published in the GitHub repository PuckAPI/claude-sports-analytics (2 stars, last pushed 3mo ago), licensed MIT. It adds 113 tokens to every session and 2,758 once invoked, about $0.0006 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-08-31.

Related

Other skills, from other repositories

dspy-gepa

Optimize instructions in DSPy programs via reflective evolution using dspy.GEPA without adding few-shot examples. Use when you want to optimize instructions without few-shot examples — a lightweight alternative when you do not have or do not want to use demonstrations. Common scenarios - optimizing instructions when…

lebsral/DSPy-Programming-not-prompting-LMs-skills · 215 tokens

ai-querying-databases

Build AI that answers questions about your database. Use when you need text-to-SQL, natural language database queries, a data assistant for non-technical users, AI-powered analytics, plain English database search, or a chatbot that talks to your database. Also used for text-to-SQL that actually works, AI SQL…

lebsral/DSPy-Programming-not-prompting-LMs-skills · 149 tokens

ai-stopping-hallucinations

Stop your AI from making things up. Use when your AI hallucinates, fabricates facts, is not grounded in real data, does not cite sources, makes unsupported claims, or you need to verify AI responses against source material. Also use when your LLM makes up facts, responses are disconnected from the input, or outputs…

lebsral/DSPy-Programming-not-prompting-LMs-skills · 174 tokens

dspy-primitives

DSPy typed wrappers (dspy.Image, dspy.Audio, dspy.Code, dspy.History, dspy.File, dspy.Reasoning, dspy.Tool, dspy.ToolCalls, dspy.Example, dspy.Prediction) for multimodal data, files, and structured outputs in signatures. Use when working with non-text inputs like images, audio, or code, passing PDFs or documents to…

lebsral/DSPy-Programming-not-prompting-LMs-skills · 275 tokens

dspy-retrieval

DSPy retrieval modules (dspy.Retrieve, dspy.ColBERTv2, dspy.Embedder, dspy.retrievers.Embeddings) for searching documents, computing embeddings, and building RAG pipelines. Use when you need to search over documents, build a RAG pipeline, connect DSPy to a vector database, compute embeddings for semantic search, set…

lebsral/DSPy-Programming-not-prompting-LMs-skills · 143 tokens

dspy-tools

Wraps Python functions as dspy.Tool objects and configures dspy.PythonInterpreter for sandboxed code execution in DSPy agents. Use when you need to give DSPy agents tool-calling abilities — wrapping Python functions as tools, building tool-using pipelines, or setting up code execution environments. Common scenarios …

lebsral/DSPy-Programming-not-prompting-LMs-skills · 216 tokens