Skip to content
Automation
Skill

/reproducible-pipelines

This skill covers reproducible research pipelines and replication packages. Use when the user is setting up a research project directory structure, configuring workflow managers (Make, Snakemake, DVC), managing computational environments, preparing replication packages for

From plugin
auto-empirical-research-skills
5k200 skills

Claude Code

$ npx -y skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill reproducible-pipelines --agent claude-code

SKILL.md

reproducible-pipelines.SKILL.md
name: reproducible-pipelines
argument-hint: "<pipeline tool or reproducibility concern>"
description: >-
  This skill covers reproducible research pipelines and replication packages. Use when the user is setting up a research project directory structure, configuring workflow managers (Make, Snakemake, DVC), managing computational environments, preparing replication packages for journal submission, or debugging reproducibility failures. Triggers on "reproducible", "replication package", "Makefile", "Snakemake", "DVC", "pipeline", "workflow manager", "data versioning", "conda environment", "Docker", "seed management", "AEA data editor", "replication", "project structure", or "submission checklist".

Reproducible Pipelines

Reference for building reproducible research pipelines: from project directory structure to automated workflows to journal-ready replication packages. Every computational result should be regenerable from raw data by running a single command.

When to Use This Skill

Use when the user is:

  • Setting up a new empirical research project
  • Building or debugging a Makefile/Snakemake/DVC pipeline
  • Preparing a replication package for journal submission
  • Managing computational environments (conda, Docker, renv)
  • Tracking data provenance or versioning large datasets
  • Debugging "works on my machine" reproducibility failures

Skip when:

  • The task is about estimation methodology (use `causal-inference` or `structural-modeling` skill)
  • The task is git workflow management (see `workflows-work/references/worktree-patterns.md`)
  • The task is about orchestrating Claude agents (see `slfg/references/orchestration-patterns.md`)

Where to Start

  • **New project?** Start with Directory Structure below
  • **Adding a workflow manager?** Jump to [Workflow Managers](#workflow-managers) (Make / Snakemake / DVC)
  • **Preparing for submission?** Jump to [Pre-Submission Checklist](#pre-submission-checklist)

Project Directory Structure

Use a standardized layout from the start. This is the structure expected by most replication reviewers:

project/
โ”œโ”€โ”€ README.md                 # Master documentation (how to replicate)
โ”œโ”€โ”€ Makefile                  # Or Snakefile โ€” single entry point
โ”œโ”€โ”€ environment.yml           # Conda environment (or requirements.txt)
โ”œโ”€โ”€ data/
โ”‚   โ”œโ”€โ”€ raw/                  # Original, immutable data files
โ”‚   โ”‚   โ””โ”€โ”€ README.md         # Data sources, access instructions, citations
โ”‚   โ”œโ”€โ”€ intermediate/         # Cleaned/transformed data (gitignored, regenerable)
โ”‚   โ””โ”€โ”€ final/                # Analysis-ready datasets (gitignored, regenerable)
โ”œโ”€โ”€ code/
โ”‚   โ”œโ”€โ”€ 01_clean.py           # Data cleaning
โ”‚   โ”œโ”€โ”€ 02_build.py           # Variable construction, merges
โ”‚   โ”œโ”€โ”€ 03_estimate.py        # Main estimation
โ”‚   โ”œโ”€โ”€ 04_robustness.py      # Robustness checks
โ”‚   โ””โ”€โ”€ 05_tables_figures.py  # Output generation
โ”œโ”€โ”€ output/
โ”‚   โ”œโ”€โ”€ tables/               # LaTeX/CSV tables (gitignored, regenerable)
โ”‚   โ””โ”€โ”€ figures/              # PDF/PNG figures (gitignored, regenerable)
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ brainstorms/          # Research brainstorming docs
โ”‚   โ”œโ”€โ”€ plans/                # Implementation plans
โ”‚   โ””โ”€โ”€ codebook.md           # Variable definitions
โ”œโ”€โ”€ tests/                    # Validation tests
โ”‚   โ”œโ”€โ”€ test_clean.py
โ”‚   โ””โ”€โ”€ test_estimates.py
โ””โ”€โ”€ paper/
    โ””โ”€โ”€ manuscript.tex        # The paper itself

**Key principles:**

  • `data/raw/` is **immutable** โ€” never modify raw data files
  • Everything in `intermediate/`, `final/`, `output/` is **regenerable** โ€” gitignore it
  • Number scripts to indicate execution order (or rely on the workflow manager)
  • Keep `README.md` as the single entry point for replicators

.gitignore for Research Projects

# Data (too large for git; document in README how to obtain)
data/raw/*.csv
data/raw/*.dta
data/raw/*.parquet
data/intermediate/
data/final/

# Generated output (reproducible from code)
output/tables/
output/figures/

# Environment
.conda/
__pycache__/
*.pyc
.ipynb_checkpoints/

# Large files managed by DVC
*.dvc

# OS
.DS_Store
Thumbs.db

# IDE
.vscode/
.idea/

Workflow Managers

Make (Recommended Default)

Make is universally available, well-understood, and sufficient for most research pipelines. Use it unless you have a specific reason for something else.

# Makefile โ€” Top-level research pipeline

.PHONY: all clean tables figures

# Default target: reproduce everything
all: output/tables/main_results.tex output/figures/event_study.pdf

# === DATA CLEANING ===
data/intermediate/clean.parquet: data/raw/survey_2020.csv code/01_clean.py
	python code/01_clean.py

# === VARIABLE CONSTRUCTION ===
data/final/analysis.parquet: data/intermediate/clean.parquet code/02_build.py
	python code/02_build.py

# === ESTIMATION ===
output/estimates/main.pkl: data/final/analysis.parquet code/03_estimate.py
	python code/03_estimate.py

output/estimates/robustness.pkl: data/final/analysis.parquet code/04_robustness.py
	python code/04_robustness.py

# === TABLES AND FIGURES ===
output/tables/main_results.tex: output/estimates/main.pkl output/estimates/robustness.pkl code/05_tables_figures.py
	python code/05_tables_figures.py --tables

output/figures/event_study.pdf: output/estimates/main.pkl code/05_tables_figures.py
	python code/05_tables_figures.py --figures

# === UTILITIES ===
clean:
	rm -rf data/intermediate/ data/final/ output/

tables: output/tables/main_results.tex
figures: output/figures/event_study.pdf

**Make best practices:**

  • Each target lists its **exact** dependencies (both data and code)
  • Changing any dependency triggers recomputation of downstream targets
  • `make -j4` runs independent targets in parallel (e.g., tables and figures simultaneously)
  • `make -n` dry run shows what would be executed without running anything
  • Use `.PHONY` for targets that don't correspond to files

Snakemake (For Complex Pipelines)

Use Snakemake when the pipeline has many steps, parameter sweeps, or needs

Read more
@brycewang-stanford
Ships withauto-empirical-research-skills

## ๐Ÿ”ฅ ๅŠ›่ ยท StatsPAI โ€” Stata ไธŽ R ็š„ Python ๅนณๆ›ฟ๏ผŒไธบ AI Agent ่€Œ็”Ÿ ๐Ÿ” Stata / R ๅนณๆ›ฟ๏ผšreghdfeใ€csdidใ€rdrobustใ€synthใ€fixestใ€did ็ญ‰ๅธธ็”จๅ‘ฝไปคๅœจ Python ไธญไธ€็ซ™ๅผๆ›ฟไปฃ๏ผŒไธ€ไธช import statspai as sp ๆžๅฎš DID / RD / IV / SCM / DML / matching ๐Ÿค– ้ขๅ‘ Agent ่ฎพ่ฎก๏ผš็ป“ๆž„ๅŒ–็ป“ๆžœๅฏน่ฑก + ๅ†…็ฝฎ MCP Server๏ผŒClaude / Codex

Stars on GitHub

Momentum

stars in total
5.0k
Star history of brycewang-stanford/Auto-Empirical-Research-Skills on GitHub, a chart by star-history.com

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, andโ€ฆ

n8n2w209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also coversโ€ฆ

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, fillingโ€ฆ

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use whenโ€ฆ

@nanocoai@nanocoaiInstall Skill

Questions about reproducible-pipelines.

Which coding agents can use reproducible-pipelines?
reproducible-pipelines installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.