About honey-compress
honey-compress is an agent skill for shortening prose files that are reread across sessions, intended for agents maintaining persistent context. It backs up the file and checks fidelity before accepting a smaller rewrite.
Key features
- 01Backs up the original file before editing
- 02Removes redundant prose while preserving instructions
- 03Checks rewrite fidelity and reduced size
- 04Restores the backup when verification cannot be fixed
- 05Reports byte counts and backup path
Use cases
- 01Condensing repeatedly loaded context files
- 02Reducing prose without changing distinct instructions
- 03Rewriting a file with a recoverable original
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ green-pt/ honey-for-devs --skill honey-compressAfter installing, type/honey-compressin Claude Code to confirm it loaded.
Details
From the project READMEHoney Compress
Apply Lever 2 to a file the agent re-reads every session. The cheapest token is the one not re-sent — a one-time rewrite that saves on every future load.
Do
- Back up first. Copy
FILE→FILE.original.md. If that backup already exists, stop and ask — never clobber a restore point. If no backup can be written, refuse. - Rewrite the prose tersely — drop wind-up, hedging, narration, and redundancy; fragments over paragraphs; merge guidance that repeats.
- Preserve every distinct instruction — terser words, identical rules. If unsure whether a line changes behavior, keep it verbatim.
- Verify, then keep or undo. Run
node "${CLAUDE_PLUGIN_ROOT}/bin/check.js" fidelity FILE.original.md FILE. It fails if any number, code span, URL, negation or safety word was lost, or if the file didn't get smaller. On a failure, fix the named loss, or restore the backup (cp FILE.original.md FILE) when the fix would cost the savings. Never report a failing rewrite as done. (IfCLAUDE_PLUGIN_ROOTis unexpanded,bin/check.jslives at the plugin root, two directories above this file; installed from npm it ishoney-check.) - Report original vs new byte count (the check prints it) and the backup path.
Keep exact — never compress
- Code blocks, commands, paths, identifiers, versions.
- Any load-bearing directive — MUST/NEVER rules, and anything touching auth, secrets, money, migrations, or deletes. Compressing an instruction that changes behavior moves cost, it doesn't remove it.
Don't
- Don't touch code, config, or data files — prose context only.
- Don't merge two rules into one if they differ in effect.
- Don't compress a file you can't back up.
Boundaries
Reversible by design — FILE.original.md is the restore path. The fidelity check is the floor, not the ceiling: it catches lost facts, not a reworded rule that changed meaning, so still read the diff.
Comments
Markdown supported