Replication package

From pedrohcgs/claude-code-my-workflow · View interactive version

Replication package is an AI agent skill from the GitHub repository pedrohcgs/claude-code-my-workflow. Assemble a submission-ready replication package to the AEA Data and Code Availability Standard (DCAS) / openICPSR / Social Science Reproduction Platform expectations — standard replication README, dataset manifest, computational-requirements capture, a Table/Figure → script:line map, and a confident

How to use this skill

Skill file

Replication Package

Produce the deposit an economist hands a journal at acceptance: a directory tree (data/, code/, output/, README) plus a DCAS compliance checklist, built to the AEA Data and Code Availability Standard, openICPSR deposit expectations, and the Social Science Reproduction Platform reproduction protocol. This skill moves the repo from auditing reproducibility to producing the deposit — /audit-reproducibility proves the numbers; this skill packages everything a third party needs to regenerate them from scratch.

Core principle: the package is reproducible by a stranger with the data and the README — no tacit knowledge, no "ask the author" steps. Every table and figure maps to the exact script and line that produces it.

When to use

Inputs

Workflow

Phase 0: Pre-flight — detect language(s) and outputs

  1. Detect the analysis language(s) by scanning for scripts/R/*.R (+ renv.lock / DESCRIPTION), scripts/stata/*.do, scripts/python/*.py (+ requirements.txt / environment.yml / pyproject.toml). A project may be polyglot — record all detected languages.
  2. Locate the outputs directory ($1) and the one-command entry point (00_run_all.R, 99_run_all.do, run.py, Makefile). If none exists, flag it — DCAS requires a single master script.
  3. If quality_reports/passports/<paper-slug>.yaml exists, load it; its claims: entries are the authoritative Table/Figure → source_file:source_line map for Phase 1.

Phase 1: Generate the standard replication README

Write replication_package/README.md (the AEA template, fields below). Leave a [FILL] marker on any field you cannot infer — never fabricate a data source or license.

Phase 2: Capture the computational environment

Generate the dependency lockfile(s) and an environment snapshot for each detected language. Prefer CODE0 if available; otherwise produce them directly:

Phase 3: Confirm claims reproduce before packaging

Run CODE0 $0 $1 (passport-aware if the YAML exists).

Phase 4: Assemble the tree + DCAS checklist

Create the deposit skeleton (copy/symlink real files where they exist; leave [FILL] placeholders otherwise):

replication_package/
├── README.md                # Phase 1
├── data/
│   ├── raw/                 # as-obtained (or a pointer + DUA note if restricted)
│   └── analysis/            # constructed analysis files
├── code/                    # numbered scripts + master script (00_run_all.* / 99_run_all.do)
└── output/                  # tables/, figures/, logs/, sessionInfo.txt (R) / sessionInfo_stata.txt (Stata), renv.lock / requirements.txt

Then emit the DCAS compliance checklist (replication_package/DCAS_checklist.md): Data Availability Statement present · every dataset has source + access + license · master script present and one-command · computational requirements stated · every Table/Figure mapped to program:line · no absolute/machine-specific paths in code · seeds set for any stochastic step · license file (a code license such as BSD/MIT + a data-usage statement). Mark each PASS / FAIL / [FILL].

Phase 5: Confidential-data handling

Per CODE0, scan the manifest for restricted, proprietary, or PII-bearing inputs (administrative records, IRS/Census RDC, proprietary panels, linked health data).

Output / Report format

Write quality_reports/replication_package_[paper-slug].md:

# Replication Package: [Paper Title]
**Date:** [YYYY-MM-DD]  **Languages:** [R / Stata / Python]  **Deposit target:** [openICPSR / Zenodo / Dataverse]

## DCAS checklist
| Item | Status |
|---|---|
| Data Availability Statement | PASS / FAIL / [FILL] |
| Dataset manifest (source · access · license) | ... |
| One-command master script | ... |
| Computational requirements | ... |
| Table/Figure → program:line map | ... |
| No machine-specific paths · seeds set | ... |
| Reproducibility audit (Phase 3) | PASS / EXPLAINED-only / FAIL (blocker) |
| Confidential-data note (if applicable) | ... |

## Skeleton built at
replication_package/  (tree + README + checklist)

## Open [FILL] items
[one line per unresolved field]

Exit behavior

Cross-references

What this skill does NOT do

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.