experimental-design
What it does
This tool helps plan scientific experiments or studies. It decides how to organize participants or samples into different groups, how to introduce randomness, and how to group similar units to ensure results are clear and reliable.
When to use it
- βWhen planning a study and deciding how to divide participants.
- βWhen wanting to ensure results are reliable, avoiding common errors.
- βWhen needing to create a plan to test different conditions or treatments.
Skill link
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/experimental-design/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI want to compare two drugs. How should I divide 100 patients into two groups to be sure the comparison is fair?β
5 new skills a week. 1 minute to read.
How it works
The tool uses principles like randomization to avoid bias, replication to estimate variability, and blocking to control factors that might influence results. It helps choose the best plan before data collection.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
uv venv --python 3.13 .venv-design
uv pip install --python .venv-design/bin/python "numpy==2.5.3" "pandas==3.0.6" "pydoe==1.5.0"
pyDOE3 was archived in May 2026; active
development returned to pydoe. The bundled
wrappers target pydoe==1.5.0, imported as lowercase pydoe, and return
designs in real factor units. All seven DOE wrappers and both script demos were
executed with Python 3.13, NumPy 2.5.3, pandas 3.0.6, and SciPy 1.18.1. On
Windows, the environment interpreter is .venv-design/Scripts/python.exe.
Archive the environment versions and exported schedules: a seed alone does not
promise identical output across package or script upgrades.
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 (watch carry-over and correlation).
β ββ You can only randomize groups, not individuals (schools, clinics)?
β β CLUSTER-randomized design (account for clustering; 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
β¦
FAQ
What is randomization in an experiment?
It's the act of assigning treatments or groups randomly, like flipping a coin, so that unknown factors don't influence the results, allowing for conclusions about cause and effect.
What is replication and why is it important?
Replication means repeating the experiment or measurement on independent units. This is crucial for estimating the natural variability in the data and ensuring observed effects aren't just by chance.
What is blocking?
It's grouping similar units (e.g., patients from the same hospital or samples from the same batch) and then randomizing within those groups. This helps remove unwanted variation from these groups from the final result, making the main effect clearer.
Details
Original description by the author
Designs 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
Popularity
- GitHub stars
- 51k
- Ranking position
- #3458
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
13c-metabolic-flux
51kEstimates metabolic fluxes using carbon-13 isotope tracing data. It is useful for analyzing cellular metabolism and biochemical pathways.
adaptyv
51kDesigns protein characterization experiments using the Adaptyv API. It helps estimate costs, submit sequences, and monitor lab results.
aeon
51kPerforms machine learning tasks on time series data. It is useful for classifying, forecasting, detecting anomalies, and finding patterns in sequential data.
alphagenome
51kLooks up precomputed genomic effects for genetic variants. It provides scores and explanations to understand the impact of variants on the genome.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.