pre-analysis-plan

pre-analysis-plan is a skill for Claude Code, Codex from lancegui/causal-powers. It costs 163 tokens per session (1,907 once invoked), scanned A, original, MIT.

A pre-analysis plan: a written decision made before seeing the results that defines the hypotheses, measurement, sample, exclusions, main analysis, and robustness checks. A robustness check tests whether a conclusion holds under reasonable alternative choices.

In plain words
What is it for?
Use it to specify how an experiment or study will be analyzed before its outcomes are known, including what effect will be measured and which observations or tests will be included.
Why use it?
It reduces the risk of trying many analyses and reporting only the one that looks best. This is especially important for confirmatory studies, experiments, A/B tests, policy evaluations, and causal research.

Skill for Claude CodeCodex

Part of the causal-powers plugin — 18 skills, 2 agents, 5 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lancegui/causal-powers/pre-analysis-plan
Any agent
npx skills add lancegui/causal-powers --skill pre-analysis-plan
Clone the repo
git clone --depth 1 https://github.com/lancegui/causal-powers

Made for: Claude Code, Codex.

Or install causal-powers, the plugin that ships this one along with the rest of its 18 skills, 2 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pre-analysis-plan

README.md
[![agentmods](https://agentmods.dev/badge/skills/lancegui/causal-powers/pre-analysis-plan.svg)](https://agentmods.dev/skills/lancegui/causal-powers/pre-analysis-plan)
Your own site
<a href="https://agentmods.dev/skills/lancegui/causal-powers/pre-analysis-plan"><img src="https://agentmods.dev/badge/skills/lancegui/causal-powers/pre-analysis-plan.svg" alt="Measured on agentmods" height="20"></a>
Per session 163 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,907 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00163 $0.01907
Opus 5 $0.00081 $0.00954
Sonnet 5 $0.00033 $0.00381
Haiku 4.5 $0.00016 $0.00191

Measured 3d ago against content hash c1c4b349e3f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pre-analysis-plan scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pre-analysis-plan/SKILL.md · 77 lines

How it starts

The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pre-Analysis Plan

Overview

If you can run a hundred reasonable specifications and report the one you like, you haven't measured an effect — you've measured your own preferences with extra steps. A pre-analysis plan (PAP) is the commitment that stops this: write down what you will do, and what would count as the answer, before the outcomes are visible. It's the analytics counterpart of writing a spec before code — decide the contract first — but the stakes are higher: the temptation to retrofit the plan to the result is enormous and almost invisible after the fact.

Core principle: A specification chosen after seeing the outcome is not evidence. Decide the analysis while you are still ignorant of how it will turn out.

When you actually need this

Not every exploration needs a PAP — forcing one onto genuine EDA is theater (see question-framing and the exploration regime in data-contracts). It earns its weight when:

  • The result will be used to make or defend a decision (ship the feature, keep the policy, publish the finding).
  • You or the requester have a stake in the result coming out a particular way.
  • The analysis is causal — identification claims are exactly where specification search does the most damage.
  • The work will be scrutinized — a referee, a regulator, a skeptical exec, a replication.

If none of those hold, you're exploring; label it exploratory and move on.

What the plan locks (before seeing outcomes)

  1. Hypotheses. Stated directionally and ranked: primary vs. secondary. Test the primary one; treat everything else as secondary or exploratory. Pre-commit the multiple-comparisons correction for secondary tests (Bonferroni / Benjamini–Hochberg / etc.) — uncorrected, they reintroduce the forking-paths problem the PAP exists to stop.
  2. Estimand. The exact quantity (ATE/ATT/LATE/ITT), on the exact population, over the exact window. Reuse the question-framing brief.
  3. Primary specification. One pre-committed model: functional form, controls, fixed effects, SE structure (and clustering level), inference method — the number you will report. Robustness specs support it; they don't replace it when you like them better. Write the primary specification to the presentation standard in causal-identification — equation with subscripts defined, level of variation, intuition, literature precedent — not an estimator name-drop.
  4. Sample and exclusions. Inclusion criteria, exclusion rules, and how outliers and missing data are handled — decided now, by rule, not later by eye. "Drop obvious outliers" after seeing the data is a degree of freedom; "drop values beyond 3 IQR, pre-committed" is a rule.
  5. Robustness suite. The alternative specs, placebo/falsification tests, and sensitivity analyses you commit to run regardless of whether the primary result survives them — you can't quietly drop the ones that disagree. Keep it small and targeted: two or three checks that probe the load-bearing assumption, not a catalogue; a pre-registered buffet is still a buffet. (causal-identification's design-specific diagnostics are mandatory and separate from this discretionary suite; "small" governs the discretionary specs only.)
  6. Decision rule and power. What result leads to what action, and what counts as the effect being absent — define the null outcome so a null is a finding, not a prompt to keep digging. Commit too to the minimum detectable effect / power the design has: a null from an underpowered test isn't evidence of no effect, and saying so up front stops a noisy null from being read as a clean one.

Read the full file on GitHub · 77 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 77 lines · 163 tokens per session scan A c1c4b349e3f0

Subscribe to this mod's changes

pre-analysis-plan is a skill published in the GitHub repository lancegui/causal-powers (2 stars, last pushed 10d ago), licensed MIT. It adds 163 tokens to every session and 1,907 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.