capture-environment

Installation
SKILL.md

/capture-environment — snapshot the computational environment

A replication package that runs on the author's laptop in 2026 and nowhere else in 2029 is not reproducible. This skill captures the exact computational environment — language versions, package versions, seeds, RNG kind, and (optionally) the OS layer — so a referee, the AEA Data Editor, or future-you can reconstruct it. It detects which stack the project uses and emits the artifacts that stack's ecosystem expects, then verifies the lockfile installs clean.

Core principle: Pin everything a result depends on. Display rounding aside, a re-run on a pinned environment should reproduce the paper to the replication-protocol.md tolerances — byte-identical when the optional Dockerfile is used.

When to use

  • Before releasing a replication package to openICPSR, Zenodo, Dataverse, or a journal archive — the AEA Data Editor / DCAS standard expects a documented, version-pinned environment.
  • Before submission, alongside /audit-reproducibility — that skill checks the numbers; this one captures the environment those numbers were produced in (its sessionInfo.txt requirement is satisfied by this skill).
  • After adding or upgrading a package mid-project — re-snapshot so the lockfile doesn't drift from what the code actually loads.
  • When handing a project to a co-author or RA who needs to reconstruct your stack.

Inputs

  • $0 — project directory. Defaults to the repo root. The skill looks under scripts/R/, scripts/stata/, scripts/python/.
  • --docker — also emit a Dockerfile pinning OS + language version + system libraries for byte-identical reproduction.
  • --no-verify — skip Phase 3 (the best-effort clean-install check). Useful in CI or when the toolchain isn't installed locally.
Installs
16
GitHub Stars
1.6K
First Seen
Jun 14, 2026
capture-environment — pedrohcgs/claude-code-my-workflow