Agent skill

Caveman Memory File Compressor

by JuliusBrussee in JuliusBrussee/caveman-code

Rewrites a memory file such as CLAUDE.md or a todo list in terse caveman-style text to cut input tokens, saving a readable backup outside the project tree.

MITAuto-check passedAgent Workflows

Install Caveman Memory File Compressor

skills CLI
$ npx skills add JuliusBrussee/caveman-code --skill caveman-compress -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install JuliusBrussee/caveman-code caveman-compress --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/JuliusBrussee/caveman-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/coding-agent/skills/caveman-compress .claude/skills/caveman-compress && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
caveman-compress
GitHub stars
942
Token cost
~1.2k tokens
SKILL.md length
576 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Rewrites a memory file such as CLAUDE.md or a todo list in terse caveman-style text to cut input tokens, saving a readable backup outside the project tree.

  • Shrinking a long CLAUDE.md that is loaded into every session
  • SKILL.md covers Core Rule, Grammar, Pattern and Examples, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Compressing a todo list or preferences file to save input tokens

What it does

Invoked as /caveman-compress with a file path, or by asking to shrink a memory file, the skill runs a bundled Python command from its own folder. That command detects the file type without calling a model, asks Claude to compress the text, then validates the result without a model call. If validation finds errors, Claude makes targeted fixes rather than recompressing, with up to two retries, and when it still fails the original file is left untouched.

The compressed version replaces the original. A readable backup named after the file with an .original.md ending is written to a data folder outside the project, under XDG_DATA_HOME or LOCALAPPDATA on Windows, so skill auto-loaders do not read it as a live file.

Compression drops articles, filler words, pleasantries, hedging, redundant phrasing and connective words. Code blocks, inline code, URLs, file paths, commands, technical terms, proper nouns, dates, version numbers and environment variables are preserved exactly, and headings, list nesting, numbering, tables and frontmatter keep their structure.

When your agent uses it

  • Shrinking a long CLAUDE.md that is loaded into every session
  • Compressing a todo list or preferences file to save input tokens
  • Reducing the token cost of memory files without losing commands or paths

Example prompts

  • “/caveman-compress /home/me/project/CLAUDE.md”
  • “Compress my todo.md memory file to save tokens and keep a backup.”
  • “Shrink the CLAUDE.md in this repo, but keep every command and file path exactly as written.”

Requirements

  • Python 3, since the scripts run with python3 -m scripts
  • Access to Claude for the compression step

What it can do on your machine

Read from SKILL.md and the folder at commit 3a21be1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Caveman Memory File Compressor loads about 1.2k tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 576 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~67
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from JuliusBrussee/caveman-code at commit 3a21be1, republished under its MIT licence (© JuliusBrussee). 576 words, ~1,205 tokens.

Download SKILL.mdSave it as .claude/skills/caveman-compress/SKILL.md (or your agent's skills folder).
name
caveman-compress
description
Ultra-compressed communication mode (lite / full / ultra) that cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Use when the user requests "caveman mode", "less tokens", "be brief", or when output budget is tight.
effort
low

Caveman Mode

Core Rule

Respond like smart caveman. Cut articles, filler, pleasantries. Keep all technical substance.

Default intensity: full. Change with /caveman lite, /caveman full, /caveman ultra (Codex: $caveman lite|full|ultra).

Grammar

  • Drop articles (a, an, the)
  • Drop filler (just, really, basically, actually, simply)
  • Drop pleasantries (sure, certainly, of course, happy to)
  • Short synonyms (big not extensive, fix not "implement a solution for")
  • No hedging (skip "it might be worth considering")
  • Fragments fine. No need full sentence
  • Technical terms stay exact. "Polymorphism" stays "polymorphism"
  • Code blocks unchanged. Caveman speak around code, not in code
  • Error messages quoted exact. Caveman only for explanation

Pattern

[thing] [action] [reason]. [next step].

Not:

Sure! I'd be happy to help you with that. The issue you're experiencing is likely caused by...

Yes:

Bug in auth middleware. Token expiry check use < not <=. Fix:

Examples

User: Why is my React component re-rendering?

Normal (69 tokens): "The reason your React component is re-rendering is likely because you're creating a new object reference on each render cycle. When you pass an inline object as a prop, React's shallow comparison sees it as a different object every time, which triggers a re-render. I'd recommend using useMemo to memoize the object."

Caveman (19 tokens): "New object ref each render. Inline object prop = new ref = re-render. Wrap in useMemo."


User: How do I set up a PostgreSQL connection pool?

Caveman:

Use `pg` pool:
js
const pool = new Pool({
  max: 20,
  idleTimeoutMillis: 30000,
  connectionTimeoutMillis: 2000,
})
max = concurrent connections. Keep under DB limit. idleTimeout kill stale conn.

Intensity Levels

Lite — trim the fat

Professional tone, just no fluff. Grammar stays intact.

  • Drop filler and pleasantries (same list as full)
  • Drop hedging
  • Keep articles, keep full sentences
  • Prefer short synonyms where natural
Full (default)

Classic caveman. Rules from Grammar section above apply.

Ultra — maximum grunt

Telegraphic. Every word earn its place or die.

  • All full rules, plus:
  • Abbreviate common terms (DB, auth, config, req, res, fn, impl)
  • Strip conjunctions where possible
  • One word answer when one word enough
  • Arrow notation for causality (X -> Y)
Show full SKILL.md (268 more words)Show less

Intensity Examples

User: Why is my React component re-rendering?

Lite: "Your component re-renders because you create a new object reference each render. Inline object props fail shallow comparison every time. Wrap it in useMemo."

Full: "New object ref each render. Inline object prop = new ref = re-render. Wrap in useMemo."

Ultra: "Inline obj prop -> new ref -> re-render. useMemo."


User: Explain database connection pooling.

Lite: "Connection pooling reuses open database connections instead of creating new ones per request. This avoids the overhead of repeated handshakes and keeps response times low under load."

Full: "Pool reuse open DB connections. No new connection per request. Skip repeated handshake overhead. Response time stay low under load."

Ultra: "Pool = reuse DB conn. Skip handshake overhead -> fast under load."

Boundaries

  • Code: write normal. Caveman English only
  • Git commits: normal
  • PR descriptions: normal
  • User say "stop caveman" or "normal mode": revert immediately
  • Intensity level persist until changed or session end

Cavekit Integration

When caveman_mode is enabled in Cavekit config (on by default), caveman-speak is automatically applied to:

  • Build phase (/ck:make): wave logs, iteration summaries, task status reports
  • Inspect phase (/ck:check): gap analysis summaries, peer review output
  • Subagent communication: all inter-agent status reports, merge summaries, wave completions
  • Loop logging: compressed entries in context/impl/loop-log.md
  • Codex prompt framing: setup text around review prompts (not the code or structured findings)

Caveman is NOT applied to:

  • Draft phase (/ck:sketch): kits are human-reviewed specs, need normal prose
  • Architect phase (/ck:map): build sites are source of truth, need clarity
  • Code blocks: code is always written normally
  • Spec artifacts: kits, build sites, DESIGN.md stay in normal language
  • Structured output: P0/P1/P2/P3 findings tables, coverage matrices

© JuliusBrussee, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in packages/coding-agent/skills/caveman-compress of JuliusBrussee/caveman-code.

Open the folder on GitHubat commit 3a21be1

Compare with similar skills

Caveman Memory File Compressor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Caveman Memory File Compressor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Caveman Memory File Compressor this skillJuliusBrussee/caveman-code942—~1.2kAutomated safety check: PassMIT
Caveman Learn Token FixesJuliusBrussee/caveman111k—~2.8kAutomated safety check: PassApache-2.0
Context Budget Checkposhan0126/dotclaude870—~1.4kAutomated safety check: PassMIT
Claude Code Cost Optimizermergisi/awesome-openclaw-agents4k—~1.1kAutomated safety check: PassMIT
Claude Code Masteryborghei/Claude-Skills891—~1.9kAutomated safety check: PassMIT
Context Mode Output Sandboxmksglu/context-mode26k—~4.1kAutomated safety check: PassCustom licence

Similar skills

  • Caveman Learn Token Fixes

    JuliusBrussee/caveman

    Acts on a Caveman learn report: reviews ranked token sinks, applies cost-lowering edits one at a time with your consent, and reports what each fix returned.

    111k GitHub stars~2.8k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Context Budget Check

    poshan0126/dotclaude

    Estimates the per-turn token cost of a project's .claude folder and CLAUDE.md, split into always-loaded, path-scoped and invoked-only files, and flags what runs over budget.

    870 GitHub stars~1.4k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Claude Code Cost Optimizer

    mergisi/awesome-openclaw-agents

    Audits a project's Claude Code setup for common token-cost leaks and returns a prioritized fix list, using only static inspection of files and settings.

    4k GitHub stars~1.1k tokensUpdated 14 days ago
    Agent WorkflowsAuto-check passed
  • Claude Code Mastery

    borghei/Claude-Skills

    A skill your agent uses when the user asks to "optimize CLAUDE.md", "create a new skill", "write a custom agent", "configure hooks", "manage context window", "set up MCP servers", "scaffold a skill…

    891 GitHub stars~1.9k tokensUpdated 3 days ago
    Agent WorkflowsAuto-check passed
  • Context Mode Output Sandbox

    mksglu/context-mode

    Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.

    26k GitHub stars~4.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Routing rules for using context-mode MCP tools in Antigravity CLI: sandboxed code runs, file analysis, indexed search and web fetches that keep large output out of the conversation.

    26k GitHub stars~850 tokensUpdated today
    Agent WorkflowsAuto-check passed

More from JuliusBrussee/caveman-code

  • Cavekit Design System

    JuliusBrussee/caveman-code

    How to write and maintain DESIGN.md as the visual specification layer for Cavekit projects.

    942 GitHub stars~4.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Cavekit Methodology

    JuliusBrussee/caveman-code

    Cavekit specification-driven development methodology — the Hunt lifecycle (Draft → Architect → Build → Inspect → Monitor) and how to apply it.

    942 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Cavekit Revision

    JuliusBrussee/caveman-code

    Trace bugs and manual fixes back to kits and prompts; fix at the source so the iteration loop can reproduce the fix autonomously.

    942 GitHub stars~3.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Cavekit Validation First

    JuliusBrussee/caveman-code

    Validation-first design for Cavekit — every kit requirement must be automatically verifiable.

    942 GitHub stars~4.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Plugin Creator

    JuliusBrussee/caveman-code

    Scaffold a complete cave plugin bundle — generates .cave-plugin/plugin.json manifest and the standard directory structure (commands/, skills/, agents/, themes/, hooks/).

    942 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Caveman Memory File Compressor

What does Caveman Memory File Compressor do?

Rewrites a memory file such as CLAUDE.md or a todo list in terse caveman-style text to cut input tokens, saving a readable backup outside the project tree. Invoked as /caveman-compress with a file path, or by asking to shrink a memory file, the skill runs a bundled Python command from its own folder. That command detects the file type without calling a model, asks Claude to compress the text, then validates the result without a model call.

When should I use Caveman Memory File Compressor?

Caveman Memory File Compressor fits situations like: shrinking a long CLAUDE.md that is loaded into every session; compressing a todo list or preferences file to save input tokens; reducing the token cost of memory files without losing commands or paths.

How do I install Caveman Memory File Compressor in Claude Code?

Run `npx skills add JuliusBrussee/caveman-code --skill caveman-compress -a claude-code`. Or copy the skill folder (packages/coding-agent/skills/caveman-compress in JuliusBrussee/caveman-code) into .claude/skills/caveman-compress in your project. Claude Code loads it when a task matches its description.

How do I install Caveman Memory File Compressor in Codex?

Run `npx skills add JuliusBrussee/caveman-code --skill caveman-compress -a codex`. Or copy the skill folder (packages/coding-agent/skills/caveman-compress in JuliusBrussee/caveman-code) into .agents/skills/caveman-compress in your project. Codex loads it when a task matches its description.

Can I use Caveman Memory File Compressor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add JuliusBrussee/caveman-code --skill caveman-compress -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/caveman-compress, .gemini/skills/caveman-compress, .github/skills/caveman-compress and .opencode/skills/caveman-compress in your project.

What does Caveman Memory File Compressor need to run?

SKILL.md names no scripts, command-line tools or credentials: Caveman Memory File Compressor is instructions for the agent only. Our summary lists: Python 3, since the scripts run with python3 -m scripts; Access to Claude for the compression step.

Does Caveman Memory File Compressor access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Caveman Memory File Compressor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Caveman Memory File Compressor use?

Caveman Memory File Compressor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Caveman Memory File Compressor use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Caveman Memory File Compressor?

Skills that share tags, products or a category with Caveman Memory File Compressor: Caveman Learn Token Fixes (JuliusBrussee/caveman, 111k stars), Context Budget Check (poshan0126/dotclaude, 870 stars), Claude Code Cost Optimizer (mergisi/awesome-openclaw-agents, 4k stars) and Claude Code Mastery (borghei/Claude-Skills, 891 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Caveman Memory File Compressor?

JuliusBrussee (a GitHub user) maintains it in JuliusBrussee/caveman-code, which has 942 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on August 14, 2026.

Source: JuliusBrussee/caveman-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.