Agent skill

Causal Detective

by pymc-labs in pymc-labs/CausalPy

Challenge causal claims through structured threat assessment, counterfactual reasoning, and CausalPy falsification checks.

Apache-2.0Auto-check passed

Install Causal Detective

skills CLI
$ npx skills add pymc-labs/CausalPy --skill causal-detective -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pymc-labs/CausalPy causal-detective --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pymc-labs/CausalPy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/causalpy/skills/causal-detective .claude/skills/causal-detective && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
causal-detective
GitHub stars
1.2k
Token cost
~809 tokens
SKILL.md length
352 words
Files
4
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

Challenge causal claims through structured threat assessment, counterfactual reasoning, and CausalPy falsification checks.

  • Works in 6 steps: Frame the claim: state the treatment,… → Evaluate the counterfactual: ask how… → Hunt for alternatives: identify concrete… → …
  • Validating whether a causal effect is real
  • SKILL.md covers Investigation Workflow, Core Questions, CausalPy Checks and Output Pattern, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Causal Detective is an agent skill from pymc-labs/CausalPy. Challenge causal claims through structured threat assessment, counterfactual reasoning, and CausalPy falsification checks. Use when validating whether a causal effect is real or when the user asks "is this effect real?" or "can I trust this result?"

Its SKILL.md is about 810 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files (for example `reference/counterfactual_analysis.md`, `reference/falsification_tests.md` and `reference/threat_catalog.md`).

The repository describes itself as: A Python package for causal inference in quasi-experimental settings. The licence is Apache-2.0.

When your agent uses it

  • Validating whether a causal effect is real
  • The user asks is this effect real?
  • Can I trust this result?

Example prompts

  • “is this effect real?”
  • “can I trust this result?”
  • “/causal-detective”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Frame the claim: state the treatment, outcome, estimand, fitted method, and proxy counterfactual.
  2. Evaluate the counterfactual: ask how close the proxy is to the ideal parallel-world comparison.
  3. Hunt for alternatives: identify concrete confounders, selection effects, reverse causation, measurement issues, common shocks, and…
  4. Map threats to tests: choose CausalPy checks that would be expected to fail if each alternative explanation were true.
  5. Interpret the evidence: separate threats ruled out by the data from threats that remain untested or unresolved.
  6. Communicate the verdict: use cautious language that reflects the strength of the causal evidence rather than treating a fitted effect as…

What it can do on your machine

Read from SKILL.md and the folder at commit 7882153. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Causal Detective loads about 809 tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 352 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~67
When it runs · the whole SKILL.md, loaded when a task matches
~809

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pymc-labs/CausalPy at commit 7882153, republished under its Apache-2.0 licence (© pymc-labs). 352 words, ~809 tokens.

Download SKILL.mdSave it as .claude/skills/causal-detective/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
causal-detective
description
Challenge causal claims through structured threat assessment, counterfactual reasoning, and CausalPy falsification checks. Use when validating whether a causal effect is real or when the user asks "is this effect real?" or "can I trust this result?"

Causal Detective

Use this skill to stress-test a causal claim before trusting or communicating it. The workflow combines qualitative causal reasoning with CausalPy sensitivity and diagnostic checks.

Investigation Workflow

  1. Frame the claim: state the treatment, outcome, estimand, fitted method, and proxy counterfactual.
  2. Evaluate the counterfactual: ask how close the proxy is to the ideal parallel-world comparison.
  3. Hunt for alternatives: identify concrete confounders, selection effects, reverse causation, measurement issues, common shocks, and external-validity limits.
  4. Map threats to tests: choose CausalPy checks that would be expected to fail if each alternative explanation were true.
  5. Interpret the evidence: separate threats ruled out by the data from threats that remain untested or unresolved.
  6. Communicate the verdict: use cautious language that reflects the strength of the causal evidence rather than treating a fitted effect as proof.

Core Questions

  • What is the counterfactual, and how far is it from the ideal comparison?
  • Is there something else that could affect both treatment assignment and the outcome?
  • Could the outcome be influencing the treatment, or could the timing be ambiguous?
  • If bias exists, would it inflate the effect, shrink it, or make the direction unclear?
  • Can this result be generalized across populations, time periods, geographies, or treatment scales?
Show full SKILL.md (146 more words)Show less

CausalPy Checks

Alternative explanationUseful check
Effect existed before treatmentcp.checks.PreTreatmentPlaceboCheck
Model detects fake effects in untreated periodscp.checks.PlaceboInTime
Result depends on one donor or observationcp.checks.LeaveOneOut
Common shocks affect untreated units toocp.checks.PlaceboInSpace
Effect appears on outcomes that should not movecp.checks.OutcomeFalsification
RD/RK estimate depends on bandwidthcp.checks.BandwidthSensitivity
Bayesian result depends on prior choicescp.checks.PriorSensitivity
RD threshold may be manipulatedcp.checks.McCraryDensityTest
Synthetic control extrapolates beyond donorscp.checks.ConvexHullCheck
Effect fades, reverses, or is window-specificcp.checks.PersistenceCheck

Output Pattern

Return:

  • Claim: one sentence.
  • Counterfactual quality: good, moderate, or poor with reasoning.
  • Threat inventory: named threats with severity, bias direction, and whether each is testable.
  • Tests to run or tests run: CausalPy check names and the alternative each test targets.
  • Verdict: strong, moderate, suggestive but inconclusive, weak, or likely non-causal.
  • What would change the verdict: specific additional data, checks, or domain evidence.

References

© pymc-labs, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in causalpy/skills/causal-detective of pymc-labs/CausalPy.

  • SKILL.md
  • reference/counterfactual_analysis.md
  • reference/falsification_tests.md
  • reference/threat_catalog.md

Open the folder on GitHubat commit 7882153

Compare with similar skills

Causal Detective next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Causal Detective compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Causal Detective this skillpymc-labs/CausalPy1.2k—~809Automated safety check: PassApache-2.0
Threat Detectionalirezarezvani/claude-skills28k—~3.5kAutomated safety check: PassMIT
Performing Threat Landscape Assessment For Sectormukul975/Anthropic-Cybersecurity-Skills34k—~3.2kAutomated safety check: PassApache-2.0
Detecting Insider Threat Behaviorsmukul975/Anthropic-Cybersecurity-Skills34k—~897Automated safety check: PassApache-2.0
Detecting Insider Threat With Uebamukul975/Anthropic-Cybersecurity-Skills34k—~738Automated safety check: PassApache-2.0
Performing Threat Modeling With Owasp Threat Dragonmukul975/Anthropic-Cybersecurity-Skills34k—~2.1kAutomated safety check: PassApache-2.0

Similar skills

  • Threat Detection

    alirezarezvani/claude-skills

    A skill your agent uses when hunting for threats in an environment, analyzing IOCs, or detecting behavioral anomalies in telemetry.

    28k GitHub stars~3.5k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Performing Threat Landscape Assessment For Sector

    mukul975/Anthropic-Cybersecurity-Skills

    Conducts a sector-specific threat landscape assessment (financial, healthcare, energy, government, etc.) by profiling targeting threat actors, mapping attack vectors and MITRE ATT&CK TTPs with the…

    34k GitHub stars~3.2k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Detecting Insider Threat Behaviors

    mukul975/Anthropic-Cybersecurity-Skills

    Detect insider threat behavioral indicators including unusual data access, off-hours activity, mass file downloads, privilege abuse, and resignation-correlated data theft.

    34k GitHub stars~897 tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Detecting Insider Threat With Ueba

    mukul975/Anthropic-Cybersecurity-Skills

    Implement User and Entity Behavior Analytics (UEBA) using Elasticsearch/OpenSearch to build behavioral baselines, calculate anomaly scores, perform peer group analysis, and alert on insider threat…

    34k GitHub stars~738 tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Performing Threat Modeling With Owasp Threat Dragon

    mukul975/Anthropic-Cybersecurity-Skills

    Uses OWASP Threat Dragon (web or desktop) to build data flow diagrams, identify threats with STRIDE, LINDDUN, CIA, DIE, or PLOT4ai methodologies via its auto-generation rule engine, and produce PDF…

    34k GitHub stars~2.1k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Detecting Container Runtime Threats With Falco

    mukul975/Anthropic-Cybersecurity-Skills

    Deploys and operates Falco with the modern eBPF driver in Kubernetes and Docker, covering driver selection, Helm installation, output channels, and the built-in ruleset that detects container…

    34k GitHub stars~3k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check: warnings

More from pymc-labs/CausalPy

All 12 skills in this repo
  • Example Datasets

    pymc-labs/CausalPy

    Load built-in CausalPy example datasets for demos, tutorials, tests, and quick causal-analysis prototypes.

    1.2k GitHub stars~587 tokensUpdated yesterday
    Auto-check passed
  • Review PR

    pymc-labs/CausalPy

    Review CausalPy pull requests end-to-end by classifying PR type, checking branch freshness, mergeability, remote CI, correctness, security, tests, docs, and maintainer concerns.

    1.2k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Running Placebo Analysis

    pymc-labs/CausalPy

    Performs placebo-in-time sensitivity analysis with hierarchical null model and optional Bayesian assurance.

    1.2k GitHub starsUsed in 1 repo~442 tokens
    Auto-check passed
  • Python Environment

    pymc-labs/CausalPy

    Detect, configure, and use the project's Python environment (uv by default, conda-compatible tool as a fallback).

    1.2k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Feature Exploration

    pymc-labs/CausalPy

    Explore unfamiliar APIs, libraries, or implementation behavior with minimal reproducible examples and documented findings.

    1.2k GitHub stars~442 tokensUpdated yesterday
    Auto-check passed
  • GitHub Issues

    pymc-labs/CausalPy

    Create, evaluate, and triage GitHub issues for CausalPy. An agent skill from pymc-labs/CausalPy.

    1.2k GitHub stars~254 tokensUpdated yesterday
    Auto-check passed

Questions about Causal Detective

What does Causal Detective do?

Challenge causal claims through structured threat assessment, counterfactual reasoning, and CausalPy falsification checks. Causal Detective is an agent skill from pymc-labs/CausalPy. Challenge causal claims through structured threat assessment, counterfactual reasoning, and CausalPy falsification checks.

When should I use Causal Detective?

Causal Detective fits situations like: validating whether a causal effect is real; the user asks is this effect real?; can I trust this result?.

How do I install Causal Detective in Claude Code?

Run `npx skills add pymc-labs/CausalPy --skill causal-detective -a claude-code`. Or copy the skill folder (causalpy/skills/causal-detective in pymc-labs/CausalPy) into .claude/skills/causal-detective in your project. Claude Code loads it when a task matches its description.

How do I install Causal Detective in Codex?

Run `npx skills add pymc-labs/CausalPy --skill causal-detective -a codex`. Or copy the skill folder (causalpy/skills/causal-detective in pymc-labs/CausalPy) into .agents/skills/causal-detective in your project. Codex loads it when a task matches its description.

Can I use Causal Detective in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pymc-labs/CausalPy --skill causal-detective -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/causal-detective, .gemini/skills/causal-detective, .github/skills/causal-detective and .opencode/skills/causal-detective in your project.

What does Causal Detective need to run?

SKILL.md names no scripts, command-line tools or credentials: Causal Detective is instructions for the agent only.

Does Causal Detective access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Causal Detective safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Causal Detective use?

Causal Detective is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Causal Detective use?

About 809 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Causal Detective?

Skills that share tags, products or a category with Causal Detective: Threat Detection (alirezarezvani/claude-skills, 28k stars), Performing Threat Landscape Assessment For Sector (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Detecting Insider Threat Behaviors (mukul975/Anthropic-Cybersecurity-Skills, 34k stars) and Detecting Insider Threat With Ueba (mukul975/Anthropic-Cybersecurity-Skills, 34k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Causal Detective?

pymc-labs (a GitHub organization) maintains it in pymc-labs/CausalPy, which has 1,201 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 9, 2026.

Source: pymc-labs/CausalPy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.