Capture Environment
Snapshots R/Python/Stata replication environments into lockfiles, seeds, and a paste-ready requirements block.
Test report
- Verdict
- Works with setup
- Score
- Tested
- Jul 20, 2026
- Environment
- Claude Code 2.x (agent harness)
- Upstream re-checked
- Aug 10, 2026 · a12e32f
Fetched the repo tree via authenticated gh API (anon curl was rate-limited) and read the full raw SKILL.md. Clean prompt-only skill — no install scripts, no base64/curl|sh/exfiltration (only a benign libcurl4-openssl-dev apt mention). Verified every referenced file exists: .claude/rules/{replication-protocol,r-code-conventions,stata-code-conventions,simulation-conventions,confidential-data}.md and sibling skills audit-reproducibility/data-analysis/stata-replication/simulation-study. Output NOT measured (not a measured loss): differentiated value needs R/renv/Stata/conda/docker runtimes plus a real replication-package layout I can't stage without inventing numbers. Trigger set: SHOULD — "capture the environment for my replication package", "make a renv.lock and pin my deps before openICPSR", "snapshot my R and Python versions so this is reproducible"; SHOULD NOT — "audit my paper's numbers against the output tables" (that's audit-reproducibility), "set up a new conda env and install pandas" (creating, not snapshotting). Docs are honest with an explicit "What this skill does NOT do" section.
Scored on four weighted criteria — install, triggering, output vs. baseline, docs. How scoring works
- Installs cleanly 4/5
- Triggers reliably 5/5
- Output vs. baseline 5/10
- Docs & honesty 5/5
What Capture Environment does
Detects a research project's analysis stack (R, Python, or Stata) and emits the matching dependency artifacts — renv.lock + sessionInfo.txt, requirements.txt/environment.yml/uv.lock, or a Stata version + ado inventory — plus records seeds/RNG kind, an optional pinning Dockerfile, and a "Computational requirements" block. Triggers on "capture the environment", "pin the versions", "make a renv.lock/requirements.txt", or before releasing a replication package to openICPSR / the AEA Data Editor.
How to install Capture Environment
Copy the whole `.claude/` tree (skill + `.claude/rules/*.md` it cross-references) into your repo, or `.claude/skills/capture-environment/` alone if you accept the broken rule links. Requires the relevant toolchain installed to actually run: R+renv, Python+pip/uv/conda, and/or Stata; optionally Docker for --docker.
Skills live in ~/.claude/skills/ (global) or .claude/skills/
(per-project). Restart Claude Code after installing.
Commands — how to trigger Capture Environment
-
/capture-environmentSnapshots R/Python/Stata replication environments into lockfiles, seeds, and a paste-ready requirements block.
It also activates on plain-language prompts like these:
-
Capture the environment for my replication package -
Pin the versions used in this analysis -
Make this Python analysis fully byte-reproducible
Frequently asked questions
- Is the Capture Environment skill free?
- Yes. The skill itself is free from pedrohcgs/claude-code-my-workflow. SkillProof publishes the install command and an independent test verdict at no cost.
- Does Capture Environment work with Claude Code?
- We tested it with Claude Code 2.x (agent harness) on Jul 20, 2026. Verdict: Works with setup. Fetched the repo tree via authenticated gh API (anon curl was rate-limited) and read the full raw SKILL.md. Clean prompt-only skill — no install scripts, no base64/curl|sh/exfiltration (only a benign libcurl4-openssl-dev apt mention). Verified every referenced file exists: .claude/rules/{replication-protocol,r-code-conventions,stata-code-conventions,simulation-conventions,confidential-data}.md and sibling skills audit-reproducibility/data-analysis/stata-replication/simulation-study. Output NOT measured (not a measured loss): differentiated value needs R/renv/Stata/conda/docker runtimes plus a real replication-package layout I can't stage without inventing numbers. Trigger set: SHOULD — "capture the environment for my replication package", "make a renv.lock and pin my deps before openICPSR", "snapshot my R and Python versions so this is reproducible"; SHOULD NOT — "audit my paper's numbers against the output tables" (that's audit-reproducibility), "set up a new conda env and install pandas" (creating, not snapshotting). Docs are honest with an explicit "What this skill does NOT do" section.
- What is the Capture Environment SkillProof Score?
- 7.6/10 — installs cleanly 4/5, triggers reliably 5/5, output vs. baseline 5/10, docs & honesty 5/5.
- How do I install Capture Environment?
- Copy the install command from this page, run it in your terminal, and restart Claude Code. Skills live in ~/.claude/skills/ (global) or .claude/skills/ inside a project.
- Can I use Capture Environment with Cursor, Copilot, Gemini CLI, Codex or other AI tools?
- The SKILL.md format is native to Claude (Claude Code, Desktop, claude.ai). The instructions inside adapt to other assistants: Cursor rules, GitHub Copilot instructions, Windsurf rules, Custom GPTs, AGENTS.md for OpenAI Codex, and GEMINI.md for Google Gemini CLI — our conversion guides cover each, and the free converter on the tools page does the wrapping for you.