Plans, generates, verifies, and analyzes designed experiments (DOE) using the process-improve library. Covers factorial, fractional factorial, Plackett-Burman, Box-Behnken, central composite, and definitive screening designs, plus resolution, aliasing, power checks and effect/response-surface analysis.
Ships in doe-designer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
You are helping someone spend their lab time well. Every run costs money and days, so the design has to be right before the first sample is made, and the analysis has to be honest about what the data can and cannot support.
Never write out a design matrix yourself. Generate it with a tool, then verify it.
This is not a stylistic preference. Vazquez, Rother and Charles-Gonzalez (2026, arXiv:2512.17113) had GPT and Gemini models construct two-level fractional factorial designs with 8, 16 and 32 runs and 4 to 26 factors, and compared the results against the best-known designs on resolution and minimum aberration. The models produce optimal designs reliably only up to about eight factors, and degrade beyond that. A degraded design still looks entirely plausible on the page. A resolution-2 design aliases one main effect with another, so the experiment cannot answer its own question, and nobody finds out until the results make no sense.
The catalogs in this library do not have that failure mode. So:
generate_design (or create_factorial_design) to build the matrix.verify_design.py on it, or call evaluate_design with the
moment_aberration metric.If a user pastes in a design from a chatbot, a spreadsheet or an old report,
verify it before analyzing anything. moment_aberration works on any
two-level matrix with no generators or defining relation needed, so there is
never an excuse to skip the check.
Work through these in order. Do not jump to generating a design before you know what the user is actually trying to learn.
You need these before a design is meaningful. Ask for whatever is missing, but ask in one batch, not one question at a time:
A common and important correction: users often arrive asking for a response surface when they have eleven candidate factors. That is a screening problem. Say so, and explain the staging.
recommend_strategy takes the interview answers and returns a staged plan
with run counts, transition rules, budget allocation, assumptions and risks.
It applies deterministic decision rules rather than judgment, so use it
instead of reasoning from scratch about which design to pick.
python scripts/doe_tool.py call recommend_strategy --input strategy.json
Experiments are almost always staged: screen, then optimize, then confirm. Spending the whole budget on one big design is the most common expensive mistake. Aim to spend roughly a quarter to a third of the budget on the first stage and keep the rest for what the first stage teaches you.
python scripts/doe_tool.py call generate_design --input design_spec.json
Design types available: full_factorial, fractional_factorial,
plackett_burman, box_behnken, ccd, dsd, d_optimal, i_optimal,
a_optimal, mixture, taguchi. Omit design_type to let the tool choose
from the factors and budget.
Always include center points (default 3) for continuous factors: they buy a pure-error estimate and a curvature test for very little money.
See references/choosing-a-design.md for which design fits which situation.
python scripts/verify_design.py design.csv --require-resolution 4
This exits non-zero when the design does not meet the bar, so it is safe to
use as a gate. Then tell the user in plain words what the resolution means for
their experiment. references/verification.md has the wording for each
resolution and the other quality metrics worth reporting.
Give the user a run sheet in real units, not coded ones, with the run order randomized and a column to write results into. Randomization is not optional: it is what protects the experiment against drift in ambient conditions, operator fatigue and raw-material lots. If the user cannot randomize (a factor is too expensive to change), say that the analysis will need to treat it as a split-plot, and record which factor it was.
python scripts/doe_tool.py call analyze_experiment --input results.json
Analysis types: anova, effects, coefficients, significance,
residual_diagnostics, lack_of_fit, curvature_test, model_selection,
box_cox, lenth_method, confidence_intervals, prediction,
confirmation_test.
Always run residual_diagnostics. A model with a good R-squared and patterned
residuals is worse than useless, because it is confidently wrong. For an
unreplicated factorial there are no degrees of freedom for error, so use
lenth_method rather than an F-test.
references/analysis-workflow.md has the full sequence and the traps.
python scripts/render_plot.py --analysis analysis.json --type pareto --output pareto.png
Lead with a Pareto or half-normal plot of the effects, then main-effects and
interaction plots for whatever turned out to matter. Write .png for a
static image or .html for an interactive page that needs nothing installed.
optimize_responses finds settings that balance several responses via
desirability. Whatever it returns is a prediction, and predictions at the
edge of the design space are the least trustworthy ones. Always propose
confirmation runs and check them with analysis_type: confirmation_test.
python scripts/doe_tool.py call recommend_next_step --input study.json
After every round, pass every run made so far and do what action says,
rather than choosing the next design by hand. It judges the terms, tests
whether anything stands out at all, and returns the next runs in real units,
the reasons with their numbers, and what to do with the runs once made:
append them to runs and call again; for confirm, pass them as
confirmation_runs; for widen_ranges and move_region, change the ranges
as the reply says and start the runs afresh. Pass history, the actions so
far, and ranges_can_move: false when a range is a hard limit. Quote its
reasons to the user: they are the evidence, not a paraphrase of it.
Every tool below is reachable through scripts/doe_tool.py call <name>, and
scripts/doe_tool.py list prints whatever the registry currently holds. Run
python scripts/doe_tool.py spec <name> to see the exact input schema before
calling, rather than guessing at field names.
| Tool | Use it for |
|---|---|
recommend_strategy | "How should I plan this?" Staged plan from factors, budget, domain |
doe_knowledge | Definitions, design-type descriptions, diagnostics, decision logic |
query_concept_graph | How the textbook's terms connect, in Cypher: what remedies a symptom, what a method needs, how two ideas are related. Every answer carries the book line. Needs pip install relate-db |
generate_design | Build a design matrix |
write_run_sheet | The runs as a CSV or Excel sheet for the lab or an upload: actual or coded units, columns named or X01..Xnn, empty response columns |
read_run_sheet | A filled sheet back into the factors' names and actual units, whichever units and labels it was written in |
create_factorial_design | Quick 2^k full factorial |
evaluate_design | Resolution, aliasing, moment aberration, D/I/G-efficiency, VIF, power |
compare_designs | Several designs side by side for one model: A, D, E, G, I, max correlation, power |
simulate_design_performance | "Would this design find what I expect?" Designs run many times on the process you expect and analyzed as the next step analyzes them: the share that finds each term, false alarms, distance from the best settings |
analyze_experiment | ANOVA, effects, diagnostics, Lenth, Box-Cox, confirmation |
analyze_omars | The staged analysis of a definitive screening (DSD) or OMARS design; returns a model formula to fit and optimize |
yates_table | The working a textbook prints for a full 2^k or 3^k factorial: Yates's columns, effects and sums of squares; with keep, a 2^k model's fitted values by the reverse algorithm |
interaction_components | The two-degree-of-freedom components of interactions of three-level factors: AB and AB^2 (Yates's J and I), ABC to AB^2C^2 (Z, Y, X, W) |
recommend_next_step | "What do I run next?" After every round: confirm, axial runs, fold-over, the path of steepest ascent, or stop, with the runs in real units |
suggest_next_runs | "Where do I run next?" when no quadratic fits, for a computer experiment, or for runs made one at a time: the runs (1 to 50) where a Gaussian process of every run expects the most improvement, inside the limits, to raise or lower a response or to bring it to a target; little_to_gain says when to confirm instead |
fit_gaussian_process | A model of a computer experiment (passes through every run), or with noise of runs no quadratic fits: each input's correlation parameter and its share of the variance (sensitivity), and predictions with standard errors |
variance_components | "How much of the spread comes from the batch, the operator, the test?" REML variance components of random factors, crossed or nested, with intervals and each fixed term's test |
multistratum_anova | Runs made in groups of several sizes (split-plot, strip-plot, blocks): each term tested against its own stratum's error; without a response, the skeleton's degrees of freedom, to judge a design before it is run |
fit_linear_model | Explicit model formula when you need control |
augment_design | Add runs: fold-over, axial points, replicates, de-aliasing |
optimize_responses | Multi-response desirability optimization |
visualize_doe | 21 plot types, returns Plotly and ECharts specs |
trade_off_table | Two-level runs-against-factors table: what each budget buys, and its aliasing |
doe_knowledge is the right first call whenever the user asks a conceptual
question ("what is aliasing?", "why center points?"). It returns curated
content from the library's knowledge base rather than a paraphrase.
When the question is about how ideas connect ("what fixes curvature?", "how
is aliasing related to steepest ascent?"), use query_concept_graph. Call it
with no input first: it returns the labels, the link types and example
queries. Quote the evidence of each link you use: it is the line of the
textbook that states it.
Give the user, every time:
Round sensibly. A factor setting of 152.3847 C is false precision, and an effect quoted to six figures invites more confidence than eight runs support.
Load these as needed; they are not required reading for every task.
references/choosing-a-design.md - which design for which situation, run
counts, and the screening-versus-optimization distinction.references/verification.md - what resolution and the other quality
metrics mean, and how to phrase them.references/analysis-workflow.md - the analysis sequence, unreplicated
designs, transformations, and diagnostic traps.references/worked-example.md - a complete end-to-end session.The scripts need process-improve:
pip install 'process-improve[plotting]'
Each script also carries a PEP 723 header, so uv run --script <script> will
build the environment on its own with nothing installed up front. If a script
reports a missing import, the message names the extra to install.
examples/README.md (opens in a new tab)examples/design_spec.json (opens in a new tab)examples/screen_coded.csv (opens in a new tab)examples/screen_results.csv (opens in a new tab)examples/strategy_spec.json (opens in a new tab)references/analysis-workflow.md (opens in a new tab)references/choosing-a-design.md (opens in a new tab)references/verification.md (opens in a new tab)references/worked-example.md (opens in a new tab)scripts/doe_tool.py (opens in a new tab)scripts/render_plot.py (opens in a new tab)scripts/verify_design.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/doe-designer:doe-designerfrom doe-designer
npx claudepluginhub kgdunn/process-improve --plugin doe-designerOther plugins' skills for the same job