power-analysis
Skill17 starsChanged 3 months agoMITView on GitHub
Computes target N and the minimum detectable effect in R by declaring and diagnosing the design in DeclareDesign — power, bias, coverage, Type S and exaggeration ratios over a grid of N and effect sizes, with the penalties for interactions, clustering, attrition, and conjoint profiles built in — and reports a sensitivity curve. Use after a design is chosen and before fielding or preregistration, or whenever the user asks about sample size, statistical power, or MDE.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- pedrohcgs/claude-code-my-workflowtheir own version, first seen Nov 8, 2026
- lhg-plugs/lhg-experimenttheir own version, first seen Oct 11, 2026
- mitchross/talos-argocd-proxmoxtheir own version, first seen Oct 8, 2026
- chipweaver/veripowertheir own version, first seen Sep 20, 2026
- bybren-llc/story-systems-templatetheir own version, first seen Aug 4, 2026
- xjtulyc/awesome-rosetta-skillstheir own version, first seen Mar 17, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- pedrohcgs/claude-code-my-workflow★ 1.7ksame name
- mitchross/talos-argocd-proxmox★ 93same name
- bybren-llc/story-systems-template★ 66same name
- xjtulyc/awesome-rosetta-skills★ 34same name
- chipweaver/veripower★ 10same name
- lhg-plugs/lhg-experiment★ 0same name
- seen0722/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository38 other files it gives its agents.
- abstract-shotgunSkill
- analyzeSkill
- archiveSkill
- carefulSkill
- coauthor-reviewSkill
- codebookSkill
- cover-letterSkill
- data-acquireSkill
- data-cleanSkill
- design-researchSkill
- draft-sectionSkill
- freezeSkill
- guardSkill
- hypothesis-designSkill
- idea-shotgunSkill
- identification-reviewSkill
- journal-fitSkill
- learnSkill
- lit-mapSkill
- llm-checklistSkill
- mstack-initSkill
- mstack-upgradeSkill
- paper-statusSkill
- pdf-ingestSkill
- preregisterSkill
- r-and-rSkill
- referee-mockSkill
- research-questionSkill
- results-auditSkill
- retroSkill
- robustnessSkill
- scope-challengeSkill
- submission-packSkill
- survey-buildSkill
- theory-buildSkill
- title-shotgunSkill
- unfreezeSkill
- vizSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
After /mstack:design-research, before fielding.
- Very specific: line 35
Update the stats section of .mstack/config.yaml if useful.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/mstack:power-analysis
Stage: design · Voice: methodologist
After /mstack:design-research, before fielding. The prereg's Sample section takes its target N from this report, and the SESOI in hypotheses.md is the effect the study must be able to detect, not the effect the literature reports.
Procedure
- Load
.mstack/hypotheses.md(estimand, SESOI, moderators),.mstack/design-research.md(data and answer strategy),.mstack/lit-map.md(comparable effect sizes and their designs). - Inputs, each with a source written down.
- Effect-size target: the SESOI from
hypotheses.md; benchmark against the literature's estimates discounted for publication bias (a published median overstates the true effect; use the lower end or a replication estimate). - α (0.05 two-sided unless preregistered otherwise) and power (0.80; 0.90 for a preregistered primary).
- Design constants: ICC and cluster size for clustered assignment (design effect 1 + (m − 1) ICC), attrition rate (inflate N accordingly), blocking gains, compliance rate for encouragement designs (the CACE needs N scaled by 1/compliance²), the share of units with within-variation for fixed-effects designs.
- Interactions and heterogeneity: an interaction of the same size as the main effect needs about four times the N, and a half-size interaction about sixteen times (Gelman 2018); state the N for every moderation hypothesis separately.
- Conjoints: power in profiles and attribute levels, not respondents alone (Schuessler & Freitag 2020).
- Effect-size target: the SESOI from
- Write
code/00-power.Rby copying${CLAUDE_PLUGIN_ROOT}/skills/power-analysis/assets/00-power-template.Rand adapting the PARAMETERS block and the declared design. It uses DeclareDesign (declare the model, inquiry, data strategy, and answer strategy thatdesign-research.mdchose;diagnose_design()over a grid of N and effect sizes) because the same skeleton generalizes across experimental, survey, FE, panel, hierarchical, and conjoint designs and forces every assumption into code. Diagnose power, bias, RMSE, coverage, and the Type S (wrong sign) and exaggeration (Type M) ratios at the planned N (Gelman & Carlin 2014): an underpowered study that "finds" the effect overstates it.pwronly as an analytic sanity check for textbook two-sample cases;Superpoweronly for factorial ANOVA; document any fallback in the script header. Experiments and surveys: report N for the target power at the SESOI and the MDE at the planned N. Observational with fixed effects: simulate the within-unit variation that identifies the effect and report the effective N. Save the sensitivity curve (power against effect size and N) tooutput/figures/power-sensitivity.pdf. - Run
Rscript code/00-power.Rand capture the results. - Report to
.mstack/power-analysis.md, with these sections:- Inputs, each with its source or justification.
- Method — declared design, simulations, software, replicable seed.
- Results table — target N at the SESOI, MDE at the planned N, power at the literature's effect, Type S and exaggeration ratios at the planned N, ICC / attrition / compliance assumed; a separate row for each moderation hypothesis.
- Sensitivity curve — description and pointer to the figure.
- Inconclusive region — the effect sizes the planned N cannot distinguish from zero, so the preregistration can say what a null will mean.
- Verdict — can the planned N detect the SESOI at the target power? If not, a larger N, a more precise design (blocking, covariate adjustment, repeated measures), or a redesign.
- Update the
statssection of.mstack/config.yamlif useful.
Outputs
code/00-power.R,output/figures/power-sensitivity.pdf,.mstack/power-analysis.md.- Summary block: target N at the SESOI, MDE at planned N, exaggeration ratio at planned N, verdict.
Anti-patterns
- The wrong effect size. A published median from a biased literature underpowers the study; the SESOI is the target.
- Black-box defaults. Justify ICC, attrition, clustering, compliance; each changes the answer.
- A single number. The curve and the inconclusive region are the result.
- Main-effect power for an interaction hypothesis. State the N the moderation claim needs.
- Reaching for
pwrfirst. DeclareDesign unless the case is genuinely textbook, with the reason in the header.
Next
/mstack:preregister, which quotes this report.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

