feature-engineering
Skill11 starsChanged 6 months agoMITView on GitHub
Use when creating, encoding, scaling, or selecting features for ML models. Covers categorical encoding, numeric transforms, datetime/text/aggregation features, and leakage-safe target encoding.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- IngAs8/ClaudeSkilltheir own version, first seen Sep 28, 2026
- PuckAPI/claude-sports-analyticstheir own version, first seen May 6, 2026
- Lu1sDV/skillsmdtheir own version, first seen Apr 29, 2026
- kienbui1995/magic-powerstheir own version, first seen Apr 10, 2026
- brainbytes-dev/everything-claude-tradingtheir own version, first seen Mar 14, 2026
- agiprolabs/claude-trading-skillstheir own version, first seen Mar 11, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- agiprolabs/claude-trading-skills★ 408same name
- brainbytes-dev/everything-claude-trading★ 19same name
- PuckAPI/claude-sports-analytics★ 3same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- Lu1sDV/skillsmd★ 2same name
- IngAs8/ClaudeSkill★ 0same name
- kienbui1995/magic-powers★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- data-cleaningSkill
- experiment-trackingSkill
- exploratory-data-analysisSkill
- hyperparameter-tuningSkill
- imbalanced-dataSkill
- llm-finetuningSkill
- ml-debuggingSkill
- model-evaluationSkill
- model-servingSkill
- pandas-patternsSkill
- pytorch-training-loopSkill
- rag-pipelineSkill
- reproducible-mlSkill
- sklearn-pipelinesSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
After cleaning, before/iterating with modeling.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 →
log1por Box-Cox/Yeo-Johnson. - Scaling →
StandardScalerfor 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 oofPitfalls
- Target encoding fit on all rows → severe leakage, inflated CV, collapse in production.
- Scaling fit on full data → use
Pipelineso scaler fits on train folds only. - Aggregations over the whole timeline in time-series → only use past data (rolling windows with proper shift).
- Creating thousands of features then trusting noisy importance — prefer a few well-motivated features + regularization.
Hand-off
Deliver a documented feature set (name, source, rationale) and ensure all transforms are wrapped in a fitted Pipeline for the model-evaluation and model-serving skills to reuse.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

