/doe:tune [knob=low/mid/high ... goal=minimize|maximize|target]from doe
Optimizes numeric outcomes (latency, throughput, memory, cost) over 3+ knobs using Taguchi designed experiments and S/N-ratio analysis. Useful when measurements are expensive and knobs may interact.
Ships in doe. 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.
None: SKILL.md is the whole skill.
Tuning is the taguchi skill pointed at optimization instead of blame: same arrays, same run sheets, but the outcome is a number to improve and the analysis picks the best level of every knob at once. One L9 pass over four 3-level knobs reads out all four response curves in 9 runs; one-knob-at-a-time needs 12 runs and still misses interactions.
Use the taguchi skill's steps 1-4 for factor definition, array selection, and the run sheet, with two tuning-specific defaults:
Generate the sheet with the taguchi skill's scripts/design.py (../taguchi/scripts/design.py from here) — the array, the columns and the dummy treatment are mechanical, and a hand-built sheet is where a silent transcription error enters.
Keep it in the journal (../taguchi/scripts/experiment.py new ... --repeats 3) and let ../taguchi/scripts/run.py execute the sheet — a benchmark is a command, so the array is one invocation with --metric 'p95=([0-9.]+)' instead of a dozen hand-run measurements, and the per-row repeats the S/N ratio needs come out balanced.
Measure the current configuration first, before the array. It is the reference every S/N number is judged against, and it is the cheapest check that the measurement harness reports what you think it does.
Taguchi's signal-to-noise ratio folds "good on average" and "stable" into one number computed per row from its repeats y1..yn. Higher is always better:
| Goal | S/N per row |
|---|---|
| Minimize (latency, RSS, cost) | −10·log10(mean(y²)) |
| Maximize (throughput, hit rate) | −10·log10(mean(1/y²)) |
| Hit a target (offset, utilization) | 10·log10(ȳ²/s²) |
Exactly the taguchi skill's column-wise analysis, applied to S/N: for each knob, average the S/N over all rows at each level; the best level is the highest mean; Δ between best and worst level ranks how much each knob matters. Knobs with flat Δ are free — set them by cost or convenience.
Do not compute decibels by hand. The taguchi skill's scripts/analyze.py takes the goal and does the whole pass — per-row S/N, level means, ranking, the permutation p that says which Δ is noise, and the predicted optimum:
python3 ../taguchi/scripts/experiment.py csv latency > results.csv
python3 ../taguchi/scripts/analyze.py results.csv --goal minimize
python3 ../taguchi/scripts/analyze.py results.csv --goal target=200
One CSV row per array row, repeats in y1..yn columns — the repeats are what the S/N ratio is computed from, so a single-column sheet only supports minimize and maximize.
The predicted optimum is the combination of every knob's best level. It is usually not a row of the array — that is expected, the array sampled the space, the analysis extrapolated.
--goal target=VALUE does not rank on S/N alone: the nominal-the-best ratio scores stability and is blind to the value you are aiming at, so ranking by it recommends the most stable knob setting regardless of where the mean lands. The script prints step 5's two-step answer instead — stability knobs at their highest-S/N level, the knobs flat on S/N set to land the mean on the target, and the predicted mean printed next to the target so the miss is visible.
A pass/fail sheet has no S/N at all. analyze.py says so and reads it as blame rather than optimization: the best level of a failure-rate table is the level holding the failures, which is a recommendation pointing exactly backwards.
Run the predicted optimum. Matches or beats the best array row → done. Falls clearly short of the prediction → the additivity assumption broke, interactions dominate. On a 2-level array, fold the design over per the taguchi skill's step 7; on L9 or L18 fold-over de-aliases nothing (its guarantee is a 2-level construction), so run the full factorial on the two highest-Δ knobs, or re-center with a zoom round.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
taguchi, experiment-design, optimization, parameter-tuning, sn-ratio
npx claudepluginhub lexfrei/ccc --plugin doe4 skills in this plugin
/pairwiseGenerate a minimal pairwise covering array for factors with arbitrary mixed level counts, using the bundled deterministic generator. TRIGGER — invoke when a debugging or testing plan has 3+ independent factors whose level counts do not fit the fixed taguchi arrays (a 4-level factor, a 5-value enum, uneven mixes like 4x3x2x2) and each run is expensive. DO NOT TRIGGER when every factor has 2-3 levels (use the taguchi skill - balanced arrays support effect ranking), for a single factor (bisect it), or when runs are cheap enough to brute-force the full factorial./shrinkFind the guilty few among many boolean suspects with group testing (split-half, delta debugging) instead of toggling one thing at a time. TRIGGER — invoke when 8+ independently toggleable suspects (feature flags, config lines, env-var deltas, patches, plugins, extensions, imports) hide an expected single culprit or small set and each run is expensive; the moment the plan looks like "disable them one by one" this replaces it. DO NOT TRIGGER for ranking several contributing factors (use the taguchi skill), for ordered history (git bisect does this natively), for suspects that cannot be toggled independently, or for cheap runs./taguchiPlan a minimal set of debugging or testing runs with a Taguchi orthogonal array instead of changing one factor at a time. TRIGGER — invoke proactively whenever a debugging, tuning, or repro plan involves 3+ independent candidate factors (flags, versions, environments, config values) and each run is expensive (slow build, CI round-trip, flaky repro, hardware cycle); the moment the plan starts to look like "try A, then B, then A+B" this skill replaces it. Also on explicit ask - "taguchi", "orthogonal array", "DOE", "design of experiments", "plan the runs", "reduce iterations". DO NOT TRIGGER for a single suspected factor (bisect it), runs cheap enough to brute-force the full factorial, factors that cannot be set independently, or pure code-reading investigation with no experiment loop.Other plugins' skills for the same job