causal-identification

causal-identification is a skill for Claude Code, Codex from lancegui/causal-powers. It costs 181 tokens per session (3,778 once invoked), scanned A, original, MIT.

A set of guidelines for deciding whether data can support a causal claim—the claim that changing X caused a change in Y. It covers methods such as difference-in-differences, event studies, instrumental variables, regression discontinuity, matching, and synthetic control.

In plain words
What is it for?
Use it when evaluating policies, treatments, or interventions, and when designing or reviewing analyses that claim one action changed an outcome.
Why use it?
A relationship in the data can be caused by other differences between groups or events. These guidelines require the assumptions and source of comparison to be stated before treating a model estimate as an effect.

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/causal-identification
Any agent
npx skills add lancegui/causal-powers --skill causal-identification
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 causal-identification

README.md
[![agentmods](https://agentmods.dev/badge/skills/lancegui/causal-powers/causal-identification.svg)](https://agentmods.dev/skills/lancegui/causal-powers/causal-identification)
Your own site
<a href="https://agentmods.dev/skills/lancegui/causal-powers/causal-identification"><img src="https://agentmods.dev/badge/skills/lancegui/causal-powers/causal-identification.svg" alt="Measured on agentmods" height="20"></a>
Per session 181 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,778 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.00181 $0.03778
Opus 5 $0.00090 $0.01889
Sonnet 5 $0.00036 $0.00756
Haiku 4.5 $0.00018 $0.00378

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

Security

Grade A, and why

causal-identification 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 4d 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-identification/SKILL.md · 156 lines

How it starts

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

Causal Identification

Overview

A regression coefficient is a correlation with good posture. It becomes a causal effect only when a design rules out the other explanations — and that design rests on assumptions no amount of clean data or tight standard errors can supply. The fatal error is silent: the code runs, the coefficient is significant, the sign is plausible, and it's still confounding wearing the costume of an effect.

Core principle: State the identification assumptions before you estimate, and test the ones that are testable. The estimate is only as credible as the assumption you can't test.

Before any model, answer the Angrist–Pischke question: if you could run the ideal randomized experiment, what would it be — and what real-world variation are you using as a stand-in? Name the source of variation in one sentence and argue it's as good as random, or you have a regression hoping to be an identification strategy.

The Design Card — sign-off before estimation

A causal claim locks a Design Card — invoke analysis-state-management, write it to docs/analysis/ (or point to the PAP), get sign-off before estimating. (Structural → model card, prediction → Prediction Spec — same gate, different document; mechanics owned by analysis-checkpoints.) Fields:

  • Causal question + estimand — ATT/ATE/LATE, for which population.
  • Design + source of variation — the "what's your experiment?" answer, one sentence.
  • The untestable assumption, in plain language, and why it's plausible here.
  • Diagnostics planned — the design-specific tests you'll run before reading the estimate.
  • Robustness shortlist — the ~3 checks aimed at the main threat (approval-gated, see below).
  • Primary spec — outcome, treatment, FE/controls (each control with its confounding story), SEs/clustering.

Entering mid-stream ("just run the DiD") does not waive the card: "the user already said regress Y on X" names the spec, not the design — reconstruct the card from context in ≤10 lines and confirm before estimating.

Read the full file on GitHub · 156 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. 4d ago First seen · 156 lines · 181 tokens per session scan A e9b933d1af80

Subscribe to this mod's changes

causal-identification is a skill published in the GitHub repository lancegui/causal-powers (2 stars, last pushed 10d ago), licensed MIT. It adds 181 tokens to every session and 3,778 once invoked, about $0.0009 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.