StatsPAI_skill

StatsPAI_skill is a skill for Claude Code, Codex from brycewang-stanford/StatsPAI. It costs 604 tokens per session (40,231 once invoked), scanned D, original, MIT.

A Python workflow for empirical causal analysis, meaning statistical methods used to estimate whether one factor caused a change. It is organized like an applied economics research paper and supports methods such as difference-in-differences, regression discontinuity, instrumental variables, and matching.

In plain words
What is it for?
Use it to run causal studies in Python, state the estimating equation and identifying assumption, create descriptive and results tables, produce event-study figures, test robustness, and export common research artifacts.
Why use it?
It provides a repeatable path from data preparation through estimates, robustness checks, and paper-ready results. This reduces the work needed to organize a rigorous analysis and its supporting tables and figures.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to run causal studies in Python, state the estimating equation and identifying assumption, create descriptive and results tables, produce event-study figures, test robustness, and export common research artifacts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/brycewang-stanford/statspai/statspai_full_data_analysis_skill
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 brycewang-stanford/StatsPAI --skill statspai_full_data_analysis_skill
Clone the repo
git clone --depth 1 https://github.com/brycewang-stanford/StatsPAI

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 StatsPAI_skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/brycewang-stanford/statspai/statspai_full_data_analysis_skill.svg)](https://agentmods.dev/skills/brycewang-stanford/statspai/statspai_full_data_analysis_skill)
Your own site
<a href="https://agentmods.dev/skills/brycewang-stanford/statspai/statspai_full_data_analysis_skill"><img src="https://agentmods.dev/badge/skills/brycewang-stanford/statspai/statspai_full_data_analysis_skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 604 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 40,231 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00604 $0.40231
Opus 5 $0.00302 $0.20116
Sonnet 5 $0.00121 $0.08046
Haiku 4.5 $0.00060 $0.04023

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

Security

Grade D, and why

StatsPAI_skill scanned grade D with 2 findings 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 3d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (validate_api_claims.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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| Title still shows ▢▢▢ tofu after `setup_plot()` | Host has none of the listed fonts. Install one — **macOS**: pre-installed (no action). **Linux**: `sudo apt install fonts-noto-cjk` (Debian/Ubuntu) or `sudo dnf install

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

| Title still shows ▢▢▢ tofu after `setup_plot()` | Host has none of the listed fonts. Install one — **macOS**: pre-installed (no action). **Linux**: `sudo apt install fonts-noto-cjk` (Debian/Ubuntu) or `sudo dnf install
StatsPAI_full_data_analysis_skill/SKILL.md · 2,264 lines

How it starts

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

StatsPAI: Agent-Native Causal Inference & AER-Style Empirical Workflow

StatsPAI is a validation-tiered Python package for causal inference and applied econometrics: one import statspai as sp, 1,100+ registered functions behind a self-describing API, and mature estimator result objects that commonly export to LaTeX / Word / Excel / BibTeX.

This skill drives StatsPAI through the canonical pipeline of an applied AER empirical paper. Each step emits a paper-ready artifact (Table 1, event-study figure, Table 2 main results, robustness panel, replication stamp).

  • Source: https://github.com/brycewang-stanford/StatsPAI
  • Install: pip install "statspai[fixest,plotting]" (API surface re-validated against statspai 1.19.0 — every sp.* reference, signature, and result-object attribute claim in this skill is checked by validate_api_claims.py in this folder). The bare pip install statspai is not enough for the default pipeline — see the dependency matrix below.
  • Paper: Wang & Rozelle (2026), Journal of Open Source Software 11(125), 10604, https://doi.org/10.21105/joss.10604; JSS materials in Paper-JSS/README.md and docs/jss_source_audit_dossier.md

Install the right extras or the documented calls will raise ImportError. Several core functions live behind optional dependency groups (verified from pyproject.toml):

You use… Needs extra Install Symptom if missing
sp.feols / sp.fepois / sp.feglm (high-dim FE — the default for any y ~ x | fe regression) fixest (pyfixest) pip install "statspai[fixest]" ImportError: pyfixest is required …
Any figure (sp.coefplot, sp.binscatter, event-study/RD/SCM plots, .plot()) plotting (matplotlib/seaborn) pip install "statspai[plotting]" ImportError on first plot
sp.dragonnet / sp.tarnet / sp.cfrnet / sp.cevae (neural causal) neural (torch) pip install "statspai[neural]" ImportError: PyTorch is required …
sp.causal_text.* (text-as-treatment) text (sentence-transformers) pip install "statspai[text]" ImportError on embed

A one-shot install covering the whole skill: pip install "statspai[fixest,plotting,neural,text]". sp.regtable / sp.collect / Word+Excel+LaTeX export, sp.regress, IV, RD, DID (callaway_santanna), matching, DML, meta-learners, causal forest, BCF, TMLE, and the epi stack work on the base install.

Read the full file on GitHub · 2,264 lines

Files

What ships with it

3 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. 3d ago Changed c9e63dd652f6
  2. 9d ago First seen · 2,264 lines · 604 tokens per session scan D 993ddbe34dbe

Subscribe to this mod's changes

StatsPAI_skill is a skill published in the GitHub repository brycewang-stanford/StatsPAI (314 stars, last pushed 2d ago), licensed MIT. It adds 604 tokens to every session and 40,231 once invoked, about $0.0030 per session on Opus 5. A static security scan graded it D with 2 findings (asks for root, recursive force delete). 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

cnsplots

Create, revise, and troubleshoot publication-ready scientific plots in Python with cnsplots, including distribution, regression, heatmap, genomics, survival, set, flow, and multi-panel figures. Use when a user asks for cnsplots code, Cell/Nature/Science-style visualization, precise physical figure dimensions…

faridrashidi/cnsplots · 79 tokens

fin-data-acquisition

A data-preparation workflow for financial research. It reads variable definitions from a completed research design and produces data-acquisition work plus executable Python or Stata regression scripts.

csmar432/finai-research · 36 tokens

alterlab-anndata

Build, slice, concatenate, read, and write AnnData annotated data matrices (obs, var, X, layers, obsm, uns) — the scverse data STRUCTURE, not an analysis pipeline. Use when creating or wrangling .h5ad/zarr files, managing cell and gene annotations, concatenating batches, or handling layers/obsm/backed-mode; for the…

AlterLab-IEU/AlterLab-Academic-Skills · 133 tokens

alterlab-rdkit

Provides the RDKit cheminformatics toolkit for low-level, fine-grained molecular primitives — SMILES/SDF parsing, descriptors (MW, LogP, TPSA), fingerprints, substructure/SMARTS search, 2D/3D coordinate generation, similarity, and reaction handling. Use when custom sanitization, specialized fingerprint or descriptor…

AlterLab-IEU/AlterLab-Academic-Skills · 130 tokens

alterlab-sympy

Symbolic mathematics in Python with SymPy — solve equations algebraically, perform calculus (derivatives, integrals, limits), manipulate algebraic expressions, work with symbolic matrices, and generate executable code from formulas. Use when exact symbolic results are needed rather than numerical approximations, or…

AlterLab-IEU/AlterLab-Academic-Skills · 86 tokens

alterlab-cirq

Builds, simulates, and runs quantum circuits with Cirq, Google Quantum AI's framework for NISQ hardware, noise-aware low-level circuit design, and noise characterization. Use when targeting Google Quantum AI processors (Sycamore/Weber), designing noise-aware NISQ circuits, or running characterization experiments…

AlterLab-IEU/AlterLab-Academic-Skills · 135 tokens