Logo: Caveman Token Reduction

Caveman Token Reduction

Organisatioun
UitbreidenOS
caveman-token-reduction

Claude Code Caveman mode: token-efficient communication, compressed responses, minimal output for context-heavy sessions, terse acknowledgments, and context budget optimization

Add to TypingMind

Iwwersiicht

EditeurUitbreidenOS
RepositoryUitKit
Skill-Nummcaveman-token-reduction
Stären
14
Forks
5
Matgeliwwert Dateien
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    UitbreidenOS huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Caveman Token Reduction an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/UitbreidenOS/UitKit/tree/main/plugins/uitkit-ai-engineering/skills/caveman-token-reduction
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UitbreidenOS/UitKit.git /tmp/UitKit
mkdir -p .claude/skills
cp -r /tmp/UitKit/plugins/uitkit-ai-engineering/skills/caveman-token-reduction .claude/skills/caveman-token-reduction
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Caveman Token Reduction an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Caveman Token Reduction automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Caveman Token Reduction net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Caveman — Token Reduction Mode

When to activate

  • Context window is above 70% capacity and you need to extend the session
  • Working on a large codebase where tool outputs (file reads, grep results) dominate context
  • Multi-step tasks where intermediate responses waste context budget
  • User explicitly requests terse/minimal responses
  • Running cost-sensitive sessions where token usage matters
  • Long debugging sessions where you need maximum context for logs and traces

When NOT to use

  • First interaction on a new session with plenty of context headroom
  • When the user is learning and needs detailed explanations
  • Documentation generation or tutorial writing (verbosity is the product)
  • When communicating with stakeholders who need full context
  • Complex architectural discussions that require nuanced reasoning

Instructions

1. Response Compression Levels

LevelNameTokens/responseUse when
0Normal200-500Default, ample context
1Concise50-150Context > 50%, routine tasks
2Terse15-50Context > 70%, repetitive operations
3Caveman5-15Context > 85%, emergency mode

2. Level 1: Concise Mode

Normal response:

I've reviewed the authentication middleware in src/auth/middleware.ts. 
There are three issues I found:
1. The JWT verification on line 23 doesn't check the token expiration, 
   which means expired tokens will still be accepted.
2. The error handler on line 45 catches all errors but returns a generic 
   500 instead of distinguishing between auth failures and server errors.
3. The CORS configuration allows all origins, which is too permissive 
   for production.

I recommend fixing these in order of severity. Want me to proceed?

Concise response:

src/auth/middleware.ts — 3 issues:
1. L23: JWT expiry not checked (expired tokens accepted)
2. L45: Generic 500 for all errors (should be 401 vs 500)
3. L12: CORS allows all origins (too permissive for prod)

Fix in order?

3. Level 2: Terse Mode

auth/middleware.ts: 3 bugs
- L23: no expiry check
- L45: 500 for all errors (need 401/500 split)
- L12: CORS wildcard (prod risk)
Fix?

4. Level 3: Caveman Mode

auth fix: 3 bugs (L12,L23,L45). Fix all?

5. Acknowledgment Compression

FullConciseTerseCaveman
"I've completed the task and all tests are passing.""Done. Tests pass.""Done ✓""✓"
"I've read the file and understand the structure.""Read.""Read""👁"
"That file doesn't exist, let me search for it.""Not found. Searching...""Missing, searching""∅→🔍"
"I've made the requested changes and committed them.""Committed.""Committed""git✓"

6. Tool Output Compression

Compress grep/read results before including in response:

yaml
compression_rules:
  file_reads:
    - omit_lines: "unchanged/import/header"
    - show_only: "modified + context (3 lines)"
    - max_lines: 30  # never show more than 30 lines from a read
    
  grep_results:
    - max_matches: 10  # summarize beyond this
    - group_by: "file"
    - format: "file:line:match (not full line content)"
    
  bash_output:
    - tail_lines: 20   # last 20 lines of output
    - on_success: "exit 0"  # just the exit code
    - on_failure: "last 20 lines + exit code"

7. Context Budget Management

Monitor and report context usage:

yaml
context_monitor:
  check_every: 10_turns
  thresholds:
    50_percent: "switch to concise"
    70_percent: "switch to terse, summarize old context"
    85_percent: "switch to caveman, aggressively compress"
    95_percent: "suggest handoff to new session"
  
  report_format: "ctx: 72% | mode: terse | ~45 turns remaining"

Automatic context cleanup:

yaml
auto_cleanup:
  when: "context > 70%"
  actions:
    - summarize_conversation: "compress turns 1-50 into 10-line summary"
    - drop_tool_results: "keep only most recent 5 tool outputs in full"
    - compress_file_reads: "replace full reads with line-range references"

8. Batch Operation Compression

Instead of reporting each step in a batch:

Normal:
  1/10: Created src/api/users.ts ✓
  2/10: Created src/api/products.ts ✓
  3/10: Created src/api/orders.ts ✓
  ...

Caveman:
  10/10 files created ✓

Instead of confirming each file read:

Normal:
  Read package.json (45 lines)
  Read tsconfig.json (22 lines)
  Read .eslintrc.json (18 lines)

Caveman:
  Read 3 configs ✓

9. When to Expand Back

Automatically return to normal verbosity when:

  • User asks a conceptual question ("Why did you choose X?")
  • User says "explain" or "more detail"
  • A critical error occurs that needs full context
  • Context usage drops below 40% (after summarization/cleanup)
  • Starting a new task within the same session

Example

Long debugging session in caveman mode:

User: "The API is returning 500 on /users endpoint. Debug it."

Agent (normal): Read error logs, identified 3 issues in the request chain...
User: "Go caveman mode, we have a lot to debug"

Agent: "logs: 3 errs. L47 null ref in userRepo. Fix?"
User: "yes"
Agent: "fixed. Test?"
User: "still failing"
Agent: "err2: L82 missing await. Fix?"
User: "yes"  
Agent: "fixed. ctx:68% mode:terse ~60 turns left"
User: "next error?"
Agent: "L115: unhandled promise reject in cache. wrap try/catch?"
User: "do it"
Agent: "✓ /users returns 200. All 3 fixed."

Anti-Patterns

  • Caveman by default: Starting every session in caveman mode hurts onboarding and discoverability — use only when context pressure is real
  • Losing meaning: Compressing so aggressively that the response becomes ambiguous — "fix?" is fine, "?" alone is not
  • Ignoring user preference: Staying in caveman mode when user asks for details — always expand when asked
  • Compression without context: Using caveman mode with a new user who doesn't understand the abbreviations — match the user's familiarity level
  • Premature summarization: Summarizing tool outputs that you'll need in full later — only compress results you've already processed
  • Silent context overflow: Not warning the user when context is critical — always report context status at terse/caveman levels

Heefeg gestallte Froen

Wat mécht de KI-Skill Caveman Token Reduction?

Claude Code Caveman mode: token-efficient communication, compressed responses, minimal output for context-heavy sessions, terse acknowledgments, and context budget optimization

Firwat Caveman Token Reduction op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Caveman Token Reduction besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Caveman Token Reduction an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/UitbreidenOS/UitKit/tree/main/plugins/uitkit-ai-engineering/skills/caveman-token-reduction an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Caveman Token Reduction benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Caveman Token Reduction benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Caveman Token Reduction domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Caveman Token Reduction gratis?

UitbreidenOS huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇