token-saver
Skill0 starsChanged 7 days agoMITView on GitHub
Local Mac tools that do the heavy reading before Claude does - text in images (OCR), face detection, green screen / background removal and chroma key, Spotlight file search, one-frame-per-scene video contact sheets, and ffmpeg edits of photos, videos, gifs and audio (resize, convert, crop, web export, trim, gif, poster frame, speed, rotate, colour grade). Use whenever a task involves looking at images, screenshots or video, finding files on this Mac, cutting out a subject or replacing a background, or editing media assets.
22 other projects use a version of this.
Adopted by
Most recently taken up by
- taro1037-design/claude-skillstheir own version, first seen Oct 20, 2026
- chidekina/aria-superpowerstheir own version, first seen Oct 13, 2026
- otnc/agent-skillstheir own version, first seen Sep 27, 2026
- otnc/skills_ai-agent-saving-techtheir own version, first seen Sep 27, 2026
- DanielNoamTuby/claude-skillstheir own version, first seen Sep 20, 2026
- MissSophieSterling/agent-skillstheir own version, first seen Sep 19, 2026
Other versions22 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 22
- lokikill123/codex-token-skills★ 119same name
- 4pixeltechBR/token_saver_ClaudeCode★ 14same name
- 4pixeltechBR/Token-Saver★ 14same name
- SiruGao/token-saver★ 9same name
- caiolocateli46-cell/skills-caio★ 4same name
- otnc/skills_ai-agent-saving-tech★ 3same name
- chidekina/aria-superpowers★ 2same name
- OpenWorkai/claude-token-saver★ 2same name
- otnc/agent-skills★ 2same name
- LucioLiu/token-saver★ 1same name
12 more not listed
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.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 18 edited versions we read keep these.
1
Distinctive
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
- Distinctive: line 27
When you edit a video or make any asset for the person (a cutout, a key, a gif, an edit, a render), keep the intermediates inside a job.
- Very specific: line 30
Put every intermediate in $(tokprep job dir): tokprep's own outputs land there by themselves, and pass -o "$(tokprep job dir)" to your own …
- Very specific: line 32
When they approve it as final: tokprep job deliver <file> [--to <folder>] [--name <final name>], then tokprep job done.
- Very specific: line 33
If they want changes, keep iterating in the same job.
- Very specific: line 39
Cutouts: check the coverage numbers.
“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
token-saver: tokprep
The exact command for this machine is in your system prompt ("Local media/file prep on this machine: …"). On macOS that is the tokprep script, also linked at ~/.local/bin/tokprep; on Windows it is python "<plugin>\bin\tokprep".
Each command uses the Apple tool on macOS (Vision, Spotlight, sips, PDFKit). Elsewhere it uses the Windows alternative when the machine has one: Windows OCR and face detection (built in), Windows Search or Everything (es.exe), rembg for cutouts, pdftotext, and ffmpeg for sheets. If a command answers NOT AVAILABLE on this machine, do the task directly, as you would without tokprep: read the image or PDF yourself, use your own search. The hooks let a second Read of the same file through. Each command does the work on the Mac and prints a short result, or writes summary.md plus at most two labelled sheets. Read the summary first. Open a sheet only when the summary can't answer the question, and open a raw file only when the sheet can't either.
| Need | Command | |||||||||
| Words in a screenshot, photo or scan | `tokprep ocr <img | folder> [--fast]` | ||||||||
| Faces: how many, where, how sharp | `tokprep faces <img | folder>`: boxes in pixels, quality 0–1, one sheet of crops | ||||||||
| Overview of photos or videos | `tokprep media <files | folder>`: size, text, faces, people, scenes, transcript (macOS 26+, Apple SpeechAnalyzer) | ||||||||
| What happens in a video | tokprep scenes <video> [--threshold 0.3] [--max 24] [--min 1.0]: cut list, shot lengths, one frame per scene | |||||||||
| Cut a subject out / green screen | `tokprep cutout <img | video | folder> --bg transparent | green | blue | #hex | bg.jpg [--mode auto | subject | person] -o <dir>` | |
| Remove an existing green/blue screen | `tokprep key <img | video> [--color auto] [--similarity 0.12] [--bg transparent | bg.jpg] -o <dir>` | |||||||
| Find files on this Mac | `tokprep find <words> [--kind image | video | doc | slides | sheet | code | audio | folder | 3d] [--days N] [--name] [--in dir]` | |
| Edit photos, videos, gifs, audio | `tokprep asset <op> <files | folder> [options] -o <dir> [--preview]; run tokprep asset` alone to list ops | ||||||||
| Check a web page's layout | `tokprep web <url | file.html#anchor> [--widths 1440,390] [--select CSS]` | ||||||||
| A long file | tokprep file <path>, then tokprep peek <file> <a> <b> / tokprep grep <re> <file> |
Making an asset: always inside a job
When you edit a video or make any asset for the person (a cutout, a key, a gif, an edit, a render), keep the intermediates inside a job. That way they disappear once the final is approved.
tokprep job start "<what you are making>" --dest "<folder the person wants the final in>"- Put every intermediate in
$(tokprep job dir): tokprep's own outputs land there by themselves, and pass-o "$(tokprep job dir)"to your own ffmpeg/sips/python commands. Anything temporary you had to write elsewhere, register withtokprep job track <path>. - Show the person the candidate and ask whether it is the final version.
- When they approve it as final:
tokprep job deliver <file> [--to <folder>] [--name <final name>], thentokprep job done. Tell them where the final is and how much space was freed. The mod compacts the conversation after that turn, so the job's iterations stop taking up context. - If they want changes, keep iterating in the same job. If they drop the asset entirely, use
tokprep job abandon.
tokprep job done refuses to run before a final is delivered, never deletes a delivered final, and only deletes things the job made: its work folder, plus tracked files newer than the job and outside top-level or destination folders. Use --dry-run to see the list first. tokprep clean --days 7 removes old prep summaries and sheets made outside jobs.
Rules:
- Outputs: final assets go wherever the person says (
job deliver --to); never put intermediates in their folders. tokprep never overwrites a file; it adds-1,-2to the name. - Cutouts: check the coverage numbers. 0% means no subject was found; above 80% means the background was kept. Look at the before/after sheet only if those look wrong.
--mode personis for people only;subjectalso catches objects and dark silhouettes. - Chroma key: a green halo means raise
--similarity(0.15–0.2); holes in the subject mean lower it (0.08). - Formats: transparent video comes out as ProRes 4444
.mov. WebP is not available in this ffmpeg build: use AVIF or JPG.
Code: graphify first
For questions about a codebase, use graphify, not tokprep. When graphify-out/graph.json exists, run graphify query "<question>" before grepping or reading source, graphify path "<A>" "<B>" for relationships, graphify explain "<concept>" for one concept, and graphify update . after code edits. No graph yet: suggest /graphify . once. If graphify is not found, run tokprep graphify setup (the plugin does this once, after it is installed).
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.

