Video Summary

I Stopped Hitting Claude Code Usage Limits (Here's How)

Brad | AI & Automation

Main takeaways
01

Run /context in a fresh session to see how many tokens are preloaded before you send a message.

02

Disconnect unused MCP servers (they load tool definitions into context every message) or replace them with CLIs for ~40% token savings.

03

Trim and simplify claude.md: remove contradictions, rules that don't add value, and use one-line pointers to reference docs (progressive disclosure).

04

Audit installed skills and remove verbose or low-value ones; each skill's metadata is preloaded into context.

05

Adjust settings.json (auto compact ~75%, deny rules for directories) and adopt habits: fresh sessions between tasks, use /clear, and use planning mode to avoid costly follow-ups.

Key moments
Questions answered

What's the fastest way to see how much context you're paying for before sending a message?

Run the /context command in a fresh Claude Code session to reveal tokens preloaded by system tools, MCPs, skills, and claude.md.

How do MCP servers inflate token usage and what should I do about them?

Every connected MCP loads all its tool definitions into your context on every message (can be tens of thousands of tokens). Disconnect unused MCPs at session start with /MCP and replace frequently unused servers with CLIs when possible.

What three changes should I make to my claude.md to reduce context bloat?

1) Remove contradictory or redundant rules; 2) Delete rules that don't add value using the five audit filters; 3) Use progressive disclosure—keep only universal rules in claude.md and point to reference files with one-line links.

Which settings and habits reduce ongoing token waste?

Set auto compaction to around 75%, add deny rules in settings.json to limit directories Claude can read, start fresh sessions between unrelated tasks, use /clear, and run planning mode before non-trivial work.

How does the provided Context Audit skill help maintain low usage?

The audit skill scans your setup, scores context hygiene, and gives specific recommendations (which MCPs, skills, or claude.md rules to remove). Install once and run periodically to catch regressions.

Strategies to Avoid Hitting Claude Code Usage Limits 00:00

"I was wasting a huge amount of tokens on invisible context I didn't even know was there."

  • Wasting tokens on excessive context can lead to quickly reaching Claude code usage limits. It’s crucial to audit and optimize your setup to prevent unnecessary usage.

  • The author discovered that invisible sources of context were inflating their token costs and implemented strategies to reduce the starting context.

  • A significant finding was that every time a message is sent, Claude code rereads the entire conversation, meaning later messages can cost significantly more than the first.

Reducing Starting Context to Optimize Usage 01:30

"Bloated context means you're paying more and getting less output."

  • Reducing starting context involves identifying and removing unnecessary elements that lead to context bloat.

  • By running the command {slash} context in a fresh Claude session, users can see how many tokens they are paying for without sending a message, revealing areas for potential savings.

  • For instance, the author noted that their context was bloated by over 50,000 tokens before they made enhancements.

Solutions for Specific Context Sources 02:00

"Every connected MCP server loads all of its tool definitions into your context on every single message."

  • Connected MCP servers can significantly inflate context costs, leading to up to 70,000 tokens’ worth of excess overhead.

  • To mitigate this, users should disconnect MCP servers that are not actively in use within the session by executing the {slash} MCP command.

  • Additionally, switching from MCP servers to command line interfaces (CLIs) can lead to approximately 40% savings, as CLIs only incur costs when invoked.

Claude.md Optimization Techniques 03:22

"Your core Claude.md should only contain rules that apply to every single session."

  • Optimizing the Claude.md file can reduce usage substantially. Users should check for contradictions and eliminate redundant or vague instructions to streamline commands.

  • The audit skill referenced can help identify which rules to remove based on specific filters, ensuring that only essential guidelines remain.

  • It is advised to utilize one-line pointers leading to detailed resources rather than overcrowding the core file with extensive instructions.

Skills and Settings Impacting Context 05:18

"If you're loading up a setup with tons of skills, you're bloating your context for very little return."

  • Each installed skill contributes to context load, and verbose skills can unnecessarily consume tokens. Concise skills that provide meaningful and clear outputs are preferable.

  • Users should audit their skills to identify those that are verbose or not yielding sufficient value, implementing changes accordingly.

Context Window Settings Adjustments 06:07

"By default, Claude code can read everything in your project."

  • Adjustments to settings such as auto compaction percentage can enhance context management. Setting it to about 75% triggers context compacting earlier to maintain output quality.

  • Limiting directory access via deny rules in settings.json can help prevent Claude from analyzing unnecessary components of a project, conserving context tokens.

  • An in-depth audit will flag absent optimizations such as missing auto compact settings or needed deny rules, offering specific recommendations for corrections.

Building a Marketplace for Verified Claude Skills 08:28

"I'm building a marketplace for verified Claude code skills, security reviewed, vetted by real engineers and domain experts, so you know exactly what you're getting before you install it."

  • The speaker is developing a marketplace aimed at ensuring users can find Claude code skills that are not only verified but also secure.

  • This marketplace will feature skills that have been thoroughly reviewed and vetted by professional engineers and domain experts, providing users with confidence in the quality and reliability of the skills they install.

  • A waitlist link for interested users is provided in the video description.

Best Practices for Managing Token Usage 08:42

"Now, let me go through the habits that make a big difference day-to-day. You might have heard a few of these already, but they're genuinely useful for keeping your usage under control."

  • The speaker emphasizes the importance of developing habits that help manage token usage effectively when working with Claude.

  • Fresh sessions should be started between unrelated tasks to avoid carrying over token costs from one task to the next.

  • Using commands like the {slash} clear command allows users to reset the context, which helps in saving tokens significantly.

Importance of Planning Mode 09:18

"Use the plan mode before anything non-trivial. This is the single most expensive mistake in Claude code: letting it go down the wrong path."

  • Planning mode is recommended before undertaking any significant coding tasks to prevent costly errors.

  • It helps in outlining the approach and getting alignment before any coding begins, which minimizes wasted tokens on misunderstandings.

  • The speaker advises taking a structured approach, considering development frameworks that emphasize planning loops.

Avoiding Follow-Up Corrections 09:51

"When Claude gets something wrong, don't send a follow-up correction. Every follow-up message gets added to a conversation history permanently."

  • Avoid sending corrective messages after receiving an incorrect response from Claude since these corrections add to the conversation history, leading to compounded context issues.

  • By omitting corrections, users can eliminate the ineffective responses from the current context, preserving token usage.

Choosing the Right Claude Model for the Task 10:12

"The next thing is using the right model for the job. Sonnet handles most coding work, while Haiku is great for sub-agents, formatting, and simple lookups."

  • Selecting the appropriate model for the specific task is crucial for maximizing efficiency; for example, using Sonnet for coding tasks and Haiku for lighter tasks like formatting and lookups.

  • If deep architectural planning is needed, the Opus model is recommended when Sonnet is being utilized, ensuring users apply the best tools available for the job.

Continuous Context Auditing 10:28

"That's why I built the audit as a skill and not a one-time checklist. Install it once and run it whenever you want."

  • A context audit skill has been developed to provide ongoing assessment of users' setups rather than a single-point check.

  • By running the audit, users can receive feedback on their context hygiene and suggestions for improvements, helping them maintain efficiency over time.

  • This audit skill is available for free and can be added to the skills folder for user convenience.