ysskrishna logoysskrishna

Chapter 6 of 8 · 3 min

Shorter answers, lower token cost

Output tokens cost more than input. How to cut filler without cutting accuracy, and how to measure the difference.

Most model pricing charges more per output token than per input token, and long answers also cost your time. Yet default replies are padded: a restatement of your question, an introduction, hedges, the answer, and a summary of the answer.

You can remove most of that with a few lines of prompt, or with a skill.

Measure first

  1. Paste a typical reply into the AI Token Counter. Note tokens and the cost column for your model.
  2. Delete everything you would not miss. Count again.
  3. The difference is your waste per reply. Multiply by replies per day.

This also tells you whether it matters. For a few chats a day, it may not. For an agent that writes hundreds of summaries, it does.

Prompt lines that work

Answer first. No introduction, no recap.
Max 5 bullets unless I ask for more.
Code: show only changed lines with 2 lines of context.
Skip caveats unless they change what I should do.

Put these in your rules file (CLAUDE.md, Cursor rules) so they apply to every task, not just one prompt.

What not to cut

  • Code. Never ask the model to abbreviate code or identifiers.
  • Error messages and commands. Keep them verbatim.
  • Real caveats. "This migration locks the table" is not filler.

A skill for terse replies

Caveman is an open-source skill that makes replies terse while leaving code and technical content intact. Install for any skills-compatible agent:

npx skills add JuliusBrussee/caveman -g

Its README reports a benchmark of output tokens with and without the skill; check the current numbers there rather than assuming a fixed saving, because results depend on the task. It also has levels (/caveman, /ultracave) and a /caveman-compress command that shortens memory files such as CLAUDE.md, which reduces input tokens on every turn.

Input tokens matter too

  • Rules files load every turn. A 2,000-token CLAUDE.md costs 2,000 tokens per message. Trim it.
  • Long pasted logs stay in the conversation. Paste the relevant lines, or let a subagent read the full log.
  • Start fresh when you switch tasks. A new chat drops old context.

Step by step: a one-week experiment

  1. Pick one recurring task (PR summaries, test plans).
  2. Run it 5 times with your current prompt. Record tokens (from the counter or your usage dashboard) and whether the answer was correct.
  3. Add the four prompt lines above. Run 5 more.
  4. Compare both tokens and correctness. Keep the change only if correctness held.

Practice: a before-and-after on one task

Pick a question you ask often, such as "why is this test failing?", and run it twice on the same failure:

  1. With no length instruction.
  2. With: "Answer in at most 5 lines: cause, the one line to change, how to verify. No background unless I ask."

Compare the two answers on the things that matter: did the short one still name the cause and the fix? If yes, you have found a line worth keeping in your project rules. If it dropped something important, loosen the limit (for example 8 lines) rather than removing it. Keep a note of the token counts your tool reports for each run; that note is the measurement from "Measure first", and it is the only evidence that the change saved anything.

The goal is not the shortest answer possible. It is the shortest answer that still lets you act without a follow-up question, because every follow-up costs another full round trip.

Quick check

  1. What should you never ask the model to shorten?Code, identifiers, commands and error messages.

  2. Where do length rules go so they apply every time?In the project or user rules file (CLAUDE.md, Cursor rules), or a skill such as Caveman.

  3. Why measure correctness as well as tokens?A shorter answer that is wrong costs more in re-runs than it saved.

Continue exploring

CourseCover image for Agent Building Blocks: Skills, Subagents, MCP and Hooks

Agent Building Blocks: Skills, Subagents, MCP and Hooks

A free, hands-on course on the four pieces behind Cursor and Claude Code agents: skills, subagents, MCP servers and hooks. Build each one, then combine them.

Agent Skills
Chat & AI
+1

9 chapters · 30 min

BlogCover image for 17 Thinking Skills for AI Agents: Pre-Mortem, Five Whys, Six Hats and More

17 Thinking Skills for AI Agents: Pre-Mortem, Five Whys, Six Hats and More

AI Apps & Assistants
Agent Skills
4 min read
ToolCover image for AI Token Counter

AI Token Counter

AI token counter with model pricing and context-window comparison in your browser.

Chat & AI
AI Apps & Assistants
+1
Productskills.sh+1Claude Code Subagents for Cursor

Claude Code Subagents for Cursor

Your Cursor subagents can finally run on the model you picked in each agent file.
Chat & AI
Agent Skills
AI Apps & Assistants
Bash
BlogCover image for How to Install Caveman in Cursor and Claude Code

How to Install Caveman in Cursor and Claude Code

AI Apps & Assistants
Agent Skills
+1
3 min read
BlogCover image for Publish AI Agent Skills to ClawHub: Stop Re-Pasting Your AI Workflow

Publish AI Agent Skills to ClawHub: Stop Re-Pasting Your AI Workflow

AI Apps & Assistants
Agent Skills
3 min read