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".
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
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
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.
Use DVC when you need to version large data files that don't fit in git.
# Initialize DVC in an existing git repo
dvc init
# Track a large data file
dvc add data/raw/survey_2020.csv
# Creates data/raw/survey_2020.csv.dvc (small metadata file, tracked by git)# The actual data is in .dvc/cache# Configure remote storage
dvc remote add -d myremote s3://my-bucket/dvc-cache
# Push data to remote
dvc push
# Collaborator pulls data
dvc pull
Enhanced DVC: remote storage and experiment tracking:
# Remote storage options
dvc remote add -d s3remote s3://my-bucket/dvc-cache # AWS S3
dvc remote add -d gcsremote gs://my-bucket/dvc-cache # Google Cloud
dvc remote add -d sshremote ssh://server.edu/path/cache # SSH server (common for university HPC)
dvc remote add -d localremote /data/shared/dvc-cache # Shared NFS mount# Visualize pipeline DAG
dvc dag # ASCII DAG in terminal
dvc dag --dot | dot -Tpdf > pipeline.pdf # PDF visualization# Parameter tracking and comparison# params.yaml — centralize all tunable parameters# DVC auto-tracks params files listed in dvc.yaml
dvc params diff HEAD~1 # Compare current params to last commit
dvc params diff main feature-branch # Compare across branches# Metrics: track experiment outcomes# In dvc.yaml: add metrics: [output/metrics.json] to a stage
dvc metrics show # Show all tracked metrics
dvc metrics diff HEAD~3 # Compare metrics across commits# Partial pipeline execution
dvc repro estimate # Run only the 'estimate' stage and its deps
dvc repro --force # Re-run even if inputs haven't changed# Pull only what you need (for large datasets)
dvc pull data/final/analysis.parquet.dvc # Pull only one file
dvc fetch --run-cache # Prefetch cached stage outputs
DVC best practices for research:
Commit dvc.lock to git — it records the exact state of all outputs
Use params.yaml for all tunable parameters (seeds, model specs, sample cutoffs); DVC tracks changes automatically
On HPC clusters: configure SSH remote pointing at shared storage so collaborators don't re-run expensive stages
dvc metrics is useful for tracking bias/RMSE across Monte Carlo runs; commit metrics.json to see history
Which Workflow Manager to Use
Factor
Make
Snakemake
DVC
pytask
Complexity
Simple pipelines (< 20 targets)
Complex pipelines, parameter sweeps
Data-heavy pipelines
Mixed-language projects
Learning curve
Low (most researchers know it)
Medium (Python-like syntax)
Medium (git-like commands)
Medium (Python decorators)
Cluster support
Manual (submit scripts)
Built-in (SLURM, SGE)
Via CML
Via plugins
Data versioning
No
No
Yes (core feature)
No
Availability
Everywhere
pip install
pip install
pip install
Reviewer familiarity
Very high
Medium
Lower
Lower
pytask (Python-Native DAG)
pytask — Python-native DAG manager using decorated functions with type-annotated dependencies. First-class plugins for Stata, R, Julia. pixi run pytask rebuilds the entire project. Good for mixed-language economics projects.
Recommendation: Start with Make. Switch to Snakemake if you need cluster execution or parameter sweeps. Add DVC if data files are too large for git. Consider pytask if your team prefers Python-native tooling and works across multiple languages.
Additional References
references/stata-and-crosslang.md — Stata master.do patterns, batch mode, ado versioning, Stata anti-patterns; cross-language tolerance thresholds (R/Stata/Python) and systematic discrepancy trap table
references/environment-and-seeds.md — conda/renv/Docker environment management, random seed management by language, results caching strategies