Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Enforces a measured complexity budget on coding work. Reaches for the standard library, native platform features and code that already exists in the repository before writing anything new, and treats every added dependency, file and line as a cost that has to be justified. A hook measures the real diff and reports overruns back mid-task, so the budget is a number, not a mood. Use this on ANY coding task: writing, refactoring, fixing, reviewing, choosing libraries, or designing an interface. Use
.claude/skills/0xwilliamortiz-ratchet/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 65% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -44% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 90% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 23% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -12% | 0% |
A ratchet turns one way. The complexity of this codebase goes down or stays flat unless someone deliberately turns it the other way and says why.
The budget applies to the solution, never to the reading. Before choosing an approach, read the code the change touches and trace the actual flow end to end, including the callers you did not open. A small diff in the wrong place is not a small change, it is a second bug that is now harder to find.
Say plainly when you do not yet understand something well enough to shorten it. That sentence costs less than a confident wrong patch.
Stop at the first rung that holds.
<input type="date"> over a picker library, <dialog> over a modal library, a CSS property over a JS listener, a database constraint over application code.A report names a symptom. Find the function every affected path routes through and fix it once. Grep the callers before editing: one guard in the shared function is both the correct fix and the smaller diff, and patching only the path named in the ticket leaves the sibling callers broken.
Each of these is measured by the hook and reported back to you. None of them is forbidden. All of them need a reason stated in the same response.
Findings arrive graded, and the grade tells you how much to trust them:
certain is parsed, not guessed. A dependency name read out of a manifest, an import of a named package. Treat it as fact.likely is structural. A function that forwards and nothing else, an interface with one implementation. Usually right, occasionally reading a stub or a deliberate seam.heuristic is shape matching. Often right, sometimes catching a lookalike. Judge it on the code in front of you.When a finding is wrong, say so in one line and move on. It is a detector, not an authority. What is not acceptable is silently ignoring a flag.
When it is wrong for a reason that will keep being true, silence it where it lives rather than arguing every time:
// ratchet-ignore: profiled, the clone is the hot path
const copy = JSON.parse(JSON.stringify(frame));That covers the line the comment sits on and the line after it. A repository that has been baselined already ignores everything that existed before the ratchet was installed, so anything you see is something this session did.
When you knowingly ship something with a ceiling, mark it where it lives:
# ratchet: single global lock, split per account if write throughput mattersThe comment names the ceiling and the trigger to revisit. /ratchet-ledger collects these, so a deferral cannot quietly become permanent.
Never trade these away for a smaller diff:
assert based self check or a single small test file. The smallest thing that fails when the logic breaks. No frameworks, no fixtures, no suite per function. Trivial one-liners need none.Code first. Then at most three short lines: what you left out, and the condition that should bring it back. If the explanation runs longer than the code, the explanation is the thing to cut. A paragraph defending a simplification is complexity smuggled back in as prose.
Explanation the user asked for is not overhead. Give it in full.
| Mode | New files | New deps | Added lines | On overrun | |------|-----------|----------|-------------|------------| | advise | 8 | 3 | 400 | findings only | | guard | 3 | 1 | 150 | findings and budget warnings | | strict | 1 | 0 | 60 | blocked on a certain finding or an overrun |
Default is guard. Switch with /ratchet advise|guard|strict|off. Per project overrides live in .ratchet/config.json.
Ratchet governs what gets built, not how you talk. Off with stop ratchet.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 9,939 | 12,338 | +24% | 1 | 1 | 0% | 1,868 | 3,075 | +65% | 0 | 0 | — |
case-02 | pass→pass | 10,520 | 2,439 | -77% | 1 | 1 | 0% | 1,616 | 1,594 | -1% | 0 | 0 | — |
case-03 | fail→pass | 19,253 | 5,997 | -69% | 1 | 1 | 0% | 3,887 | 2,164 | -44% | 0 | 0 | — |
case-04 | pass→pass | 14,088 | 3,679 | -74% | 1 | 1 | 0% | 2,805 | 1,872 | -33% | 0 | 0 | — |
case-05 | pass→pass | 12,874 | 4,118 | -68% | 1 | 1 | 0% | 2,061 | 1,906 | -8% | 0 | 0 | — |
case-06 | fail→pass | 7,366 | 6,063 | -18% | 1 | 1 | 0% | 1,265 | 2,398 | +90% | 0 | 0 | — |
case-07 | fail→fail | 2,853 | 9,236 | +224% | 1 | 1 | 0% | 464 | 2,406 | +419% | 0 | 0 | — |
case-16 | pass→pass | 13,210 | 3,982 | -70% | 1 | 1 | 0% | 1,860 | 1,850 | -1% | 0 | 0 | — |
case-08 | pass→pass | 5,096 | 4,731 | -7% | 1 | 1 | 0% | 823 | 1,961 | +138% | 0 | 0 | — |
case-09 | pass→pass | 12,199 | 8,831 | -28% | 1 | 1 | 0% | 2,287 | 2,822 | +23% | 0 | 0 | — |
case-10 | pass→pass | 12,029 | 4,094 | -66% | 1 | 1 | 0% | 1,813 | 1,845 | +2% | 0 | 0 | — |
case-11 | fail→fail | 14,056 | 4,659 | -67% | 1 | 1 | 0% | 1,984 | 1,948 | -2% | 0 | 0 | — |
case-17 | fail→pass | 7,568 | 1,872 | -75% | 1 | 1 | 0% | 1,167 | 1,435 | +23% | 0 | 0 | — |
case-12 | fail→pass | 12,243 | 1,897 | -85% | 1 | 1 | 0% | 1,759 | 1,555 | -12% | 0 | 0 | — |
case-13 | fail→pass | 10,826 | 2,961 | -73% | 1 | 1 | 0% | 1,682 | 1,671 | -1% | 0 | 0 | — |
case-14 | pass→pass | 12,698 | 3,129 | -75% | 1 | 1 | 0% | 1,968 | 1,669 | -15% | 0 | 0 | — |
case-15 | pass→pass | 9,857 | 12,975 | +32% | 1 | 1 | 0% | 1,342 | 1,741 | +30% | 0 | 0 | — |
case-18 | fail→pass | 14,454 | 1,745 | -88% | 1 | 1 | 0% | 2,215 | 1,510 | -32% | 0 | 0 | — |
case-19 | fail→fail | 8,145 | 5,452 | -33% | 1 | 1 | 0% | 1,636 | 2,275 | +39% | 0 | 0 | — |
case-20 | pass→fail | 7,621 | 3,181 | -58% | 1 | 1 | 0% | 1,247 | 1,722 | +38% | 0 | 0 | — |
case-21 | pass→pass | 11,660 | 2,402 | -79% | 1 | 1 | 0% | 1,804 | 1,561 | -13% | 0 | 0 | — |
case-22 | fail→pass | 10,797 | 2,591 | -76% | 1 | 1 | 0% | 1,606 | 1,612 | +0% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +32 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.