Enforces pre-registration discipline with an Iron Law requiring a frozen analysis plan before any data analysis. Runs a PLAN/COLLECT/CONFIRM/EXPLORE workflow, flags HARKing, optional stopping, post-hoc covariates, outlier-dropping, and test-shopping, and forces unplanned findings to be labeled exploratory.
Ships in alterlab-methodology. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Skill type: DISCIPLINE-ENFORCING. This is not a how-to and not a reference. It exists to stop one specific failure mode — exploiting researcher degrees of freedom after seeing the data, then reporting the result as if it were planned. It governs when you are allowed to claim a confirmatory result; it does not teach you how to pick a test or fill an OSF form. Those are sibling skills (see the routing table).
THE IRON LAW
NO DATA ANALYSIS WITHOUT A PRE-REGISTERED ANALYSIS PLAN FIRST.
The frozen hypothesis + analysis plan is the research analog of a failing test written before the implementation: you commit to what would count as a result before you can see whether you got one. Run an unplanned analysis and the rule is absolute — it is exploratory. Label it, timestamp it, and you cannot report its p-value as confirmatory. (Per the Center for Open Science confirmatory/exploratory model: in exploratory work, p-values lose their diagnostic value and findings require independent replication. Verified at https://www.cos.io/initiatives/prereg.)
Violating the letter of the pre-registration is violating the spirit of the science.
That line pre-empts the predictable defense — "pre-registration is bureaucratic, I'm following the scientific spirit." There is no spirit-following exception. Iterate freely in the EXPLORE phase; the confirmatory claim needs the frozen plan.
Use it the moment a confirmatory claim is on the table without a frozen plan behind it, or the moment the plan is being bent after data are visible:
alterlab-open-science; this skill enforces that the plan is actually frozen and
honored).This skill is the gatekeeper, not the toolbox. It orchestrates siblings and routes everything mechanical away. Route adjacent requests as follows:
| The request is really about… | Route to | Not this skill because… |
|---|---|---|
| Registration mechanics: OSF Registries / AsPredicted templates / PROSPERO, DMPs, FAIR data, repository choice, registered reports | alterlab-open-science | That skill owns the how to register; this one only enforces freeze and honor it. |
| Which test to run, assumption checks (Shapiro/Levene), power/sample-size, APA results | alterlab-statistical-analysis | Test selection and execution is statistics, not pre-registration discipline. |
| Grading evidence quality (GRADE, RoB), spotting biases/confounders, design validity | alterlab-scientific-thinking | Judging an existing body of evidence ≠ committing to a plan before data. |
| Whether a citation exists / supports a claim | alterlab-citation-verifier | Citation integrity, not analysis-plan integrity. |
| Reporting completeness of an analysis already run (effect sizes, CIs, every test disclosed) | alterlab-results-transparency | That is the reporting gate downstream of CONFIRM/EXPLORE. |
| Choosing among candidate tests for a borderline distribution before any peeking | alterlab-test-selection-guard | Locking the test choice is its own guard; this skill assumes the test is already in the frozen plan. |
| Writing a TÜBİTAK / grant proposal's methods section | alterlab-tubitak-proposal / alterlab-research-grants | Proposal authoring, not pre-registration enforcement (alterlab-grant-reporting is post-award reporting). |
| Research ethics approval / KVKK / data-management compliance | alterlab-tr-research-ethics / alterlab-kvkk-dmp | Ethics & data governance, distinct from analysis-plan freezing. |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-open-science) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
In scope here means a request to freeze or check a plan before data, or to judge an analysis run without a plan, a peek, or a change made after results; a plan the user only mentions ("my settled plan", "for my pre-registered plan") is context, so a hand-off adds none of this skill's checks — no freeze checklist, decision-rule template or confirmatory/exploratory verdict.
REQUIRED BACKGROUND (this skill orchestrates, it does not reimplement):
alterlab-open-science for the registration artifact, alterlab-statistical-analysis
for test choice + assumptions, alterlab-scientific-thinking for bias framing. When a
step needs any of those, hand off — do not restate their content here.
This is the research analog of red → green → refactor. Each phase has an exit gate; you may not enter the next phase until the current gate passes.
Write down, and lock, all of:
alterlab-statistical-analysis; record the decision here).Register the artifact via alterlab-open-science (OSF Registries / AsPredicted /
PROSPERO). Gate: the plan exists, is timestamped, and nothing in it depends on
having seen the outcome data. If you cannot answer "what result would falsify this?"
you are not done planning.
Collect according to the stopping rule. Do not peek at the outcome to decide whether to keep going. If an interim look is genuinely needed, it had to be a pre-specified sequential design (record that in PLAN). Gate: data collection matched the frozen rule; no outcome-dependent stopping occurred.
Run the pre-specified tests, in the pre-specified order, on the pre-specified sample.
Assumption checks (via alterlab-statistical-analysis) run and are reported before
interpreting the result — you do not get to swap the test because an assumption failed
unless the swap was pre-specified; an unplanned swap demotes the result to EXPLORE.
Gate: every confirmatory number traces to a line in the frozen plan.
Anything not in the frozen plan lives here: new subgroups, post-hoc covariates, alternative tests, interesting patterns. This work is valuable — it generates the next study's hypotheses — but it is reported under an Exploratory heading, its p-values are descriptive not confirmatory, and it carries a "requires replication" caveat. Gate: every exploratory finding is labeled as such; none is laundered into the confirmatory narrative.
A decision flowchart and the full phase gates live in references/workflow_gates.md.
The predictable rationalizations, and what is actually happening. (Seeded from the documented researcher-degrees-of-freedom literature — see references/researcher_degrees_of_freedom.md.)
| Excuse | Reality |
|---|---|
| "The data suggested a better test/model." | You are fitting noise. That is HARKing — hypothesizing after results are known. Report it as exploratory. |
| "We only peeked once." | Optional stopping inflates the Type I error rate. Report the (pre-specified) sequential design, or stop peeking. |
| "Pre-registration is rigid; science is iterative." | Iterate in the EXPLORE section. The confirmatory claim still needs the frozen plan. |
| "We dropped 3 outliers to meet normality." | Outlier rules must be pre-specified, or reported as a sensitivity analysis — not a silent edit. |
| "This covariate obviously belongs in the model." | "Obvious" post-hoc = a researcher degree of freedom. Pre-specify it, or flag it as exploratory. |
| "We switched to Mann–Whitney because the t-test wasn't significant." | Choosing a test by its p-value is test-shopping. Pre-register the decision rule or label the result exploratory. |
| "The deviation follows the spirit of the registration." | Violating the letter is violating the spirit. There is no spirit exception. |
| "It's only exploratory, so registration is overkill." | Then label every finding exploratory and claim no confirmatory p-values. You don't get confirmatory credit without the plan. |
If you catch yourself (or the user) thinking any of these, STOP:
All of these mean the same thing: you are exploiting researcher degrees of freedom. Either return to the frozen plan, or label the work exploratory and forfeit the confirmatory claim. There is no third option.
A hard, countable rule (the analog of "3 failed fixes = wrong architecture"):
Ran 3+ tests on the same hypothesis searching for significance? STOP. This is multiple comparisons / test-shopping. Either correct for all of them (Bonferroni / Benjamini–Hochberg FDR — via
alterlab-statistical-analysis) or declare the whole analysis exploratory. Do not run test #4 to find p < .05.
If a deviation from the frozen plan is unavoidable (a genuine error in the plan, an impossible assumption), it is not silently absorbed. Run, in order:
alterlab-results-transparency).You can run a quick structured self-audit of a plan-vs-actual story with the optional helper:
uv run python scripts/prereg_check.py \
--plan plan.json --actual actual.json
It is a stdlib-only checklist scorer (no network, no third-party APIs) — it does not
run statistics. See its --help.
Any "no" → the result is exploratory, not confirmatory. Say so plainly.
alterlab-open-science, alterlab-statistical-analysis,
alterlab-scientific-thinking.Part of the AlterLab Academic Skills suite.
What SKILL.md sets; muted values are Claude Code's defaults
/alterlab-methodology:alterlab-preregistration-disciplinefrom alterlab-methodology
npx claudepluginhub alterlab-ieu/alterlab-academic-skills --plugin alterlab-methodology3 skills in this plugin
/alterlab-results-transparencyEnforces results-reporting transparency as a discipline gate built on the Iron Law "NO RESULTS CLAIM WITHOUT REPORTING EVERY ANALYSIS RUN" — a numbered Gate Function (IDENTIFY the claim, LIST every test actually run including the ones that did not "work", CHECK assumptions were reported, CHECK effect size with 95% CI is present, CHECK pre-registration deviations are disclosed, ONLY THEN write the sentence), plus an Excuse-vs-Reality table and Red-Flags-STOP list for selective reporting, cherry-picking, and bare p-values. Use when writing up Results, claiming a finding from a subset of analyses, reporting a p-value without an effect size or confidence interval, dropping outliers post hoc, or omitting analyses that did not pan out. Orchestrates alterlab-statistical-analysis (tests, effect sizes), alterlab-preregistration-discipline (the frozen plan), and alterlab-open-science (TOP, disclosure); it does not run the tests itself. Part of the AlterLab Academic Skills suite./alterlab-test-selection-guardEnforces statistical-test selection as a discipline, holding the Iron Law NO TEST CHOSEN AFTER SEEING THE P-VALUE: routes the choice through a fixed decision tree (outcome type -> groups -> paired? -> normality) terminating in named tests (t-test, Mann-Whitney U, ANOVA, Kruskal-Wallis, Wilcoxon, Friedman, chi-square, Pearson/Spearman, regression), gates interpretation behind a mandatory Shapiro-Wilk/Levene/linearity assumption check, blocks test-shopping with an Excuse-vs-Reality table and Red-Flags-STOP list, and applies a 3+-tests escalation gate forcing Bonferroni/FDR correction or an exploratory label. Use when choosing or switching a statistical test, asking which test to run, dropping a test after a non-significant result, or running many tests hunting for significance. For executing the chosen test prefer alterlab-statistical-analysis or alterlab-statsmodels; for the broader frozen-plan discipline see alterlab-preregistration-discipline. Part of the AlterLab Academic Skills suite.2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
Other plugins' skills for the same job