causal-inference-root-cause

Systematically investigate causal relationships to identify true root causes rather than correlations or surface patterns. Distinguish real causation from spurious associations, test competing explanations, and design interventions targeting fundamental drivers. Use for cause investigations, system debugging, failure analysis, policy-impact evaluation, or whenever users ask “why did this happen?” or mention root causes, causal chains, confounders, or false correlations.

Last repository push
GitHub Stars
206
Forks
28
Issues / PRs
3

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "causal-inference-root-cause" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-4c77ced8fa483ffb6d0f09d5f05bf10182c4ef23f8ed52ac0fd85e056c442ce9. Verify the upstream source and version against https://github.com/lyndonkl/claude before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Systematically investigate causal relationships to identify true root causes rather than correlations or surface patterns. Distinguish real causation from spurious associations, test competing explanations, and design interventions targeting fundamental drivers. Use for cause investigations, system debugging, failure analysis, policy-impact evaluation, or whenever users ask “why did this happen?” or mention root causes, causal chains, confounders, or false correlations.

0 Downloads

Introduction source: third_party · lyndonkl · 0.0.1 Reference

SkillPi interpretation

Tasks
Systematically investigates causal relationships to identify true root causes rather than correlations or symptoms. Distinguishes genuine causation from spurious associations, tests competing explanations, and designs interventions addressing underlying drivers. Use when investigating why something happened, debugging systems, analyzing failures, evaluating policy impacts, or when user mentions root cause, causal chain, confounding, spurious correlation, or asks "why did this really happen?
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: causal-inference-root-cause
description: Systematically investigates causal relationships to identify true root causes rather than correlations or symptoms. Distinguishes genuine causation from spurious associations, tests competing explanations, and designs interventions addressing underlying drivers. Use when investigating why something happened, debugging systems, analyzing failures, evaluating policy impacts, or when user mentions root cause, causal chain, confounding, spurious correlation, or asks "why did this really happen?"

Causal Inference & Root Cause Analysis

Table of Contents

Key concepts: root cause (fundamental issue), proximate cause (immediate trigger), confounding variable (third factor creating spurious correlation), counterfactual ("what would have happened without X?"), and causal mechanism (pathway through which X affects Y).

Quick Example:

# Effect: Website conversion rate dropped 30%

## Competing Hypotheses:
1. New checkout UI is confusing (proximate)
2. Payment processor latency increased (proximate)
3. We changed to a cheaper payment processor that's slower (root cause)

## Test:
- Rollback UI (no change) → UI not cause
- Check payment logs (confirm latency) → latency is cause
- Trace to processor change → processor change is root cause

## Counterfactual:
"If we hadn't switched processors, would conversion have dropped?"
→ No, conversion was fine with old processor

## Conclusion:
Root cause = processor switch
Mechanism = slow checkout → user abandonment

Workflow

Copy this checklist and track your progress:

Root Cause Analysis Progress:
- [ ] Step 1: Define the effect
- [ ] Step 2: Generate hypotheses
- [ ] Step 3: Build causal model
- [ ] Step 4: Test causality
- [ ] Step 5: Document and validate

Step 1: Define the effect

Describe effect/outcome (what happened, be specific), quantify if possible (magnitude, frequency), establish timeline (when it started, is it ongoing?), determine baseline (what's normal, what changed?), and identify stakeholders (who's impacted, who needs answers?). Key questions: What exactly are we explaining? One-time event or recurring pattern? How do we measure objectively?

Step 2: Generate hypotheses

List proximate causes (immediate triggers/symptoms), identify potential root causes (underlying factors), consider confounders (third factors creating spurious associations), and challenge assumptions (what if initial theory wrong?). Techniques: 5 Whys (ask "why" repeatedly), Fishbone diagram (categorize causes), Timeline analysis (what changed before effect?), Differential diagnosis (what else explains symptoms?). For simple investigations → Use resources/template.md. For complex problems → Study resources/methodology.md for advanced techniques.

Step 3: Build causal model

Draw causal chains (A → B → C → Effect), identify necessary vs sufficient causes, map confounding relationships (what influences both cause and effect?), note temporal sequence (cause precedes effect - necessary for causation), and specify mechanisms (HOW X causes Y). Model elements: Direct cause (X → Y), Indirect (X → Z → Y), Confounding (Z → X and Z → Y), Mediating variable (X → M → Y), Moderating variable (X → Y depends on M).

Step 4: Test causality

Check temporal sequence (cause before effect?), assess strength of association (strong correlation?), look for dose-response (more cause → more effect?), test counterfactual (what if cause absent/removed?), search for mechanism (explain HOW), check consistency (holds across contexts?), and rule out confounders. Evidence hierarchy: RCT (gold standard) > natural experiment > longitudinal > case-control > cross-sectional > expert opinion. Use Bradford Hill Criteria (9 factors: strength, consistency, specificity, temporality, dose-response, plausibility, coherence, experiment, analogy).

Step 5: Document and validate

Create causal-inference-root-cause.md with: effect description/quantification, competing hypotheses, causal model (chains, confounders, mechanisms), evidence assessment, root cause(s) with confidence level, recommended tests/interventions, and limitations/alternatives. Validate using resources/evaluators/rubric_causal_inference_root_cause.json: verify distinguished proximate from root cause, controlled confounders, explained mechanism, assessed evidence systematically, noted uncertainty, recommended interventions, acknowledged alternatives. Minimum standard: Score ≥ 3.5.

Common Patterns

For incident investigation (engineering):

  • Effect: System outage, performance degradation
  • Hypotheses: Recent deploy, traffic spike, dependency failure, resource exhaustion
  • Model: Timeline + dependency graph + recent changes
  • Test: Logs, metrics, rollback experiments
  • Output: Postmortem with root cause and prevention plan

For metric changes (product/business):

  • Effect: Conversion drop, revenue change, user engagement shift
  • Hypotheses: Product changes, seasonality, market shifts, measurement issues
  • Model: User journey + external factors + recent experiments
  • Test: Cohort analysis, A/B test data, segmentation
  • Output: Causal explanation with recommended actions

For policy evaluation (research/public policy):

  • Effect: Health outcome, economic indicator, social metric
  • Hypotheses: Policy intervention, confounding factors, secular trends
  • Model: DAG with confounders + mechanisms
  • Test: Difference-in-differences, regression discontinuity, propensity matching
  • Output: Causal effect estimate with confidence intervals

For debugging (software):

  • Effect: Bug, unexpected behavior, test failure
  • Hypotheses: Recent changes, edge cases, race conditions, dependency issues
  • Model: Code paths + data flows + timing
  • Test: Reproduce, isolate, binary search, git bisect
  • Output: Bug report with root cause and fix

Guardrails

Do:

  • Distinguish correlation from causation explicitly
  • Generate multiple competing hypotheses (not just confirm first theory)
  • Map out confounding variables and control for them
  • Specify causal mechanisms (HOW X causes Y)
  • Test counterfactuals ("what if X hadn't happened?")
  • State confidence levels and uncertainty
  • Acknowledge alternative explanations
  • Recommend testable interventions based on root cause

Don't:

  • Confuse proximate cause with root cause
  • Cherry-pick evidence that confirms initial hypothesis
  • Assume correlation implies causation
  • Ignore confounding variables
  • Skip mechanism explanation (just stating correlation)
  • Overstate confidence without strong evidence
  • Stop at first plausible explanation without testing alternatives
  • Propose interventions without identifying root cause

Common Pitfalls:

  • Post hoc ergo propter hoc: "After this, therefore because of this" (temporal sequence ≠ causation)
  • Spurious correlation: Two things correlate due to third factor or coincidence
  • Confounding: Third variable causes both X and Y
  • Reverse causation: Y causes X, not X causes Y
  • Selection bias: Sample is not representative
  • Regression to mean: Extreme values naturally move toward average

Quick Reference

  • Template: resources/template.md - Structured framework for root cause analysis
  • Methodology: resources/methodology.md - Advanced techniques (DAGs, confounding control, Bradford Hill criteria)
  • Quality rubric: resources/evaluators/rubric_causal_inference_root_cause.json
  • Output file: causal-inference-root-cause.md
  • Key distinction: Correlation (X and Y move together) vs. Causation (X → Y mechanism)
  • Gold standard test: Randomized controlled trial (eliminates confounding)
  • Essential criteria: Temporal sequence (cause before effect), mechanism (how it works), counterfactual (what if cause absent)

Version history

  1. 0.1 GitHub ↗
    Original release notes

    ## What's Changed * Improve writer skill navigation and structure by @lyndonkl in https://github.com/lyndonkl/claude/pull/1 * Consolidate stickiness content and reduce revision to 3 passes by @lyndonkl in https://github.com/lyndonkl/claude/pull/2 * Update README.md to reflect current writer skill structure by @lyndonkl in https://github.com/lyndonkl/claude/pull/3 * Add explicit instructions for AI agents to follow resource file workf… by @lyndonkl in https://github.com/lyndonkl/claude/pull/4 * Change analysis files from /tmp/ to project directory by @lyndonkl in https://github.com/lyndonkl/claude/pull/5 * Add five refined skills to production by @lyndonkl in https://github.com/lyndonkl/claude/pull/6 * Add causal-inference-root-cause skill and fix missing methodology files by @lyndonkl in https://github.com/lyndonkl/claude/pull/7 * Add workflow pattern to 6 completed skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/8 * Add chain-estimation and roleplay-debate skills with optimizations by @lyndonkl in https://github.com/lyndonkl/claude/pull/9 * Add 3 new skills and update writer skill workflow pattern by @lyndonkl in https://github.com/lyndonkl/claude/pull/10 * Add skills #12-13: constraint-based-creativity and data-schema-knowle… by @lyndonkl in https://github.com/lyndonkl/claude/pull/11 * Add skills #14-16: decision-matrix, decomposition-reconstruction, deliberation-debate-red-teaming by @lyndonkl in https://github.com/lyndonkl/claude/pull/12 * Add skills #17-19: design-of-experiments, dialectical-mapping-steelmanning, discovery-interviews-surveys by @lyndonkl in https://github.com/lyndonkl/claude/pull/13 * Add chef-assistant skill and update README by @lyndonkl in https://github.com/lyndonkl/claude/pull/14 * Fix README: Remove links to gitignored scratchpad files by @lyndonkl in https://github.com/lyndonkl/claude/pull/15 * Add skills #14-22: 9 new production-ready skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/16 * Add skills #20-24 and workflow pattern updates by @lyndonkl in https://github.com/lyndonkl/claude/pull/17 * Add skill #25: expected-value by @lyndonkl in https://github.com/lyndonkl/claude/pull/18 * Add skills #26-28: facilitation-patterns, financial-unit-economics, focus-timeboxing-8020 by @lyndonkl in https://github.com/lyndonkl/claude/pull/19 * Add skills #29-30: heuristics-and-checklists, hypotheticals-counterfactuals by @lyndonkl in https://github.com/lyndonkl/claude/pull/20 * Add skills #31-33: information-architecture, kill-criteria-exit-ramps, layered-reasoning by @lyndonkl in https://github.com/lyndonkl/claude/pull/21 * Add Claude Code plugin support by @lyndonkl in https://github.com/lyndonkl/claude/pull/22 * Fix plugin marketplace source path by @lyndonkl in https://github.com/lyndonkl/claude/pull/23 * Add skill #34: mapping-visualization-scaffolds by @lyndonkl in https://github.com/lyndonkl/claude/pull/24 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/25 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/26 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/27 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/28 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/29 * Add skill #59: skill-extraction by @lyndonkl in https://github.com/lyndonkl/claude/pull/30 * Add skill-creator: Transform documents into actionable skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/31 * Update skill count from 58 to 61 in README by @lyndonkl in https://github.com/lyndonkl/claude/pull/32 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/33 * Add d3-visualization skill: comprehensive D3.js implementation guide by @lyndonkl in https://github.com/lyndonkl/claude/pull/34 * Add comprehensive Superforecasting Toolkit with 4 skills and orchestr… by @lyndonkl in https://github.com/lyndonkl/claude/pull/35 * Add "Run in Smithery" badge by @gurdasnijor in https://github.com/lyndonkl/claude/pull/36 * Add Scientific Writing Toolkit with 6 skills and orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/37 * Improve skill invocation rules and update README by @lyndonkl in https://github.com/lyndonkl/claude/pull/38 * Add Geometric Deep Learning skill suite and orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/39 * Decompose writer skill into 4 focused skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/40 * Add GraphRAG skill suite with 5 skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/41 * Decompose cognitive-design skill into 3 focused skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/42 ## New Contributors * @lyndonkl made their first contribution in https://github.com/lyndonkl/claude/pull/1 * @gurdasnijor made their first contribution in https://github.com/lyndonkl/claude/pull/36 **Full Changelog**: https://github.com/lyndonkl/claude/commits/0.1

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value88/100

Highlights

  • 提供系统性因果推理与根因分析方法,适用于工程、产品、政策、软件等多个高价值场景
  • 包含完整工作流、常见模式和质量评估标准,具有广泛实用价值
Trigger Precision92/100

Highlights

  • 触发描述清晰完整,覆盖多种使用场景和关键词变体
  • 边界定义明确,有效区分相关性与因果性
Structure and Standards90/100

Highlights

  • 文档结构完整,包含5步工作流、示例、防护措施和快速参考
  • frontmatter 完整,有端到端示例,符合规范要求
Execution Reliability85/100

Areas to improve

  • description内容重复 Reported severity: Minor

    description内容同时出现在顶层frontmatter和skill_body内部

    Recommendation: 建议统一description位置,避免重复内容

Highlights

  • 提供完整的执行流程和质量评估rubric
  • 包含异常处理建议和反事实测试方法
Evidence Verifiability (mean of the first four)89/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.