mcpbeat

Ratchet Ledger

0xwilliamortiz/ratchet-ledger

> ledger at .ratchet/ledger.jsonl, the accepted complexity mark, and every upgrade trigger. Use when the user says "ratchet ledger", "/ratchet-ledger", "what did we defer", "show the complexity trend", "what shortcuts are in here", or asks whether the codebase is getting simpler or more complex over time. Reports real recorded numbers only, never estimates.

550 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
420
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/0xwilliamortiz/ratchet --skill ratchet-ledger

The instruction itself

5 sections, as written by the author

Ratchet ledger

Three sections. Real numbers only.

1. Trend

Read .ratchet/ledger.jsonl, one JSON object per finished session. Report

the last ten: date, mode, lines added, new dependencies, findings by tag, and

the repository line count at the end of that session.

Show the direction plainly. If the line count has risen for three sessions in

a row, say so.

If the file is missing, say the ratchet is not initialised for this repository

and that mkdir .ratchet turns it on. Do not invent a trend.

2. Mark

Read .ratchet/mark.json, the accepted high water mark. Compare it to the

repository now.

Below or equal to the mark: At the mark. Above it: report the gap and the

reason recorded on the mark, then ask whether to bring it down or accept a

new mark with a written reason.

3. Shortcuts

grep -rnE '(#|//|--) ?ratchet:' . --exclude-dir=node_modules --exclude-dir=.git

One row per hit, grouped by file:

<file>:<line> <what was simplified>. ceiling: <the limit>. upgrade: <the trigger>.

The convention is ratchet: <ceiling>, <upgrade path>, so both fields come

straight out of the comment. Any marker with no upgrade trigger gets tagged

no-trigger, those are the ones that rot silently.

End with <N> shortcuts, <M> with no trigger.

Honesty

Every number here is read from a file or counted from the tree. Never report

what a session "saved": the version that was not written was never written,

so there is nothing to subtract from. The trend and the shortcut count are

the real figures, and they are enough.

Reports only. Changes nothing unless asked to write the report to a file.

How to use it

Copy the folder

Take 0xwilliamortiz/ratchet-ledger from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.