tune

A method for choosing values for three or more numeric settings, such as timeouts, batch sizes, or resource limits, using structured experiments and signal-to-noise analysis. Signal-to-noise analysis compares improvement with variation across repeated runs.

In plain words
What is it for?
Use it to optimize latency, throughput, memory use, or cost by testing several levels of multiple settings and selecting a combination.
Why use it?
It avoids adjusting one setting at a time and helps account for settings that may affect one another.

Skill for Claude CodeCodex

Part of the doe plugin — 4 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lexfrei/ccc/tune
Any agent
npx skills add lexfrei/ccc --skill tune
Clone the repo
git clone --depth 1 https://github.com/lexfrei/ccc

Made for: Claude Code, Codex.

Or install doe, the plugin that ships this one along with the rest of its 4 skills.

Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,365 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00120 $0.01365
Opus 5 $0.00060 $0.00682
Sonnet 5 $0.00024 $0.00273
Haiku 4.5 $0.00012 $0.00136

Measured 3d ago against content hash 8f1cfe0b7001, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tune scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/doe/skills/tune/SKILL.md · 61 lines

How it starts

The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Step 1 — design via the taguchi skill

Use the taguchi skill's steps 1-4 for factor definition, array selection, and the run sheet, with two tuning-specific defaults:

  • Prefer 3 levels per knob — low, mid, high of the plausible range. Two levels see only a line; three see curvature, which is where optima live. L9 fits four 3-level knobs, L18 fits seven plus one binary.
  • Run every row 2+ times. Variance per row is data here, not noise to average away — the S/N analysis below needs it.

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.

Step 2 — pick the S/N ratio for the goal

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²)

Read the full file on GitHub · 61 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 61 lines · 120 tokens per session scan A 8f1cfe0b7001

Subscribe to this mod's changes

tune is a skill published in the GitHub repository lexfrei/ccc (9 stars, last pushed 3d ago), licensed BSD-3-Clause. It adds 120 tokens to every session and 1,365 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens