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.
npx skills add brycewang-stanford/StatsPAI --skill _skillgit clone --depth 1 https://github.com/brycewang-stanford/StatsPAIWrote 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.
[](https://agentmods.dev/skills/brycewang-stanford/statspai/_skill)<a href="https://agentmods.dev/skills/brycewang-stanford/statspai/_skill"><img src="https://agentmods.dev/badge/skills/brycewang-stanford/statspai/_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.
<a href="https://agentmods.dev/skills/brycewang-stanford/statspai/_skill"><img src="https://agentmods.dev/badge/skills/brycewang-stanford/statspai/_skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00271 | $0.02799 |
| Opus 5.5 | $0.00108 | $0.01120 |
| Sonnet 5.5 | $0.00054 | $0.00560 |
| Haiku 4.5 | $0.00027 | $0.00280 |
Grade A, and why
statspai-analysis scanned grade A with 0 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 2d ago.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.
StatsPAI: agent-native causal inference, paper-ready
StatsPAI is one import statspai as sp over 1,500+ registered functions for
causal inference and applied econometrics, numerically aligned with Stata / R
reference implementations, with self-describing schemas and result objects that
export to LaTeX / Word / Excel / BibTeX. This skill drives it through the
canonical pipeline of an applied empirical paper, in one of three modes
(default applied econ; epidemiology; ML-causal), and leaves paper-ready
artifacts on disk at every step.
- Source: https://github.com/brycewang-stanford/StatsPAI
- Install:
pip install "statspai[fixest,plotting]"(default pipeline); addneuralfor Dragonnet / TARNet / CEVAE,textfor text-as-treatment. The bare install cannot runsp.feols(anyy ~ x | feregression) or make figures — seereferences/operating-loop.mdfor the extras matrix. - Verified:
validate_api_claims.pychecks this skill against the installed package (statspai skill validate). Everysp.*name resolves, everysp.*(...)call in a code block binds to the real signature (for a function that takes**kwargs, to its agent schema or forwarding target), and the result attributes on the gate's smoke-fit list exist. With--runthe pipeline files are also executed end to end on synthetic data, which is what catches a call that binds but is rejected at run time. There is no version stamp to go stale. - Is this copy current? An installed skill is a plain copy and does not
follow
pip install -U statspai.statspai skill statuscompares it with the skill packaged in the installed version; if it reportsstale, say so and suggeststatspai skill install --forcebefore relying on a call shape written here. - Paper: Wang & Rozelle (2026), Journal of Open Source Software 11(125), 10604, https://doi.org/10.21105/joss.10604.
Operating loop (every request)
- Route the mode first from the user's words — default applied econ,
Mode A epi, Mode B ML-causal, or an export-only path. Do not run the whole
paper pipeline for "make Table 1" or "export this regression". A request
for one estimate, one check or one table takes the short path in
references/quick-path.md. - Freeze the contract before estimating:
y, treatment / exposure, unit / time ids, estimand, design, required artifacts, install extras. Infer a missing field only when the column names make it obvious; otherwise return a short blocking checklist instead of inventing columns. - Pick the estimator with the tables, not from memory:
sp.route('did', design='staggered', timing_random='no', covariates='none')(alsoiv,rd,matching,ml_causal,qte,dynamic_panel) returns the registered call, an example, why, and the assumptions it adds;sp.decision_guide(family)lists the questions.sp.recommend(df, ...)routes from the data itself. - Start from the smallest verified call shape: the skeleton in
references/verified-skeleton.md, then the section snippet. For anything unfamiliar,sp.describe_function(name)/sp.function_schema(name)before writing code;sp.search_functions("weak instrument robust CI")to find the name. - Widen one block at a time: data contract → plan → diagnostic figure →
main estimate → robustness / export. After each block read the result's
violations(),next_steps(),degradationsandmodel_infobefore passing it downstream. - Gate the answer on artifacts: the final message lists the files produced, the identifying assumption, the estimator class, and any failed or skipped gate. Never say "paper-ready" when an export or a required diagnostic did not actually run.
- Turn failures into bounded corrections: a
StatsPAIErrorcarriescode,recovery_hint,diagnosticsandalternative_functions; fix the smallest wrong rule and continue from the last verified artifact.
What ships with it
12 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.
- references/common-mistakes.md 16 KB
- references/export.md 15 KB
- references/mcp-and-cli.md 11 KB
- references/method-catalog.md 9.8 KB
- references/modern-methods.md 9.0 KB
- references/operating-loop.md 15 KB
- references/pipeline-econ.md 63 KB
- references/pipeline-epi.md 14 KB
- references/pipeline-ml-causal.md 12 KB
- references/quick-path.md 3.7 KB
- references/verified-skeleton.md 3.8 KB
- validate_api_claims.py 38 KB runs code
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.
- 2d ago Changed · +12 lines · +30 tokens per session 98652fd173b2
- 13d ago Changed · +7 lines 6db351d9ff9c
- 17d ago First seen · 140 lines · 241 tokens per session scan A 11f41d649b4c
statspai-analysis is a skill published in the GitHub repository brycewang-stanford/StatsPAI (340 stars, last pushed today), licensed MIT. It adds 271 tokens to every session and 2,799 once invoked, about $0.0011 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-29.
Other skills, from other repositories
fin-paper-figure
Generate academic-quality figures (>=300 DPI) for economics and finance papers.
fin-paper-writing
A workflow for turning a research outline and study design into a complete economics or finance paper. It coordinates drafting, figure creation, consistency checks, review rounds, LaTeX compilation, and submission checks.
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.
fin-viz-launch
A tool for turning research data and a written description into academic charts. It can choose a suitable chart type, create plotting code with matplotlib or seaborn, and save the result as a high-resolution PDF, SVG, or PNG.
fin-lit-review
A systematic literature-review workflow for economics and finance. It searches several academic sources, maps how papers cite one another, and organizes the main findings and research gaps.
fin-submit-check
A pre-submission checklist for an academic paper and its LaTeX files. It checks journal requirements such as anonymous authorship, length, spacing, margins, citations, figures, data availability, and other submission details.