# scikit-learn

scikit-learn — a skill for classical ML in Python: it picks the algorithm and wires the pipeline so test data stays out of the fitting.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 124 installs · ★ 7 repo stars
- Author: eyadsibai
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/eyadsibai/ltk/tree/HEAD/plugins/ltk-data/skills/scikit-learn/SKILL.md
- Updated: 2026-01-15
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/eyadsibai-scikit-learn

## What it does

When a request mentions sklearn, classification, clustering or tuning, the skill hands the agent a selection table. Logistic regression as a baseline, random forest for everyday work, gradient boosting when accuracy on tabular data is the goal, SVM for wide feature spaces. Clustering and dimensionality reduction get their own tables, down to the parameter that decides the result, like `n_clusters` for KMeans or `eps` for DBSCAN.

Pipelines take up the middle of the file. `Pipeline` keeps every transform inside the training fold, `ColumnTransformer` routes different transforms to different columns, and the suggested preprocessing order is impute, then scale, then encode. For evaluation there are KFold, StratifiedKFold, TimeSeriesSplit and LeaveOneOut, plus a metric table per task.

Some limits are stated plainly. `HalvingGridSearchCV` needs sklearn 0.24 or newer. With lopsided classes, accuracy hides more than it shows, so the skill pushes you toward F1 or ROC-AUC. Fitting a scaler before the split is the leak it warns about hardest.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add eyadsibai/ltk --skill scikit-learn -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/scikit-learn/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/scikit-learn/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add eyadsibai/ltk --skill scikit-learn -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/scikit-learn/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add eyadsibai/ltk --skill scikit-learn -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/scikit-learn/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install eyadsibai/ltk plugins/ltk-data/skills/scikit-learn
```

2. **Manually: put the files in place**
- File: `.github/skills/scikit-learn/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add eyadsibai/ltk --skill scikit-learn -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/eyadsibai/ltk --path plugins/ltk-data/skills/scikit-learn
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/scikit-learn/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add eyadsibai/ltk --skill scikit-learn -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/eyadsibai/ltk/tree/HEAD/plugins/ltk-data/skills/scikit-learn/SKILL.md

## When to use it
- pick an algorithm for a tabular classification task
- keep preprocessing inside the training fold
- tune hyperparameters without a full grid sweep
- choose a metric when classes are imbalanced
- read learning curves to spot overfitting

## Example prompts
- Build a pipeline for this CSV: `ColumnTransformer` for the categoricals, `StandardScaler` for the numeric columns.
- Split the data, run `StratifiedKFold`, and report F1 per fold.
- Tune `RandomForestClassifier` with `RandomizedSearchCV` and show me the best params.

## Similar
- [scikit-learn-best-practices](https://affpapa.org/en/nevibecode/skills/scikit-learn-best-practices.md) — skill · 940 installs
- [scikit-learn-expert](https://affpapa.org/en/nevibecode/agents/scikit-learn-expert.md) — subagent · ★ 1029 repo stars
- [pytorch-scikit-learn-cursorrules-prompt-file](https://affpapa.org/en/nevibecode/rules/pytorch-scikit-learn-cursorrules-prompt-file.md) — rule · ★ 41178 repo stars
- [pandas-scikit-learn-guide-cursorrules-prompt-file](https://affpapa.org/en/nevibecode/rules/pandas-scikit-learn-guide-cursorrules-prompt-file.md) — rule · ★ 41178 repo stars
- [scikit-survival](https://affpapa.org/en/nevibecode/skills/scikit-survival.md) — skill · 2200 installs
- [Anomaly Detection](https://affpapa.org/en/nevibecode/skills/anomaly-detection.md) — skill · 534 installs

## Other versions with the same name
- [scikit-learn · k-dense-ai](https://affpapa.org/en/nevibecode/skills/k-dense-ai-scikit-learn.md) — 2400 installs
- [scikit-learn · tondevrel](https://affpapa.org/en/nevibecode/skills/tondevrel-scikit-learn.md) — 122 installs

From the same set: [eyadsibai/ltk](https://affpapa.org/en/nevibecode/by/eyadsibai/ltk.md) — 11 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
