power-analysis

power-analysis is a skill for Claude Code from pedrohcgs/claude-code-my-workflow. It costs 150 tokens per session (2,902 once invoked), scanned A, original, MIT.

A study-design calculator for statistical power, sample size, and minimum detectable effect—the smallest effect a study is designed to reliably find. It also writes the results in a format suitable for preregistration, a public record of a study plan made before data collection.

In plain words
What is it for?
Use it for randomized controlled trials, field or survey experiments, multi-arm studies, clustered designs, and simulation-based planning for unusual designs.
Why use it?
It helps researchers choose a defensible number of participants or clusters before running a study and avoid drawing conclusions from an under-sized design.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Use it for randomized controlled trials, field or survey experiments, multi-arm studies…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pedrohcgs/claude-code-my-workflow/power-analysis
About the project

claude-code-my-workflow is a forkable setup for using Claude Code to produce and review academic papers, slides, data analyses, and replication packages. Researchers use its agents, skills, rules, hooks, and quality checks to coordinate these tasks and verify their results. The catalogue entries define the reusable workflow components for Claude Code.

pedrohcgs/claude-code-my-workflow · 1,563 stars · on GitHub · psantanna.com

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 pedrohcgs/claude-code-my-workflow --skill power-analysis
Clone the repo
git clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflow

Made for: Claude Code.

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 power-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/power-analysis.svg)](https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/power-analysis)
Your own site
<a href="https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/power-analysis"><img src="https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/power-analysis.svg" alt="Measured on agentmods" height="20"></a>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,902 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.
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.00150 $0.02902
Opus 5 $0.00075 $0.01451
Sonnet 5 $0.00030 $0.00580
Haiku 4.5 $0.00015 $0.00290

Measured 7d ago against content hash 55cf542be4a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

power-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 7d ago.

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.

.claude/skills/power-analysis/SKILL.md · 131 lines

How it starts

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

/power-analysis — Power / MDE for study design

Compute the three interlocking quantities of an ex-ante design calculation — power, required N, and minimum detectable effect (MDE) — and emit a power section the user can paste straight into a preregistration. Analytical for standard designs; simulation-based (reusing the /simulation-study harness pattern) for non-standard ones.

Core principle: a power calculation is a design-time commitment made before the data exist. Fix any two of {effect size, N, power} and solve for the third; never back out a "power" number from a realised estimate (that is post-hoc power, and it is uninformative — see "What this skill does NOT do").

When to use

  • Before launching an RCT / field / survey experiment — to choose N (or clusters) for a target MDE at 80–90% power.
  • Invoked by /preregister for RCTs — the AEA RCT Registry and most IRBs require a power/MDE justification; /preregister's aea-rct style calls this skill to fill that section.
  • During R&R — when a referee asks "was this study adequately powered to detect the effect you claim?"
  • Designing a Monte Carlo — to set R and sample sizes before handing off to /simulation-study.

Inputs

$ARGUMENTS may carry flags; missing pieces are elicited in Phase 0.

  • --mode mde|n|power — solve for MDE given N+power, N given MDE+power, or power given N+MDE. Default mde.
  • --design rct|cluster|multiarm|sim — two-arm RCT, clustered RCT (ICC), multiple arms, or simulation-based. Default inferred from the elicited design.
  • --input <path> — a spec from /interview-me (under quality_reports/specs/) to pull the RQ, outcome, and design from.

Workflow

Phase 0 — Elicit the design

Gather the design parameters; ask once for anything missing rather than fabricating. Required:

  • Estimand & test: primary outcome, one- vs two-sided test, alpha (default 0.05), and whether the target is a difference in means, a proportion, or a regression coefficient.
  • Two of {effect size, N, power}: the effect as a raw difference and in standardized units (Cohen's d = effect / SD) — record both; power default 0.80.
  • Baseline mean and SD (or baseline proportion for a binary outcome) — needed to translate raw ↔ standardized effects.
  • Allocation: treated:control ratio (default 1:1; unequal allocation costs power — note it).
  • Clustering: if randomization is at a group level (village, school, clinic), the ICC (ρ), the average cluster size (m), and number of clusters. Compute the design effect DEFF = 1 + (m − 1)·ρ and the effective N.
  • Multiplicity: number of arms / primary outcomes; the correction (Bonferroni, Holm, or none) and whether power is per-comparison or familywise.

Read the full file on GitHub · 131 lines

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. 7d ago First seen · 131 lines · 150 tokens per session scan A 55cf542be4a5

Subscribe to this mod's changes

power-analysis is a skill published in the GitHub repository pedrohcgs/claude-code-my-workflow (1,563 stars, last pushed 13d ago), licensed MIT. It adds 150 tokens to every session and 2,902 once invoked, about $0.0007 per session on Opus 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