---
name: capture-environment
description: Snapshot the computational environment for a replication package — detects the analysis stack (R / Stata / Python) and emits the right lockfiles (renv.lock + sessionInfo.txt, requirements.txt / environment.yml / uv.lock, Stata version + ado package list), records seeds and RNG kind, optionally writes a pinning Dockerfile, and produces a paste-ready "Computational requirements" block. Use when user says "capture the environment", "snapshot my dependencies", "pin the versions", "make a renv.lock / requirements.txt", "make this byte-reproducible", or before releasing a replication package to openICPSR / the AEA Data Editor.
---
<!-- Generated by scripts/sync-agent-skills.py from .claude/skills/capture-environment/SKILL.md. Do not edit: change the source and re-run the script. -->

# capture-environment

This skill's instructions live in [`.claude/skills/capture-environment/SKILL.md`](../../../.claude/skills/capture-environment/SKILL.md).
Read that file now and follow it, with the files it points to. Read [`AGENTS.md`](../../../AGENTS.md)
first if you have not already.

It was written for Claude Code. Running it from Codex, Antigravity or another agent:

- **Arguments.** Where it says `$ARGUMENTS`, use what the user asked for.
- **Claude Code agents.** Where a step hands work to an agent in `.claude/agents/` (through the
  `Agent` or `Task` tool), read that agent's file and do the step yourself after the main work.
  Tell the user the step was not an independent review: the same agent did both.
- **Claude Code settings.** `allowed-tools`, `model`, `effort`, `argument-hint` and
  `disable-model-invocation` in the source's frontmatter configure Claude Code. Ignore them.
- **Guards.** Claude Code's guard hooks do not run for you. Follow the rules in `AGENTS.md`
  yourself; the git pre-commit gate and CI still apply to your commits.
