capture-environment
一键生成多语言锁文件,显著提升可复现性。
会读取系统与包版本信息,可能泄露环境细节。
检测分析堆栈并生成 lockfile 与环境报告以支持复现。
把你的分析环境整包打包成可复现的清单:自动识别 R / Stata / Python,生成 renv.lock、requirements.txt / environment.yml、Stata 的 ado 列表,记录随机种子与 RNG 类型,还能选配写出固定版本的 Dockerfile。适合在准备复现包或发布数据与代码(比如提交 openICPSR/AEA)前使用。核心是把谁用什么版本跑出结果的细节都锁定,方便别人重现。
▸ 展开 SKILL.md 英文原文
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.
帮我安装这个 skill:https://raw.githubusercontent.com/pedrohcgs/claude-code-my-workflow/main/.claude/skills/capture-environment/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/pedrohcgs/claude-code-my-workflow/main/.claude/skills/capture-environment/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