Ratchet files
ratchet-filesRecommended : fabricahq/public-library recommends installing this skill when you add its skills and rules. Forked from dzhng : fabricahq/public-library created its own copy of this skill from dzhng.
Keep every file small enough for an agent to read whole, and stop files from growing back.
Find every file over a token budget, split the ones in your way by the concepts they already own, and add a ratchet so files only ever get smaller.
Why it exists
Agents read big files in pieces, and miss the pieces they skip. A file an agent can read whole is a file it can change without breaking what it didn't see.
How it works
- It measures every source file against a token budget, 8,000 by default, and lists the ones over it.
- It splits an oversized file by the concepts it already holds, so each new file has one job and a name that says so.
- With your OK, it adds a pre-commit check: a file can't grow past the budget, and one already over it can't grow further.