Agent skill

Experiment Design

by aipoch in aipoch/medical-research-skills

Design scientific experiments including sample size calculation, randomization, control groups, blinding, and study protocols.

MITAuto-check passedResearch & Science

Install Experiment Design

skills CLI
$ npx skills add aipoch/medical-research-skills --skill experiment-design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aipoch/medical-research-skills experiment-design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/'scientific-skills/Protocol Design/experiment-design' .claude/skills/experiment-design && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
experiment-design
GitHub stars
2k
Token cost
~1.5k tokens
SKILL.md length
383 words
Files
3
Skills in repo
567
Repo updated
First seen
Licence
MIT

At a glance

Design scientific experiments including sample size calculation, randomization, control groups, blinding, and study protocols.

  • User asks to design an experiment
  • SKILL.md covers Design Selection Guide, Power Analysis & Sample Size, Key Design Principles and Study Protocol Template, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Experimental design

What it does

Experiment Design is an agent skill from aipoch/medical-research-skills. Design scientific experiments including sample size calculation, randomization, control groups, blinding, and study protocols. Covers RCTs, quasi-experiments, factorial designs, A/B tests, survey design, and observational studies. Use when user asks to design an experiment, ca...

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `POLISH_CHANGELOG.md` and `eval_report_experiment-design_result.json`).

It sits in Research & Science, covering Experimental design. The repository describes itself as: Hundreds of agent skills for medical research, including protocol design, data analysis, evidence insights, and academic writing. The licence is MIT.

When your agent uses it

  • User asks to design an experiment
  • Tasks that involve Experimental design

Example prompts

  • “/experiment-design”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 686e09d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Experiment Design loads about 1.5k tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 383 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~75
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aipoch/medical-research-skills at commit 686e09d, republished under its MIT licence (© aipoch). 383 words, ~1,456 tokens.

Download SKILL.mdSave it as .claude/skills/experiment-design/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
experiment-design
description
Design scientific experiments including sample size calculation, randomization, control groups, blinding, and study protocols. Covers RCTs, quasi-experiments, factorial designs, A/B tests, survey design, and observational studies. Use when user asks to design an experiment, ca...
license
MIT
author
AIPOCH

Source: https://github.com/aipoch/medical-research-skills

Experiment Design

Scientific experiment planning, power analysis, and protocol development.

Design Selection Guide

Research QuestionRecommended Design
Does X cause Y?RCT (gold standard)
Does X cause Y? (can't randomize)Quasi-experiment, natural experiment
How do factors interact?Factorial design
Which version performs better?A/B test
What is the prevalence/association?Cross-sectional survey
How does outcome change over time?Longitudinal / cohort study
What is the lived experience?Qualitative (interviews, ethnography)
Does intervention work in practice?Pragmatic trial

Power Analysis & Sample Size

python
source /Users/zhangmingda/clawd/.venv/bin/activate
python3 << 'EOF'
from scipy import stats
import numpy as np

# --- Two-sample t-test ---
def sample_size_ttest(effect_size, alpha=0.05, power=0.80):
    """Cohen's d effect sizes: small=0.2, medium=0.5, large=0.8"""
    from scipy.stats import norm
    z_alpha = norm.ppf(1 - alpha/2)
    z_beta = norm.ppf(power)
    n = 2 * ((z_alpha + z_beta) / effect_size) ** 2
    return int(np.ceil(n))

# --- Chi-square test ---
def sample_size_chi2(effect_size, alpha=0.05, power=0.80, df=1):
    """Cohen's w effect sizes: small=0.1, medium=0.3, large=0.5"""
    from scipy.stats import norm, chi2
    z_beta = norm.ppf(power)
    z_alpha = norm.ppf(1 - alpha)
    n = ((z_alpha + z_beta) / effect_size) ** 2
    return int(np.ceil(n))

# --- Correlation ---
def sample_size_correlation(r, alpha=0.05, power=0.80):
    from scipy.stats import norm
    z_alpha = norm.ppf(1 - alpha/2)
    z_beta = norm.ppf(power)
    z_r = 0.5 * np.log((1+r)/(1-r))  # Fisher's z
    n = ((z_alpha + z_beta) / z_r) ** 2 + 3
    return int(np.ceil(n))

# Examples
print(f"t-test (d=0.5): n={sample_size_ttest(0.5)} per group")
print(f"t-test (d=0.3): n={sample_size_ttest(0.3)} per group")
print(f"Chi-square (w=0.3): n={sample_size_chi2(0.3)}")
print(f"Correlation (r=0.3): n={sample_size_correlation(0.3)}")
EOF

Key Design Principles

Controls
  • Positive control: Known to produce effect (validates method works)
  • Negative control: Known to produce no effect (validates baseline)
  • Placebo control: Inert treatment (controls for expectation effects)
  • Active control: Existing standard treatment (for superiority/non-inferiority)
Randomization
  • Simple: Coin flip / random number
  • Block: Ensures equal groups per block
  • Stratified: Randomize within strata (age, sex, severity)
  • Cluster: Randomize groups, not individuals
Blinding
  • Single-blind: Participants don't know assignment
  • Double-blind: Participants and researchers don't know
  • Triple-blind: Participants, researchers, and analysts don't know
Bias Mitigation
BiasMitigation
Selection biasRandom sampling, clear inclusion criteria
Allocation biasRandom assignment, concealed allocation
Performance biasBlinding, standardized protocols
Detection biasBlinded outcome assessment
Attrition biasITT analysis, minimize dropout
Reporting biasPre-registration, analysis plan

Study Protocol Template

markdown
# Study Protocol: [Title]

## 1. Background & Rationale
## 2. Objectives & Hypotheses
  - Primary: 
  - Secondary:
## 3. Study Design
  - Type: [RCT / quasi-experiment / observational / ...]
  - Duration:
## 4. Participants
  - Population:
  - Inclusion criteria:
  - Exclusion criteria:
  - Sample size: N = [calculated], power = 0.80, α = 0.05
## 5. Intervention / Exposure
## 6. Outcome Measures
  - Primary:
  - Secondary:
## 7. Randomization & Blinding
## 8. Data Collection Procedures
## 9. Statistical Analysis Plan
  - Primary analysis:
  - Secondary analyses:
  - Handling of missing data:
## 10. Ethical Considerations
  - IRB/Ethics approval:
  - Informed consent:
  - Data privacy:
## 11. Timeline
## 12. Budget

Pre-registration

Recommend pre-registration for confirmatory studies:

  • OSF: osf.io (general)
  • ClinicalTrials.gov: clinical trials
  • PROSPERO: systematic reviews
  • AsPredicted: aspredicted.org (quick)
Show full SKILL.md (163 more words)Show less

Tips

  • Always justify sample size with power analysis
  • Pre-register hypotheses and analysis plan
  • Plan for 10-20% attrition in sample size calculation
  • Document all deviations from protocol
  • Consider pilot study for novel methods

Error Handling

  • If required inputs are missing, state exactly which fields are missing and request only the minimum additional information.
  • If the task goes outside the documented scope, stop instead of guessing or silently widening the assignment.
  • If execution fails, report the failure point, summarize what can still be completed safely, and provide a manual fallback.
  • Do not fabricate files, citations, data, search results, or execution outcomes.

Input Validation

This skill accepts requests that match the documented purpose of experiment-design and include enough context to complete the workflow safely.

Do not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:

experiment-design only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.

© aipoch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in scientific-skills/Protocol Design/experiment-design of aipoch/medical-research-skills.

  • SKILL.md
  • POLISH_CHANGELOG.md
  • eval_report_experiment-design_result.json

Open the folder on GitHubat commit 686e09d

Compare with similar skills

Experiment Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Experiment Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Experiment Design this skillaipoch/medical-research-skills2k—~1.5kAutomated safety check: PassMIT
Scientific Critical Thinkingweapp-tailwindcss/weapp-tailwindcss1.9k23 repos~5.9kAutomated safety check: NotesMIT
Claim-Driven Experiment PlannerzjYao36/Auto-Research-Refine1287 repos~2.3kAutomated safety check: NotesNone
Benchmark Paper TemplateHKUSTDial/Supervisor-Skills8.5k—~2.8kAutomated safety check: PassCC-BY-4.0
Research Refine PipelinezjYao36/Auto-Research-Refine1286 repos~1.4kAutomated safety check: NotesNone
Metabolic Study Planneraiming-lab/AutoResearchClaw15k—~1.9kAutomated safety check: PassMIT

Similar skills

  • Scientific Critical Thinking

    weapp-tailwindcss/weapp-tailwindcss

    Evaluate research rigor. An agent skill from weapp-tailwindcss/weapp-tailwindcss.

    1.9k GitHub starsUsed in 23 repos~5.9k tokens
    Research & ScienceAuto-check: notes
  • Claim-Driven Experiment Planner

    zjYao36/Auto-Research-Refine

    Turns a refined research proposal into a claim-to-evidence-to-run-order roadmap instead of a sprawling benchmark wishlist.

    128 GitHub starsUsed in 7 repos~2.3k tokens
    Research & ScienceAuto-check: notes
  • Benchmark Paper Template

    HKUSTDial/Supervisor-Skills

    Structures benchmark and evaluation papers around five pillars, with a completeness audit, an Introduction logic chain, a section skeleton and a pre-submission checklist.

    8.5k GitHub stars~2.8k tokensUpdated 1 mo ago
    Research & ScienceAuto-check passed
  • Research Refine Pipeline

    zjYao36/Auto-Research-Refine

    Chains research-refine and experiment-plan to turn a vague research direction into a focused proposal and a claim-driven experiment roadmap.

    128 GitHub starsUsed in 6 repos~1.4k tokens
    Research & ScienceAuto-check: notes
  • Metabolic Study Planner

    aiming-lab/AutoResearchClaw

    Turns a broad metabolic modelling topic into a concrete, paper-shaped plan with organism, model, perturbations, metrics and figures before any FBA code is written.

    15k GitHub stars~1.9k tokensUpdated 1 mo ago
    Research & ScienceAuto-check passed
  • Experimental Design

    Oleafly/Oleafly

    Design experiments and studies BEFORE data is collected — choosing a design, randomizing, blocking, and laying out treatment combinations so results are interpretable.

    206 GitHub starsUsed in 4 repos~3.5k tokens
    Research & ScienceAuto-check: notes

More from aipoch/medical-research-skills

All 567 skills in this repo
  • Academic Poster Generator

    aipoch/medical-research-skills

    Complete workflow for generating academic research posters from PDF literature; use when you need to extract paper content from PDFs and produce a LaTeX-based poster…

    2k GitHub stars~2.2k tokensUpdated 21 days ago
    Auto-check passed
  • Diagnostic Study Quality Assessment Quadas

    aipoch/medical-research-skills

    Analyzes clinical diagnostic accuracy studies for bias using the QUADAS-2 tool.

    2k GitHub stars~1.4k tokensUpdated 21 days ago
    Auto-check passed
  • Exploratory Data Analysis

    aipoch/medical-research-skills

    Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.

    2k GitHub stars~3.7k tokensUpdated 21 days ago
    Auto-check passed
  • Iso Certification

    aipoch/medical-research-skills

    A toolkit for preparing ISO 13485:2016 certification documentation for medical device QMS.

    2k GitHub stars~1.8k tokensUpdated 21 days ago
    Auto-check passed
  • Journal Skills

    aipoch/medical-research-skills

    Recommends target journals for manuscript submission by analyzing the paper topic/abstract and the journal distribution of similar PubMed literature; use when users ask for journal…

    2k GitHub stars~1.7k tokensUpdated 21 days ago
    Auto-check passed
  • Latex Posters

    aipoch/medical-research-skills

    Creates academic-poster writing packages for LaTeX using beamerposter, tikzposter, or baposter.

    2k GitHub stars~1.3k tokensUpdated 21 days ago
    Auto-check passed

Questions about Experiment Design

What does Experiment Design do?

Design scientific experiments including sample size calculation, randomization, control groups, blinding, and study protocols. Experiment Design is an agent skill from aipoch/medical-research-skills. Design scientific experiments including sample size calculation, randomization, control groups, blinding, and study protocols.

When should I use Experiment Design?

Experiment Design fits situations like: user asks to design an experiment; tasks that involve Experimental design.

How do I install Experiment Design in Claude Code?

Run `npx skills add aipoch/medical-research-skills --skill experiment-design -a claude-code`. Or copy the skill folder (scientific-skills/Protocol Design/experiment-design in aipoch/medical-research-skills) into .claude/skills/experiment-design in your project. Claude Code loads it when a task matches its description.

How do I install Experiment Design in Codex?

Run `npx skills add aipoch/medical-research-skills --skill experiment-design -a codex`. Or copy the skill folder (scientific-skills/Protocol Design/experiment-design in aipoch/medical-research-skills) into .agents/skills/experiment-design in your project. Codex loads it when a task matches its description.

Can I use Experiment Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aipoch/medical-research-skills --skill experiment-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/experiment-design, .gemini/skills/experiment-design, .github/skills/experiment-design and .opencode/skills/experiment-design in your project.

What does Experiment Design need to run?

SKILL.md names no scripts, command-line tools or credentials: Experiment Design is instructions for the agent only. Our summary lists: Python 3.

Does Experiment Design access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Experiment Design safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Experiment Design use?

Experiment Design is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Experiment Design use?

About 1.5k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Experiment Design?

Skills that share tags, products or a category with Experiment Design: Scientific Critical Thinking (weapp-tailwindcss/weapp-tailwindcss, 1.9k stars), Claim-Driven Experiment Planner (zjYao36/Auto-Research-Refine, 128 stars), Benchmark Paper Template (HKUSTDial/Supervisor-Skills, 8.5k stars) and Research Refine Pipeline (zjYao36/Auto-Research-Refine, 128 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Experiment Design?

aipoch (a GitHub organization) maintains it in aipoch/medical-research-skills, which has 1,974 GitHub stars. The repository holds 567 skills in this directory. The repository was last updated on September 17, 2026.

Source: aipoch/medical-research-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.