caveman-learn

Applies consent-gated fixes to reduce agent token costs from Caveman learn reports.

Updated Aug 20, 2026
One-click install
npx skills add https://github.com/bittlinkm/claude-setup --skill caveman-learn-bittlinkm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: caveman-learn
Source: https://github.com/bittlinkm/claude-setup/tree/main/skills/caveman-learn
Command: npx skills add https://github.com/bittlinkm/claude-setup --skill caveman-learn-bittlinkm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agent configurations accumulate token waste: bloated CLAUDE.md files, never-invoked skills, and context blocks re-pasted every session. The caveman learn command measures where tokens go, but acting on its findings requires careful, reversible edits — this Skill closes that loop by proposing and applying each fix only with explicit per-edit user consent. ## Core Features & Use Cases - Reducible sink trimming: Proposes concrete diffs for heavy CLAUDE.md files or unused skills, applies them only after a yes, and re-measures to enforce a net-token-negative gate (reverting if tokens do not drop). - Recurring context offload (cavemem_offload): Moves blocks re-established every session into cavemem storage with a cheap pointer left behind, verifying content integrity via sha256 and confirming recall works before trimming the source. - Longitudinal outcome tracking: Records applied fixes via caveman learn applied so later scans report improved, unchanged, regressed, or insufficient_data verdicts with exact revert paths. - Use Case: After running caveman learn, you discover a 200-line style guide in CLAUDE.md costs tokens every turn. The Skill proposes offloading it to cavemem, verifies recall returns the content, writes a pointer, and confirms the per-turn token count actually decreased. ## Quick Start Ask the agent to run the caveman learn report and walk you through fixing the top token sinks one approved edit at a time.

Frequently Asked Questions about caveman-learn

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce my AI agent's token usage from CLAUDE.md?

Run caveman learn report to identify ranked token sinks, then use this Skill to propose concrete trims. Each edit is applied only after your approval and is re-measured to confirm tokens per turn actually decreased, otherwise it is reverted.

How to offload repeated context into cavemem memory?

The Skill stores the recurring block via caveman mem remember, verifies the content hash matches the scan locator, then replaces the source block with a pointer to caveman mem recall. The offload proceeds only if the pointer plus recall cost is cheaper than re-pasting.

Does caveman learn edit my config files automatically?

No. The caveman learn analyzer is strictly read-only and only materializes candidates. This Skill is the only writer, and it applies each edit solely after you explicitly approve the individual diff — there is no hidden apply-all.

What happens if a token-saving edit makes things worse?

Every edit passes a net-token-negative gate: if the re-measured token count is not lower than before, the change is reverted automatically. Offloads are also undone if recall fails, and applied fixes are tracked so regressions surface with an exact revert path.

Can the agent lose access to offloaded context?

The never-make-the-agent-dumber guard blocks that outcome. Before finishing an offload, the Skill confirms caveman mem recall returns a hit and a pointer is in place; otherwise it forgets the stored memory and restores the original source block.