causal-inference

causal-inference is a skill for Claude Code, Codex from leonardodalinky/SciDER. It costs 45 tokens per session (2,451 once invoked), scanned A, original, Apache-2.0.

A set of methods for estimating whether one factor actually changes another, rather than merely appearing alongside it. It covers causal graphs, natural experiments, instrumental variables, difference-in-differences, regression discontinuity, matching, and sensitivity checks.

In plain words
What is it for?
Use it to plan causal studies, draw directed causal graphs, analyse observational data, estimate treatment effects, test identification assumptions, and assess how sensitive conclusions are to unmeasured factors.
Why use it?
It helps avoid treating correlation as proof that one thing caused another. The methods expose hidden confounding factors and clarify which conclusions the available data can support.

Skill for Claude CodeCodex

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

Good fit Use it to plan causal studies, draw directed causal graphs, analyse observational data, estimate treatment effects, test identification assumptions, and assess how sensitive conclusions are to unmeasured factors.

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

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/leonardodalinky/scider/causal-inference/github.svg)](https://agentmods.dev/skills/leonardodalinky/scider/causal-inference)
Your own site
<a href="https://agentmods.dev/skills/leonardodalinky/scider/causal-inference"><img src="https://agentmods.dev/badge/skills/leonardodalinky/scider/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/leonardodalinky/scider/causal-inference"><img src="https://agentmods.dev/badge/skills/leonardodalinky/scider/causal-inference.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,451 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.00045 $0.02451
Opus 5 $0.00023 $0.01226
Sonnet 5 $0.00009 $0.00490
Haiku 4.5 $0.00005 $0.00245

Measured 9d ago against content hash 6adbb1c2cc80, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 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.

.scider/skills/causal-inference/SKILL.md · 284 lines

How it starts

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

Causal Inference

Overview

Causal inference provides methods for estimating causal effects rather than merely correlational associations. Use this skill whenever you need to claim that X causes Y, not just that X and Y are correlated.

When to Use This Skill

  • When your research question is causal ("Does X increase Y?")
  • When you have observational data and want to make causal claims
  • When designing a study and choosing between experimental and observational approaches
  • When a reviewer asks about confounding, endogeneity, or causal identification

When NOT to Use This Skill

  • When your goal is purely predictive (correlations are sufficient for prediction)
  • When you have a true RCT with perfect compliance (standard t-test is enough)

Hard Rules

  1. Never use causal language (causes, increases, reduces) without causal identification — observational correlation alone is insufficient
  2. Draw the DAG before choosing a method — the causal graph determines what you can and cannot control for
  3. Conditioning on a collider opens a backdoor path — it can create spurious associations
  4. Always run a placebo test — if your method claims an effect where no effect should exist, the method is flawed

1. Causal DAGs (Directed Acyclic Graphs)

Drawing the causal graph is the first step before any analysis.

Node types:

  • Treatment (T): the variable you want to study
  • Outcome (Y): the variable you want to affect
  • Confounder (C): common cause of T and Y — must control for
  • Mediator (M): on the causal path T → M → Y — do NOT control for if you want total effect
  • Collider (K): caused by both T and Y (or their descendants) — do NOT condition on
# Simple DAG visualization with networkx
import networkx as nx
import matplotlib.pyplot as plt

G = nx.DiGraph()
G.add_edges_from([
    ("Education", "Income"),      # T → Y (causal path)
    ("Family_SES", "Education"),  # C → T (confounder)
    ("Family_SES", "Income"),     # C → Y (confounder)
])
pos = nx.spring_layout(G, seed=42)
nx.draw(G, pos, with_labels=True, node_color="lightblue",
        node_size=2000, arrows=True, arrowsize=20)

Read the full file on GitHub · 284 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. 9d ago First seen · 284 lines · 45 tokens per session scan A 6adbb1c2cc80

Subscribe to this mod's changes

causal-inference is a skill published in the GitHub repository leonardodalinky/SciDER (88 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 45 tokens to every session and 2,451 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

paper-polish

Polishes existing academic prose while preserving the author's meaning: grammar and flow repair, tone calibration against evidence strength, AI-tone removal, and Chinese-to-English rewriting at submission quality. Never fabricates data, citations, or claims, and flags any edit that could change scientific meaning. Use…

HKUSTDial/Supervisor-Skills · 93 tokens

paper-writer

Drafts publishable paper prose from the author's own materials, from a single paragraph to a full manuscript, across STEM and non-STEM fields. Every factual claim traces to user input, verified retrieval, or field common knowledge; citations pass an independent verification ladder; delivery is clean prose with zero…

HKUSTDial/Supervisor-Skills · 90 tokens

pre-submission-reviewer

Runs a pre-submission review of a technical paper across five dimensions: macro logic, writing details, English grammar, LaTeX formatting, and figure quality. Uses a reviewer-style severity taxonomy (CRITICAL / MAJOR / MINOR) and flags banned AI-tone vocabulary and em-dash misuse. Use when the user asks to 'review…

HKUSTDial/Supervisor-Skills · 104 tokens

intro-drafter

Drafts the Introduction prose for a technical paper, guided internally by a six-paragraph flowchart: background and running example, existing limitations, problem essence and goal, key challenges, solution overview, contributions. Positions the paper as Technique or New Problem/Setting, aligns contributions with…

HKUSTDial/Supervisor-Skills · 95 tokens

figure-designer

Advises on the design of the three core figures in a technical paper: the Motivated Example (Figure 1), the Solution Overview (Methodology), and the Experimental Results figures. Recommends the right design paradigm, layout, labelling, and tool for each figure type, then runs a quality-control audit. Use when the user…

HKUSTDial/Supervisor-Skills · 112 tokens

tech-paper-template

Structures a technical paper's full logical skeleton using a thinking-template table (research background, limitations, key idea or goal, challenges, methodology modules, contributions), positions the paper as Technique or New Problem/Setting, and runs a four-point self-consistency check. Use when the user is…

HKUSTDial/Supervisor-Skills · 100 tokens