StatsPAI_skill

StatsPAI_skill is a skill for Claude Code, Codex from brycewang-stanford/StatsPAI. It costs 604 tokens per session (40,271 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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for StatsPAI_skill

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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,271 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.40271
Opus 5.5 $0.00242 $0.16108
Sonnet 5.5 $0.00121 $0.08054
Haiku 4.5 $0.00060 $0.04027

Measured 1mo ago against content hash ae321378d9bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo ago Changed ae321378d9bb
  2. 2mo ago Changed d985fc8f8bd6
  3. 2mo ago Changed c9e63dd652f6
  4. 3mo 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 (391 stars, last pushed today), licensed MIT. It adds 604 tokens to every session and 40,271 once invoked, about $0.0024 per session on Opus 5.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

StatsPAI_skill compared with skills from other repositories

StatsPAI_skill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
StatsPAI_skillbrycewang-stanford/StatsPAISkill391todayMITD604Claude Code, Codex
cnsplotsfaridrashidi/cnsplotsSkill7377d agoBSD-3-ClauseA79Codex
fin-data-acquisitioncsmar432/finai-researchSkill1127d agoMITA36Claude Code, Codex
alterlab-anndataAlterLab-IEU/AlterLab-Academic-SkillsSkill8619d agoMITA133Claude Code
alterlab-rdkitAlterLab-IEU/AlterLab-Academic-SkillsSkill8619d agoMITA130Claude Code
alterlab-sympyAlterLab-IEU/AlterLab-Academic-SkillsSkill8619d agoMITA86Claude Code
alterlab-cirqAlterLab-IEU/AlterLab-Academic-SkillsSkill8619d agoMITA158Claude Code