Skip to content
Back to skills

Causalml

ASecurity

"Use CausalML for causal inference, uplift modeling, matching,

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 8, 2026
datapythongobashapibackenddocumentation

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill causalml --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Causalml?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Causalml
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-causalml/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-causalml)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: causalml
description: "Use CausalML for causal inference, uplift modeling, matching,
  validation, interpretation, and treatment optimization workflows."
disable-model-invocation: true
metadata:
  disco-role: operating
license: NOASSERTION
---

# causalml

Use this repo skill when the task names CausalML or needs Python operating guidance for causal effect estimation, uplift modeling, propensity/matching, causal trees, optional neural causal models, validation metrics, sensitivity analysis, feature selection, or treatment decision optimization.

## Install and environment check

For normal package use, install the package and only the optional extras needed by the requested workflow:

```bash
pip install causalml
pip install "causalml[tf]"      # TensorFlow DragonNet only when needed
pip install "causalml[torch]"   # Torch/Pyro CEVAE only when needed
pip install "causalml[jax]"     # JAX DragonNet/CEVAE only when needed
```

When working from a source checkout, use the equivalent editable install such as `pip install -e .` or `pip install -e ".[tf,torch,jax]"` from that checkout.

After installation, run the bundled diagnostic from this skill tree if import status is uncertain:

```bash
python scripts/check_env.py
python scripts/check_env.py --backend tf --backend jax
python scripts/check_env.py --backend all --json
```

The diagnostic checks core imports and only checks optional backends that are explicitly requested.

## Route by workflow

| Task | Open |
| --- | --- |
| Synthetic data, feature matrix preparation, propensity scores, matching, balance tables, CSV matching | [sub-skills/data-preparation/](sub-skills/data-preparation/) |
| S/T/X/R/DR meta-learners, TMLE, IV/DRIV, estimator API contracts, Polars/DataFrame support, persistence | [sub-skills/causal-estimation/](sub-skills/causal-estimation/) |
| Causal trees, causal forests, uplift trees, uplift forests, tree plots, tree save/load, compiled tree import issues | [sub-skills/tree-models/](sub-skills/tree-models/) |
| TensorFlow DragonNet, Torch/Pyro CEVAE, JAX DragonNet, JAX CEVAE, deep-backend setup and smoke checks | [sub-skills/deep-models/](sub-skills/deep-models/) |
| AUUC/Qini/RATE/validation metrics, sensitivity analysis, feature selection, SHAP/importances, policy/value optimization, PNS bounds | [sub-skills/analysis-and-decision/](sub-skills/analysis-and-decision/) |

Start at the most specific sub-skill. Return here only when routing across workflows or diagnosing cross-cutting install/import failures.

## Operating defaults

1. Prefer keyword arguments for estimator calls: `fit(X=X, treatment=treatment, y=y, ...)`. Positional argument order is migration-sensitive in current CausalML.
2. Keep `control_name` explicit whenever treatment labels are strings or multi-arm.
3. Treat propensity scores as probabilities strictly inside `(0, 1)`; clip extreme scores before X/R/DR/TMLE, validation, and matching workflows when appropriate.
4. For multi-treatment CATE arrays, use the learner's treatment-group metadata (`t_groups` or `_classes`) rather than guessing column order.
5. For metrics and policy workflows, separate model prediction columns from feature columns. Many metrics treat every non-reserved column as a model score.
6. Do not rely on old documentation references to `causalml.inference.nn`; current neural models route through `causalml.inference.tf`, `causalml.inference.torch`, or `causalml.inference.jax`.
7. CPU execution is sufficient for small correctness and wiring checks. Do not claim GPU/accelerator behavior unless the selected backend stack has been installed and verified separately.

## Cross-cutting references

- [references/troubleshooting.md](references/troubleshooting.md): install/import, optional dependency, Graphviz/OpenMP, argument-order, backend, and stale-API issues.
- [references/repo-provenance.md](references/repo-provenance.md): source commit, package version, evidence paths, selected coverage, and refresh triggers.
- [references/repo-routing-metadata.json](references/repo-routing-metadata.json): structured router scenario metadata for managed repo-skill import.

Files in this skill

  • SKILL.md4 KB
  • references/repo-provenance.md5.7 KB
  • references/repo-routing-metadata.json420 B
  • references/troubleshooting.md5.2 KB
  • scripts/check_env.py4.6 KB
  • sub-skills/analysis-and-decision/SKILL.md3.3 KB
  • sub-skills/analysis-and-decision/references/metrics-and-validation.md8.4 KB
  • sub-skills/analysis-and-decision/references/optimization.md8.3 KB
  • sub-skills/analysis-and-decision/references/sensitivity-and-selection.md9.1 KB
  • sub-skills/analysis-and-decision/references/troubleshooting.md8.8 KB
  • sub-skills/causal-estimation/SKILL.md3.2 KB
  • sub-skills/causal-estimation/references/api-contracts.md7.9 KB
  • sub-skills/causal-estimation/references/iv-tmle-serialization.md6.3 KB
  • sub-skills/causal-estimation/references/meta-learners.md9.3 KB
  • sub-skills/causal-estimation/references/troubleshooting.md7.4 KB
  • sub-skills/data-preparation/SKILL.md3.6 KB
  • sub-skills/data-preparation/references/data-contracts.md7.2 KB
  • sub-skills/data-preparation/references/troubleshooting.md6.2 KB
  • sub-skills/data-preparation/references/workflows.md12.7 KB
  • sub-skills/data-preparation/scripts/match_csv.py8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.