From stat-analysis
User has completed or planned a statistical analysis and wants to scaffold a jupytext report notebook with standard sections, QC diagnostic plots, model summary tables, and result figures. Use this skill whenever the user wants to start writing up results, needs a notebook template for a statistical analysis, or wants to turn plan-analysis model hierarchy output into a reportable format. Also invoke when the user asks for an analysis notebook, report script, or structured write-up.
How this skill is triggered — by the user, by Claude, or both
Slash command
/stat-analysis:gen-reportThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Scaffold a jupytext-compatible report file with standard analysis sections, method-
Scaffold a jupytext-compatible report file with standard analysis sections, method-
appropriate QC diagnostic plot cells, and a model sequence stub. The output is a
plain-text script (.py percent format by default) that converts to a runnable
Jupyter notebook with jupytext --to notebook <file>.
Reference files (load as directed):
${CLAUDE_PLUGIN_ROOT}/references/jupytext-config.md — pairing formats, header
block, conversion commands, editor setup${CLAUDE_PLUGIN_ROOT}/references/report-sections.md — section templates and
cell content guidance${CLAUDE_PLUGIN_ROOT}/../../references/qc-metrics.md — must-run
diagnostic plots per method family (load in Phase 2)Parse from $ARGUMENTS where possible. Ask only for what is missing.
Analysis title — a short descriptive name for the report file.
Method family — what kind of analysis is being reported?
/plan-analysis and has a model hierarchy, ask them to paste
it or point to the output file — you will pre-fill the model stubs from it.test-selection.md.Language — Python (default), R, or Julia.
Output path — where to write the report script. Default: same directory as
merged.tsv (if known), named report_<title_snake_case>.py.
Load ${CLAUDE_PLUGIN_ROOT}/references/jupytext-config.md to confirm the correct
header format for the chosen language.
Load ${CLAUDE_PLUGIN_ROOT}/references/report-sections.md to get the section
templates and cell content guidance.
If the user provided a plan-analysis output or model hierarchy, read it to extract:
Load ${CLAUDE_PLUGIN_ROOT}/../../references/qc-metrics.md.
Locate the row for the user's method family in the "Diagnostic plots quick-reference"
table at the bottom of the file. Then pull the full code blocks for each listed plot
from the body of qc-metrics.md. These become the Section 2 cells in the output.
If the user chose Python, use the Python code blocks. If R, use R blocks. If Julia, note that Julia diagnostic coverage is limited and fall back to Python or R.
Assemble and write a single report file using:
jupytext-config.mdreport-sections.mdIf the user provided a plan-analysis hierarchy, fill in the actual model formulas:
# %% 3a — Null model
m0 = smf.ols("fa_l_af ~ 1", data=df).fit()
# %% 3b — Covariates
m1 = smf.ols("fa_l_af ~ age + C(site)", data=df).fit()
# etc.
If no hierarchy was provided, use clearly-labelled placeholders:
# %% 3a — Null model [replace with your formula]
m0 = smf.ols("outcome ~ 1", data=df).fit()
report_<title_snake_case>.<ext> where ext is .py, .R, or .jl.
After writing, tell the user:
jupytext --to notebook <file> then jupyter lab <file>.ipynbreport-sections.md table lists the recommended figure type
per method family.qc-metrics.md, add a comment in the cell: # No Julia template available for this plot — see the R or Python cell in qc-metrics.md and include a prose
description of what to look for.Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub bcmcpher/my-skills --plugin stat-analysis