agentleFS
alphasafalalphasafal/production-agent-skills/skills/data-scientist/SKILL.md

data-scientist

Skill1 starsChanged 2 months agoMITView on GitHub

Runs an end-to-end structured tabular data science workflow: problem framing, schema/leakage/missingness checks, EDA, baseline before modeling, feature engineering, model comparison against the baseline, and error/slice analysis. Use when asked to analyze a dataset, CSV, or spreadsheet; predict an outcome such as which users will convert or churn; build or evaluate a predictive model; review or write up a model's results, or dig into a data quality issue in tabular data. Do not use for pure data engineering/ETL with no analysis or modeling question, for unstructured data (images/audio/free text at scale) without a tabular framing, or when the task is answerable by a single summary statistic with no need for the full workflow — say so and just answer it.

  • Installs packages

17 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use data-architect, gcp-cloud-run and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • rade-nugrohoSkill

    data-architect

    Design data architecture at enterprise and solution levels. Cover data mesh, lakehouse, governance, domain-driven design, conceptual/logical/physical data modeling, platform selection, and compliance frameworks. Produce ADRs, data model diagrams, platform comparison matrices, and governance policy templates. Triggers on "design data platform", "choose data warehouse", "data mesh", "lakehouse architecture", "data governance", "data modeling", "platform selection", "data architecture decision", "compliance framework", or "data strategy". For applied AI solution architecture (RAG data plane, embeddings, vector stores in commercial or enterprise products), use applied-ai-architect-commercial-enterprise. For dbt analytics layers and mart delivery, use analytics-data-engineer—not data-architect.

    Also in 3 projects that use this

  • xfstudioSkill

    gcp-cloud-run

    Specialized skill for building production-ready serverless applications on GCP. Covers Cloud Run services (containerized), Cloud Run Functions (event-driven), cold start optimization, and event-driven architecture with Pub/Sub.

    Also in 3 projects that use this

  • abdullah1854Skill

    context-optimization

    Also in 3 projects that use this

  • OpenAISkill

    executing-plans

    Use when you have a written implementation plan to execute in a separate session with review checkpoints

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never jump straight to a sophisticated model: Always establish a naive baseline first (step 10) — a model that doesn't beat the baseline is …

    line 46
  2. Very specific:

    Read references/classification.md, references/regression.md, or references/time-series.md depending on the problem type before step 10 — …

    line 103
  3. Very specific:

    Run the deterministic scripts for anything they can determine exactly — don't eyeball a .describe() output for missingness when …

    line 111
  4. Very specific:

    Read references/experiment-design.md before recommending an A/B test or similar experiment based on the analysis.

    line 128
  5. Distinctive:

    Stop and correct course if any of these are true:

    line 152

“Common” is measured: kept by at least 6 in 10 of the 16 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.

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

Purpose

Turn "analyze this dataset" or "build a model" into a structured, leakage-checked, baseline-anchored workflow instead of jumping straight to a sophisticated model that may be solving the wrong problem or trained on a false signal.

When to use

  • Asked to analyze a tabular dataset, build a predictive/classification model, or evaluate model performance.
  • Asked to investigate a data quality issue (missingness, duplicates, suspicious distributions) in tabular data.

When NOT to use

  • The question is answerable with a single, simple aggregation ("what's the average order value last month") — just answer it; the full workflow is overkill.
  • The task is ETL/pipeline engineering with no analysis or modeling question attached.
  • Never jump straight to a sophisticated model. Always establish a naive baseline first (step 10) — a model that doesn't beat the baseline is a negative result worth reporting, not a failure to hide.

Required inputs

  • The dataset (file path or description of where it lives) and, if this is a modeling task, what's being predicted and why (the business/decision context — see step 1).

Workflow

  1. Understand the decision/business problem — what decision would this analysis or model actually inform? A model with no decision attached is a request to clarify, not a request to start training.
  2. Inspect the dataset — shape, column types, a sample of rows. Use scripts/profile_dataset.py.
  3. Validate schema — expected columns present, types sane, value ranges plausible. Mismatches here should stop the workflow, not be silently worked around.
  4. Identify the target (if modeling) — confirm what column is being predicted and its distribution (class balance for classification, shape for regression).
  5. Detect leakage — features that wouldn't be available at prediction time, or that are direct proxies/derivatives of the target. Use scripts/check_leakage.py; read references/data-leakage.md for the mechanisms to check beyond what the script catches.
  6. Check missingness — patterns, not just totals (missing-at-random vs. missing-not-at-random matters for how to handle it). Use scripts/check_missingness.py.
  7. Check duplicates/outliers — use scripts/detect_duplicates.py; investigate outliers rather than dropping them reflexively.
  8. EDA — distributions, correlations with the target, relationships between key features. Let this inform, not replace, the hypotheses step.
  9. Hypotheses — state what you expect to find and why, before or alongside EDA, so results can be interpreted against expectations.
  10. Choose the evaluation metric — read references/evaluation-metrics.md and pick the metric that matches the actual decision from step 1, not the most common default. State why.
  11. Create a naive baseline — for classification: majority class or a simple rule; for regression: mean/median predictor. This is non-negotiable — every later model is judged against it.
  12. Feature engineering — only after the baseline exists, so its value is measurable.
  13. Train candidate models — start simple (e.g. logistic/linear regression) before complex models; complexity must earn its keep against the next-simplest option, not just against the baseline.
  14. Compare with baseline — use scripts/evaluate_predictions.py. If a model doesn't beat the baseline meaningfully, report that plainly.
  15. Error analysis — look at what the best model gets wrong and why, not just the aggregate metric.
  16. Slice analysis — check performance across meaningful subgroups (segments relevant to the decision from step 1); an aggregate metric can hide a subgroup where the model is actually harmful or useless.
  17. Interpretation — connect findings back to the original decision.
  18. Recommendations — what should actually change/happen as a result.

Read references/classification.md, references/regression.md, or references/time-series.md depending on the problem type before step 10 — each affects which metrics and validation strategy are valid, especially for time-series, where standard k-fold cross-validation leaks future information into the past.

Tool & resource guidance

Run the deterministic scripts for anything they can determine exactly — don't eyeball a .describe() output for missingness when scripts/check_missingness.py gives an exact, reproducible answer.

python scripts/profile_dataset.py data.csv
python scripts/check_missingness.py data.csv
python scripts/detect_duplicates.py data.csv
python scripts/check_leakage.py data.csv --target outcome
python scripts/evaluate_predictions.py predictions.csv --y-true actual --y-pred predicted
python scripts/generate_summary.py data.csv --target outcome

Each script is standalone (python scripts/<name>.py --help) and requires only pandas/numpy — install via pip install -e '.[data-scientist]' from the repo root, or pip install pandas numpy directly.

Read references/experiment-design.md before recommending an A/B test or similar experiment based on the analysis.

Output contract

A findings summary covering: the decision context, key EDA findings, the chosen metric and why, baseline performance, best model performance and whether it beats baseline, error/slice analysis findings, and concrete recommendations. For pure data-quality investigations (no modeling), the same contract minus the modeling-specific sections.

Quality checks

  • A baseline was established before any "sophisticated" model, and the final comparison is against that baseline explicitly.
  • Leakage was actively checked, not assumed absent.
  • The chosen metric matches the actual decision, and that match is stated.
  • Slice analysis was performed on at least one meaningful subgroup, not only an aggregate metric reported.
  • If the task didn't actually need modeling, that was recognized and modeling was skipped rather than forced.

Red flags

Stop and correct course if any of these are true:

  • You are training a model and there is no naive baseline score yet.
  • A feature is suspiciously predictive and you haven't checked whether it exists at prediction time.
  • Rows with missing values were dropped without looking at whether missingness relates to the target.
  • The metric is accuracy on an imbalanced target, chosen because it's the default.
  • You only report one aggregate number — no error analysis, no slices.
  • The data has a time dimension and you used a random train/test split.

Common rationalizations

Excuses that come up for skipping this workflow, and why they don't hold:

RationalizationReality
"The baseline is obviously bad, skip it."Then it costs seconds and proves your model's lift. Without it, "92% accuracy" might mean nothing on a 92/8 split.
"This feature is the best predictor — great!"Too-good features are the first leakage suspect. Run scripts/check_leakage.py and ask when the value becomes known.
"Just drop the nulls."If missingness correlates with the target you've just biased the dataset. Check the pattern first.
"Let's try XGBoost straight away."Complexity has to beat the next-simplest model, not just the baseline. Start with linear/logistic and make the fancy model earn its place.
"The overall metric is good, we're done."Aggregates hide subgroups where the model is useless or harmful. Slice by the segments the decision cares about.

Edge cases

  • Task is analysis-only, no modeling needed: skip steps 10-16, keep 1-9 and 17-18. Say explicitly that modeling wasn't warranted and why.
  • Dataset too small for a train/test split: say so, use cross-validation or report the limitation rather than presenting an overfit single-split result as reliable.
  • Time-series data: standard random train/test splitting leaks future data into training — read references/time-series.md before choosing a validation strategy.
  • Severe class imbalance: accuracy is misleading as a metric here — read references/evaluation-metrics.md and references/classification.md.

References

See examples/customer-churn-walkthrough.md for a full worked example of this workflow end to end.

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.