Caveman-Mode-Skill: token-diet für knappe Antworten, weniger erneutes Lesen und /compact

Dmitriy Solodukha, Caprock-Entwickler · Veröffentlicht am

Am mit Claude Code und Codex getestet

Bitte um „caveman mode“: Der token-diet-Skill lässt den Agenten knapp antworten, weniger lesen und rechtzeitig /compact empfehlen, in Claude Code und Codex.

Sag „caveman mode“: Der token-diet-Skill lässt den Agenten direkt antworten und aufhören: keine Einleitung, keine Wiederholung der Frage, kein Rückblick, Code ohne Kommentar. Er ändert auch die Arbeitsweise, da die meisten Tokens beim Lesen anfallen: vor dem Lesen suchen, Zeilenbereiche lesen, gerade bearbeitete Dateien nie erneut lesen, Befehlsausgaben kürzen. Und er sagt dir, wann du /compact nutzen oder frisch starten solltest, samt Fokus für die Zusammenfassung.

Installiere den token-diet-Skill

Ein Befehl pro Agent. Der Skill ist eine einzelne SKILL.md; bei der Installation wird nichts ausgeführt.

Alle neun Skills als Plugin. Gib dies in Claude Code ein:

Oder nur diesen Skill, im Projektordner in einem Terminal:

Füge -g hinzu, um ihn für jedes Projekt zu installieren.

Prompts für den token-diet-Skill

Der Agent wählt den Skill, wenn deine Worte zu dessen Beschreibung passen; mit dem Namen stellst du es sicher. Klicke auf einen Prompt, um ihn zu kopieren.

Was der Caveman-Skill ändert: weniger sagen, weniger lesen, rechtzeitig komprimieren

  • Weniger sagen: Die erste Zeile ist die Antwort; Satzfragmente sind in Ordnung, wenn der Inhalt klar bleibt; drei Stichpunkte statt sieben; eine Frage auf einmal, nur wenn die Arbeit blockiert ist.
  • Weniger lesen: zuerst git grep -n oder rg -n, dann die benötigten Zeilen; Flags für knappe Ausgaben (git status --short, git diff --stat); ein einzelner Test statt der Suite; lange Logs in eine Datei schreiben und durchsuchen.
  • Den Kontext klein halten: Nach einer erledigten Teilaufgabe empfiehlt er frischen Kontext; nach einem langen Durchlauf zur selben Aufgabe /compact mit einem Fokus wie „keep the failing test name, the files changed, and the open question“. Vor frischem Kontext hält er fest, was erhalten bleiben muss.
Die Befehle zum Eingeben aus der jeweiligen Agenten-Dokumentation (abgerufen am 29. November 2026)
Bedarf Claude Code Codex CLI
Sehen, was den Kontext füllt /context /status
Zusammenfassen, weiterarbeiten /compact [instructions] /compact
Frisch starten /clear /new

Was wir ausgeführt haben und was die Agenten taten

Jeder Skill wurde am 29. November 2026 in einem eigens dafür angelegten Wegwerf-Repository ausgeführt, als Projekt-Skill installiert. Ein winziges Python-Repository: pager.py mit einem Off-by-one-Fehler (start = page * size bei 1-basierten Seiten) und einem fehlgeschlagenen Test.

Claude Code (claude -p --model sonnet)

caveman mode please, save tokens. Why does test_first_page fail? Fix it.

Zwei Durchläufe. Beide riefen token-diet auf, nutzten drei oder vier Shell-Aufrufe, korrigierten pager.py:3 zu (page - 1) * size und antworteten in zwei kurzen Zeilen: Ursache, Korrektur und der Hinweis, dass pytest nicht installiert war, weshalb die Testfunktion direkt aufgerufen wurde und bestand.

Codex (0.163.0, codex exec)

caveman mode please, save tokens. Why does test_first_page fail? Fix it.

.agents/skills/token-diet/SKILL.md gelesen. Er begann mit „Token diet on.“, wie es der Skill damals vorgab; danach wurde der Skill geändert, um die Ankündigung wegzulassen, und Codex wurde nicht erneut ausgeführt. Er fand die Korrektur bereits in der Datei (ein früherer Durchlauf im selben Ordner hatte sie vorgenommen), führte den Test aus und antwortete in zwei Zeilen (Link als Klartext dargestellt):

Off-by-one: `page * size` skipped the first 10 items. pager.py:3 already has the fix: `(page - 1) * size`.
Verified: `test_first_page` passes.

Agenten, mit denen er getestet wurde

  • Claude Code: am 29. November 2026 mit claude -p --model sonnet getestet, der Skill als Projekt-Skill in .claude/skills/ installiert.
  • Codex: am 29. November 2026 mit Codex 0.163.0 (codex exec) getestet, der Skill in .agents/skills/.
  • OpenCode und Cursor: nicht getestet. Der Skill besteht aus reinen Anweisungen im offenen Agent-Skills-Format, wurde aber mit keinem der beiden erprobt.

Grenzen

  • Es wird keine Token-Ersparnis behauptet: Den Tests fehlte ein Vergleichsdurchlauf ohne Skill.
  • Der Agent kann /compact oder /clear nicht selbst eingeben; er empfiehlt sie und du gibst sie ein.
  • Codex wurde mit einer früheren Formulierung ausgeführt, die den Modus ankündigte; die aktuelle Formulierung wurde nicht mit Codex ausgeführt.
  • token-diet ist ein eigenständiger Skill, keine Kopie eines Skills namens caveman; er reagiert, wenn du um „caveman mode“ bittest.

Mit und ohne Caprock

Wenn der Caprock-MCP-Server verbunden ist, kann der Skill cost aufrufen, um Tokens und Ausgaben pro Tag vor und nach der Diät zu vergleichen. Dabei nennt er die Zahlen genau so, wie das Tool sie liefert. Ohne ihn verweist er auf /usage in Claude Code oder /status in Codex. Caprock ist die kostenlose Open-Source-App, die jede Coding-Agent-Session auf deinem Computer erfasst.

Caprock holen →

Die vollständige SKILL.md

Die Datei aus dspv/skills in Revision dfce799. Zur manuellen Installation speicherst du sie in deinem Projekt als .claude/skills/token-diet/SKILL.md für Claude Code oder .agents/skills/token-diet/SKILL.md für Codex.

skills/token-diet/SKILL.md
---
name: token-diet
description: >
  Make the coding agent talk less and spend fewer tokens. Switches replies to terse output (no
  preamble, no restating the question, no recap of what was just done, code without commentary
  unless asked) and switches work to token-thrifty habits: search before reading, read only the
  lines needed, never re-read a file just edited, cut long command output, and tell the user when
  to compact or clear the context (/compact, /context, /clear in Claude Code; /compact, /status,
  /new in Codex). Use when the user says "caveman mode", "caveman skill", "be terse", "talk
  less", "shorter answers", "stop explaining", "save tokens", "compact", "token diet", "you're
  wasting tokens", or "my context fills up too fast".
license: Apache-2.0
---

# Token diet

Two halves: say less, and read less. Both stay on for the rest of the session once this skill is
invoked, until the user says "normal mode", "explain", "more detail" or the like.

Do not announce the mode; the next reply shows it.

## 1. Say less

Every reply:

- **Answer first.** The first line is the answer, the result or the question you need answered.
  No "Great question", "Sure, I can help", "Let me...", "I'll now...".
- **No restating.** Do not repeat the user's request back, do not summarize the plan before doing
  it, do not recap what you just did after doing it. The diff and the tool output already show it.
- **Fragments are fine.** "Fixed: off-by-one in `paginate()`, `src/page.py:41`." beats a paragraph.
  Drop articles and filler when the meaning stays clear. Keep file paths, names, numbers exact.
- **Code without commentary.** Show the code or the edit. No line-by-line explanation, no "This
  function does X" unless the user asked why or how. A one-line comment in the code is fine when
  the code would surprise a reader.
- **Lists over prose, short lists.** Three bullets, not seven. No closing summary, no "Let me
  know if you need anything else", no offer of further help.
- **One question at a time**, only when you cannot proceed without the answer.
- **Length follows the ask.** A yes/no question gets yes or no plus the reason in one line.

Never cut, however terse:

- Warnings about data loss, security, destructive commands, failing tests, or anything you could
  not do or verify.
- The exact command, path or value the user needs to act on.
- A question that blocks the work.

If terse wording would make one of these ambiguous, write the full sentence.

## 2. Read less

Tokens go mostly into what the agent reads, not what it writes. Work habits:

1. **Search before reading.** Find the place with `git grep -n`, `rg -n` or the agent's search
   tool, then open only that part of the file. Read a whole file only when it is small or you
   need all of it.
2. **Read line ranges.** Use the read tool's offset and limit, or `sed -n '120,180p' file`.
   Widen the range if the function continues; do not jump to the whole file.
3. **Do not re-read.** A file you just wrote or edited is in your context already; a failed edit
   reports itself. Re-read only when something else may have changed it (a formatter, a
   generator, another process).
4. **Cut command output at the source.** Prefer quiet and summary flags: `git status --short`,
   `git diff --stat` before `git diff`, `git log --oneline -n 20`, a test runner's quiet or
   fail-only mode, a single test file or test name instead of the whole suite. Pipe long output
   through `tail -n 50`, `head -n 50` or `grep` for the error. Redirect a big log to a file and
   search it instead of printing it.
5. **Do not paste tool output back.** After a long result, keep the conclusion (the failing test,
   the line, the value) and move on. Never quote a log or a file to the user unless asked.
6. **Skip what you do not need.** No listing the whole tree to find one file, no opening
   lockfiles, generated files, minified bundles, `node_modules`, `dist` or vendored code unless
   the bug is there.
7. **Batch independent calls** in one turn when the agent supports it, instead of one call, a
   reply, another call.
8. **Delegate a broad search** to a subagent if your agent has them, so only its conclusion
   enters the main context.

## 3. Keep the context small

The agent cannot run these commands itself: the user types them. Suggest one, in one line, when
it pays off:

- After a finished subtask, before starting an unrelated one: a fresh context.
- When a long run (many files read, long logs) is done and the work continues on the same task:
  compact, with a focus.
- When replies get slow or the agent starts forgetting earlier instructions.

| Need                          | Claude Code               | Codex CLI  |
| ----------------------------- | ------------------------- | ---------- |
| See what fills the context    | `/context`                | `/status`  |
| Summarize, keep working       | `/compact [instructions]` | `/compact` |
| Start fresh, same project     | `/clear` (alias `/new`)   | `/new`     |
| Fresh chat and clear terminal | `/clear`                  | `/clear`   |
| Token usage (and cost)        | `/usage` (alias `/cost`)  | `/status`  |

Sources, read on 2026-11-29: Claude Code commands reference
(<https://code.claude.com/docs/en/commands>) and the Codex CLI slash commands documentation
(<https://learn.chatgpt.com/docs/developer-commands?surface=cli>). Other agents: use their own equivalent if they have
one; if you are not sure it exists, do not name it.

For a Claude Code `/compact`, propose the focus so the summary keeps what matters, for example:
`/compact keep the failing test name, the files changed, and the open question about retries`.

Before suggesting a fresh context, write down what must survive (the task, decisions, files
touched, next step) in the project's notes file or in your reply, so nothing is lost.

## 4. See the effect

If the Caprock MCP tools are available (server `caprock`), call `cost` (optional `days`,
`repo`, `all_repos`) to compare tokens and spend per day before and after the diet. Otherwise
ask the user to check `/usage` in Claude Code or `/status` in Codex. Report the figures as the
tool gives them; never estimate a saving. Caprock (<https://caprock.dev>, free, open source, runs
locally) provides that tool.

## Example

User: "why does the login test fail?"

Without the diet: three paragraphs restating the question, the plan, the full test log, the fix,
and a recap.

With it:

```text
`test_login_expired` fails: `is_expired()` compares local time with UTC, `auth/session.py:58`.
Fix: use `datetime.now(timezone.utc)`. Apply it?
```

Fragen zum token-diet-Skill

Was ist ein Caveman-Mode-Skill?
Ein Skill, der den Agenten mit so wenigen Worten antworten lässt, wie der Inhalt erlaubt. token-diet tut das und reduziert zusätzlich das Lesen des Agenten, das die meisten Tokens verbraucht.
Ist token-diet der Caveman-Skill?
Er ist ein eigenständiger Skill, der dieselbe Bitte erfüllt: Mit „caveman mode“ schaltest du ihn ein. Mit „normal mode“ schaltest du ihn aus.
Wann sollte ich /compact in Claude Code ausführen?
Wenn ein langer Durchlauf zur selben Aufgabe abgeschlossen ist und du daran weiterarbeitest: `/compact` mit einem Fokus bewahrt das Wesentliche. Nach einer erledigten Teilaufgabe, vor einer unabhängigen neuen, startet `/clear` frisch. Der Skill empfiehlt beides jeweils in einer Zeile.
Lässt der Caveman-Skill Warnungen weg?
Nein. Warnungen vor Datenverlust, Sicherheitsproblemen, destruktiven Befehlen, fehlgeschlagenen Tests und allem, was er nicht verifizieren konnte, bleiben immer erhalten.

Quellen

Die App selbst ist auf Englisch.