Reduce Claude Code token usage 3-5x in 5 minutes
Set up CLAUDE.md, check .gitignore, and learn /compact - three built-in features that save up to 80% of tokens without plugins
- 1.Open a terminal in your project root folder and launch Claude Code with the claude command. If the tool is not installed - install it via npm.
To install: npm install -g @anthropic-ai/claude-code. Node.js version 18 or higher is required. After installation, run claude in your project folder.
About this tool - 2.Ask Claude Code to generate a CLAUDE.md file - it is a context file the tool reads automatically on every launch. Without it, Claude re-examines the project structure from scratch each time, wasting tokens.
CLAUDE.md replaces dozens of clarifying questions and repeated file reads. It is the biggest savings lever - create it once, save on every session.
About this toolPromptAnalyze this codebase and create a CLAUDE.md file in the project root. Include: 1. Tech stack and versions (from package.json / requirements.txt / etc.) 2. Commands: install, dev, build, test, lint 3. Project structure: list top-level directories and their purpose 4. Coding conventions you observe (naming, file organization, error handling) 5. Files and directories that must NOT be modified Keep the entire file under 400 words. Be specific - no generic advice.
What this prompt doesEnglish prompt for Claude Code: asks it to scan the project and create a CLAUDE.md file with tech stack, commands, structure, and rules. No need to replace anything - just send it to Claude Code. The file is created automatically. - 3.Check that your project's .gitignore lists all heavy folders. Claude Code automatically skips files listed in .gitignore and does not waste tokens reading them.
If node_modules, build folders, or .lock files are not in .gitignore - Claude Code reads them when analyzing the project. That is tens of thousands of wasted tokens. Add missing entries manually.
- 4.During long sessions, run the /compact command every 10-15 messages. It compresses the conversation context into a brief summary while preserving the task essence.
Without /compact, long conversations resend the entire history in every message. At 20+ messages this can burn 50,000+ tokens just on context. The command is built-in and free.
About this tool - 5.Structure tasks using this template: specific action + scope constraint + verification method. This prevents Claude Code from reading and editing files outside the task scope.
The phrase «Do NOT touch files outside of [scope]» is the most underrated saving. Without it, Claude may scan the entire project for a single edit.
About this toolPromptTask: [one-sentence description of what to change] Scope: only files in [specific path, e.g. src/components/Button/] Constraints: - Do NOT create new files - Do NOT modify files outside of the scope - Do NOT add new dependencies Verify: run [test or build command] and confirm it passes
What this prompt doesEnglish task template. Replace the content in square brackets: Task - what to do, Scope - folder with files, Verify - command to check. Do not change the constraints in the middle - they block unnecessary Claude Code actions.
- subscriptionClaude Code (Anthropic)Requires a Claude Pro subscription from $20/mo or Max from $100/mo, or API billing. All techniques in this recipe are built-in features - no additional payments needed.
Why today
AI services change fast - interfaces and free limits may differ from what's described.