Video summary

18 Claude Code Token Hacks in 18 Minutes

Main summary

Key takeaways

Technology

High-level summary

  • Purpose: a practical, hands‑on guide to reduce Claude (Anthropic) token usage and improve output quality — 18 hacks organized in three tiers (easy → advanced), plus bonuses and an actionable checklist.
  • Core technical insight:

    Claude rereads the entire conversation (system prompts, cloud.MD, MCP/tool definitions, files, prior messages) on every turn, so token cost compounds quickly. Invisible overhead (MCPs, system tools, file outputs) can dominate usage and degrade output quality (loss-in-the-middle).

  • Main technologies / products discussed: Claude / Claude Code (Anthropic), models Sonnet / Haiku / Opus, MCP servers (tool integrations), cloud.MD (system file), CodeEx plugin, agent / sub-agent workflows, CLI alternatives, terminal status line and dashboard monitoring.

  • Outcome promised: implement these practices to meaningfully multiply effective token budget (2–5x or more).

How tokens work (key concepts)

  • Token ≈ the smallest unit of text the model reads; billing occurs per token.
  • Every new message triggers rereading of the full session context: messages, model replies, system prompts, cloud.MD, MCP tool definitions, and loaded files.
  • Token usage compounds (not linear): later messages can be many times costlier due to reprocessing the whole history.
  • Invisible overhead (MCPs, system tools, loaded files, command outputs) can be huge; one report found 98.5% of tokens in a long chat were spent rereading history.
  • Cache behavior: Claude caches some context but has a ~5‑minute timeout — stepping away >5 minutes can cause the next message to reprocess everything at full cost.

Tier 1 — Easy, high-impact (9 hacks)

  1. Start fresh conversations
    • Use /clear between unrelated tasks to avoid carrying context across topics.
  2. Disconnect unused MCP servers
    • Each connected MCP can load large tool definitions per message (e.g., thousands of tokens); run MCP when needed and disconnect others.
  3. Batch prompts into one message
    • Combine multi-step requests to avoid repeat rereads; prefer editing + regenerate over multiple follow-ups where appropriate.
  4. Use plan mode before heavy tasks
    • Have Claude map the approach and ask clarifying questions to avoid wasted work/token churn.
  5. Use /context and /cost
    • Run these to see what’s actually consuming tokens and current session spend estimates (visibility → control).
  6. Set up a status line
    • In terminal, show model, context percentage, token count/progress to monitor usage live.
  7. Keep dashboard open / monitor
    • Watch allocation and resets; optionally automate periodic checks.
  8. Be smart with pasting
    • Paste only necessary excerpts (function, paragraph) instead of whole documents/repos.
  9. Watch Claude run
    • Monitor long-running tasks to stop wrong paths or loops early.

Tier 2 — Intermediate / project hygiene (5 hacks)

  1. Keep cloud.MD lean and local
    • Place a short (≤ ~200 lines) index-like cloud.MD in the project root; treat it as a map to large resources rather than embedding everything.
  2. Be surgical with file references
    • Point at specific files/functions (use @filename) instead of asking Claude to search the whole repo.
  3. Compact proactively (~60% context)
    • Run /compact before the automatic trigger at ~95%; specify what to preserve. After 3–4 compacts, session quality degrades — then summarize and clear.
  4. Avoid short breaks >5 minutes without compacting
    • Cache timeout causes reprocessing; run /compact or /clear before stepping away if needed.
  5. Control command output bloat
    • Shell/CLI outputs get added to context; restrict or deny noisy commands and be intentional about commands run by Claude.

Tier 3 — Advanced / strategic (4 hacks + bonuses)

  1. Pick the right model
    • Sonnet: default for most coding work.
    • Haiku: lightweight sub-agents, formatting, small/simple tasks.
    • Opus: deep architectural planning (use sparingly; limit to <20% usage).
    • Use the CodeEx plugin (or similar) to offload heavy codebase reviews and reduce Claude token load.
  2. Understand sub-agent / agent costs
    • Sub-agents/agent teams cost ~7–10x tokens because each is a separate context instance. Use sub-agents for one-off explorations or offload heavy tasks to cheaper models.
  3. Use peak / off-peak timing
    • Peak hours: weekdays 8 AM–2 PM ET drain sessions faster.
    • Schedule heavy tasks/refactors/offload to off-peak (afternoons/evenings/weekends) or time heavy runs near reset if you have spare allocation.
  4. Systems constitution (cloud.MD best practices)
    • Store stable decisions, architecture rules, short progress summaries (save decisions, not conversations).
    • Add short applied-learning bullets (<15 words) for recurring fixes/workarounds; be careful not to bloat the file (check it regularly).

Actionable checklist (what to run / do now)

  • Run /context and /cost to see current token sinks and spend.
  • Set up /st status line in terminal (model, context %, token count).
  • Keep Claude usage dashboard visible and note reset timing.
  • Disconnect unused MCP servers; use CLIs where available.
  • Start complex flows in plan mode; use /clear when switching topics.
  • Manually compact around 60% context; summarize & clear after multiple compacts.
  • Batch multi-step instructions into single messages where feasible.
  • Schedule heavy/agent sessions in off-peak windows.

Tradeoffs and mindset

  • Balance quality vs cost: sometimes you’ll need expensive models/agents for better outputs; sometimes cost-saving changes reduce quality.
  • The primary problem is often “context hygiene,” not necessarily plan limits — stop re-sending entire histories repeatedly.
  • Hitting limits can indicate productive usage; the aim is to be efficient but also a power user when necessary.

Extras

  • Slide deck available for download (free community link mentioned).
  • Treat cloud.MD as an evolving, monitored system that can self-improve but must be checked to avoid bloat.

Main speakers / sources referenced

  • Video presenter (unnamed in transcript) — author of the 18-hack tutorial and step-by-step guidance.
  • Anthropic / Claude team — referenced for product behavior and peak/off-peak adjustments.
  • Unnamed developer(s) — example: one developer tracked a 100+ message chat and reported 98.5% tokens used to reread history.
  • CodeEx (official plugin) — mentioned as a tool for codebase reviews to save Claude tokens.

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video