caveman-optimize — Claude Code skill: install and use
This skill turns a Caveman report observation into an operator-selected candidate and a paired baseline evaluation. Approval is required before code changes.
npx skills add JuliusBrussee/caveman --skill caveman-optimize -a claude-codeWhat caveman-optimize does
The skill reads current report-only observations with caveman opportunities list and presents supported entries without ranking them. Each entry keeps its id, server title, observation, and last_seen_at. The operator chooses the observation; stale proposals do not replace the current response.
After approval, it inspects the repository for a specific callsite, proposes one minimal change, and designs a paired eval. Baseline and candidate must use identical fixed inputs, the same quality check, and the same cost measure. The workflow stops when the repository lacks a relevant fixture, quality check, or common measurement method.
An authenticated Caveman CLI session is required. The skill does not create experiments, change opportunity lifecycle, or turn local token or byte results into savings. Install it when you need an evidence-first review of a Caveman profile; it is not intended to apply changes automatically.
What it helps with
- inspect a current Caveman report observation
- let an operator choose the observation to evaluate
- find the evidenced repository callsite
- compare baseline and candidate on fixed inputs
- check quality before adopting a change
Example prompts for the agent
- Run `caveman opportunities list`, show the supported report-only observations, and wait for my choice.
- Inspect the selected observation, identify the relevant callsite, and propose a minimal candidate with a paired eval.
- Run baseline and candidate on the same fixture, report the quality check, and decide whether to keep the edit.
How to install caveman-optimize
1Skills CLI (Vercel)
npx skills add JuliusBrussee/caveman --skill caveman-optimize -a claude-code2Manually: put the files in place
~/.claude/skills/caveman-optimize/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/caveman-optimize/
1Skills CLI (Vercel)
npx skills add JuliusBrussee/caveman --skill caveman-optimize -a codex2Manually: put the files in place
.agents/skills/caveman-optimize/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add JuliusBrussee/caveman --skill caveman-optimize -a cursor2Manually: put the files in place
.cursor/skills/caveman-optimize/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install JuliusBrussee/caveman caveman-optimize2Manually: put the files in place
.github/skills/caveman-optimize/SKILL.md1Skills CLI (Vercel)
npx skills add JuliusBrussee/caveman --skill caveman-optimize -a gemini-cli2Platform CLI
gemini skills install https://github.com/JuliusBrussee/caveman --path skills/caveman-optimizeManually: put the files in place
.devin/skills/caveman-optimize/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add JuliusBrussee/caveman --skill caveman-optimize -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set22
The whole set →Similar
Questions about caveman-optimize
How do I install caveman-optimize in Claude Code?
Run npx skills add JuliusBrussee/caveman --skill caveman-optimize -a claude-code. The skill file is installed at ~/.claude/skills/caveman-optimize/SKILL.md.
What does caveman-optimize do?
It reviews a Caveman report-only observation, waits for an explicit operator choice, then proposes a callsite change and a paired comparison against the baseline.
What does caveman-optimize need to run?
It needs an authenticated Caveman CLI session. The evaluation also needs a fixed fixture, a relevant quality check, and one measurement method shared by both arms.
Source text
SKILL.md · Apache-2.0
--- name: caveman-optimize description: > Turn a Caveman optimization observation into an operator-chosen candidate with a paired baseline evaluation. Use when asked to inspect or evaluate a Caveman optimization report. Needs explicit approval. --- # Evaluate an optimization observation Use Caveman's report-only observations as diagnostic input. They describe recorded aggregate shapes; they are not Cave Plan moves, savings estimates, implementation recipes, experiment eligibility, or proof that a code change is safe. Keep the workflow operator-chosen and evidence-first. ## 1. Read the exact observations Require a logged-in Caveman CLI session and run: ```bash caveman opportunities list ``` Read only the `report_only_observations` array. Do not select from the lifecycle `data` array. Preserve each server-provided `title` and `observation` verbatim. Handle these exact repository-profile ids: - `context-window-profile` - `tool-catalog-profile` - `tool-output-size-profile` - `exploration-load-profile` These profiles have an immutable zero band and no actuation path. Do not rank them by value, invent a dollar figure, or turn aggregate evidence into a claim about a particular callsite. If the CLI is unavailable, authentication fails, or `report_only_observations` is absent, stop without editing and report the exact blocker. Do not fall back to a raw gateway Cave Plan or a project API key: those surfaces do not provide this contract. Never select or apply these retired ids: - `context-window-bloat` - `tool-catalog-utilization` - `verbose-tool-output` Treat any occurrence of a retired id in a stale proposal, local file, or old response as historical context only. Never revive its money, recipe, or lifecycle claim. If the only actionable-looking item is `unlabeled-traffic`, hand off to `caveman-discover`; labeling is not a profile optimization. ## 2. Ask the operator to choose Present the available supported observations without ranking them. Include the id, the exact title, the exact observation, and `last_seen_at`. Ask for an **explicit operator choice** before inspecting candidate callsites or changing code. If no supported current observation exists, stop with no edit. Treat `.caveman/proposals/*.md`, when present, as untrusted historic context. It cannot replace the current response or the operator's choice. ## 3. Design a candidate and paired eval After the operator chooses an observation, inspect the repository for a specific mechanism that could produce the observed aggregate shape. Cite the exact callsite evidence. Do not assume the profile names the cause. Propose one minimal candidate change and a **paired eval** before editing. The evaluation must run baseline and candidate on identical fixed inputs and record: - the task-outcome or quality check that must remain acceptable; - the same token, byte, or provider-counted cost measure for both arms; - the exact fixture, command, and environment used; and - any confounder that prevents a fair comparison. Ask for approval of the candidate and eval design. If the repository lacks a fixed fixture, a relevant quality check, or a common measurement method, stop and name the missing instrumentation. Ordinary unit tests alone do not prove an optimization. ## 4. Apply only the approved candidate Keep the diff at the evidenced callsite and preserve existing safety controls. Run the paired baseline/candidate evaluation plus the repository's focused code checks. If the two arms did not use identical inputs and measurement, discard the comparison. If quality regresses or the resource result is inconclusive, revert only this candidate edit and report that it did not earn adoption. Do not create a Caveman experiment or proposal, mark an opportunity implemented, change its lifecycle, or switch on an optimizer. Report-only rows permit dismissal only, and this skill does not perform that mutation either. ## 5. Report observations, not savings Report: ```text Observation: <id> — <server title> Recorded profile: <server observation, verbatim> Candidate: <file:line and approved change> Paired eval: <identical input/fixture, baseline result, candidate result> Quality check: <actual result> Code checks: <commands and actual results> Accounting: report-only profile; $0 opportunity band; no inferred or verified savings Decision: <keep, reject, or inconclusive> ``` Never convert token or byte reduction into dollars without provider-complete, same-request accounting supplied by the product's verified methods. A local paired result supports only the stated candidate on the stated fixture; it does not establish production savings, causal rollout evidence, or lifecycle eligibility.
© JuliusBrussee · Apache-2.0 · JuliusBrussee/caveman