data-science-python
Skill9 starsChanged 8 months agoMITView on GitHub
Python data science: notebook structure, data validation, reproducibility, and model documentation
In this repository31 other files it gives its agents.
- git-workflow-releaseSkill
- skill-authoring-generalSkill
- git-workflow-releaseSkill
- skill-authoring-generalSkill
- accessibility-generalSkill
- accessibility-react-nativeSkill
- architecture-generalSkill
- architecture-pythonSkill
- assistant-rocky-lti-assistSkill
- assistant-ucd-mobileSkill
- ci-cd-github-actionsSkill
- code-review-generalSkill
- code-review-pythonSkill
- code-review-typescriptSkill
- design-frontendSkill
- documentation-projectSkill
- documentation-readmeSkill
- git-workflow-generalSkill
- git-workflow-monorepoSkill
- git-workflow-pr-generatorSkill
- git-workflow-releaseSkill
- infrastructure-terraformSkill
- package-management-pythonSkill
- project-management-jiraSkill
- refactoring-typescriptSkill
- security-generalSkill
- skill-authoring-generalSkill
- testing-generalSkill
- testing-javaSkill
- testing-pythonSkill
- testing-typescriptSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Keep notebooks for exploration.
- Distinctive: line 51
Document for every model:
- Very specific: line 70
Write unit tests for data processing functions in tests/.
- Very specific: line 71
Use pathlib.Path — never hardcode file paths.
- Very specific: line 72
Use logging not print in production code.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.
Files
Data Science — Python
Notebook Structure
Organize notebooks in this order:
- Imports & configuration
- Data loading
- Exploratory data analysis (EDA)
- Feature engineering
- Modeling
- Evaluation
- Conclusions & next steps
Keep notebooks for exploration. Move reusable logic to src/ Python modules with tests.
Data Validation
# Always validate after loading
assert df.shape[0] > 0, "DataFrame is empty"
assert df.isnull().sum().sum() == 0, f"Nulls found: {df.isnull().sum()}"
assert df['price'].between(0, 1_000_000).all(), "Price out of expected range"
# For production pipelines: use pandera
import pandera as pa
schema = pa.DataFrameSchema({
"price": pa.Column(float, pa.Check.ge(0)),
"category": pa.Column(str, pa.Check.isin(["A", "B", "C"])),
})
schema.validate(df)Reproducibility
import random
import numpy as np
SEED = 42
random.seed(SEED)
np.random.seed(SEED)
# sklearn: pass random_state=SEED to all estimators- Pin all dependency versions in
requirements.txtorpyproject.toml. - Track experiments: MLflow, or a simple
experiments/log with metadata JSON. - Save models with timestamp + metadata:
model_rf_20260115_v1.pkl.
Model Documentation
Document for every model:
- Training data: source, date range, size, preprocessing steps.
- Feature list and engineering decisions.
- Hyperparameters and tuning approach.
- Evaluation metrics on held-out test set.
- Known limitations and failure modes.
Code Quality
# Extract transforms into sklearn Pipeline
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.ensemble import RandomForestClassifier
pipeline = Pipeline([
('scaler', StandardScaler()),
('classifier', RandomForestClassifier(random_state=SEED)),
])- Write unit tests for data processing functions in
tests/. - Use
pathlib.Path— never hardcode file paths. - Use
loggingnotprintin production code.
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.

