setting-up-reproducible-analysis
Use when starting analysis work that needs isolation, or before executing a pre-registered plan - ensures an isolated, reproducible workspace with pinned environment, fixed seeds, and immutable raw data
npx skills add K-Dense-AI/science-superpowers --skill setting-up-reproducible-analysis --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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. ```bash 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: ```bash 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. **If `GIT_DIR == GIT_COMMON`:** normal checkout. If your human partner hasn't already stated a preference, ask before cr
- Overview
- Step 0: Detect Existing Isolation
- Step 1: Create Isolated Workspace
- Step 2: Pin the Environment
- Step 3: Fix Random Seeds
- Step 4: Data Provenance & Immutability
- Step 5: Verify a Clean Baseline
- Report
- Quick Reference
- Red Flags
git rev-parse --show-superproject-working-tree 2>/dev/null Prefer an existing .worktrees/ (must be git-ignored), else default to it git check-ignore -q .worktrees 2>/dev/null || echo ".worktrees/" >> .gitignore git worktree add ".worktrees/$BRANCH_NAME" -b "$BRANCH_NAME" cd ".worktrees/$BRANCH_NAME" Python if [ -f environment.yml ]; then conda env create -f environment.yml || conda env update -f environment.yml; fi if [ -f requirements.txt ]; then python -m venv .venv && . .venv/bin/activate && pip install -r requirements.txt; fi if [ -f pyproject.toml ]; then python -m venv .venv && . .venv/bin/activate && pip install -e .; fi R
What does the setting-up-reproducible-analysis skill do?
Use when starting analysis work that needs isolation, or before executing a pre-registered plan - ensures an isolated, reproducible workspace with pinned environment, fixed seeds, and immutable raw data
How do I install it?
Run `npx skills add K-Dense-AI/science-superpowers --skill setting-up-reproducible-analysis --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From K-Dense-AI/science-superpowers, a repository with 280 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
