causal-inference

causal-inference is a skill for Claude Code, Codex from Learning-Bayesian-Statistics/baygent-skills. It costs 172 tokens per session (2,972 once invoked), scanned B, original, MIT.

A workflow for estimating cause-and-effect relationships with Bayesian statistical tools such as PyMC, CausalPy, and DoWhy. It starts with a DAG, a diagram of assumed cause-and-effect links, before any code is written.

In plain words
What is it for?
Defining treatment-effect questions, drawing and checking causal diagrams, choosing an identification strategy, fitting Bayesian models, and testing whether conclusions are robust.
Why use it?
It forces important assumptions and the causal question to be reviewed before analysis, helping avoid unsupported causal claims.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Good fit Defining treatment-effect questions, drawing and checking causal diagrams, choosing an identification strategy, fitting Bayesian models, and testing whether conclusions are robust.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/learning-bayesian-statistics/baygent-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 Learning-Bayesian-Statistics/baygent-skills --skill causal-inference
Clone the repo
git clone --depth 1 https://github.com/Learning-Bayesian-Statistics/baygent-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/learning-bayesian-statistics/baygent-skills/causal-inference/github.svg)](https://agentmods.dev/skills/learning-bayesian-statistics/baygent-skills/causal-inference)
Your own site
<a href="https://agentmods.dev/skills/learning-bayesian-statistics/baygent-skills/causal-inference"><img src="https://agentmods.dev/badge/skills/learning-bayesian-statistics/baygent-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/learning-bayesian-statistics/baygent-skills/causal-inference"><img src="https://agentmods.dev/badge/skills/learning-bayesian-statistics/baygent-skills/causal-inference.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 172 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,972 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 29
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 29
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 29
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 35
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
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.00172 $0.02972
Opus 5 $0.00086 $0.01486
Sonnet 5 $0.00034 $0.00594
Haiku 4.5 $0.00017 $0.00297

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

Security

Grade B, and why

causal-inference scanned grade B with 1 finding 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/check_refutation.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Enumerates other installed skillsmediumAgent snooping

Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.

ls ~/.claude/skills/bayesian-workflow/SKILL.md 2>/dev/null || ls .claude/skills/bayesian-workflow/SKILL.md 2>/dev/null
causal-inference/SKILL.md · 170 lines

How it starts

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

Causal Inference

Dependencies

This skill requires the bayesian-workflow skill for all PyMC modeling steps (priors, sampling, diagnostics, calibration, reporting).

Detect it:

ls ~/.claude/skills/bayesian-workflow/SKILL.md 2>/dev/null || ls .claude/skills/bayesian-workflow/SKILL.md 2>/dev/null

If not found, install it:

git clone https://github.com/Learning-Bayesian-Statistics/baygent-skills.git /tmp/baygent-skills
cp -r /tmp/baygent-skills/bayesian-workflow ~/.claude/skills/

For all PyMC modeling steps (priors, sampling, diagnostics, calibration, reporting), follow the bayesian-workflow skill.

Workflow overview

Every causal analysis follows this sequence. Steps 1-4 are the thinking phase (no code). Steps 5-8 are the doing phase. Think before you do.

  1. Formulate the causal question — Propose precise estimand (ATE, ATT, LATE, etc.). ⚠️ ASK USER TO CONFIRM.
  2. Draw the DAG — Propose causal graph with nodes, edges, and explicit non-edges. ⚠️ ASK USER TO CONFIRM. See references/dags-and-identification.md
  3. Identify — Determine identification strategy (backdoor, front-door, IV, RDD, DiD). ⚠️ ASK USER TO CONFIRM untestable assumptions. See references/dags-and-identification.md
  4. Choose design — Match problem to method using table below. ⚠️ ASK USER TO CONFIRM. See references/quasi-experiments.md or references/structural-models.md
  5. Estimate — Build and fit the model. Delegate all PyMC mechanics to bayesian-workflow skill.
  6. Refute — MANDATORY. Run design-specific robustness checks. See references/refutation.md
  7. Interpret — Effect size + decision-relevant HDIs + probability of direction.
  8. Report — Generate <treatment>-on-<outcome>/report.md using the canonical template in references/reporting.md. Run scripts/check_refutation.py to turn refutation outcomes into pass/marginal/fail ratings, calibrated causal language (causal / suggestive / associational / descriptive), and an ordered next-steps list. Use that output to fill the report's section 7 (causal language calibration) and Suggested Next Steps.

Read the full file on GitHub · 170 lines

Files

What ships with it

7 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 · 170 lines · 172 tokens per session scan B 96d32915d5d6

Subscribe to this mod's changes

causal-inference is a skill published in the GitHub repository Learning-Bayesian-Statistics/baygent-skills (174 stars, last pushed 5d ago), licensed MIT. It adds 172 tokens to every session and 2,972 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it B with 1 finding (enumerates other installed skills). 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

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for…

K-Dense-AI/scientific-agent-skills · 66 tokens

torchdrug

Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning. Use when code imports torchdrug or needs its datasets, models, tasks, or Engine.

K-Dense-AI/scientific-agent-skills · 61 tokens

deepspot-m

Generate transcriptome-wide virtual spatial transcriptomics from H&E histology with DeepSpot-M. Use when you need spatial gene expression in log1p-CPM for 224x224 tiles at about 20x, want to query protein-coding genes by symbol instead of a fixed panel, or want to run prediction across a whole slide after tiling with…

K-Dense-AI/scientific-agent-skills · 80 tokens

pyhealth

Build clinical/healthcare deep-learning pipelines with PyHealth — loading EHR/signal/imaging datasets (MIMIC-III/IV, eICU, OMOP, SleepEDF, ChestXray14, EHRShot), defining tasks (mortality, readmission, length-of-stay, drug recommendation, sleep staging, ICD coding, EEG events), instantiating models (Transformer…

K-Dense-AI/scientific-agent-skills · 216 tokens

pick-a-pii-model

Select an on-device OpenMed PII model from the committed registry by language, runtime format, and size budget, then require recall validation before deployment. Use when an agent must choose a local PII detector for CPU, Apple Silicon, or a mobile export without relying on live model discovery.

maziyarpanahi/openmed · 64 tokens

evo2

Score, embed, and generate DNA sequences with Evo 2, a long-context genomic foundation model. Use this skill when: (1) Computing per-nucleotide or per-sequence likelihoods for variant effect scoring, (2) Embedding genomic windows for downstream classification, (3) Generating DNA conditioned on a prefix, (4) Scoring…

aipoch/open-science · 83 tokens