SkillsReviewed · juliusbrussee

Caveman Compress

Caveman Compress is a skill for developers shortening AI memory and instruction files, but its checks cannot guarantee that rewritten prose keeps its meaning. It overwrites the source, keeps an original backup and submits content to a configured local or remote model. Actual token savings and provider costs are unknown.

Researched 13 Nov 2026

In short.

Caveman Compress is a skill for developers reducing the size of AI memory and rule files, with the catch that its structural checks cannot prove the shorter instructions mean the same thing. Its Python scripts preserve selected content, validate a staged candidate and back up the original before replacing the source. Compression can use Claude, Anthropic's API, Codex, opencode or an OpenAI-compatible endpoint. The code requires fewer body characters, which does not guarantee fewer tokens. Privacy filters have visible limitations, and the instruction sheet overstates the implemented repair allowance. Token savings, downstream assistant quality, compatibility and operating costs are unknown. Nothing was executed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage comprises the complete plugins/caveman/skills/caveman-compress folder: SKILL.md and seven Python files, plus the supplied root LICENSE, LICENSE-MIT and NOTICE, all pinned to revision ad473752bdc86ca96d7289443228d4c53ec119a8. Linked pages, LICENSING.md, other repository folders, external dependencies and test fixtures are excluded. The original source address and pinned source identity are retained. Runtime behavior, provider permissions, compatibility, token savings, semantic preservation, recovery outcomes and actual costs were not tested.

The overview

identity

Caveman Compress is the instruction skill and accompanying Python scripts at [https://github.com/juliusbrussee/caveman/tree/main/plugins/caveman/skills/caveman-compress]. It turns natural-language memory files, rules and todo lists into terse prose intended to consume fewer input tokens.

The documented assistant command is /caveman-compress <filepath>. The implementation also exposes a Python module entry point. This resource covers the selected skill folder; other Caveman products and repository folders are outside its scope.

assessment

The clearest fit is a project that repeatedly loads lengthy prose instructions and has someone available to review the rewrite. The implementation contains useful safeguards: strict UTF-8 decoding, protected-content masking, staged validation, a verified original backup and atomic file replacement.

Treat it as assisted editing that needs review. A passing candidate can still omit an exception, weaken an instruction or change an unprotected number. No supplied results establish token savings, preserved task performance or successful operation on a particular backend.

users

Likely users include developers maintaining CLAUDE.md, project preferences, todo lists and editor rule files. Beginners need to be comfortable identifying the exact file, choosing where its content may be sent and finding the backup. Experienced developers can configure providers and inspect the validation logic.

It is a poor fit when prose must retain exact wording or cannot be disclosed to the configured model service. A local endpoint is supported, but the endpoint's own data handling is not established by these files.

capabilities

The detector accepts .md, .mdc, .txt, .markdown, .rst, .typ, .typst and .tex files, several named prose dotfiles and extensionless files classified as natural language. It skips recognized code and configuration files, .original.md backups and files whose first line identifies them as generated.

The orchestrator preserves YAML frontmatter separately and masks fenced code, indented regions, block HTML comments and explicit nocompress regions before the initial model request. Validation compares headings, code blocks, URLs, inline code and recognizable paths. Bullet-count changes and several other differences produce warnings rather than blocking replacement.

Using it

requirements

Python 3.10 or newer is implied by the source's type syntax; a supported-version matrix is not supplied. Input must be valid UTF-8, contain compressible body text and be no larger than 500,000 bytes. The process needs permission to create a temporary file beside the source and write its backup and lock directories.

A configured backend is also required. CLI backends need their respective executable and authentication. The explicit Anthropic backend requires ANTHROPIC_API_KEY and the anthropic Python package. OpenAI-compatible requests use Python's standard library and require a model name. The optional tiktoken package affects benchmark counting, not compression itself.

mechanism

The program rejects sensitive-looking paths, checks file suitability, reads the source and scans for selected credential patterns before requesting compression. It removes frontmatter from the request and replaces protected blocks with markers. The returned candidate must restore those markers correctly and contain fewer body characters than the original.

An initial candidate that passes those preliminary checks triggers creation of a byte-for-byte original backup. The program verifies that backup, stages the candidate beside the source and runs structural validation. Only a passing candidate is written to the live path using atomic replacement.

The validation loop has two passes and can request one repair, despite SKILL.md describing up to two retries. The repair request includes the original body and candidate without the initial protected-block masking. Consequently, protected code and comments can reach the provider during repair; preservation markers are not a privacy boundary.

setup

Keep SKILL.md and the complete adjacent scripts directory together. The documented direct invocation, from the skill directory, is python3 -m scripts /absolute/path/to/CLAUDE.md. An assistant host can expose /caveman-compress with an explicit filepath. Host-specific installation instructions are not supplied in this folder.

CAVEMAN_COMPRESS_PROVIDER accepts claude, anthropic, codex, opencode or openai-compat. The default label is claude: it uses the Anthropic SDK when ANTHROPIC_API_KEY is set and the package is available, otherwise the Claude CLI. CAVEMAN_COMPRESS_MODEL overrides CAVEMAN_MODEL. The SDK path defaults to claude-sonnet-4-5.

For an OpenAI-compatible server, set the provider and model, then configure CAVEMAN_COMPRESS_ENDPOINT if needed. Its default is [http://localhost:11434/v1]. CAVEMAN_COMPRESS_API_KEY supplies optional bearer authentication. These configuration paths are visible in the code; successful connections and model availability were not assessed.

example

An illustrative trial would use /caveman-compress /work/demo/CLAUDE.md on a disposable copy containing a verbose reminder to run tests before pushing, followed by a fenced command block. The intended result is a shorter reminder with the command block preserved. This is an example scenario, not an observed output.

Under default Unix-like settings, the original would be stored beneath ~/.local/share/caveman-compress/backups/<parent-name>-<path-hash>/CLAUDE.original.md. XDG_DATA_HOME can change the base directory; Windows uses LOCALAPPDATA or its fallback. The hash comes from the resolved parent path, making the implemented location more specific than the parent-name-only layout described in SKILL.md.

Assessment & evidence

limitations

Structural validation cannot verify meaning. It does not systematically check prose negation, exceptions, dates, numbers, technical terms or commands outside protected code. Heading-level changes, added inline code and substantial bullet-count differences can remain warnings. Accepting formats such as .tex and .rst does not establish format-specific correctness because the preservation logic largely targets Markdown.

The size gate compares stripped body characters, not tokens. A shorter accepted file can therefore have an unknown token benefit. Existing current or legacy backups block another compression attempt, and unsupported filesystem locking can cause the program to proceed without coordination between runs.

Static inspection reveals a path-filter mismatch: directory components are normalized by removing dots, but the directory denylist retains entries such as .ssh, .aws and .kube. Those entries do not match their normalized forms through that comparison. Filename and credential-pattern checks may still reject particular files, but the filters do not guarantee that sensitive content stays local.

Backend isolation also differs. The Codex and opencode adapters request restrictive tool settings. The Claude CLI arguments do not show an equivalent blanket denial of built-in tools. Effective permissions, resistance to instructions embedded in input files and backend compatibility were not assessed.

reasoning

The strongest basis for confidence is the separation between model rewriting and deterministic preservation checks. Masking keeps protected blocks out of the initial rewrite, validation detects specified structural losses, and the original backup provides a recovery copy.

Those controls support a narrow conclusion: the program attempts to preserve recognized structures before replacement. They do not establish preserved instruction meaning or better assistant performance. Human comparison remains necessary because a rewritten instruction can retain every heading, URL and code block while changing what the reader should do.

alternatives

Manual shortening gives the author direct control over wording and avoids a model submission. Leaving the file unchanged preserves its wording without a compression request, though it provides no size reduction. These are practical alternatives inferred from the task; comparative results are unavailable.

Within Caveman Compress, explicit nocompress regions can preserve selected passages while allowing surrounding prose to change. An OpenAI-compatible local endpoint offers another deployment choice, but it does not change the structural validation limits. No evidence supports ranking this skill against another compression product.

evidence

The source material comprises SKILL.md, seven adjacent Python files and the root LICENSE, LICENSE-MIT and NOTICE. The pinned instruction file is available at [https://raw.githubusercontent.com/juliusbrussee/caveman/ad473752bdc86ca96d7289443228d4c53ec119a8/plugins/caveman/skills/caveman-compress/SKILL.md].

The findings describe source code and documented intent. No supplied test outputs, benchmark tables, provider responses or execution logs establish runtime behavior. Comments about earlier issues and compatibility probes are author statements rather than independently reproduced results. Nothing was installed, executed or tested.

Access & freshness

costs

Operating cost is unknown. No provider prices, subscription entitlements, measured usage or billing examples are supplied. Compression requests a model generation, and a validation failure can add a repair generation. Transport-level retry costs are not established.

Future savings depend on whether the resulting file contains fewer tokens for the model that repeatedly reads it, and whether those savings outweigh compression costs. The benchmark utility uses o200k_base when tiktoken is installed and otherwise substitutes word counts. Neither method establishes savings for every provider, and no benchmark results are included. Local hosting costs are also unknown.

rights

The supplied root LICENSE contains Apache License 2.0, permitting use, modification and redistribution under its conditions. Redistribution requires a license copy, retention of applicable notices, identification of modified files and preservation of relevant NOTICE attribution. The license provides no warranty.

NOTICE identifies Caveman and Julius Brussee and says contributions to parts outside the Engine-linked runtime before Caveman 3.0.0 remain available under MIT. LICENSE-MIT retains that copyright and permission notice. This does not establish MIT coverage for every current file. The referenced LICENSING.md is outside the supplied material, so a complete component-by-component mapping is unknown.

NOTICE also lists third-party components in other repository folders. Those folders are excluded here; their implementations and separate license texts were not assessed.

freshness

The supplied snapshot is pinned to revision ad473752bdc86ca96d7289443228d4c53ec119a8 and was captured on 13 November 2026 at 11:25:20.489 UTC. These findings apply to that revision; later changes to the main branch are unknown.

scripts/__init__.py declares package version 1.0.0. That local declaration does not establish the overall Caveman release version. NOTICE mentions the licensing transition at Caveman 3.0.0, but no release date or current backend compatibility matrix is established.

actions

Before adopting it, choose a non-sensitive disposable copy and explicitly configure the intended provider and model. Review the entire body for information that provider should not receive, including protected blocks that a repair request can expose. Confirm the backend's effective permissions.

Compare the resulting text against the original for instruction strength, exceptions, numbers, paths and commands. Measure tokens with the tokenizer relevant to the assistant that will consume the file; character reduction alone is insufficient. Check representative downstream tasks before replacing important memory or rule files.

Keep the original backup and record the source revision. The program refuses another attempt when an applicable backup already exists. Inspect and preserve that backup before moving it; deleting it and rerunning can cause already-compressed text to become the next stored original.

Evidence for this report

LICENSEnotice · checked 2026-11-13
LICENSE-MITnotice · checked 2026-11-13
NOTICEnotice · checked 2026-11-13