Skip to main content
ClaudeWave
EN, English
Skill1k repo starsupdated 12d ago

experimental-design

# ClaudeWave Editorial Description The experimental-design skill guides users through rigorous scientific experiment planning, including research question formulation, study design selection across randomized trials and observational approaches, power analysis for sample size calculation, and control variable strategies. Use this skill when planning experiments, determining required sample sizes, or establishing appropriate controls and study designs. Do not use for executing experiments, analyzing collected data, or writing results.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/beita6969/ScienceClaw /tmp/experimental-design && cp -r /tmp/experimental-design/skills/experimental-design ~/.claude/skills/experimental-design
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Experimental Design Skill

Design rigorous, reproducible experiments across scientific disciplines.

## When to Use

- "Design an experiment to test..."
- "How many samples do I need?"
- "What controls should I include?"
- "Help me plan a clinical trial"
- "Is this experimental design valid?"
- Power analysis and sample size calculation

## When NOT to Use

- Running the actual experiment (use code-execution)
- Analyzing collected data (use scipy-analysis + statsmodels-stats)
- Writing up results (use paper-writing)
- Literature review (use literature-search)

## Design Components

### 1. Research Question and Hypotheses
- State clear, testable research question
- Formulate H0 and H1 (see hypothesis-gen skill)
- Define primary and secondary outcomes

### 2. Study Design Selection

| Design | When to Use | Strengths | Weaknesses |
|--------|------------|-----------|------------|
| RCT | Causal inference needed | Gold standard causality | Expensive, ethical limits |
| Factorial | Multiple factors | Tests interactions | Complex analysis |
| Crossover | Within-subject comparison | Reduced variability | Carryover effects |
| Quasi-experimental | Randomization impossible | Practical feasibility | Weaker causality |
| Observational (cohort) | Long-term outcomes | Natural setting | Confounding |
| Case-control | Rare outcomes | Efficient for rare events | Recall bias |

### 3. Power Analysis

```python
# Sample size calculation template (using scipy/statsmodels)
from statsmodels.stats.power import TTestIndPower
analysis = TTestIndPower()
n = analysis.solve_power(
    effect_size=0.5,   # Cohen's d (small=0.2, medium=0.5, large=0.8)
    alpha=0.05,         # Significance level
    power=0.80,         # Statistical power (commonly 0.80 or 0.90)
    ratio=1.0,          # Ratio of group sizes (n2/n1)
    alternative='two-sided'
)
print(f"Required sample size per group: {int(n) + 1}")
```

Key parameters:
- **Effect size**: Expected magnitude of difference
- **Alpha**: Type I error rate (usually 0.05)
- **Power**: 1 - Type II error rate (usually 0.80-0.95)
- **Attrition**: Add 10-20% for expected dropout

### 4. Variable Control

- **Independent variables**: What you manipulate
- **Dependent variables**: What you measure
- **Confounding variables**: What could bias results
- **Control strategies**: Randomization, blocking, matching, blinding

### 5. Randomization

- Simple randomization (coin flip)
- Block randomization (balanced groups)
- Stratified randomization (balance key covariates)
- Cluster randomization (group-level assignment)

### 6. Blinding

- Single-blind: Participants unaware of assignment
- Double-blind: Participants and researchers unaware
- Triple-blind: Including data analysts

## Reproducibility Checklist

- [ ] Protocol pre-registered (OSF, ClinicalTrials.gov, PROSPERO)
- [ ] All materials/reagents specified with catalog numbers
- [ ] Detailed step-by-step procedure written
- [ ] Statistical analysis plan pre-specified
- [ ] Data management plan documented
- [ ] Raw data sharing plan established
- [ ] Code availability ensured
- [ ] Sample size justified with power analysis
- [ ] Randomization method specified
- [ ] Blinding procedures documented
- [ ] Inclusion/exclusion criteria defined
- [ ] Primary endpoint pre-specified

## Output Format

```
## Experimental Design: [Title]

**Research Question**: [Clear question]
**Design Type**: [RCT/Factorial/etc.]

### Participants/Samples
- Population: [target population]
- Inclusion: [criteria]
- Exclusion: [criteria]
- Sample Size: N=[total] ([n] per group) — Power=[X], alpha=[X], effect=[X]

### Groups
- Experimental: [treatment description]
- Control: [control description]
- Blinding: [single/double/triple/none]

### Variables
- IV: [variables]
- DV: [primary + secondary outcomes]
- Controls: [confounds and how addressed]

### Procedure
1. [Step-by-step protocol]

### Analysis Plan
- Primary: [statistical test]
- Secondary: [additional analyses]
- Multiple comparison correction: [method]

### Timeline
- [Phase 1]: [duration]
- [Phase 2]: [duration]

### Ethics
- IRB/IACUC requirements: [details]
- Consent procedure: [details]
```
1passwordSkill

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.

academic-deep-researchSkill

Transparent, rigorous research with full methodology — not a black-box API wrapper. Conducts exhaustive investigation through mandated 2-cycle research per theme, APA 7th citations, evidence hierarchy, and 3 user checkpoints. Self-contained using native OpenClaw tools (web_search, web_fetch, sessions_spawn). Use for literature reviews, competitive intelligence, or any research requiring academic rigor and reproducibility.

academic-literature-searchSkill

# Academic Literature Search — 学术文献检索与引用管理

acp-routerSkill

Route plain-language requests for Pi, Claude Code, Codex, OpenCode, Gemini CLI, or ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation.

apple-notesSkill

Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes). Use when a user asks OpenClaw to add a note, list notes, search notes, or manage note folders.

apple-remindersSkill

Manage Apple Reminders via remindctl CLI (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.

article-writingSkill

Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, especially when voice consistency, structure, and credibility matter.

arxiv-databaseSkill

Search and retrieve preprints from arXiv via the Atom API. Use this skill when searching for papers in physics, mathematics, computer science, quantitative biology, quantitative finance, statistics, electrical engineering, or economics by keywords, authors, arXiv IDs, date ranges, or categories.