Make AI Coding Agents More Concise with Caveman
Job to be done: Reduce token usage and verbosity of AI coding agents
🇳🇬 Ways to use this in Nigeria
Ideas to get you started, adapt to your situation.
- Student
Use Caveman with your AI coding assistant to get shorter, cheaper code explanations for your CSC201 assignments or side hustle projects, saving data and reducing AI costs.
- Entrepreneur
Reduce your AI coding agent's token usage with Caveman when building your startup's MVP, cutting development costs and getting faster code suggestions for your product.
- 9-5 employee
Generate concise commit messages and one-line code review comments using Caveman, making your team's AI coding agent more efficient and cost-effective for daily coding tasks.
What you’ll get
You will learn how to install and use Caveman, a tool that makes your AI coding assistant give shorter, more direct answers. This helps you save money on AI usage costs and read responses faster because it removes unnecessary filler phrases. It works by making the AI’s output more concise without changing the accuracy of the code or explanations.
Tools you need
- Caveman (free): An open-source tool that shortens AI agent responses.
- An AI coding agent (paid): Such as Claude Code or Copilot, which you use for coding tasks.
Steps
-
Install the Caveman skill: Open your terminal or command prompt and run the following command to add Caveman as a skill to your AI agent. You should see a confirmation message indicating the skill was added successfully.
npx skills add JuliusBrussee/caveman -
Activate Caveman: If your AI agent doesn’t automatically start using Caveman, you can manually activate it by typing
/cavemanin the chat. You should see a confirmation or the AI should start responding more concisely. -
Adjust Caveman’s terseness (optional): You can control how short the AI’s responses are. Try these commands in your chat:
/caveman lite: For slightly shorter responses./caveman full: For standard terse responses./caveman ultra: For the most concise responses./caveman off: To turn Caveman off. After running a command, observe that the AI’s subsequent answers are shorter or longer based on your choice.
-
Use special Caveman commands (optional): Caveman adds extra helpful commands:
/caveman-commit: Ask Caveman to write a short commit message for your code changes. You should get a concise commit message suggestion./caveman-review: Get a one-line, actionable code review comment. You should see a brief suggestion for improving your code./caveman-compress file: Shrink Markdown files and keep a backup. You will be prompted for a file and then receive confirmation of the compressed file and its backup.
Original source
This workflow is based on the Caveman project by arshtechpro, shared on their blog. It offers a way to make AI coding agents more efficient by reducing the length of their output, saving both time and computational resources.
Notes & variations
- Free tier alternative: Caveman itself is free and open-source. The main cost is using the AI coding agent, so look for agents with generous free tiers or pay-as-you-go options if possible.
- Common mistake: Don’t expect Caveman to reduce the tokens used for your input prompts or the AI’s internal reasoning. It only shortens the final output. If your prompts are very long, your total token usage might not decrease significantly.
- Tip for better results: Measure your own token savings. The author’s 65% average saving is a guideline. If your work involves a lot of code and less explanatory text, your savings might be smaller. Use the
/caveman-statscommand in Claude Code to see your actual savings.