/forge:caveman-internalfrom forge
Compresses prose in Forge agent artifacts (handoff notes, summaries, reviews) to reduce token usage in autonomous loops.
Ships in forge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Compress prose in Forge's own agent-to-agent artifacts so the autonomous loop spends fewer tokens on coordination and more on actual implementation. This skill is consumed internally by Forge agents (executor, planner, reviewer, verifier) when writing handoff notes, artifact summaries, and review reports. It is NOT a user-facing command and must never be invoked as /caveman.
In scope (compress these):
.forge/artifacts/{task-id}.json artifact descriptions and key_decisions.forge/context-bundles/ handoff notes between tasksOut of scope (ALWAYS use normal verbose mode regardless of intensity):
.forge/specs/Three levels. Higher intensity removes more, but technical terms (function names, file paths, identifiers, version numbers, error codes) stay verbatim at every level.
Strip filler words and pleasantries. Keep articles, conjunctions, and full grammar. This is the safest mode and is the default for standard depth tasks.
Remove: just, really, basically, very, quite, simply, actually, essentially, indeed, clearly, obviously, sure, certainly, happy to help, of course, please note, it should be noted, as you can see, in order to (use "to").
Example:
Token reduction: ~20%.
Drop articles (a, an, the) where meaning survives. Allow sentence fragments. Use shorter synonyms. Keep technical terminology precise. Default for quick depth tasks.
Substitutions: implement -> add, modify -> change, utilize -> use, demonstrate -> show, approximately -> about, in addition -> also, due to -> from, prior to -> before, subsequent to -> after, in the event that -> if.
Example:
Token reduction: ~40%.
Emergency budget mode. Used when fewer than 20% of task budget tokens remain. Adds aggressive abbreviation and arrows for causality.
Abbreviations: database -> DB, authentication -> auth, configuration -> config, function -> fn, variable -> var, request -> req, response -> res, parameter -> param, environment -> env, repository -> repo, dependency -> dep, validation -> valid, error -> err, message -> msg, application -> app, server -> srv, client -> cli, production -> prod, development -> dev.
Strip conjunctions where meaning is clear. Use arrows for causality and flow: X -> Y means X causes/produces Y. Use + for "and" in lists.
Example:
Token reduction: ~65%.
Agents self-select intensity at the start of each task by querying the task budget and applying the rule below. No external orchestrator is required.
Compute remaining_percentage = remaining / budget * 100 from the task budget, then:
| Remaining budget | Mode |
|---|---|
| > 50% | lite (lowest compression, keep readability) |
| 20% to 50% | full (default compression) |
| < 20% | ultra (emergency, maximum compression) |
depth = thorough clamps the result to lite regardless of budget. Compression is never allowed to obscure thorough-depth artifacts.
From a shell:
node scripts/forge-tools.cjs check-task-budget <task_id> --forge-dir .forge
From Node:
const { checkTaskBudget } = require('./scripts/forge-tools.cjs');
const { used, budget, remaining, percentage } = checkTaskBudget(taskId, forgeDir);
The returned percentage is percent used. Compute remaining as 100 - percentage.
If the budget check fails, throws, or there is no current task context (ad-hoc work, repair flows), default to full. Never block on budget lookup. See references/budget-thresholds.md for the full threshold table and rationale.
Caveman compression is lossy. If a downstream consumer (reviewer, verifier, next executor) cannot act on a compressed artifact because critical context is missing, the producing agent must regenerate the artifact in normal verbose mode.
Triggers for fallback:
When fallback occurs:
.forge/state.md under "Caveman Fallbacks":
- {task_id} {mode} -> verbose: {short reason}
The T024 benchmark validates that fallbacks fire on fewer than 5% of compressed artifacts. Above that threshold, the thresholds in references/budget-thresholds.md should be tuned upward (less aggressive compression).
This skill adapts the prompt-compression approach from JuliusBrussee/caveman, used here under the MIT license. Original project: https://github.com/JuliusBrussee/caveman
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
token-optimization, forge, agent-artifacts, compression, internal-skill
npx claudepluginhub lucasduys/forge --plugin forge10 skills in this plugin
/backpropagationTrace runtime bugs back to spec gaps — identify missing acceptance criteria, update specs, generate regression tests, and detect patterns/brainstormingInteractive spec generation — turn ideas into concrete specs with R-numbered requirements and testable acceptance criteria/collaboratingHackathon-native multiplayer collaboration mode -- brain-dump together, claim tasks across machines, flag decisions async. Drives the subcommands of /forge:collaborate./design-systemDESIGN.md integration for Forge — ensures visual consistency across all UI tasks through standardized design specifications/executingAutonomous task implementation workflow — implement, test, review, commit for each task in the frontier/graphify-integrationGraph-aware planning and research using codebase knowledge graphs — enables architecture-aware task decomposition, dependency discovery, and context reductionOther plugins' skills for the same job