feature-engineering

feature-engineering is a skill for Claude Code, Codex from param087/agent-ml-skills. It costs 38 tokens per session (791 once invoked), scanned A, original, MIT.

A guide to creating useful input columns, called features, from raw data before training a machine-learning model. It covers categories, numbers, dates, text, aggregates, and preventing information leakage.

In plain words
What is it for?
Use it to encode categories, transform skewed numbers, derive date or text features, create aggregates, and select safer model inputs.
Why use it?
It helps models receive data in forms they can learn from while preventing test or target information from accidentally entering the inputs. Leakage can make evaluation look better than real performance.

Skill for Claude CodeCodex

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

Good fit Use it to encode categories, transform skewed numbers, derive date or text features, create aggregates, and select safer model inputs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/param087/agent-ml-skills/feature-engineering
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 param087/agent-ml-skills --skill feature-engineering
Clone the repo
git clone --depth 1 https://github.com/param087/agent-ml-skills

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/param087/agent-ml-skills/feature-engineering"><img src="https://agentmods.dev/badge/skills/param087/agent-ml-skills/feature-engineering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 791 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.00038 $0.00791
Opus 5.5 $0.00015 $0.00316
Sonnet 5.5 $0.00008 $0.00158
Haiku 4.5 $0.00004 $0.00079

Measured 2mo ago against content hash 674364a13dc3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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 · 77 lines

How it starts

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

Feature Engineering

Overview

Feature engineering is where most model performance is won or lost. The aim is to express the signal in a form the model can use, while never letting information from the target or the test set leak into a feature.

When to use

  • After cleaning, before/iterating with modeling.
  • A model plateaus and you suspect under-expressed signal.
  • You have raw datetime, text, or relational data to turn into columns.

Encoding categoricals

Cardinality Encoder Notes
Low (<15), tree model One-hot or native categorical LightGBM/CatBoost handle natively
Low, linear model One-hot Drop-first to avoid collinearity
High (>15) Target/leave-one-out encoding Must be cross-fitted to avoid leakage
Ordinal meaning Ordinal map Preserve order (low<med<high)

Numeric transforms

  • Skewed positive values → log1p or Box-Cox/Yeo-Johnson.
  • Scaling → StandardScaler for linear/NN, none needed for trees.
  • Binning → only when the relationship is genuinely non-monotonic.
  • Interactions → products/ratios of features with domain meaning (e.g., price / sqft).

Datetime features

ts = df["event_time"]
df["hour"] = ts.dt.hour
df["dayofweek"] = ts.dt.dayofweek
df["is_weekend"] = ts.dt.dayofweek.ge(5).astype(int)
df["month"] = ts.dt.month
# Cyclical encoding so 23:00 and 00:00 are close
import numpy as np
df["hour_sin"] = np.sin(2 * np.pi * df["hour"] / 24)
df["hour_cos"] = np.cos(2 * np.pi * df["hour"] / 24)

Leakage-safe target encoding

Target encoding must be fit out-of-fold, never on the rows it encodes:

from sklearn.model_selection import KFold
import numpy as np

def target_encode_oof(train, col, target, n_splits=5, smoothing=10):
    oof = np.zeros(len(train))
    prior = train[target].mean()
    kf = KFold(n_splits=n_splits, shuffle=True, random_state=42)
    for tr_idx, val_idx in kf.split(train):
        agg = train.iloc[tr_idx].groupby(col)[target].agg(["mean", "count"])
        smooth = (agg["mean"] * agg["count"] + prior * smoothing) / (agg["count"] + smoothing)
        oof[val_idx] = train.iloc[val_idx][col].map(smooth).fillna(prior).values
    return oof

Read the full file on GitHub · 77 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. 2mo ago First seen · 77 lines · 38 tokens per session scan A 674364a13dc3

Subscribe to this mod's changes

feature-engineering is a skill published in the GitHub repository param087/agent-ml-skills (13 stars, last pushed 5mo ago), licensed MIT. It adds 38 tokens to every session and 791 once invoked, about $0.0002 per session on Opus 5.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

feature-engineering compared with skills from other repositories

feature-engineering next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
feature-engineeringparam087/agent-ml-skillsSkill135mo agoMITA38Claude Code, Codex
spark-training-gotchaswshobson/agentsSkill42kyesterdayMITA63Claude Code
9router-sttdecolua/9routerSkill32k9d agoMITA63Claude Code, Codex
9routerdecolua/9routerSkill32k9d agoMITA84Claude Code, Codex
9router-embeddingsdecolua/9routerSkill32k9d agoMITA66Claude Code, Codex
dashscopecalesthio/OpenMontageSkill77k3d agoAGPL-3.0A93Claude Code, Codex
ultralytics-platformfcakyon/claude-codex-settingsSkill1.2kyesterdayApache-2.0A135Claude Code