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.00205 | $0.01664 |
| Opus 5.5 | $0.00082 | $0.00666 |
| Sonnet 5.5 | $0.00041 | $0.00333 |
| Haiku 4.5 | $0.00020 | $0.00166 |
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 today.
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 — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
StatsPAI analysis
One import statspai as sp covers causal inference and applied econometrics,
with self-describing functions and results that export to LaTeX / Word / Excel.
Read only what the request needs
| Request | Read |
|---|---|
| one estimate, one check or one export | references/quick-path.md |
| a whole DID study, pre-flight, Stata / R script, reviewer audit | references/one-call-workflows.md |
| a full paper, Table 1 through robustness | references/pipeline-econ.md (one step at a time); references/verified-skeleton.md to copy |
| target trial, g-formula, TMLE, MR, survival | references/pipeline-epi.md |
| DML, meta-learners, causal forest, policy, conformal, fairness | references/pipeline-ml-causal.md |
| tables, journal styles, Word / Excel bundles, figures | references/export.md |
| robust staggered DID, event-study bands, few treated units, weak IV, forests, dynamic DML | references/modern-methods.md |
| decomposition, forecasting, experiments, survey, survival, Bayes | references/other-methods.md |
| which function for a method family; alternatives | references/method-catalog.md |
| silent traps, result-object attributes | references/common-mistakes.md |
| MCP or shell instead of Python | references/mcp-and-cli.md |
| acceptance gates, mode table, figure / table inventory | references/operating-loop.md |
Loop
- Scope. Do what was asked. "Make Table 1" is not a paper pipeline.
- Contract before estimating. Name outcome, treatment, unit, time, estimand, design and the files to produce. If a needed column or a design fact (staggered? never-treated group? cutoff?) is not in the data or the request, ask. Do not invent it.
- Route.
sp.route("did", design="staggered", timing_random="no", covariates="none")(alsoiv,rd,matching,ml_causal,qte,dynamic_panel);sp.recommend(df, ...)reads the data;sp.preflight(df, method, ...)checks it before fitting. - Describe, then call.
sp.search_functions("..."),sp.describe_function(name),sp.function_schema(name). Never write an unfamiliar signature from memory. - Inspect, then report.
r.violations(),r.next_steps(),r.degradations,sp.audit(r). A check that did not run is not a check that passed. - Answer with evidence. Estimate, SE, CI, N, estimand, identifying assumption, files written, and every failed or skipped gate. Never say "paper-ready" when an export or a required diagnostic did not run.
- On error, apply the
recovery_hint/alternative_functionsof theStatsPAIErrorto the one wrong thing and continue.
What ships with it
14 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 5.9 KB
- references/export.md 15 KB
- references/mcp-and-cli.md 12 KB
- references/method-catalog.md 10 KB
- references/modern-methods.md 9.2 KB
- references/one-call-workflows.md 4.7 KB
- references/operating-loop.md 6.5 KB
- references/other-methods.md 5.4 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.9 KB
- references/verified-skeleton.md 3.8 KB
- validate_api_claims.py 43 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.
- today Changed · -57 lines · -66 tokens per session 24694cf14094
- 1mo ago Changed · +12 lines · +30 tokens per session 98652fd173b2
- 1mo ago Changed · +7 lines 6db351d9ff9c
- 2mo 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 (389 stars, last pushed today), licensed MIT. It adds 205 tokens to every session and 1,664 once invoked, about $0.0008 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.
statspai-analysis compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| statspai-analysisbrycewang-stanford/StatsPAI | Skill | 389 | today | MIT | A | 205 | Claude Code, Codex |
| fin-paper-figurecsmar432/finai-research | Skill | 112 | 7d ago | MIT | A | 14 | Claude Code, Codex |
| fin-paper-writingcsmar432/finai-research | Skill | 112 | 7d ago | MIT | A | 65 | Claude Code |
| fin-data-acquisitioncsmar432/finai-research | Skill | 112 | 7d ago | MIT | A | 36 | Claude Code, Codex |
| fin-viz-launchcsmar432/finai-research | Skill | 112 | 7d ago | MIT | A | 45 | Claude Code, Codex |
| fin-lit-reviewcsmar432/finai-research | Skill | 112 | 7d ago | MIT | A | 49 | Claude Code |
| fin-submit-checkcsmar432/finai-research | Skill | 112 | 7d ago | MIT | A | 37 | Claude Code, Codex |