analyze-stats

analyze-stats is a skill for Claude Code from Aperivue/medsci-skills. It costs 64 tokens per session (6,866 once invoked), scanned A, original, MIT.

A medical-research statistics assistant that generates reproducible Python or R code, tables, and figures for common study analyses.

In plain words
What is it for?
It is for diagnostic accuracy, agreement between reviewers, meta-analysis, survival, survey, group-comparison, regression, propensity-score, and repeated-measures analyses.
Why use it?
It reduces the work of choosing and implementing statistical methods while keeping the analysis repeatable and suitable for a research paper.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_SKILL_DIR} variable.

Part of the medsci-analysis plugin — 6 skills shipped together

Good fit It is for diagnostic accuracy, agreement between reviewers, meta-analysis, survival, survey, group-comparison, regression, propensity-score, and repeated-measures analyses.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aperivue/medsci-skills/analyze-stats
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 Aperivue/medsci-skills --skill analyze-stats
Clone the repo
git clone --depth 1 https://github.com/Aperivue/medsci-skills

Made for: Claude Code.

Or install medsci-analysis, the plugin that ships this one along with the rest of its 6 skills.

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 analyze-stats

README.md
[![agentmods](https://agentmods.dev/badge/skills/aperivue/medsci-skills/analyze-stats/github.svg)](https://agentmods.dev/skills/aperivue/medsci-skills/analyze-stats)
Your own site
<a href="https://agentmods.dev/skills/aperivue/medsci-skills/analyze-stats"><img src="https://agentmods.dev/badge/skills/aperivue/medsci-skills/analyze-stats/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 analyze-stats

Your own site · 80×15
<a href="https://agentmods.dev/skills/aperivue/medsci-skills/analyze-stats"><img src="https://agentmods.dev/badge/skills/aperivue/medsci-skills/analyze-stats.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,866 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium analysis-evasion · line 1
    Suspicious Unicode normalization or mixed-script content
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
How audits are shown
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.00064 $0.06866
Opus 5.5 $0.00026 $0.02746
Sonnet 5.5 $0.00013 $0.01373
Haiku 4.5 $0.00006 $0.00687

Measured 21d ago against content hash ee32227f9665, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

analyze-stats 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 21d ago.

The scan reads SKILL.md. This mod also ships 16 executable files (references/templates/agreement_analysis.py, references/templates/diagnostic_accuracy.py, references/templates/forest_plot.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.

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.

skills/analyze-stats/SKILL.md · 431 lines

How it starts

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

Statistical Analysis Skill

Generate reproducible code (Python preferred, R when necessary) for medical research analyses, run it, and produce publication-ready tables and figures from its output.

Data Privacy Check

Before reading any data file, check whether it might contain Protected Health Information (PHI):

  1. If *_deidentified.* files exist in the working directory, use those.
  2. If only raw CSV/Excel files exist, ask the user whether the data contain patient identifiers (names, national ID / RRN, contact details); if so, have them de-identify it first with /deidentify.
  3. Proceed once the user confirms the data are de-identified or contain no PHI.
  4. NEVER display raw PHI values (names, phone numbers, RRN) in your output, because console output is copied into transcripts and drafts. If you encounter them, warn the user and suggest /deidentify.

Reference Files

  • ${CLAUDE_SKILL_DIR}/references/templates/ — reusable analysis scripts; read the matching one before generating code.
  • ${CLAUDE_SKILL_DIR}/references/analysis_guides/ — methodology guides; the Phase 2 table says which to read.
  • ${CLAUDE_SKILL_DIR}/references/table-standards/ — table-standards.md (universal and AMA rules, footnote order, gtsummary pipeline), journal-profiles/ (YAML per journal: radiology, jama, nejm, lancet, european_radiology, ajr), table-types/ (one template per table type), tool-comparison.md (R/Python table tools).
  • ${CLAUDE_SKILL_DIR}/references/style/figure_style.mplstyle — figure style.

Workflow

Phase 1: Data Assessment

  1. Read the data file (CSV, Excel, TSV, or other tabular format).
  2. Report to the user: shape (rows x columns); column names and inferred types (continuous, categorical, ordinal, binary, datetime); missing values per column (count and percentage); first 5 rows; unique value counts for categorical columns.
  3. Identify the analysis unit: patient, exam, lesion, image, rater, study, etc.
  4. If a variable name or coding is uncertain, write [VERIFY: variable_name] and ask the user to confirm it against the data dictionary; never guess a column name or coding.

Read the full file on GitHub · 431 lines

Files

What ships with it

60 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. 21d ago Changed · +4 lines ee32227f9665
  2. 23d ago Changed · +2 lines 7148b04afd6b
  3. 24d ago Changed · +3 lines 9df48549e9b8
  4. 25d ago Changed · -299 lines · +8 tokens per session 4e2a60a6aebf
  5. 26d ago Changed 1db0afddb968
  6. 27d ago Changed dca033657405
  7. 1mo ago Changed · -3 lines c541c8811b91
  8. 1mo ago First seen · 724 lines · 56 tokens per session scan A 62fec491713b

Subscribe to this mod's changes

analyze-stats is a skill published in the GitHub repository Aperivue/medsci-skills (349 stars, last pushed yesterday), licensed MIT. It adds 64 tokens to every session and 6,866 once invoked, about $0.0003 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-08-30.

Related

Other skills, from other repositories

clinical-trials-search

Search ClinicalTrials.gov with natural language queries. Find clinical trials, enrollment, and outcomes using Valyu semantic search.

beita6969/ScienceClaw · 28 tokens

shidi

A Chinese-language research assistant role that turns a user’s ideas into literature reviews, experiment plans, figures and organised data.

IcyCreamDAS/shidi-skill · 126 tokens

clinical-research

Use when designing a prospective clinical study before submission — selecting and classifying endpoints (primary / key-secondary / exploratory, with surrogate-endpoint flagging), estimating sample size and power for two-arm designs (means / proportions / survival), or scoring a study plan for feasibility and a GO /…

bestagentkits/agency-skills · 152 tokens

sr-search-record

An automated literature-review search and screening workflow using OpenAlex, an open database and API for scholarly research, and Zotero, a reference manager.

qiaomiaojoe/ai-academic-workflow · 354 tokens

critical-paper-reading

A paper-reading workflow for critically examining one research paper from a PDF or Zotero item. Zotero is a tool for organising research papers and references.

qiaomiaojoe/ai-academic-workflow · 0 tokens

journal-requirements-check

A tool that extracts a journal's actual submission requirements and turns them into a traceable requirements matrix. A requirements matrix records each rule, its scope, whether it is mandatory or suggested, and any gap.

qiaomiaojoe/ai-academic-workflow · 49 tokens