capture-environment

Detect R, Stata, or Python stacks and generate lockfiles for reproducibility.

Updated Jun 27, 2026
One-click install
npx skills add https://github.com/fredmilhome/laffer_tobacco --skill capture-environment-fredmilhome
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: capture-environment
Source: https://github.com/fredmilhome/laffer_tobacco/tree/main/.claude/skills/capture-environment
Command: npx skills add https://github.com/fredmilhome/laffer_tobacco --skill capture-environment-fredmilhome

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires renv, pip, conda, stata, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the capture of the computational environment for research projects, ensuring reproducibility and ease of replication.

Core Features & Use Cases

  • Environment Detection: Automatically detects the computational stack (R, Stata, Python) used in a project.
  • Lockfile Generation: Generates the necessary lockfiles (renv.lock, requirements.txt, environment.yml, uv.lock) for reproducible environments.
  • Seed and RNG Recording: Records seeds and RNG kind for random results reproducibility.
  • Dockerfile Creation: Optionally creates a Dockerfile for byte-reproducible environments.
  • Use Case: Before releasing a replication package, use this Skill to capture the environment used for the analysis, ensuring that others can replicate the results.

Quick Start

Run the 'capture-environment' skill with the project directory as an argument to snapshot your computational environment.

Frequently Asked Questions about capture-environment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I capture my computational environment for reproducible research?

To capture your computational environment for reproducible research, this Skill automatically detects your R, Stata, or Python stack and generates lockfiles like renv.lock, requirements.txt, and environment.yml to snapshot software and package versions.

What is the best way to generate a Dockerfile and lockfiles for a replication package?

The best way to generate a Dockerfile and lockfiles for a replication package is using automated environment snapshotting, which records package versions, seeds, and RNG kind to ensure byte-reproducible computational environments.

Does environment snapshotting work with R, Python, and Stata projects?

Yes, environment snapshotting works with R, Python, and Stata projects by detecting the associated computational stack and tools, then generating the appropriate lockfiles such as renv.lock or uv.lock for each detected language.

How do I record seeds and RNG kind for random results reproducibility?

You record seeds and RNG kind for random results reproducibility by running an environment capture process that automatically logs these random number generation parameters alongside your package versions in the project snapshot.

When do I need to create lockfiles for computational environments?

You need to create lockfiles for computational environments before releasing a replication package, ensuring that others can replicate your analysis results by restoring the exact software versions and configurations used during your research.

What are the limitations of automated environment detection for reproducibility?

A limitation of automated environment detection is that it requires finding R, Stata, or Python stacks and associated tools within the project directory, meaning projects using unsupported languages or tools may not be fully captured for reproducibility.