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

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/param087/agent-ml-skills/feature-engineering
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.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.svg" alt="Measured on agentmods" 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. 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 $0.00038 $0.00791
Opus 5 $0.00019 $0.00396
Sonnet 5 $0.00008 $0.00158
Haiku 4.5 $0.00004 $0.00079

Measured 4d ago against content hash 674364a13dc3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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 valueslog1p or Box-Cox/Yeo-Johnson.
  • ScalingStandardScaler 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. 4d 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 (9 stars, last pushed 3mo ago), licensed MIT. It adds 38 tokens to every session and 791 once invoked, about $0.0002 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

stock-data-fetch

Fetch multi-market financial data — US (FMP→Finnhub), A/HK (Tencent→Sina), crypto (OKX→Hyperliquid), commodities (Hyperliquid+Finnhub), news (Marketaux), backup (Longbridge). Battle-tested in restricted network environments.

realnaka/alphaloop · 62 tokens

data-scientist

数据分析全流程:数据画像、统计检验、可视化、报告生成。三阶段流程(数据摄入→分析执行→报告生成),单 agent 完成,无需多 agent 编排。当用户提到 CSV/Excel/Parquet 数据分析、假设检验、统计报告、制造业分析(良率/SPC/Cpk)、A/B 测试、或数据质量问题诊断时使用。.

realnghon/data-scientist · 95 tokens

auth-web-cloudbase

CloudBase Web Authentication Quick Guide for frontend integration after auth-tool has already been checked. Provides concise and practical Web authentication solutions with multiple login methods and complete user management.

TencentCloudBase/CloudBase-AI-Toolkit · 38 tokens

browse-and-evaluate

Use when exploring the ai-agent-skills catalog to find, compare, and evaluate skills before installing. Always use --fields to limit output size and --dry-run before committing to an install.

MoizIbnYousaf/Ai-Agent-Skills · 43 tokens

loop-engineering

Shared loop-engineering reference for COG skills - the agent loop, deterministic verifiers, termination conditions, in-loop context management, and named patterns. Invoke when designing or debugging a skill that iterates (search-verify-retry, scan-until-dry, fetch-retry-gate).

huytieu/COG-second-brain · 63 tokens

telnyx-messaging-hosted-curl

Set up hosted SMS numbers, toll-free verification, and RCS messaging. Use when migrating numbers or enabling rich messaging features. This skill provides REST API (curl) examples.

team-telnyx/ai · 45 tokens