caveman-compress
Skill4 starsChanged 24 days agoApache-2.0View on GitHub
Compress a memory or instruction file (AGENTS.md, CLAUDE.md, todo list, preferences) into caveman prose to save input tokens, keeping a readable backup outside the source tree. Trigger: /caveman-compress <filepath>.
- Reads credentials
57 other projects use a version of this, 54 of them edited.
Adopted by
Most recently taken up by
- kuni29/claude-skillsedited, first seen Nov 29, 2026
- elidadutra187/claude-skillsedited, first seen Nov 29, 2026
- kanjiandahai/skills-collectiontheir own version, first seen Nov 29, 2026
- carriegale2710/skills-libraryedited, first seen Nov 29, 2026
- Snakeblack/ospec-workflowtheir own version, first seen Nov 29, 2026
- gameyfin/gameyfinedited, first seen Nov 16, 2026
Used with
Projects with it also use cavecrew, caveman-evidence-review and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JuliusBrusseeSkillcavecrew
When to delegate to `cavecrew-investigator` (locate code), `cavecrew-builder` (1-2 file edit) or `cavecrew-reviewer` (diff review) instead of working inline or using `Explore`. Their output is compressed, so main context lasts longer.
Also in 32 projects that use this
JuliusBrusseeSkillcaveman-evidence-review
Read-only review of Caveman Cloud evidence: cost, Cave Score, workflows, traces, latency, errors, routing, savings. Use when asked what Caveman found or where LLM spend goes.
Also in 7 projects that use this
- +6 more from JuliusBrussee
Other versions57 projects use a version of this.
Word for word · 0
None found.
Edited · 54
- JuliusBrussee/caveman★ 124k23% same
- gameyfin/gameyfin★ 1.2k24% same
- HoangNguyen0403/agent-skills-standard★ 56528% same
- dbt-labs/docs.getdbt.com★ 22327% same
- goern/forgejo-mcp★ 16626% same
- kubestellar/console★ 15527% same
- rawsun007/claude-notch★ 11627% same
- vobase/vobase★ 6028% same
- Namma-Flutter/namma_wallet★ 5927% same
- nitingupta220/riperflow★ 1927% same
44 more not listed
Wrote their own version · 3
- Snakeblack/ospec-workflow★ 4same name
- kanjiandahai/skills-collection★ 1same name
- Gopyr/gopyr-skills-hub★ 0same name
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 repository13 other files it gives its agents.
- caveman-commitSkill
- caveman-helpSkill
- caveman-reviewSkill
- cavemanSkill
- caveman-statsSkill
- investigate-firstSkill
- lean-buildSkill
- megacaveSkill
- migrationSkill
- safe-refactorSkill
- surgical-patchSkill
- ultracaveSkill
- verify-and-stopSkill
The file
We split this skill into the rules it gives an agent
5 rules. 1 is common, 2 are distinctive, and 2 are very specific to this project.
1
Common
Most of the 53 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Requires an explicit filepath: If the user pastes text instead of naming a file, do not compress it inline: ask for the path, or offer to …
- Very specific: line 45
Never compress a *.original / *.original.md backup.
- Very specific: line 55
Keep the backup out of the source directory: an AGENTS.md.original.md next to AGENTS.md is itself an instruction file that agents will read.
- Distinctive: line 70
If validation fails twice, restore the original from the backup and report the failure.
- Common: line 95
All markdown headings: keep the exact heading text, compress only the body below
“Common” is measured: kept by at least 6 in 10 of the 53 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
Caveman Compress (DSH port)
<!-- ADAPTED FOR DEEPSEEK HARNESS. Upstream (JuliusBrussee/caveman, Apache-2.0) ships this skill
with a Python CLI that sends the file to the `claude` CLI, the Anthropic API or an
OpenAI-compatible endpoint. This host already has a model in the session, so this port drops
the external endpoint and the Python script, and states the backup and validation rules in
terms DSH can actually keep. The compression rules below are upstream's. -->Purpose
Compress natural-language files (AGENTS.md, CLAUDE.md, todo lists, preferences) into caveman prose to reduce input tokens. The compressed text overwrites the original file; a readable backup is written OUTSIDE the source tree so agents do not re-read it as a live instruction file.
No file leaves this machine for compression. The running session's own model does the rewrite. Nothing is uploaded to a third-party endpoint and no API key is involved.
Trigger
/caveman-compress <filepath> or the user asks to compress a memory file.
Requires an explicit filepath. If the user pastes text instead of naming a file, do not compress it inline: ask for the path, or offer to save the pasted text to a file first. Never let your own commentary about the request ("user pasted text, not a path") end up in a saved file.
Refuse before reading
Refuse and explain, without reading the file, when the name looks like a secret or credential:
.env, .env.*, credentials*, secrets*, *.key, *.pem, .netrc, *.p12, id_rsa*,
anything under .ssh/, and any file whose first line is a private key header.
Refuse when the file is not natural language. Compress only .md, .txt, .typ, .typst,
.tex, or an extensionless text file. Never compress .py, .js, .ts, .json, .yaml,
.yml, .toml, .env, .lock, .css, .html, .xml, .sql, .sh, or any file with a code
file's extension. If unsure whether content is code or prose, leave it unchanged.
Never compress a *.original / *.original.md backup. Skip a file that is already under
.caveman/backups/.
Process
- Resolve the path against the session workspace. Read the file.
- Choose the backup path:
.caveman/backups/<the file's path relative to the workspace>.original.md(AGENTS.md→.caveman/backups/AGENTS.md.original.md,docs/AGENTS.md→.caveman/backups/docs/AGENTS.md.original.md). Create the directories. Write the ORIGINAL bytes there before touching the source file. Keep the backup out of the source directory: anAGENTS.md.original.mdnext toAGENTS.mdis itself an instruction file that agents will read. - Rewrite only the prose, following the rules below. Keep the file's language.
Validate with the helper that ships with this skill:
node <skill dir>/scripts/verify-compress.mjs <backup> <compressed>It checks that every fenced code block and inline code span survived byte-identical, that all headings survived, that the file got smaller, and that no secret-looking path was written. A failing check means: fix the compressed file and re-run; do not overwrite.
- Overwrite the original only after the check passes. Report before/after byte sizes, the backup path, and what was preserved. Never report token counts or money saved: this host records no measured comparison, so savings stay unknown.
If validation fails twice, restore the original from the backup and report the failure. Leave the file as it was.
Compression Rules
Remove
- Articles: a, an, the (when the sentence still reads in one pass)
- Filler: just, really, basically, actually, simply, essentially, generally
- Pleasantries: "sure", "certainly", "of course", "happy to", "I'd recommend"
- Hedging: "it might be worth", "you could consider", "it would be good to"
- Redundant phrasing: "in order to" → "to", "make sure to" → "ensure", "the reason is because" → "because"
- Connective fluff: "however", "furthermore", "additionally", "in addition"
Preserve EXACTLY (never modify)
- Code blocks (fenced ``` and indented)
- Inline code (
backtick content) - URLs and links (full URLs, markdown links)
- File paths, commands, environment variables (
$HOME,NODE_ENV) - Technical terms (library, API, protocol, algorithm names), proper nouns
- Dates, version numbers, numeric values, negative words (not, never, no, only, except)
Preserve structure
- All markdown headings: keep the exact heading text, compress only the body below
- Bullet nesting, numbered list numbering, table structure, frontmatter / YAML headers
Compress
- Short synonyms: "big" not "extensive", "fix" not "implement a solution for", "use" not "utilize"
- Fragments fine: "Run tests before commit" not "You should always run tests before committing"
- Merge bullets that say the same thing twice; keep one example where several show one pattern
CRITICAL: anything inside ... or ... is copied exactly. Do not remove comments,
spacing, order, or shorten commands. If the file mixes prose and code, compress only prose; do not
merge sections around code blocks.
Example
Original:
You should always make sure to run the test suite before pushing any changes to the main branch. This is important because it helps catch bugs early and prevents broken builds from being deployed to production.
Compressed:
Run tests before push to main. Catch bugs early, prevent broken prod deploys.
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.

