data-science-causal-inference

data-science-causal-inference is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 187 tokens per session (5,924 once invoked), scanned A, original, MIT.

A causal-inference guide for estimating whether one action actually caused an outcome. Causal inference uses experiments or observational data to distinguish cause from correlation.

In plain words
What is it for?
Estimate treatment effects with methods such as difference-in-differences, regression discontinuity, instrumental variables, propensity scores, and causal forests.
Why use it?
It helps avoid blaming the wrong factor when many things change at once or when controlled experiments are unavailable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex.

Good fit Estimate treatment effects with methods such as difference-in-differences, regression discontinuity, instrumental variables, propensity scores, and causal forests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/j4flmao/agent-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 j4flmao/agent-skills --skill causal-inference
Clone the repo
git clone --depth 1 https://github.com/j4flmao/agent-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 data-science-causal-inference

README.md
[![agentmods](https://agentmods.dev/badge/skills/j4flmao/agent-skills/causal-inference/github.svg)](https://agentmods.dev/skills/j4flmao/agent-skills/causal-inference)
Your own site
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/causal-inference"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-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 data-science-causal-inference

Your own site · 80×15
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/causal-inference"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/causal-inference.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 187 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,924 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00187 $0.05924
Opus 5 $0.00093 $0.02962
Sonnet 5 $0.00037 $0.01185
Haiku 4.5 $0.00019 $0.00592

Measured 9d ago against content hash 2b84cf51b468, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

data-science-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 9d 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/data-science/causal-inference/SKILL.md · 548 lines

How it starts

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

Causal Inference

Purpose

Estimate causal effects from observational and experimental data using rigorous frameworks and methods: causal frameworks (potential outcomes / Rubin Causal Model, directed acyclic graphs / Pearl's framework, do-calculus, counterfactual reasoning, structural causal models), quasi-experimental methods (difference-in-differences, regression discontinuity design, instrumental variables, propensity score matching, synthetic control), and causal machine learning (uplift modeling, heterogeneous treatment effects, CATE estimation, S/T/X-learners, causal forests, double/debiased ML).

Agent Protocol

Trigger

Exact user phrases: "causal inference", "causal effect", "treatment effect", "potential outcomes", "Rubin causal model", "DAG", "directed acyclic graph", "do-calculus", "counterfactual", "structural causal model", "SCM", "difference-in-differences", "DiD", "regression discontinuity", "RDD", "instrumental variable", "IV", "propensity score", "PSM", "synthetic control", "uplift modeling", "heterogeneous treatment effect", "HTE", "CATE", "conditional average treatment effect", "meta-learner", "S-learner", "T-learner", "X-learner", "causal forest", "double ML", "debiased ML", "confounding", "selection bias", "endogeneity", "identification".

Input Context

Before activating, verify:

  • Data source (RCT, observational, panel, time series)
  • Treatment assignment mechanism (random, conditional, self-selection)
  • Confounders observed and unobserved
  • Target estimand (ATE, ATT, CATE, ITE)
  • Domain knowledge for DAG construction
  • Sample size and dimensionality
  • Budget/computational constraints for causal ML

Output Artifact

Causal analysis plan with identification strategy, estimation method, robustness checks, and sensitivity analysis.

Response Format

# Estimation code
# CATE estimates: ATE, ATT, heterogeneity analysis
# DAG specification in DOT notation
# Sensitivity analysis results

No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.

Read the full file on GitHub · 548 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 548 lines · 187 tokens per session scan A 2b84cf51b468

Subscribe to this mod's changes

data-science-causal-inference is a skill published in the GitHub repository j4flmao/agent-skills (23 stars, last pushed 6d ago), licensed MIT. It adds 187 tokens to every session and 5,924 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-09-03.

Related

Other skills, from other repositories

StatsPAI_skill

Use when the user asks to run a full empirical / causal analysis in Python — by default in the style of an applied economics paper (AER / QJE / JPE / ReStud / AEJ) with DID / RD / IV / SCM / DML / matching, written-out estimating equation + identifying assumption, Table 1 / Table 2 / event-study figure / robustness…

brycewang-stanford/StatsPAI · 604 tokens

audit-reproducibility

Enforce the replication-protocol.md rule by cross-checking numeric claims in a manuscript against the actual R / Stata / Python outputs. Report PASS/FAIL per claim against tolerance thresholds. Use before submission and before releasing a replication package.

pedrohcgs/claude-code-my-workflow · 54 tokens

preregister

Draft a structured preregistration document (OSF, AsPredicted, or AEA RCT Registry style) from a research spec or free-form study description. Output is a Markdown file with hypotheses, design, sampling plan, analysis plan, exclusions, and inference criteria — annotated with MUST / SHOULD / MAY clarity flags. Use when…

pedrohcgs/claude-code-my-workflow · 153 tokens

simulation-study

Scaffold and run a reproducible Monte Carlo simulation study in R — a declared assumption regime, a parameterized DGP, an estimator grid, a seeded replication loop, and a summary of bias, RMSE, empirical SE, coverage, size/power with Monte Carlo standard errors. Use when the user says "run a Monte Carlo simulation"…

pedrohcgs/claude-code-my-workflow · 148 tokens

data-management-plan

Draft a funder-compliant Data Management Plan (NSF DMP, NIH DMS Policy 2023, ERC, Horizon Europe) by composing the confidential-data and environment-capture primitives. Sections cover data description, formats/metadata, storage/backup, access/sharing, preservation/archiving, and roles. Use when user says "data…

pedrohcgs/claude-code-my-workflow · 143 tokens

respond-to-referees

Generate a structured response-to-referees document from a referee report and the revised manuscript. Maps each referee comment to the specific revision, classifies coverage (addressed / partially / deferred / disagreement), and drafts polite but firm responses. Use during the R&R (revise-and-resubmit) stage of paper…

pedrohcgs/claude-code-my-workflow · 70 tokens