Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
beita6969 avatar

Code Science

  • 16 installs
  • 869 repo stars
  • Updated June 8, 2026
  • beita6969/scienceclaw

code-science is a Claude skill that provides scientific programming best practices for reproducible research, notebooks, data management, and HPC/parallel computing.

About

This skill provides scientific programming best practices for reproducible research and computational infrastructure. A developer uses it to organize research code, pin environments, version data, run parallel or HPC workloads, and test scientific code against known solutions. It covers project structure, FAIR data principles, and performance profiling.

  • Best practices for reproducible research code and computational notebooks
  • Covers project structure, dependency pinning, seeds, data versioning, and HPC/parallel computing
  • Includes a reproducibility checklist and file-format guidance for scientific data

Code Science by the numbers

  • 16 all-time installs (skills.sh)
  • Ranked #1,318 of 2,065 Data Science & ML skills by installs in the Skillselion catalog
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
At a glance

code-science capabilities & compatibility

Free; guidance-only, uses open-source scientific Python/R tooling

Capabilities
code execution · data analysis
Works with
github
Use cases
research · documentation · testing
Pricing
Free
From the docs

What code-science says it does

Best practices for research software and reproducible computation.
SKILL.md
Raw data is sacred — never modify it, only create processed copies
SKILL.md
Data versioning**: Use DVC or git-lfs for large data
SKILL.md
npx skills add https://github.com/beita6969/scienceclaw --skill code-science

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs16
repo stars869
Last updatedJune 8, 2026
Repositorybeita6969/scienceclaw

What it does

Structure and harden research code for reproducibility, parallel computing, and FAIR data management.

Who is it for?

Organizing research code, ensuring reproducibility, and setting up parallel/HPC computation

Skip if: Running a specific analysis or querying a dataset

When should I use this skill?

You need to structure research code, pin an environment, version data, or parallelize computation

What you get

Established reproducible project structure, pinned dependencies, and a tested scientific pipeline

  • reproducible project structure
  • pinned environment files
  • parallelized pipelines

By the numbers

  • 5-item reproducibility checklist
  • 6-format scientific file-format table
  • 4 FAIR principles

Files

SKILL.mdMarkdownGitHub ↗

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

1. Environment: Pin all dependencies with versions

   pip freeze > requirements.txt
   # or conda
   conda env export > environment.yml

2. 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)

3. 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

4. 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)

5. 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

def process_chunk(data):
    return heavy_computation(data)

with Pool(processes=8) as pool:
    results = pool.map(process_chunk, data_chunks)

# Concurrent futures (simpler API)
from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor

with ProcessPoolExecutor(max_workers=8) as executor:
    results = list(executor.map(process_func, items))

# For I/O-bound tasks (API calls, file reading)
with ThreadPoolExecutor(max_workers=20) as executor:
    results = list(executor.map(fetch_data, urls))

Performance Optimization

# Profiling
import cProfile
cProfile.run('my_function()', sort='cumulative')

# Line profiling
# pip install line_profiler
# @profile decorator, then: kernprof -l -v script.py

# NumPy vectorization (avoid loops)
# Bad:
result = [x**2 + 2*x + 1 for x in data]
# Good:
result = data**2 + 2*data + 1

# Memory profiling
# pip install memory_profiler
# @profile decorator, then: python -m memory_profiler script.py

Data Management

FAIR Principles

  • Findable: Persistent identifiers (DOI), rich metadata
  • Accessible: Open protocols, authentication when needed
  • Interoperable: Standard formats (CSV, JSON, HDF5, NetCDF)
  • Reusable: Clear license, provenance, community standards

File Formats for Science

FormatBest ForSizeSpeed
CSVSmall tabular, universalLargeSlow
ParquetLarge tabular, columnarSmallFast
HDF5Multidimensional arraysSmallFast
NetCDFClimate/geospatialSmallFast
FITSAstronomyMediumFast
FeatherDataFrame interchangeSmallVery fast
# Parquet (recommended for large datasets)
df.to_parquet('data.parquet', compression='snappy')
df = pd.read_parquet('data.parquet')

# HDF5 (for arrays)
import h5py
with h5py.File('data.h5', 'w') as f:
    f.create_dataset('experiment1', data=array)

Testing Scientific Code

import numpy as np
import pytest

def test_conservation_law():
    """Physical quantities should be conserved"""
    initial_energy = compute_energy(initial_state)
    final_energy = compute_energy(simulate(initial_state))
    np.testing.assert_allclose(initial_energy, final_energy, rtol=1e-6)

def test_known_solution():
    """Compare against analytical solution"""
    numerical = solve_numerically(params)
    analytical = analytical_solution(params)
    np.testing.assert_allclose(numerical, analytical, atol=1e-4)

def test_symmetry():
    """Result should be symmetric under transformation"""
    result1 = compute(data)
    result2 = compute(transform(data))
    np.testing.assert_array_equal(result1, result2)

Tips

  • Raw data is sacred — never modify it, only create processed copies
  • Use version control (git) from day one
  • Write README before writing code
  • Automate the full pipeline (Makefile or Snakemake)
  • Document assumptions and decisions in code comments
  • Use type hints for clarity in scientific code
  • Publish code alongside papers (GitHub + Zenodo for DOI)

Related skills

FAQ

What does the reproducibility checklist cover?

Pinning environments, setting random seeds, data versioning with DVC or git-lfs, separating config from code, and logging experiments.

What file formats does it recommend for science?

Parquet for large tabular data, HDF5 for arrays, NetCDF for climate/geospatial, FITS for astronomy, and Feather for DataFrame interchange.

Data Science & MLpipelinesanalytics

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.