scikit-learn · davila7 — Claude Code skill: ML in Python
A Claude skill that steers the agent through scikit-learn work: classification, clustering, preprocessing, pipelines and hyperparameter tuning.
npx claude-code-templates@latest --skill scientific/scikit-learnWhat scikit-learn does
The skill hands the agent a reference set for scikit-learn. It covers supervised and unsupervised algorithms, evaluation metrics, cross-validation, missing-value handling, categorical encoding and pipeline assembly. The material lives in files such as references/supervised_learning.md, references/unsupervised_learning.md, references/model_evaluation.md and references/preprocessing.md. When you ask for a model or a data prep step, the agent pulls the matching section.
Install it with npx claude-code-templates@latest --skill scientific/scikit-learn or npx skills add davila7/claude-code-templates --skill scikit-learn -a claude-code. The skill itself ships no library code. scikit-learn still has to be present in your project, for instance via uv pip install scikit-learn; the examples also lean on matplotlib and seaborn for plots and on pandas and numpy for tables.
It earns its place when you compare several algorithms on one dataset or wire up a pipeline over mixed feature types. If you already keep your own snippet collection and would rather the agent not reach for outside examples, this one gets in the way.
What it helps with
- build a pipeline over numeric and categorical features
- tune hyperparameters with GridSearchCV or RandomizedSearchCV
- score a model with precision, recall and ROC AUC
- impute missing values and encode categories before training
- cut dimensionality with PCA or t-SNE
Example prompts for the agent
- Split the data into train and test with stratification, then fit a RandomForestClassifier
- Build a Pipeline with ColumnTransformer: scale the numeric features and encode the categorical ones
- Run cross-validation across several models and print the metrics for each
How to install scikit-learn
1claude-code-templates
npx claude-code-templates@latest --skill scientific/scikit-learn2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill scikit-learn -a claude-code3Manually: put the files in place
~/.claude/skills/scikit-learn/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/scikit-learn/
Manually: put the files in place
.agents/skills/scikit-learn/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/scikit-learn/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates scikit-learn2Manually: put the files in place
.github/skills/scikit-learn/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/scientific/scikit-learnManually: put the files in place
.devin/skills/scikit-learn/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about scikit-learn
How do I install scikit-learn in Claude Code?
Run npx claude-code-templates@latest --skill scientific/scikit-learn, then npx skills add davila7/claude-code-templates --skill scikit-learn -a claude-code. The skill file lands at ~/.claude/skills/scikit-learn/SKILL.md.
What does the scikit-learn skill do?
It gives the agent reference material on scikit-learn algorithms, metrics, preprocessing and pipelines, so the code it writes follows the library instead of guesswork.
Do I still need to install scikit-learn itself?
Yes. The skill does not install the library. Add it to your project separately, for example with uv pip install scikit-learn.
Similar skills
All skills for AI and ML →scikit-learn by other authors comes first.