Caveman 모드 스킬: 간결한 답변, 반복 읽기 감소, /compact를 위한 token-diet

Dmitriy Solodukha, Caprock 개발자 · 게시일

Claude Code와 Codex에서 테스트

caveman 모드를 요청하면 token-diet 스킬이 Claude Code와 Codex의 답변을 간결하게 만들고, 읽는 분량을 줄이며, 적절한 시점에 /compact를 제안합니다.

“caveman mode”라고 말하면 token-diet 스킬은 에이전트가 답부터 제시하고 멈추게 합니다. 서문, 질문 반복, 요약 없이, 코드에도 설명을 붙이지 않습니다. 대부분의 토큰은 에이전트가 읽는 내용에 쓰이므로 작업 방식도 바꿉니다. 읽기 전에 검색하고, 줄 범위를 지정해 읽고, 방금 수정한 파일을 다시 읽지 않으며, 명령어 출력을 줄입니다. 또한 언제 /compact를 실행하거나 새로 시작할지, 요약에 어떤 내용을 중점적으로 담아야 할지도 알려 줍니다.

token-diet 스킬 설치

에이전트마다 명령어 하나로 설치합니다. 스킬은 SKILL.md 파일 하나이며, 설치 시 실행되는 것은 없습니다.

스킬 아홉 가지 전체를 플러그인으로 설치합니다. Claude Code 안에서 다음을 입력합니다:

이 스킬만 설치하려면 터미널에서 프로젝트 폴더로 이동한 뒤 다음을 실행합니다:

추가 옵션: -g 모든 프로젝트에 설치하려면 앞의 옵션을 추가합니다.

token-diet 스킬을 사용하는 프롬프트

요청이 스킬 설명과 일치하면 에이전트가 해당 스킬을 선택합니다. 이름을 명시하면 확실하게 선택할 수 있습니다. 프롬프트를 클릭하면 복사됩니다.

caveman 스킬의 변경 사항: 출력과 읽기 줄이기, 제때 컨텍스트 압축

  • 출력 줄이기: 첫 줄에 답을 제시합니다. 의미가 명확하다면 완전한 문장이 아니어도 됩니다. 글머리 항목은 일곱 개 대신 세 개로 작성합니다. 작업이 막혔을 때만 한 번에 질문 하나를 합니다.
  • 읽는 양 줄이기: 먼저 git grep -n 또는 rg -n으로 찾은 다음 필요한 줄만 읽기, 출력이 적은 플래그(git status --short, git diff --stat) 사용, 전체 테스트 모음 대신 테스트 하나 실행, 긴 로그는 파일에 저장하고 검색.
  • 컨텍스트 크기 줄이기: 하위 작업을 마치면 새 컨텍스트를 제안합니다. 같은 작업을 오래 진행한 뒤에는 "keep the failing test name, the files changed, and the open question"처럼 초점을 정해 /compact를 제안합니다. 새 컨텍스트로 전환하기 전에 반드시 유지해야 할 내용을 기록합니다.
각 에이전트 문서에 따른 입력 명령(확인일: 2026년 11월 29일)
필요한 것 Claude Code Codex CLI
컨텍스트를 채우는 내용 확인 /context /status
요약 후 작업 계속 /compact [instructions] /compact
새로 시작 /clear /new

실행한 내용과 에이전트의 수행 결과

각 스킬은 2026년 11월 29일에 전용으로 만든 임시 저장소에서 프로젝트 스킬로 설치하여 실행했습니다. 작은 Python 저장소로, 오프바이원 오류(1부터 시작하는 페이지에 start = page * size 사용)가 있는 pager.py와 실패하는 테스트 하나가 있습니다.

Claude Code (claude -p --model sonnet)

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

두 번 실행했습니다. 두 실행 모두 token-diet를 호출하고 셸 호출을 세 번 또는 네 번 사용했으며, pager.py:3을 (page - 1) * size로 수정했습니다. 원인, 수정 사항, 그리고 pytest가 설치되어 있지 않아 테스트 함수를 직접 호출했고 통과했다는 내용을 짧은 두 줄로 답했습니다.

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를 읽었습니다. 당시 스킬 지시에 따라 "Token diet on."으로 시작했습니다. 이후 스킬에서 이 안내를 없앴으며 Codex는 다시 실행하지 않았습니다. 파일에 이미 수정 사항이 있음을 확인하고(같은 폴더의 이전 실행에서 수정됨), 테스트를 실행한 뒤 두 줄로 답했습니다(링크는 일반 텍스트로 표시):

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.

테스트한 에이전트

  • Claude Code: .claude/skills/에 프로젝트 스킬로 설치한 상태에서 2026년 11월 29일에 claude -p --model sonnet으로 테스트했습니다.
  • Codex: 2026년 11월 29일에 Codex 0.163.0(codex exec)로 테스트했으며, 스킬은 .agents/skills/에 설치했습니다.
  • OpenCode와 Cursor: 테스트하지 않았습니다. 스킬은 공개 Agent Skills 형식의 일반 지침이지만, 어느 쪽에서도 실행하여 확인하지 않았습니다.

한도

  • 테스트에서 비교할 스킬 미사용 실행이 없었으므로 토큰 절감 효과를 주장하지 않습니다.
  • 에이전트는 /compact나 /clear를 직접 입력할 수 없습니다. 에이전트가 제안하면 사용자가 입력합니다.
  • Codex에서는 모드를 알리도록 한 이전 문구로 실행했습니다. 현재 문구로는 Codex에서 실행하지 않았습니다.
  • token-diet는 caveman이라는 이름의 다른 스킬을 복사한 것이 아닌 독자적인 스킬이며, caveman mode를 요청하면 반응합니다.

Caprock을 사용할 때와 사용하지 않을 때

Caprock MCP 서버가 연결되어 있으면 스킬은 cost를 호출해 토큰 절약 전후의 일별 토큰과 지출을 비교하고, 도구가 제공하는 수치를 그대로 인용할 수 있습니다. 연결되어 있지 않으면 Claude Code의 /usage 또는 Codex의 /status를 안내합니다. Caprock은 컴퓨터의 모든 코딩 에이전트 세션을 기록하는 무료 오픈 소스 앱입니다.

Caprock 다운로드 →

SKILL.md 전문

dspv/skills의 리비전 dfce799에 있는 파일 그대로입니다. 수동으로 설치하려면 프로젝트 안에 Claude Code용은 .claude/skills/token-diet/SKILL.md, Codex용은 .agents/skills/token-diet/SKILL.md로 저장합니다.

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?
```

token-diet 스킬 관련 질문

caveman mode 스킬이란 무엇인가요?
의미를 유지하는 선에서 에이전트가 최대한 적은 단어로 답하게 하는 스킬입니다. token-diet는 답변을 줄이는 동시에 토큰 대부분이 쓰이는 읽기 분량도 줄입니다.
token-diet가 caveman 스킬인가요?
같은 요청에 반응하는 별도의 스킬입니다. “caveman mode”라고 말하면 켜지고, “normal mode”라고 말하면 꺼집니다.
Claude Code에서 /compact는 언제 실행해야 하나요?
같은 작업을 오래 실행한 뒤 계속 이어 갈 때는 중점을 지정한 `/compact`로 중요한 내용을 유지합니다. 하위 작업을 마치고 관련 없는 작업을 시작하기 전에는 `/clear`로 새로 시작합니다. 스킬은 각각을 한 줄로 제안합니다.
caveman 스킬은 경고를 생략하나요?
아니요. 데이터 손실, 보안, 파괴적인 명령, 실패하는 테스트, 검증하지 못한 사항에 대한 경고는 항상 유지합니다.

출처

앱 자체는 영어로 되어 있습니다.