shrink

A debugging tool that uses group testing, checking groups of possible causes together, to find one or more guilty changes among many. A suspect can be a feature flag, configuration line, environment change, patch, plugin, or import.

In plain words
What is it for?
Use it when at least eight independently toggleable suspects may explain a failure and you expect one or a small number of culprits.
Why use it?
Testing dozens or thousands of suspects one by one is slow. Split-half testing narrows the search with far fewer runs when the suspects can be changed independently.

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/shrink
Any agent
npx skills add lexfrei/ccc --skill shrink
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 136 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 846 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.00136 $0.00846
Opus 5 $0.00068 $0.00423
Sonnet 5 $0.00027 $0.00169
Haiku 4.5 $0.00014 $0.00085

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

Security

Grade A, and why

shrink 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/shrink/SKILL.md · 43 lines

How it starts

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

When one culprit hides among n toggles, testing halves finds it in log2 n to 2·log2 n runs instead of n — the upper end pays for testing the second half after a pass: 32 flags → 5-10 runs, 1000 config lines → 10-20. The method is group testing; delta debugging is its generalization to multiple culprits.

Vocabulary: each suspect has a suspect value (as in the failing config) and an innocent value (as in the known-good one). "Test a subset" means: subset at suspect values, everything else innocent, run, record fail/pass.

Step 0 — baselines, always first

Two runs before any search:

  • All-innocent must pass. If it fails, the difference between good and bad is not in the suspect list — stop and widen the list.
  • All-suspect must fail. If it passes, the culprit interacts with something outside the list (environment, timing, data) — stop, the search space is wrong.

Skipping these two runs is how a whole binary search gets spent chasing a phantom.

Step 1 — split-half for a single culprit

Split the suspects in half, test one half. Fails → culprit inside, recurse into it. Passes → test the other half; fails → recurse there. Repeat to one suspect.

Both halves passing is a finding, not an error: the failure needs suspects from both halves at once. Re-split along a different boundary first (group by subsystem instead of by list order); if every split shows the same pattern, it is a genuine interaction — take the surviving suspects to the taguchi skill and rank them as factors.

Step 2 — delta debugging for multiple culprits

When more than one culprit is plausible, split-half alone can chase the first one and lose the rest. The ddmin scheme:

  1. Partition the current suspect set into k subsets (start k=2).
  2. Test each subset alone, and each complement (everything except that subset).
  3. A failing subset → it becomes the new suspect set, back to k=2.
  4. A failing complement → the removed subset was irrelevant, drop it, keep k.
  5. Nothing fails → double k (finer granularity); k above the set size means every remaining suspect is needed — that set is the answer.

Read the full file on GitHub · 43 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 · 43 lines · 136 tokens per session scan A 964ea1af7582

Subscribe to this mod's changes

shrink is a skill published in the GitHub repository lexfrei/ccc (9 stars, last pushed 3d ago), licensed BSD-3-Clause. It adds 136 tokens to every session and 846 once invoked, about $0.0007 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