Overview
This repository provides a unique tool called "Caveman" that drastically reduces token usage in AI interactions, particularly for code generation and assistance. It achieves this by making your AI agent "talk like a caveman" – concise, direct, and devoid of unnecessary prose, while preserving all critical information. This approach can lead to significant cost savings, with reported reductions of up to 65% in output tokens and 33.2% in input tokens.
Key Features
- Token Reduction: Significantly cuts down on the number of tokens processed by AI models, leading to lower costs. The "Caveman" skill reduces output tokens by an average of 65%, and the proxy offers up to 33.2% input token savings.
- Concise Communication Style: Implements a "caveman" speaking style that removes verbose language, throat-clearing, and filler, resulting in shorter, more efficient responses.
- Proxy and Skill Options: Offers two primary modes of operation:
- Skill: A lightweight rule file that modifies agent behavior. Easy to install and works with over 30 different agents.
- Proxy: A local process that sits between your agent and the AI provider, compressing both input and output.
- Broad Agent Compatibility: Supports integration with a wide range of popular AI coding agents, including Claude Code, Codex, Gemini, Aider, and many others.
- Intelligent Compression: The proxy intelligently identifies and compresses different payload types (JSON, logs, code, diffs, search results, text/HTML) while preserving essential information.
- "Pixel Mode" for Skills: Converts installed skills into PNG images to further reduce token count for prompt text, with options to revert.
- Insightful Analytics: The
caveman learncommand analyzes your agent's history to identify token sinks and provide actionable insights for optimization. - Sub-Agent Presets: Includes specialized sub-agent presets for investigation, building, and code review, all operating with a compressed communication style.
Typical Use Cases
- Cost Optimization: Developers and teams looking to reduce their AI API expenses by minimizing token consumption.
- Faster AI Responses: By reducing token count, AI agents can often respond more quickly.
- Improved Focus in AI Interactions: Encourages direct and efficient communication with AI models, cutting through the noise.
- Streamlining Code Assistance: Developers using AI agents for coding tasks can benefit from more concise explanations, suggestions, and code outputs.
- Analyzing and Optimizing AI Usage: Teams can leverage the
caveman learnfeature to understand their AI token expenditure and implement targeted savings. - Enhancing Existing Workflows: Seamlessly integrates with many existing AI coding tools, allowing for immediate adoption and benefits.
