ratchet-files
Skill2.9k starsChanged 10 days agoMITView on GitHub
Ratchet source file size so every file stays small enough for an agent to read whole: find every file over a token budget, split oversized files by concept, and set up the pre-commit ratchet that stops them from growing. Use when a commit is blocked because a file is over the size budget, when asked to find or split oversized/long/god files, when a file you need to change is too large to read in one pass, or when asked to add a file-size limit or hook to a repository.
- Installs packages
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Run the script with --all from the repository root, passing the repository's --max-tokens if its hook sets one.
- Distinctive: line 46
Never install the hook without the user's explicit yes, even when they asked to set up the repository.
- Distinctive: line 55
Ask once, with everything the user is agreeing to: how many files the hook would freeze and which are largest, leaving out generated or …
- Very specific: line 70
Dependency: Add linguist-languages at an exact version as a dev dependency of the repository's root package.json, with the package manager …
- Very specific: line 76
Hook: Run the script on every staged file with node (or bun where the repository already runs its tools with it), appending --max-tokens N …
- Distinctive: line 97
Docs: Document the budget, the opt-out pragma, and that a clone needs a package install for the hook, where the repository documents its …
- Very specific: line 101
Commit the setup through the new hook, without --no-verify.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Ratchet Files
A source file is over budget when it is past what an agent can read in one
pass (8,000 tokens, counted as bytes / 4, unless the repository sets
another). scripts/check-file-size.mjs owns
what counts as source, the budget, the ratchet, and the split rules; run it
with --help before anything else.
Splitting
- Run the script with
--allfrom the repository root, passing the repository's--max-tokensif its hook sets one. Its list is the backlog. - Pick the files to split: the one blocking the work in front of you, or with no blocker, the largest ones a change is about to touch.
- Split each one by the rules the script prints. A seam is a concept the file already owns, not a line count; when refactor-clean is installed, use it to find them.
- Prove the split changed no behaviour with the repository's own checks, and commit it alone, before the change that needed the room.
A file whose every split would cost more than it saves (one table or state
machine that only reads whole) may opt out instead. Put
@ratchet-files-ignore in a comment within its first 10 lines, in the
file's own comment syntax, followed by why splitting fails:
// @ratchet-files-ignore: one opcode table; split, each half reads without the other.The check then skips the file entirely, even as it grows, so opt out only
after looking for a seam and finding none worth its cost, never to get past a
refusal. Tell the user each file you opt out and why. --all counts
opted-out files so they stay visible.
Done when every file you picked is under budget in its own commit, the
behaviour checks pass, and --all no longer lists those files.
Setting up the ratchet
Never install the hook without the user's explicit yes, even when they asked to set up the repository. Installing it freezes every file already over budget, so audit first and leave the repository untouched while you do:
- Copy the script to a scratch directory outside the repository, run
npm install --prefix <scratch> linguist-languagesthere, and runnode <scratch>/check-file-size.mjs --allfrom the repository root (Node 18.3 or later). The script finds the package beside itself when the repository lacks it. - Ask once, with everything the user is agreeing to: how many files the hook would freeze and which are largest, leaving out generated or vendored ones you will mark below (name those); the budget, 8,000 tokens unless they want another; and which pre-commit runner you will wire it into, including any you would add. In a repository without Node tooling, say the check adds it.
Once they agree, set up everything the check needs:
- Script. The hook runs a copy committed in the repository, so every
clone runs the same check. If this skill folder is committed in the
repository, point the hook at its
scripts/check-file-size.mjs; otherwise copy that file to where the repository keeps its tool scripts (scripts/if it has none). The entries below usescripts/check-file-size.mjs; substitute the real path. - Dependency. Add
linguist-languagesat an exact version as a dev dependency of the repository's rootpackage.json, with the package manager its lockfile names, or npm if there is none. The check needs Node even in a repository written in another language: with nopackage.json, create one at the root holding only"private": trueand what this setup adds, and make sure.gitignorecoversnode_modules/. Hook. Run the script on every staged file with
node(orbunwhere the repository already runs its tools with it), appending--max-tokens Nfor a budget other than the default. Add it beside the existing entries of the pre-commit runner the repository already has:Runner Where Entry lint-staged its config "*": "node scripts/check-file-size.mjs"lefthook pre-commit.commandsrun: node scripts/check-file-size.mjs {staged_files}pre-commit .pre-commit-config.yaml,repo: localid: ratchet-files,name: source file size,entry: node scripts/check-file-size.mjs,language: systemhusky or a plain hook the pre-commitscriptgit diff --cached --name-only -z | xargs -0 node scripts/check-file-size.mjsWith no runner, add husky with lint-staged as dev dependencies, run
npx husky init, replace the whole of.husky/pre-commit(it starts asnpm test) withnpx lint-stagedor the package manager's equivalent, and add the lint-staged entry above. Husky installs the hook on each clone's package install.- Exclusions. Mark generated and vendored code
linguist-generatedorlinguist-vendoredin.gitattributesinstead of adding skip lists. The script reads the staged.gitattributes, so stage it before rerunning--all. - Docs. Document the budget, the opt-out pragma, and that a clone needs a package install for the hook, where the repository documents its other hooks; failing that, in a section of its README, creating one if needed.
Commit the setup through the new hook, without --no-verify.
Done when the setup commit passed the hook, and the installed hook refuses
git commit both of a staged new source file over the budget (a .js file
of more than four bytes per token of budget) and of a line added to a file the audit
listed, printing the split rules. Unstage and discard both probes afterwards.
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about dzhng/jevgrep
- Alex Hitt“Jevgrep GitHub Explained: Semantic Code Discovery for AI Coding Agents”YouTube · Sep 30, 2026 · 4.6k views
- Amplify Imagination“Find code by asking what it does — jevgrep”YouTube · Sep 28, 2026 · 618 views
- 아르사(Artsa)“파일 이름을 몰라도 코드 위치부터 찾는 jevgrep — 원리, 공개 평가 읽는 법, OpenRouter 설정”YouTube · Sep 29, 2026 · 520 views
- Kod Radarı“jevgrep: Yapay Zeka Kodlama Ajanlarının Maliyetini Düşüren CLI”YouTube · Sep 28, 2026 · 249 views
- LookOnThisGit“Cut AI Token Waste by 40% with jevgrep 🤖”YouTube · Sep 27, 2026 · 107 views
The biggest 5 of 45 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 45
Talked about on YouTube, GitHub, the web, Bluesky and Hacker News (45 times).
On YouTube · 21
- Sep 30, 2026Jevgrep GitHub Explained: Semantic Code Discovery for AI Coding Agents — Alex Hitt4.6k views · 3 comments
- Sep 28, 2026Find code by asking what it does — jevgrep — Amplify Imagination618 views
- Sep 29, 2026파일 이름을 몰라도 코드 위치부터 찾는 jevgrep — 원리, 공개 평가 읽는 법, OpenRouter 설정 — 아르사(Artsa)520 views
- Sep 28, 2026jevgrep: Yapay Zeka Kodlama Ajanlarının Maliyetini Düşüren CLI — Kod Radarı249 views
- Sep 27, 2026Cut AI Token Waste by 40% with jevgrep 🤖 — LookOnThisGitsays it tested it107 views
16 more on YouTube
- Oct 5, 2026Ask Your Codebase Where Things Live #shorts — Repo Rush100 views
- Oct 3, 2026Jevgrep GitHub Explained: Custom System One Gateways and 422 Errors — Alex Hitt74 views
- Oct 4, 2026Jevgrep GitHub Overview: How Offline File Inventories Scope AI Code Search — Alex Hitt43 views
- Sep 29, 2026jevgrep: a free CLI that finds code by asking it a question — ViewOS42 views
- Sep 29, 2026jevgrep - free open source tool — RepoDrop33 views
- Sep 29, 2026hotin.ai daily · Sep 29, 2026 · lemomo-ai/lemo-opuscar — HotInAI23 views
- Sep 30, 2026hotin.ai daily · Sep 30, 2026 · glanderness/beeftv — HotInAI20 views
- Sep 29, 2026hotin.ai daily · Sep 29, 2026 · lemomo-ai/lemo-opuscar — HotInAI20 views
- Sep 30, 2026hotin.ai daily · Sep 30, 2026 · glanderness/beeftv — HotInAI15 views
- Sep 30, 2026jevgrep 잡으러 클로드·GPT 출동… 코드 찾기 최강 셰프의 정체!? 직접 먹어봄😋jevgrep — Hell's Kernel14 views
- Sep 28, 2026hotin.ai daily · Sep 28, 2026 · sparkcpark/synthetic_hospital — HotInAI13 views · 1 comment
- Oct 5, 2026Same tasks solved, about a third less paid for the tokens. #sketchthestack #ai #software #tech — Sketch The Stack10 views
- Sep 28, 2026hotin.ai daily · Sep 28, 2026 · sparkcpark/synthetic_hospital — HotInAI10 views
- Oct 7, 2026jevgrep: The Hottest TypeScript Repo on GitHub Right Now — Repo Radar9 views
- Oct 6, 2026jevgrep : ton agent IA de code, un quart moins cher — GitTendance8 views
- Sep 30, 2026Find code with about 30% lower cost — 89labsays it tested it8 views
On GitHub · 13
- Oct 26, 2026Weekly spot-check 2026-10-26 — StefanKasamakov/ai-compass0 reactions
- Oct 19, 2026[사례] jevgrep: 동작 기반 코드 검색 — tourbut/decision-lib0 reactions · 1 comment
- Oct 18, 2026agent-skills.github.dzhng.jevgrep: 0.8.3 → 0.8.5 — sudosubin/agents.nix0 reactions
- Oct 18, 2026agent-skills.github.dzhng.jevgrep: 0.8.1 → 0.8.3 — sudosubin/agents.nix0 reactions
- Oct 17, 2026agent-skills.github.dzhng.jevgrep: 0.8.0 → 0.8.1 — sudosubin/agents.nix0 reactions
8 more on GitHub
- Oct 17, 2026[Candidate] dzhng/jevgrep/.agents/skills/codex - codex — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 17, 2026[Candidate] dzhng/jevgrep/.agents/skills/claude - claude — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 12, 2026Weekly spot-check 2026-10-12 — StefanKasamakov/ai-compass0 reactions
- Oct 12, 2026dzhng 'jevgrep' — Jev 디시전 모델로 코드 검색, 코딩 에이전트 파일 탐색 비용 ~30% 절감 주장 — roomedia/ax-trendsays it tested it0 reactions
- Oct 4, 2026Clean up the Google Sheet so the graph gets real topics (Category values, duplicates, empty tabs) — Amitro123/knowledgeBase-Agent0 reactions · 3 comments
- Oct 3, 2026agent-skills.github.dzhng.jevgrep: init at 0.8.0 — sudosubin/agents.nix0 reactions
- Sep 27, 2026jevgrep: init at 0.3.0 — NixOS/nixpkgs0 reactions · 1 comment
- Sep 26, 2026docs: add jevgrep (dzhng) listing — AppitStudio/awesome-jev0 reactions
On the web · 8
- Oct 5, 2026Jev Is the New AI Starlet. Should Claude Be Worried? — theairarchitect.substack.com
- Oct 2, 2026Jevgrep: Find Code by Asking What It Does - Inside dzhng/jevgrep | PyShine — pyshine.com
- Oct 1, 2026Abdullah Chaudhary — linkedin.com
- Sep 29, 2026Codex Rate Limits Discussion Thread - Codex - OpenAI Developer Community — community.openai.com
- Sep 29, 2026Codex Rate Limits Discussion Thread - Codex - OpenAI Developer Community — community.openai.com
3 more on the web
- Sep 28, 2026Codex Rate Limits Discussion Thread - Codex - OpenAI Developer Community — community.openai.com
- Sep 28, 2026Codex Rate Limits Discussion Thread - Codex - OpenAI Developer Community — community.openai.com
- Sep 26, 2026jevgrep Review: Ask Where the Code Is | MrJev — mrjev.com
On Bluesky · 2
- Oct 1, 2026jevgrep — AIのコード探索コストを約30%削減するTypeScript製CLI ・自然言語でコードの役割を質問し、関連ファイルや該当箇所を特定 ・Claude Code等のAIエージェントにスキルとして組み込み可能… — @sarubot.bsky.socialsays it tested it2 likes and reposts
- Sep 26, 2026RT @dzhng: Introducing jevgrep - a research agent CLI powered by jev from @typesafeai that reduces your coding agent cost by 40% (verified… — @theo-mir-rt.selfhosted.socialsays it tested it0 likes and reposts · 1 reply
On Hacker News · 1
- Sep 28, 2026Jevgrep: A CLI for coding agents that uses Jev to discover relevant files5 points
Other versions1 project uses a version of this.
Word for word · 1
- dzhng/skills★ 1.4k100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository31 other files it gives its agents.
- AGENTS.mdAGENTS.md
- audit-agentsSkill
- audit-choicesSkill
- audit-performanceSkill
- audit-testsSkill
- auto-researchSkill
- claudeSkill
- close-specSkill
- code-reviewSkill
- codexSkill
- compare-screenshotsSkill
- design-with-imagesSkill
- eli5Skill
- eval-skillsSkill
- explore-unknownsSkill
- handoff-specSkill
- implement-specSkill
- implement-spec-with-codexSkill
- jevgrepSkill
- launch-videoSkill
- marketing-pagesSkill
- preview-shotsSkill
- refactor-cleanSkill
- reviewSkill
- screenshot-critiqueSkill
- typesafe-aiSkill
- write-docsSkill
- write-skillsSkill
- write-specSkill
- write-testsSkill
- jevgrepSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

