token-efficiency — Claude Code rule: what it does, how to install
token-efficiency cuts token burn in Claude Code by removing conversational filler, enforcing read-before-write, and stopping unwanted refactoring loops.
MIT ★ 2,966 updated 2026-09-29
.cursor/rules/token-efficiency.mdcWhat token-efficiency does
This instruction set enforces strict economy on model completions. It blocks opening pleasantries, empty closing remarks, question restatements, and AI identity disclaimers. Output is restricted to plain ASCII characters, swapping curly quotes and em dashes for standard quotation marks and double hyphens.
File interactions follow two core constraints: the agent must inspect a file before touching it, yet it cannot reload a previously read file unless disk contents actually changed. Simple edits must follow a single-pass workflow. Once code passes tests, execution stops immediately without stylistic refactoring or defensive abstractions for imaginary edge cases.
Code blocks must appear first, followed by concise explanations only when logic is non-obvious. Whenever data fits, the model is directed to emit tables, bullet points, or JSON rather than paragraphs of text.
What it helps with
- remove greeting fluff and polite disclaimers from agent responses
- stop context waste caused by reloading unchanged source files
- prevent unprompted refactoring cycles on code that already passes tests
- force direct code output ahead of explanations without preambles
Example prompts for the agent
- Fix the null pointer in
session.tsfollowing token-efficiency guidelines - Generate the migration script in one pass and run tests once
- Summarize API endpoints as a clean ASCII table with zero conversational filler
How to install token-efficiency
Manually: put the files in place
.cursor/rules/token-efficiency.mdcFrontmatter: description, globs, alwaysApply
1Plugin marketplace
/plugin marketplace add rohitg00/pro-workflow/plugin install pro-workflow@pro-workflow2Manually: put the files in place
.claude/rules/token-efficiency.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/token-efficiency.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/token-efficiency.mdManually: put the files in place
.clinerules/token-efficiency.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about token-efficiency
How to install token-efficiency in Claude Code?
Run /plugin marketplace add rohitg00/pro-workflow and then /plugin install pro-workflow@pro-workflow. Alternatively, place the file directly at .claude/rules/token-efficiency.md.
What does the token-efficiency rule do?
It trims context usage by banning conversational padding, disallowing redundant file reads, enforcing ASCII formatting, and prioritizing immediate code delivery.
When does the rule stop Claude Code from editing further?
For simple tasks, the agent stops as soon as tests pass on the first pass, without polishing working code or introducing extra abstractions.
Source text
token-efficiency.mdc · MIT
--- description: Token efficiency rules - eliminate waste in AI output, enforce read-before-write, prevent iteration cycles alwaysApply: true --- No sycophantic openers: never start with "Sure!", "Great question!", "Absolutely!", "Of course!", "I'd be happy to!". No hollow closing fluff: never end with "Let me know if you need anything!", "I hope this helps!", "Feel free to ask!". No prompt restatement: do not repeat or paraphrase the question before answering. Lead with the answer. No unsolicited suggestions: deliver exactly what was asked. Do not add "you might also want to..." unless requested. No "As an AI" framing: never include disclaimers about being an AI model. ASCII-only output: use -- not em dashes, use " not smart quotes, use ' not curly apostrophes. No Unicode decorators. Read before write: never write or edit a file you have not read in this session. No exceptions. No re-reads: do not re-read a file already read in this session unless it was modified since the last read. One-pass discipline for simple tasks: write the complete solution in one pass, run tests once. If tests pass, stop. Do not refactor, improve, or polish passing code. No write-delete-rewrite cycles: understand the target file structure before writing. Plan the change, then execute once. Do not over-engineer: simplest working solution first. No unnecessary abstractions, error handling for impossible scenarios, or speculative features. Code first, explanation after: return code, then explain only if non-obvious. No preambles before code blocks. Structured output when possible: prefer tables, bullets, and JSON over prose paragraphs.
© Rohit Ghumare · MIT · rohitg00/pro-workflow