Summary

Run /context before the first prompt so you know your starting point. - Name the file and the function in your first prompt, and ask Claude Code to search before it reads.

  • Add a deny rule to the project’s settings.json for folders you never need, like docs and tests.

Run /clear when you switch tasks, and use/compact only when you need to keep the history. - Check /usage before a long task to see how much of your five-hour window is left. Since both sessions used Sonnet 5 on a Claude Pro plan and Flask’s open-source code. Your numbers will vary with the model, the size of your project, and your setup. My usage limit lasts almost all day now The limit stayed the same, but the context shrank Nothing about my plan changed between those two sessions. The questions were the same, and so were the answers. What changed was how much Claude Code had to carry into every reply, and that alone cut the cost to about a third. The same thinking works beyond source code. Test output and log files can bloat a session just as fast, so I point Claude at the exact failure instead of the full dump. If you want to see where the rest of your limit goes, tracking your Claude tokens for a week is a good place to start. claude Claude Code

  • OS
  • macOS, Windows, and Linux
  • Developer(s)
  • Anthropic
  • Price model
  • Subscription and pay-as-you-go API Claude Code is an agentic coding tool developed by Anthropic that uses multiple AI models from the developer.

By Yasir Mahmood

Original Article