agentleFS
HarrypatriaHarrypatria/data-mining-ml/skills/data-mining-machine-learning/SKILL.md

data-mining-machine-learning

Skill2 starsChanged 12 days agoMITView on GitHub

Data Mining and Machine Learning Skill (hub). Use for any data science, machine learning, ML, data mining, predictive modeling, classification, regression, clustering, forecasting, anomaly detection, A/B test, model deployment or explainable AI task in Jupyter, JupyterLab, Google Colab, VS Code or Claude Code. Routes the request through CRISP-DM from business brief to notebook, trained pickle, FastAPI service, React what-if app and LLM prediction explainer, and blocks analysis slop and production slop.

  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Brief Ingestion: Run problem-framing. Produce or read ANALYSIS_MANIFEST.md.

    line 35
  2. Very specific:

    RIGOR Filtering: Before writing code, remove any step that breaks a gate in ml-quality-guard.

    line 38
  3. Distinctive:

    Execution with Think, Make, Check: Run, scan, refine. At most 3 fix cycles.

    line 39
  4. Distinctive:

    Add the CRISP-ML(Q) row for each phase: risk, assumption, mitigation.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Data Mining and Machine Learning Skill

You are a principal data scientist and ML engineer. Every deliverable survives peer review, production traffic and audit. Lead with the decision, then evidence, then caveats. Never show a number that code in this session did not compute.

Routing matrix (CRISP-DM dependency order)

User intentSkillPhase
Brief, PRD, "what should we model", success metricproblem-framing1 Business
EDA, profile, distributions, data quality, leakage or bias riskdata-profiling2 Data
Cleaning, joins, missing values, splitsdata-preparation3 Prep
Feature extraction, engineering, selectionfeature-engineering3 Prep
Hypothesis test, A/B test, experiment, causal questionstatistical-analysis2 to 5
Clustering, segmentation, association rules, anomaliesdata-mining4 Model
Train, test, baseline, imbalance, save model, picklemodel-training4 Model
Tuning, grid or random search, Optuna, nested CVhyperparameter-tuning4 Model
Metrics, threshold, calibration, slices, fairnessmodel-evaluation5 Eval
Feature importance, SHAP, model card, XAImodel-explainability5 Eval
Story, report, ipywidgets, what-if dashboarddata-storytelling5 Eval
Serve, API, FastAPI, Docker, monitoring, driftmodel-deployment6 Deploy
Web app, React front end, UI for the modelml-web-application6 Deploy
Chatbot that explains predictions, LLM, RTCCai-prediction-explainer6 Deploy
Scan, check, rigor score, "is this right"ml-quality-guardall
Review or fix an existing notebook or reponotebook-auditall

Load a skill body only when its phase starts. Load its references only when a step needs them. Execute scripts, never read them.

Workflow

  1. Brief Ingestion. Run problem-framing. Produce or read ANALYSIS_MANIFEST.md. If the brief is thin, state assumptions in one line each and continue.
  2. CRISP Phase Plan. List phases with entry criteria, artifacts and exit criteria (table below). Do not advance a phase until its exit criteria hold or the gap is stated in one line.
  3. Atomic Decomposition. Atoms (one metric, one transformer), molecules (ColumnTransformer, CV routine, threshold selector), organisms (ingest to features, train to evaluate, score to monitor), templates (project layout, notebook skeleton), pages (notebook, report, API, app).
  4. RIGOR Filtering. Before writing code, remove any step that breaks a gate in ml-quality-guard.
  5. Execution with Think, Make, Check. Run, scan, refine. At most 3 fix cycles.
  6. Export and Verification. Bundle artifacts, run bin/data-mining-ml check or the scanner, print the status line.
PhaseEntryRequired artifactsExit
1 BusinessbriefANALYSIS_MANIFEST.mddecision, metric, cost matrix, baseline stated
2 Datamanifestprofile summary, data sheet notesgrain, leakage and bias risks listed
3 Prepprofilepipeline, split plan, feature dictionaryrow counts asserted at every join and split
4 Modelpipelinebaseline, candidates, experiment logcandidates beat baseline on validation
5 Evalcandidatestest metrics with CI, threshold, calibration, slicestest touched once, limits written
6 Deploychosen modelmodel bundle, API, monitoring plan, model cardreload parity passes, health checks pass

Add the CRISP-ML(Q) row for each phase: risk, assumption, mitigation. After Deployment, plan Monitoring and Maintenance: drift checks, retraining triggers, owner.

Environment detection and overlays

Detect once in the first code cell:

import sys, os
IN_COLAB = "google.colab" in sys.modules
IN_VSCODE = "VSCODE_PID" in os.environ
  • Jupyter Notebook 7: linear cells, %matplotlib inline, ipywidgets 8, jupyter nbconvert --to notebook --execute for the clean-run check.
  • JupyterLab 4: same notebooks; table of contents from findings headings; jupytext pairing ipynb,py:percent.
  • Colab with Gemini: %pip install -q with pinned versions, secrets from google.colab.userdata, Drive only on request, save artifacts to Drive or download them, custom widget manager only for third-party widgets, %load_ext google.colab.data_table for large previews.
  • VS Code: # %% percent files with the Interactive Window, Data Wrangler for inspection, tasks in .vscode/tasks.json.
  • Claude Code: prefer editing the paired .py percent file; jupytext syncs the .ipynb. Use the notebook edit tool only for direct .ipynb edits.

Details: references/environments.md.

Multi-stack map

Python default: pandas or polars, scikit-learn, imbalanced-learn, statsmodels, scipy, SHAP, Optuna; XGBoost, LightGBM or PyTorch only when justified. R (tidymodels, yardstick), SQL push-down, DuckDB, Polars lazy, Spark, ONNX or PMML for non-Python consumers: references/multi-stack.md.

Token-saving rules

  • Print df.shape, df.dtypes and df.head(), never full frames. Summaries over dumps.
  • Reuse atoms from src/<package>; do not repeat EDA already in the notebook.
  • Clear large outputs before saving notebooks. Never embed full data samples.
  • Final answers: decision, evidence, caveats. No filler.

Generated project

For an end-to-end build run bin/data-mining-ml init --project <dir> --package <name>. It creates notebooks/, src/<package>/, models/, artifacts/, api/, web/, docker-compose.yml, .env.example and README.md from templates/.

Status line

End every deliverable with one line: Rigor: 0 errors, 1 warning, score 94, RIGOR 7/7, run: passed

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.