New advertisers: 50% off your first month with code FIRSTMONTHSee slots
k-dense-ai avatar

Setting Up Reproducible Analysis

Reproducible analysis workspace setup that pins the environment, fixes seeds, and keeps raw data immutable.

GitHub stars
202
last updated
Jun 1, 2026
View on GitHub

What it does

  • Covers the full setup flow: worktree isolation, environment pinning, seed fixing, data provenance, and baseline verification
  • Includes step-by-step bash and Python snippets for detecting git worktrees, restoring conda, venv, or renv environments, and checksumming raw data
  • Enforces read-only raw data under data/raw/, with every transform written as a new artifact under data/derived/
  • Designed for analysts and researchers who need results that another person or their future self can reproduce

Install

$ npx -y skills add k-dense-ai/science-superpowers --skill setting-up-reproducible-analysis -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Setting Up a Reproducible Analysis

Overview

Ensure the analysis happens in an isolated workspace that another person (or future you) can reproduce exactly: same code, same environment, same seed, same immutable input data.

Core principle: A result you cannot reproduce is not a result. Set up reproducibility before you run anything.

Announce at start: "I'm using the setting-up-reproducible-analysis skill to set up an isolated, reproducible workspace."

Step 0: Detect Existing Isolation

Before creating anything, check whether you're already in an isolated workspace.

GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
BRANCH=$(git branch --show-current)

Submodule guard: GIT_DIR != GIT_COMMON is also true in submodules. Verify you're not in one:

git rev-parse --show-superproject-working-tree 2>/dev/null

If GIT_DIR != GIT_COMMON (and not a submodule): already in a linked worktree. Skip to Step 2 (Environment). Don't create another.

Details

Repository
github.com/k-dense-ai/science-superpowers
First seen
Jun 11, 2026

More from k-dense-ai/science-superpowers

All 15

Similar to Setting Up Reproducible Analysis