{"id":"30dfd924-0d52-4796-8c13-b3e2c7068e90","slug":"preregister","kind":"skill","name":"preregister","summary":"Claude Code skill: interrogate the researcher and freeze a preregistration before an experiment, shown inside an example research repo","owner":"reinthal","repoUrl":"https://github.com/reinthal/preregister","license":"MIT","licenseTier":"permissive","trust":"community","stars":3,"match":null,"fewStars":true,"format":"skill","createdAt":"2026-10-12T13:16:23.000Z","addedAt":"2026-10-22T00:01:56.037Z","logoUrl":"https://avatars.githubusercontent.com/u/10757567?u=aa39a6f448387ef466deb809004db423cc1c8843&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["developer-tools"],"tags":[],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-26T00:21:15.893Z","sample":false,"url":"https://conduits.dev/tools/preregister","language":"Python","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# preregister\n\n-- Preregistering your hypothesis --\n\nThis skill aims to solve two problems:\n\n**Problem 1: Tacit Knowledge**: Researchers and engineers have a lot of tacit knowledge that is not available to your agent. This makes them make mistakes.\n\n**Problem 2: Insufficient thinking:** When coding up experiments has become this cheap we need to think harder about what experiments are worth our time.\n\nThis skill de-risks the above problems by having the agent **interrogate the you and freeze a preregistration before a new\nexperiment**, then hold the analysis and the report to what was written.\n\nFlow: **preregister → hypothesis → test → analyze → report with conclusion**.\n\nThe agent asks in rounds (question and stakes, hypothesis, test design,\nanalysis plan, de-risking, pre-agreed conclusions), records the researcher's\nanswers verbatim, writes `experiments/<date>/PREREGISTRATION.md` from the\nform in `experiments/_template/`, and refuses to start a non-pilot run until\nit is committed. After the run it runs the preregistered analysis first,\nappends changes under \"Deviations\" instead of editing frozen sections, and\nreports prediction and outcome side by side using the pre-agreed conclusion\nsentence.\n\n## Also here: `gpu-lock`\n\n`.claude/skills/gpu-lock/` holds GPUs on a shared multi-user machine with\nvisible locks: `/tmp/gpu-locks/` records which GPUs an experiment holds,\nwhich process, and a symlink to its log. `gpu_lock.py run` starts the job\nwith `CUDA_VISIBLE_DEVICES` set and, when it ends, kills leftovers, verifies\nwith `nvidia-smi` that the GPU memory is freed, writes a `[gpu-lock] DONE`\nline (exit code, memory check) to the log and removes the locks; `status`\nshows every GPU, its lock owner and whether that process is alive. Stdlib\nonly — see its `SKILL.md`.\n\n## Repo layout (the illustration)\n\n```\n.claude/skills/preregister/SKILL.md      the skill\n.claude/skills/gpu-lock/                 GPU locks + automatic cleanup on shared machines\nAGENTS.md  (CLAUDE.md -> AGENTS.md)      agent instructions wiring the skill into the workflow\nexperiments/_template/                   skeleton: PREREGISTRATION.md form, config.json, run.py, README\nexperiments/2026-10-12-example/          a filled-in preregistration (toy experiment) + matching config\nresearch-log/log.md, template.md         the log the skill quotes predictions into\nprimitives/config.py                     ExperimentConfig: config.json in, cfg.save() on run start\npyproject.toml, uv.lock                  the uv project the scripts run under\n```\n\nRead `AGENTS.md`, then `experiments/_template/README.md`, then the example\nfolder. `research-log/log.md` shows how a preregistered experiment is logged:\n*Expected Outcome* quotes the prediction, *Actual Outcome* is the\nresearcher's.\n\n## Install the skill in your own repo\n\nWith the [`skills`](https://github.com/vercel-labs/skills) CLI:\n\n```sh\nnpx skills add reinthal/preregister                      # preregister\nnpx skills add reinthal/preregister --skill gpu-lock      # gpu-lock\n```\n\nOr copy by hand:\n\n```sh\ngit clone https://github.com/reinthal/preregister\nmkdir -p .claude/skills experiments/_template research-log\ncp -r preregister/.claude/skills/preregister .claude/skills/\ncp -r preregister/.claude/skills/gpu-lock .claude/skills/        # optional\ncp preregister/experiments/_template/PREREGISTRATION.md experiments/_template/\ncp preregister/research-log/template.md research-log/\n```\n\nThen add the \"Preregister before running\" convention from `AGENTS.md` to your\nown agent instructions, and `/preregister` in Claude Code (it also triggers\nwhen you propose an experiment, ask to scaffold a run, or try to launch a\nnon-pilot run with no `PREREGISTRATION.md`).\n\n## Try it here\n\n```sh\nuv sync\nuv run python experiments/_template/run.py --stage pilot\nuv run python experiments/2026-10-12-example/run.py --stage run\n```\n\n## Adapting\n\nThe skill assumes experiments live in `experiments/<date>/` with a\n`config.json` holding every hyperparameter, and a research log with\nExpected/Actual Outcome fields owned by the researcher. Edit the paths in\n`SKILL.md` if your project differs. The pre-mortem list in section 5 is a\nprompt, not a checklist: replace the examples with your own project's past\nfailures.\n\n## Origin\n\nExtracted from `reinthal/downstream-environment` (deception-probe research).\n"}