capture-environment

仓库创建 2026年2月7日最近提交 1 个月前SkillHot 收录 20 天前
▸ 精选理由

一键生成多语言锁文件,显著提升可复现性。

▸ 风险提示

会读取系统与包版本信息,可能泄露环境细节。

这个 Skill 做什么

检测分析堆栈并生成 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.

研究检索环境快照依赖锁定可复现通用
1.4k
Stars
2.8k
Forks
40
仓库内 Skill
+59
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/pedrohcgs/claude-code-my-workflow/main/.claude/skills/capture-environment/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/pedrohcgs/claude-code-my-workflow/main/.claude/skills/capture-environment/SKILL.md"
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
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有