Agent skill

Running Causalpy Experiments

by pymc-labs in pymc-labs/CausalPy

Fit, summarize, plot, and interpret a chosen CausalPy experiment.

Apache-2.0Auto-check passedData & Analytics

Install Running Causalpy Experiments

skills CLI
$ npx skills add pymc-labs/CausalPy --skill running-causalpy-experiments -a claude-code

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

GitHub CLI
$ gh skill install pymc-labs/CausalPy running-causalpy-experiments --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/running-causalpy-experiments .claude/skills/running-causalpy-experiments && 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
running-causalpy-experiments
GitHub stars
1.2k
Used in
1 other repo
Token cost
~1.3k tokens
SKILL.md length
480 words
Files
14
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

Fit, summarize, plot, and interpret a chosen CausalPy experiment.

  • Works in 7 steps: Load and validate a pandas DataFrame… → Choose a backend: PyMC models for… → Configure the model before construction.… → …
  • Tasks that involve Machine learning
  • SKILL.md covers Workflow, Model And Prior Guardrails, Common Output Methods and Important Exceptions, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Running Causalpy Experiments is an agent skill from pymc-labs/CausalPy. Fit, summarize, plot, and interpret a chosen CausalPy experiment. Use after the causal method has been selected, including when configuring PyMC/sklearn models and scale-aware custom priors.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files (for example `reference/custom_priors.md`, `reference/diff_in_diff.md` and `reference/instrumental_variable.md`).

It sits in Data & Analytics, covering Machine learning. It works with PyMC and scikit-learn. 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

  • Tasks that involve Machine learning

Example prompts

  • “/running-causalpy-experiments”

Workflow steps

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

  1. Load and validate a pandas DataFrame with the data layout required by the chosen experiment.
  2. Choose a backend: PyMC models for posterior uncertainty and priors, or sklearn-compatible regressors where the experiment supports…
  3. Configure the model before construction. For PyMC, set sample_kwargs, optional prior_sample_kwargs, and scale-aware priors when predictors…
  4. Instantiate the experiment. Construction is lazy: nothing is sampled until you call fit(), which returns the fitted experiment (exp =…
  5. Optionally run prior predictive checks before paying for MCMC: exp.sample_prior_predictive() (uses prior_sample_kwargs from the model…
  6. Inspect outputs with summary(), effect_summary(), print_coefficients(), and plot() only after fit(); results live on exp.result and…
  7. Run relevant sensitivity checks through cp.Pipeline, cp.EstimateEffect, and cp.SensitivityAnalysis when robustness matters.

What it can do on your machine

Read from SKILL.md and the folder at commit f17b30f. 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

Running Causalpy Experiments loads about 1.3k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 480 words of instructions outside code blocks.

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

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 f17b30f, republished under its Apache-2.0 licence (© pymc-labs). 480 words, ~1,289 tokens.

Download SKILL.mdSave it as .claude/skills/running-causalpy-experiments/SKILL.md (or your agent's skills folder). This skill also uses 13 other files; get the full folder from GitHub.
name
running-causalpy-experiments
description
Fit, summarize, plot, and interpret a chosen CausalPy experiment. Use after the causal method has been selected, including when configuring PyMC/sklearn models and scale-aware custom priors.

Running CausalPy Experiments

Use this skill when the CausalPy experiment class is already known or has just been selected by choosing-causalpy-methods. This skill is for execution: preparing data, instantiating the experiment, choosing a model backend, setting sane priors, inspecting outputs, plotting, and communicating results.

Workflow

  1. Load and validate a pandas DataFrame with the data layout required by the chosen experiment.
  2. Choose a backend: PyMC models for posterior uncertainty and priors, or sklearn-compatible regressors where the experiment supports OLS/sklearn.
  3. Configure the model before construction. For PyMC, set sample_kwargs, optional prior_sample_kwargs, and scale-aware priors when predictors or outcomes are not standardized.
  4. Instantiate the experiment. Construction is lazy: nothing is sampled until you call fit(), which returns the fitted experiment (exp = cp.InterruptedTimeSeries(...).fit()).
  5. Optionally run prior predictive checks before paying for MCMC: exp.sample_prior_predictive() (uses prior_sample_kwargs from the model, default 500 draws), then exp.plot(group="prior") and exp.effect_summary(group="prior") — under a neutral prior, P(effect > 0) should sit near 0.5. Revise priors by assigning a fresh model (exp.model = cp.pymc_models.LinearRegression(priors={...})); assignment resets all results.
  6. Inspect outputs with summary(), effect_summary(), print_coefficients(), and plot() only after fit(); results live on exp.result and exp.prior_result, and read methods raise GroupNotSampledException naming the missing call when a phase has not run.
  7. Run relevant sensitivity checks through cp.Pipeline, cp.EstimateEffect, and cp.SensitivityAnalysis when robustness matters.

Model And Prior Guardrails

  • Do not blindly accept diffuse default priors when predictors and outcomes are on very different scales. Either standardize the modeling variables or pass scale-aware priors to the PyMC model.
  • For cp.pymc_models.LinearRegression, configure priors for beta and the observation noise inside y_hat.
  • For synthetic-control weight models, priors control donor-weight regularization and outcome noise; see WeightedSumFitter, SoftmaxWeightedSumFitter, and SyntheticDifferenceInDifferencesWeightFitter.
  • For PropensityScore, standardize continuous confounders or use coefficient priors that imply plausible log-odds shifts.
  • For InstrumentalVariableRegression, priors are passed at the experiment level through priors=... and should reflect the scale of both the treatment-stage and outcome-stage regressions.
  • Always check posterior diagnostics, prior predictive plausibility when available, coefficient magnitudes, counterfactual fit in the pre-period, and whether effect summaries are stable under reasonable prior alternatives.
Show full SKILL.md (141 more words)Show less

Common Output Methods

  • experiment.summary(): Prints a method-specific summary where implemented.
  • experiment.effect_summary(): Returns a decision-ready structured effect summary where implemented.
  • experiment.plot(): Visualizes fitted values, counterfactuals, effects, or diagnostics where implemented.
  • experiment.print_coefficients(): Shows model coefficients for model-backed experiments.
  • result = cp.Pipeline(...).run(): Runs estimation, sensitivity checks, and report generation as a reproducible workflow.

Important Exceptions

  • InversePropensityWeighting.plot() is intentionally a stub. Use plot_ate() and plot_balance_ecdf() instead.
  • InversePropensityWeighting.effect_summary() is not implemented. Inspect ATE draws, overlap, balance, and weight stability instead.
  • InstrumentalVariable.plot(), summary(), and effect_summary() are not implemented, so inspect model outputs and first-stage/second-stage diagnostics directly.
  • PanelRegression.effect_summary() is not implemented because panel fixed-effects models report coefficient-level estimates rather than time-window impacts. Use summary(), print_coefficients(), and plot() or plot_coefficients().

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 13 other files in causalpy/skills/running-causalpy-experiments of pymc-labs/CausalPy.

  • SKILL.md
  • reference/custom_priors.md
  • reference/diff_in_diff.md
  • reference/instrumental_variable.md
  • reference/interrupted_time_series.md
  • reference/inverse_propensity_weighting.md
  • reference/panel_regression.md
  • reference/piecewise_its.md
  • reference/prepostnegd.md
  • reference/regression_discontinuity.md
  • reference/regression_kink.md
  • reference/staggered_did.md
  • reference/synthetic_control.md
  • reference/synthetic_difference_in_differences.md

Open the folder on GitHubat commit f17b30f

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in pymc-labs/CausalPy, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Running Causalpy Experiments 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.

Running Causalpy Experiments compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Running Causalpy Experiments this skillpymc-labs/CausalPy1.2k1 repos~1.3kAutomated safety check: PassApache-2.0
Scikit LearnzLanqing/codex-claude-academic-skills4.6k17 repos~3.9kAutomated safety check: PassBSD-3-Clause
Senior Data ScientistRaidriar7170/hermes-skilleval1256 repos~1.4kAutomated safety check: PassMIT
Time Series Analytics Useropen-edge-platform/edge-ai-libraries169—~3.1kAutomated safety check: PassApache-2.0
Estimate Online Covariancemicroprediction/precise336—~535Automated safety check: PassMIT
Aeon Time Series Machine Learningdavila7/claude-code-templates32k14 repos~2.6kAutomated safety check: PassMIT

Similar skills

  • Scikit Learn

    zLanqing/codex-claude-academic-skills

    Machine learning in Python with scikit-learn. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 17 repos~3.9k tokens
    Data & AnalyticsAuto-check passed
  • Senior Data Scientist

    Raidriar7170/hermes-skilleval

    World-class data science skill for statistical modeling, experimentation, causal inference, and advanced analytics.

    125 GitHub starsUsed in 6 repos~1.4k tokens
    Data & AnalyticsAuto-check passed
  • Time Series Analytics User

    open-edge-platform/edge-ai-libraries

    Build a new time-series analytics use case on top of the deployed Time Series Analytics microservice — bring it up with Docker Compose (from a repo clone, or by fetching the compose files from…

    169 GitHub stars~3.1k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Estimate Online Covariance

    microprediction/precise

    Estimate a covariance / correlation / precision matrix incrementally with precise.

    336 GitHub stars~535 tokensUpdated 2 days ago
    Data & AnalyticsAuto-check passed
  • Aeon Time Series Machine Learning

    davila7/claude-code-templates

    Guides time series machine learning with the aeon toolkit: classification, regression, clustering, forecasting, anomaly detection, segmentation and similarity search.

    32k GitHub starsUsed in 14 repos~2.6k tokens
    Data & AnalyticsAuto-check passed
  • Precise

    microprediction/precise

    Online (incremental) covariance, correlation, and precision estimation in Python — the streaming complement to sklearn.covariance.

    336 GitHub stars~782 tokensUpdated 2 days ago
    Data & AnalyticsAuto-check passed

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
  • Causal Detective

    pymc-labs/CausalPy

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

    1.2k GitHub stars~809 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

Questions about Running Causalpy Experiments

What does Running Causalpy Experiments do?

Fit, summarize, plot, and interpret a chosen CausalPy experiment. Running Causalpy Experiments is an agent skill from pymc-labs/CausalPy. Fit, summarize, plot, and interpret a chosen CausalPy experiment.

When should I use Running Causalpy Experiments?

Running Causalpy Experiments fits situations like: tasks that involve Machine learning.

How do I install Running Causalpy Experiments in Claude Code?

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

How do I install Running Causalpy Experiments in Codex?

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

Can I use Running Causalpy Experiments 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 running-causalpy-experiments -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/running-causalpy-experiments, .gemini/skills/running-causalpy-experiments, .github/skills/running-causalpy-experiments and .opencode/skills/running-causalpy-experiments in your project.

What does Running Causalpy Experiments need to run?

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

Does Running Causalpy Experiments 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 Running Causalpy Experiments 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 Running Causalpy Experiments use?

Running Causalpy Experiments 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 Running Causalpy Experiments use?

About 1.3k tokens (SKILL.md is roughly 5.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 Running Causalpy Experiments?

Skills that share tags, products or a category with Running Causalpy Experiments: Scikit Learn (zLanqing/codex-claude-academic-skills, 4.6k stars), Senior Data Scientist (Raidriar7170/hermes-skilleval, 125 stars), Time Series Analytics User (open-edge-platform/edge-ai-libraries, 169 stars) and Estimate Online Covariance (microprediction/precise, 336 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Running Causalpy Experiments?

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 7, 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.