
Code Science
Scientific programming best practices including reproducible research, computational...
Install
npx skills add beita6969/ScienceClaw --skill code-science -g -a claude-code -y- Repository
- beita6969/ScienceClaw1k
- Category
- Data and ML
- Updated
- 5d ago
- License
- MIT
- Context cost
- Lightabout 1,261 tokens
- Runs scripts
- No, instructions only
What it does
Scientific programming best practices including reproducible research, computational notebooks, version control for research, data management, HPC/parallel computing, and research software engineering. Use when user needs help with research code organization, reproducibility, scientific Python/R workflows, or computational infrastructure. Triggers on "reproducible research", "research code", "scientific computing", "HPC", "parallel computing", "Jupyter", "notebook", "data management plan", "research software", "code review for science".
Scientific Programming
Best practices for research software and reproducible computation.
Project Structure
project/
├── README.md # Project overview, how to reproduce
├── LICENSE # MIT, Apache 2.0, or GPL
├── requirements.txt # or environment.yml (conda)
├── setup.py / pyproject.toml
├── data/
│ ├── raw/ # Never modify raw data
│ ├── processed/ # Cleaned/transformed data
│ └── external/ # Third-party data
├── src/ or scripts/
│ ├── data_processing.py
│ ├── analysis.py
│ ├── models.py
│ └── visualization.py
├── notebooks/ # Exploratory analysis
│ ├── 01_eda.ipynb
│ ├── 02_modeling.ipynb
│ └── 03_figures.ipynb
├── results/
│ ├── figures/
│ └── tables/
├── tests/
└── docs/
Reproducibility Checklist
-
Environment: Pin all dependencies with versions
pip freeze > requirements.txt # or conda conda env export > environment.yml -
Random seeds: Set and document all random seeds
import numpy as np import random SEED = 42 np.random.seed(SEED) random.seed(SEED) # torch.manual_seed(SEED) # tf.random.set_seed(SEED) -
Data versioning: Use DVC or git-lfs for large data
dvc init dvc add data/raw/dataset.csv git add data/raw/dataset.csv.dvc -
Configuration: Separate config from code
# config.yaml # experiment: # learning_rate: 0.001 # batch_size: 32 # epochs: 100 import yaml with open('config.yaml') as f: config = yaml.safe_load(f) -
Logging: Record all experiments
import logging logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s: %(message)s', filename='experiment.log')
Parallel Computing
# Multiprocessing (CPU-bound)
from multiprocessing import Pool
import numpy as np
