/data-analyst:sample-sizefrom data-analyst
Assesses effective sample size of a dataset for a specific analytical question, flagging underpowered segments, imbalanced classes, and small-n cells. Provides a concrete verdict on what can or cannot be reliably claimed.
Ships in data-analyst. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Row count is not sample size. This skill characterises the effective sample the user has for the specific analysis they want to run, and tells them whether that's enough.
duckdb — counts, group-by cardinality, null rates.uv run --with statsmodels python -c '...' — power calculations (statsmodels.stats.power), sample-size-for-proportions, sample-size-for-regression.Report:
Ask (or infer): what is one row? Customer? Transaction? Country-year? Sensor reading?
The honest sample size for most claims is the number of independent units, not the number of rows. If the dataset has 1M transactions from 50 customers and the question is about customer behaviour, n = 50, not 1,000,000. Surface this distinction — it's the single biggest source of misstated power.
For each grouping column or categorical target the user mentions:
Compute, per planned analysis column-set, the count of rows with all required columns non-null. This is frequently much smaller than the total row count — flag it loudly if drop rate > 20%.
Apply standard rules of thumb, tuned to the user's stated question:
| Question type | Rough minimum n | Notes |
|---|---|---|
| Single-group mean with SE ≈ SD/10 | ~100 | For ±10%-of-SD precision. |
| Proportion estimate (±5 pp, 95% CI) | ~385 | Classic survey number. Scales down for wider CIs. |
| Two-group comparison, medium effect (Cohen's d = 0.5) | ~64 per group | 80% power, two-sided α = 0.05. |
| Two-group comparison, small effect (d = 0.2) | ~394 per group | 80% power. |
| Chi-square 2×2 | Min expected cell ≥ 5 | Use Fisher's exact below that. |
| Linear regression | ≥ 10–20 rows per predictor | Harrell's rule. |
| Logistic regression | ≥ 10–20 events per predictor (EPV) | Rare-event datasets bite here. |
| Any ML model | ≥ 10× predictors, more for non-linear / high-variance methods | Validate via CV, not rules of thumb alone. |
| Time series forecasting | ≥ 2 full seasonal cycles | Otherwise seasonality can't be separated from trend. |
For any quantitative question the user states with an effect size or precision target, run the matching power calculation in statsmodels and report the required n alongside the observed n.
For each stated analysis:
Write outputs/sample-size/report.md:
Keep it short. This skill's job is to prevent overclaiming, not to teach statistics.
hypothesis-testing (which consumes the verdict to decide whether the test is worth running) and multivariate-analysis (where the 10-EPV / 10-rows-per-predictor rule bites hardest).What SKILL.md sets; muted values are Claude Code's defaults
claude-data-analyst@danielrosehill is listed by theantagonist2020/samr — review the source before installing
npx claudepluginhub theantagonist2020/samr --plugin claude-data-analyst14 skills in this plugin
/anomaly-analysisScan a dataset for significant anomalies — outliers, distribution shifts, impossible values, and unusual groupings. Use when the user wants a first-pass integrity and anomaly sweep of a CSV/Parquet/Excel file before deeper analysis./correlation-analysisDetect and compute correlations between numeric variables in a dataset. Use when the user wants to see how variables in a CSV/Parquet/Excel file move together — Pearson, Spearman, or Kendall — with a short report flagging the strongest positive and negative pairs./data-dictionary-creatorGenerate a data dictionary for a dataset, combining automatic profiling with the user's description of what the data represents. Use when the user wants documentation of columns — names, types, semantic meaning, units, allowed values, and nullability — for a CSV/Parquet/Excel file.2 plugins ship this exact skill · first indexed Oct 15, 2026
Other plugins' skills for the same job