Caveman compress
Skill yigityildiz0/universal-ai-skill-library/skills/common/caveman-compress
Safely compress prose in Markdown or plain-text memory and instruction files through a provider-neutral candidate, invariant validation, unified-diff preview, explicit user approval, atomic replacement, and timestamped backup. Use only when the user explicitly invokes $caveman-compress or asks for Caveman memory-file compression. Never overwrite during the default preview.From its SKILL.md
npx -y skills add yigityildiz0/universal-ai-skill-library --skill caveman-compressAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
3 things to look at
- 26 days oldThe repository was created 26 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.8 KB, 528 tokens by cl100k_base, as published. Nobody here has run it
Caveman Compress
Compress prose without silently changing meaning. The bundled script performs no network or model call. Use the active agent to draft the candidate, then use the script for deterministic checks.
Read compression-safety.md before creating a candidate.
Supported targets
- UTF-8 Markdown, plain text, or extensionless natural-language files.
- Maximum source size: 1 MiB.
- Never target code/config formats, symlinks, existing backup files, or the candidate itself.
Safe workflow
-
Read the entire source and create a separate candidate file. Do not edit the source.
-
Preserve every item listed in the safety reference and perform the semantic ledger review.
-
Run the validator in preview mode. Preview is the default and never writes the source:
py -3 "<skill-dir>\scripts\caveman_compress.py" "<source>" --candidate "<candidate>"If
py -3is unavailable, usepythonwith the same arguments. -
Review the invariant report, reduction metrics, and unified diff. Fix the candidate separately and rerun preview until it passes. Do not weaken the validator to make a candidate pass.
-
Show the user the proposed change, validation result, residual semantic risk, and backup behavior.
-
Apply only when the user explicitly approved overwriting that exact source after seeing the preview, or explicitly requested replacement in the same turn. Reuse both hashes printed by preview:
py -3 "<skill-dir>\scripts\caveman_compress.py" "<source>" --candidate "<candidate>" --apply --user-approved-write --expected-source-sha256 "<source-hash>" --expected-candidate-sha256 "<candidate-hash>" -
Report the timestamped backup path and final hash. Keep the backup until the user verifies the result.
Non-negotiable gates
- Validation errors block apply.
- Source or candidate hash drift blocks apply.
--applywithout--user-approved-writeblocks apply.- Apply revalidates immediately before an atomic replacement.
- The exact original bytes are copied to a timestamped backup first.
- A validator cannot prove semantic equivalence. Complete the semantic ledger and diff review even when every automated check passes.
Do not call a named provider, select a model, install dependencies, or send file contents to an external service.
What ships with it: 2 files
33.1 KB alongside SKILL.md, 1 of them executable
references/
- compression-safety.md2.3 KB
scripts/
- caveman_compress.pyruns30.8 KB