causal-inference

causal-inference is a skill for Claude Code, Codex from SkillMedev/skills. It costs 142 tokens per session (1,978 once invoked), scanned A, original, MIT.

A research method for estimating whether an intervention caused a measured result. It chooses among approaches such as randomized trials, natural experiments, before-and-after comparisons with a control group, and statistical matching based on how treatment was assigned.

In plain words
What is it for?
Use it to define the treatment, outcome, comparison units, and available data, then select a design, check confounding factors, run falsification tests, and report a defensible effect estimate.
Why use it?
It prevents ordinary correlation or a flawed regression from being presented as proof of cause and effect. It makes the assumptions visible and requires checks that could disprove the conclusion.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to define the treatment, outcome, comparison units, and available data, then select a design, check confounding factors, run falsification tests, and report a defensible effect estimate.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skillmedev/skills/causal-inference
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.

Any agent
npx skills add SkillMedev/skills --skill causal-inference
Clone the repo
git clone --depth 1 https://github.com/SkillMedev/skills

Made for: Claude Code, Codex.

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 causal-inference

README.md
[![agentmods](https://agentmods.dev/badge/skills/skillmedev/skills/causal-inference/github.svg)](https://agentmods.dev/skills/skillmedev/skills/causal-inference)
Your own site
<a href="https://agentmods.dev/skills/skillmedev/skills/causal-inference"><img src="https://agentmods.dev/badge/skills/skillmedev/skills/causal-inference/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for causal-inference

Your own site · 80×15
<a href="https://agentmods.dev/skills/skillmedev/skills/causal-inference"><img src="https://agentmods.dev/badge/skills/skillmedev/skills/causal-inference.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 142 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,978 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00142 $0.01978
Opus 5.5 $0.00057 $0.00791
Sonnet 5.5 $0.00028 $0.00396
Haiku 4.5 $0.00014 $0.00198

Measured 1mo ago against content hash e93a06a0a67d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

causal-inference 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 1mo 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/causal-inference/SKILL.md · 126 lines

How it starts

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

Causal Inference

A confident effect estimate built on a broken identification strategy is worse than no estimate: it triggers real decisions with fake evidence. This skill forces the choice of design before any regression is run, states the assumptions each design buys, and requires falsification tests before an effect is reported as causal.

Inputs to collect

Gather these before choosing a design. If the user cannot supply one, propose a default and label it a guess.

  1. Treatment: the intervention, precisely defined (who received it, when, at what intensity).
  2. Outcome: the measured variable and its timing relative to treatment.
  3. Unit of analysis: person, account, store, region - and how many units exist on each side.
  4. Assignment mechanism: how units ended up treated - randomized, threshold rule, policy rollout, self-selection. This single fact determines which designs are available.
  5. Data availability: pre-treatment periods (how many), untreated comparison units, candidate instruments, covariates.
  6. Decision at stake: what action the estimate will drive, and how costly a wrong sign or 2x-off magnitude would be.

Operating procedure

Step 1: Frame the estimand and draw the DAG

Define treatment, outcome, unit, and the counterfactual in one sentence ("What would treated units' outcome have been absent treatment?"). Sketch a DAG listing confounders (cause both treatment and outcome), mediators (on the causal path), and colliders (caused by both). Never condition on a collider or any post-treatment variable; controlling for a mediator absorbs the effect you are trying to measure.

Run the confounder checklist - for each candidate variable ask:

  • Does it plausibly influence who gets treated?
  • Does it plausibly influence the outcome independent of treatment?
  • Is it measured before treatment? (If measured after, it may be a mediator or collider - exclude it.)
  • If it is unmeasured and answers yes to the first two, no amount of regression control fixes the problem - you need a design from higher in the ladder below.

Read the full file on GitHub · 126 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. 1mo ago Changed · +2 lines e93a06a0a67d
  2. 2mo ago First seen · 124 lines · 142 tokens per session scan A 4990e91ad329

Subscribe to this mod's changes

causal-inference is a skill published in the GitHub repository SkillMedev/skills (24 stars, last pushed 24d ago), licensed MIT. It adds 142 tokens to every session and 1,978 once invoked, about $0.0006 per session on Opus 5.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-30.

Related

causal-inference compared with skills from other repositories

causal-inference next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
causal-inferenceSkillMedev/skillsSkill2424d agoMITA142Claude Code, Codex
systematic-reviewSkillMedev/academic-researcherSkill31mo agoMITA123Claude Code, Codex
biopythonK-Dense-AI/scientific-agent-skillsSkill56k4d agoMITA65Claude Code
neuropixels-analysisK-Dense-AI/scientific-agent-skillsSkill56k4d agoMITA99Claude Code, Codex
onekgpdK-Dense-AI/scientific-agent-skillsSkill56k4d agoMITA143Claude Code
pkpd-modelingK-Dense-AI/scientific-agent-skillsSkill56k4d agoMITA273Claude Code
pydicomK-Dense-AI/scientific-agent-skillsSkill56k4d agoMITA52Claude Code, Codex