experimental-design
Design experiments and studies BEFORE data is collected — choosing a design, randomizing, blocking, and laying out treatment combinations so results are…
Skill by CliffVale
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/cliffvale-experimental-design
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, testing, data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/experimental-design
Tools it pre-approves 4
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
ReadWriteEditBash
What's inside
- Skill name
experimental-design- Description
- Design experiments and studies BEFORE data is collected — choosing a design, randomizing, blocking, and laying out treatment combinations so results are interpretable. Use whenever someone is planning a study, asks how to assign subjects/samples to groups, mentions randomization, blocking, stratification, controls, factorial or fractional-factorial designs, design of experiments (DOE), screening many factors, response-surface optimization, crossover or repeated-measures or split-plot designs, cluster/group randomization, Latin squares, plate layouts, batch/run-order effects, replication vs. pseudoreplication, or sequential/adaptive/group-sequential designs. Trigger even for informal phrasings like "how should I set up this experiment", "how do I avoid confounding", "what's the best way to test these 6 factors", or "assign these mice to conditions". For computing the sample size or power once the design is chosen, use statistical-power; for analyzing data already collected, use statistical-analysis.
- License
- MIT
- Compatibility
- Requires Python >=3.10. Scripts use numpy, pandas, and pyDOE3 (DOE matrices). Install with uv as shown below.
- Allowed tools
- Read, Write, Edit, Bash
- Metadata
- version: 1.1 · skill-author: K-Dense Inc.
- Instructions
- 235 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
- Pre-approves any shell command
Files (7)
- SKILL.md
- design_types.md · references/
- factorial_and_doe.md · references/
- randomization_and_blocking.md · references/
- sequential_and_adaptive.md · references/
- doe_designs.py · scripts/
- randomization.py · scripts/
SKILL.md (first lines)
## Python Environment
This skill runs on the shared office-skills venv. Use these EXACTLY when running Python:
- Interpreter: `~/.local/share/office-skills/.venv/bin/python3`
- Install missing packages: `uv pip install --python ~/.local/share/office-skills/.venv/bin/python <pkg>`
- System `python3` does NOT have these packages (externally-managed, no pip --user).
Never use bare `python`, `python3`, or `pip install` for this skill's scripts unless an explicit system tool (e.g. `soffice`, `markitdown` CLI) is required.
# Experimental Design
## Overview
The design of a study — how units are assigned to conditions, what is held constant, what is varied, and in what structure — determines what questions the data can answer. No analysis can rescue a confounded or pseudoreplicated design after the fact. This skill is about the decisions made *before* data collection: picking a design that isolates the effect of interest, randomizing to license causal claims, blocking to remove known nuisance variation, and structuring multi-factor experiments so effects are estimable rather than tangled together.
The three ideas behind almost every good design (Fisher's principles):
- **Randomization** — assign treatments at random so that confounders, known and unknown, are balanced in expectation. This is what turns a comparison into a causal claim.
- **Replication** — independent repetition at the right level, so you can estimate variability and your effects aren't artifacts of a single unit. The most common fatal error is **pseudoreplication**: counting repeated measurements on the same unit as independent replicates.
- **Blocking / local control** — group similar units (by batch, day, site, litter) and randomize within blocks, removing that nuisance variation from the error term instead of letting it inflate noise.
This skill helps you choose among design types, generate the actual randomization or DOE layout (with reproducible scripts), and avoid the structural mistakes that make data uninterpretable.
## When to Use This Skill
- Planning any comparative experiment or trial and deciding how to assign units
- Randomizing subjects/samples to arms (simple, blocked, stratified, or cluster)
- Removing nuisance variation by blocking or stratification
- Designing multi-factor experiments: full or fractional factorial, screening designs
- Optimizing a response over continuous factors (response-surface designs)
- Within-subject / repeated-measures, crossover, split-plot, or Latin-square designs
- Cluster- or group-randomized designs (sites, clinics, classrooms, litters)
- Deciding the number and level of replicates and avoiding pseudoreplication
- Sequential, group-sequential, or adaptive designs with interim analyses
- Laying out plates/batches and randomizing run order to defeat drift
## Installation
```bash
uv pip install "numpy>=1.26" "pandas>=2.0" pyDOE3
```
`pyDOE3` is the maintained successor to pyDOE/pyDOE2 and supplies factorial,
fractional-factorial, Plackett-Burman, central-composite, Box-Behnken, and
Latin-hypercube generators. The bundled scripts wrap it to return designs in real
factor units with named columns and randomized run order.
---
## Choosing a design
Start from the question and the structure of your units, not from a favorite design.
```
What are you trying to learn?
│
├─ Compare a few predefined conditions (A vs B vs C)?
│ ├─ Units independent, possibly with a known nuisance factor (day, batch, site)?
│ │ → Completely randomized (no nuisance) or RANDOMIZED BLOCK design.
│ ├─ Each unit can receive every condition in sequence (washout possible)?
│ │ → CROSSOVER / repeated-measures design (more power, watch carry-over).
│ └─ You can only randomize groups, not individuals (schools, clinics)?
│ → CLUSTER-randomized design (analyze at the cluster level; see pseudoreplication).
│
├─ Screen MANY factors (5+) to find the few that matter?
│ → FRACTIONAL FACTORIAL or PLACKETT-BURMAN screening design.
│
├─ Quantify main effects AND interactions among a handful of factors?
│ → FULL 2^k FACTORIAL design.
│
├─ Find the settings that OPTIMIZE a response (curvature matters)?
│ → RESPONSE-SURFACE design: central composite or Box-Behnken.
│
└─ Explore a simulation/computer model over a continuous space?
→ SPACE-FILLING design: Latin hypercube.
```
Detailed guidance per branch:
- **Randomization, blocking, stratification, controls** → `references/randomization_and_blocking.md`
- **Factorial, fractional-factorial, screening, response-surface, DOE concepts (aliasing, resolution)** → `references/factorial_and_doe.md`
- **Crossover, repeated-measures, split-plot, Latin-square, cluster, nested designs** → `references/design_types.md`
- **Sequential, group-sequential, and adaptive designs (interim analyses)** → `references/sequential_and_adaptive.md`
---
## Generating the design
Two scripts produce ready-to-use, reproducible layouts. Run them from the skill's
`scripts/` directory or add it to `sys.path`. Everything is seeded so the exact
schedule can be archived and regenerated — a requirement for trial registration
and good lab practice.
### Randomization / allocation schedules — `scripts/randomization.py`
```python
from randomization import (
simple_randomization, block_randomization,
stratified_block_randomization, cluster_randomization,
assign_factorial_runs, arm_balance,
)
# Permuted blocks keep the arms balanced throughout enrollment (use for n < ~100
# or sequential intake — simple randomization can drift out of balance with small n)
sched = block_randomization(n=60, arms=["treatment", "control"], seed=42)
# Balance a prognostic variable across arms by randomizing within each stratum
sched = stratified_block_randomization({"siteA": 30, "siteB": 30},
arms=["drug", "placebo"], ratio=(2, 1), seed=42)
# Randomize whole clusters, not individuals (the cluster is the unit)
sched = cluster_randomization(["clinic1", "clinic2", "clinic3", "clinic4"], seed=42)
arm_balance(sched) # sanity-check the counts per arm
sched.to_csv("allocation_schedule.csv", index=False)
```
Choosing among them: **simple** is fine for large n but can produce imbalance with
small n; **block** guarantees balance throughout; **stratified block** additionally
balances a known prognostic factor; **cluster** is mandatory when the interventionFrom CliffVale/opencode-free-setup, MIT.
More from CliffVale/opencode-free-setup
- 0.552score
ai-engineer
CliffVale
Topic-agnostic research AI engineer for ANY new subject.
SkillBFreshness: B★ 1Claude Code +9 - 0.552score
exploratory-data-analysis
CliffVale
Perform bounded, local exploratory analysis of explicitly supported scientific files.
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
clinical-reports
CliffVale
Create safety-bounded draft structures and run local deterministic checks for clinical case, diagnostic, trial, safety, and aggregate research reports.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
deepsearch-research
CliffVale
Deep internet research agent for training domain-specialist agents.
SkillBFreshness: B★ 1Claude Code +9 - 0.539score
brainstorm
CliffVale
Structured brainstorming with divergent/convergent phases.
SkillBFreshness: B★ 1Claude Code +9 - 0.291score
deep-research
CliffVale
No description from the publisher yet.
SkillBFreshness: B★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 24, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.1
- License
- MIT
- Repository
- github.com/CliffVale/opencode-free-setup
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from CliffVale
- 0.552score
ai-engineer
CliffVale
Topic-agnostic research AI engineer for ANY new subject.
SkillBFreshness: B★ 1Claude Code +9 - 0.552score
exploratory-data-analysis
CliffVale
Perform bounded, local exploratory analysis of explicitly supported scientific files.
SkillBFreshness: B★ 1Claude Code +9 - 0.549score
clinical-reports
CliffVale
Create safety-bounded draft structures and run local deterministic checks for clinical case, diagnostic, trial, safety, and aggregate research reports.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
deepsearch-research
CliffVale
Deep internet research agent for training domain-specialist agents.
SkillBFreshness: B★ 1Claude Code +9 - 0.539score
brainstorm
CliffVale
Structured brainstorming with divergent/convergent phases.
SkillBFreshness: B★ 1Claude Code +9
Cite this page
experimental-design skill. Agent Mart. https://agentmart.dev/skills/cliffvale-experimental-design (last updated 2026-10-24)