[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-75090":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":10,"languages":10,"totalLinesOfCode":10,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},75090,"claude-token-efficient","drona23\u002Fclaude-token-efficient","drona23","One CLAUDE.md file. Keeps Claude responses terse. Reduces output verbosity on heavy workflows. Drop-in, no code changes.","",null,5581,428,40,1,0,46,93,345,138,38.9,"MIT License",false,"main",true,[],"2026-06-12 02:03:32","# claude-token-efficient\n\n> One file. Drop it in your project. Keeps responses terse and can reduce total tokens on output-heavy workflows.\n> Note: instruction files add input tokens on every turn. Keep this file short - if it grows too much, it can cost more than it saves.\n> Model support: benchmarks were run on Claude only. The rules are model-agnostic and should work on any model that reads context - but results on local models like llama.cpp, Mistral, or others are untested. Community results welcome.\n\n---\n\n## The Problem\n\nWhen you use Claude Code, every word Claude generates costs tokens.\nMost people never control *how* Claude responds - they just get whatever the model decides to output.\n\nBy default, Claude:\n- Opens every response with \"Sure!\", \"Great question!\", \"Absolutely!\"\n- Ends with \"I hope this helps! Let me know if you need anything!\"\n- Uses em dashes (--), smart quotes, Unicode characters that break parsers\n- Restates your question before answering it\n- Adds unsolicited suggestions beyond what you asked\n- Over-engineers code with abstractions you never requested\n- Agrees with incorrect statements (\"You're absolutely right!\")\n\n**All of this wastes tokens. None of it adds value.**\n\n---\n\n## Two Options\n\n**Option 1: Paste rules in chat (quick start)**\nCopy these rules into any new session:\n```\nRules: Read files first. Write complete solution. Test once. No over-engineering.\n```\nWorks immediately. No setup. Good for one-off tasks.\n\n**Option 2: Drop CLAUDE.md file (set and forget)**\n```\nyour-project\u002F\n└── CLAUDE.md    \u003C- one file, zero setup, no code changes\n```\nAutomatic on every message. Better for regular work. More efficient at scale.\n\nPick based on your workflow. Both work.\n\n---\n\n## How They Compare\n\n| Approach | Setup | Cost | Best For |\n|----------|-------|------|----------|\n| Rules in chat | None | Higher | Quick sessions, no project |\n| CLAUDE.md file | 1 file | Lower | Regular work, pipelines |\n\n---\n\n## When This Helps vs When It Doesn't\n\n**This file works best for:**\n- Automation pipelines with high output volume (resume bots, agent loops, code generation)\n- Repeated structured tasks where Claude's default verbosity compounds across hundreds of calls\n- Teams who need consistent, parseable output format across sessions\n\n**This file is not worth it for:**\n- Single short queries - the file loads into context on every message, so on low-output exchanges it is a net token increase\n- Casual one-off use - the overhead doesn't pay off at low volume\n- Fixing deep failure modes like hallucinated implementations or architectural drift - those require hooks, gates, and mechanical enforcement\n- Pipelines using multiple fresh sessions per task - fresh sessions don't carry the CLAUDE.md overhead benefit the same way persistent sessions do\n- Parser reliability at scale - if you need guaranteed parseable output, use structured outputs (JSON mode, tool use with schemas) built into the API - that is a more robust solution than prompt-based formatting rules\n- Exploratory or architectural work where debate, pushback, and alternatives are the point - the override rule lets you ask for that any time, but if that's your primary workflow this file will feel restrictive\n\n**The honest trade-off:**\nThe CLAUDE.md file itself consumes input tokens on every message. The savings come from reduced output tokens. The net is only positive when output volume is high enough to offset the persistent input cost. At low usage it costs more than it saves.\n\n---\n\n## Benchmark Results\n\nSame 5 prompts. Run without CLAUDE.md (baseline) then with CLAUDE.md (optimized).\n\n| Test | Baseline | Optimized | Reduction |\n|------|----------|-----------|-----------|\n| Explain async\u002Fawait | 180 words | 65 words | 64% |\n| Code review | 120 words | 30 words | 75% |\n| What is a REST API | 110 words | 55 words | 50% |\n| Hallucination correction | 55 words | 20 words | 64% |\n| **Total** | **465 words** | **170 words** | **63%** |\n\n**~295 words saved per 4 prompts. Same information. Zero signal loss.**\n\n> **Methodology note:** This is a 5-prompt directional indicator (T1-T3, T5 for word reduction; T4 is a format test), not a statistically controlled study. Claude's output length varies naturally between identical prompts. No variance controls or repeated runs were applied. Treat the 63% as a directional signal for output-heavy use cases, not a precise universal measurement. The CLAUDE.md file itself adds input tokens on every message - net savings only apply when output volume is high enough to offset that persistent cost.\n\n### External benchmark (Issue #1)\n\nAn [independent benchmark](https:\u002F\u002Fgithub.com\u002Fadam-s\u002Ftesting-claude-agent) ran 6 configs across 3 coding challenges (CSV reporter, SQLite window functions, Hono WebSocket counter). All configs passed all tests, so comparison was purely cost-to-green.\n\nWe ran our own v8 config head-to-head against C-structured (the previous best) on the same harness, same day, same model:\n\n| Challenge | M-drona23-v8 | C-structured | Winner |\n|-----------|-------------|-------------|--------|\n| CSV Reporter | $0.244 | $0.282 | v8 |\n| SQLite Windows | $0.406 | $0.376 | C-structured |\n| WebSocket | $0.285 | $0.473 | v8 |\n| **Total** | **$0.935** | **$1.131** | **v8 (-17.4%)** |\n\nThe v8 config uses 2 files (7 lines total). The biggest win comes from WebSocket where explicit pattern rules prevent expensive debugging loops.\n\nThis repo keeps the root `CLAUDE.md` to a small set of high-impact rules to minimize recurring input overhead.\n\n### At Scale\n\n| Usage | Tokens Saved\u002FDay | Monthly Savings (Sonnet) |\n|-------|-----------------|--------------------------|\n| 100 prompts\u002Fday | ~9,600 tokens | ~$0.86 |\n| 1,000 prompts\u002Fday | ~96,000 tokens | ~$8.64 |\n| 3 projects combined | ~288,000 tokens | ~$25.92 |\n\n---\n\n## Before vs After\n\n**Without CLAUDE.md - Code Review:**\n```\nGreat question! I can see you're working with a loop. Let me take a look at that.\nThat's a thoughtful piece of code! However, I notice there's actually a subtle bug\nhere that's worth pointing out. The condition i \u003C= arr.length should be i \u003C arr.length.\nUsing \u003C= means the loop will run one extra iteration... You might also want to consider\nusing modern array methods like forEach, map, or for...of which are cleaner...\nGreat catch on reviewing this - it's always good practice to double-check loop\nboundaries! I hope this review was helpful. Feel free to share more code anytime!\n```\n**120 words.**\n\n**With CLAUDE.md - Same prompt:**\n```\nBug: \u003C= causes an off-by-one error. On the final iteration arr[arr.length] is undefined.\n\nFix:\nfor (let i = 0; i \u003C arr.length; i++)\n```\n**30 words. Same fix. 75% fewer tokens.**\n\n---\n\n## What It Fixes\n\n| # | Problem | Fix |\n|---|---------|-----|\n| 1 | Starts coding without context | Think first; read files before writing |\n| 2 | Verbose responses | Keep output concise |\n| 3 | Rewrites large files unnecessarily | Prefer targeted edits |\n| 4 | Re-reading the same files | Read each file once unless it changed |\n| 5 | Declaring done without validation | Run tests before finishing |\n| 6 | Sycophantic chatter | No flattering preamble\u002Fclosing fluff |\n| 7 | Over-engineered solutions | Favor simple direct fixes |\n| 8 | Prompt conflict confusion | User instructions always override |\n\n---\n\n## Pro Tips From the Community\n\n**Scope rules to your actual failure modes, not generic ones.**\nGeneric rules like \"be concise\" help but the real wins come from targeting specific failures you've actually hit. For example if Claude silently swallows errors in your pipeline, add a rule like: \"when a step fails, stop immediately and report the full error with traceback before attempting any fix.\" Specific beats generic every time.\n\n**CLAUDE.md files compose - use that.**\nClaude reads multiple CLAUDE.md files at once - global (~\u002F.claude\u002FCLAUDE.md), project-level, and subdirectory-level. This means:\n- Keep general preferences (tone, format, ASCII rules) in your global file\n- Keep project-specific constraints (\"never modify \u002Fconfig without confirmation\") at the project level\n- Keep task-specific rules in subdirectory files\n\nThis avoids bloating any single file and keeps rules close to where they apply.\n\n---\n\n## Profiles\n\nDifferent project types need different levels of compression.\nPick the base file + a profile, or use the base alone.\n\n| Profile | Best For |\n|---------|----------|\n| `CLAUDE.md` | Universal - works for any project |\n| `profiles\u002FCLAUDE.benchmark.md` | Token-to-green coding benchmarks |\n| `profiles\u002FCLAUDE.coding.md` | Dev projects, code review, debugging |\n| `profiles\u002FCLAUDE.agents.md` | Automation pipelines, multi-agent systems |\n| `profiles\u002FCLAUDE.analysis.md` | Data analysis, research, reporting |\n\n### Versioned Configuration Sets\n\nThe `profiles\u002F` directory also contains three versioned configuration sets representing different optimization strategies. Pick the one that matches your workflow:\n\n| Version | Strategy | Tool Budget | Best For |\n|---------|----------|-------------|----------|\n| `J-drona23-v5` | Multi-file structured | 50 calls | Complex projects needing detailed workflow rules and agent definitions |\n| `K-drona23-v6` | One-shot execution | 50 calls | Tasks that should complete in a single pass with minimal iteration |\n| `M-drona23-v8` | Ultra-lean minimum-turn | 20 calls | Cost-sensitive pipelines where every tool call counts |\n\n**How to choose:**\n- Start with **v5** if you need structured multi-step workflows with clear agent protocols\n- Use **v6** if you want faster execution with strict \"done means done\" rules (no polishing passing code)\n- Use **v8** only if you need maximum cost efficiency and your tasks are simple enough for 20 tool calls\n\n### Two Ways to Apply Rules\n\n**Option A: CLAUDE.md file (recommended for regular use)**\n- Drop file in project root\n- Automatic on every message\n- Cached efficiently\n- Better for repeated tasks, pipelines\n\n**Option B: Rules in prompt (for one-off sessions)**\n- Copy-paste rules into chat\n- Works without setup\n- Clear what applies this session\n- Good for quick tasks\n\n**Cost comparison** (benchmarked on 3 coding challenges):\n\n| Method | CSV | SQLite | WebSocket | Total | Cost vs v8 |\n|--------|-----|--------|-----------|-------|-----------|\n| Rules pasted in chat | $0.274 | $0.459 | $0.585 | $1.318 | +41% |\n| **CLAUDE.md (v8)** | **$0.244** | **$0.406** | **$0.285** | **$0.935** | baseline |\n\nBoth pass all tests. Pick based on your workflow.\n\n---\n\n## How to Use\n\n**Option 1 - Universal (any project):**\n```bash\ncurl -o CLAUDE.md https:\u002F\u002Fraw.githubusercontent.com\u002Fdrona23\u002Fclaude-token-efficient\u002Fmain\u002FCLAUDE.md\n```\n\n**Option 2 - Clone and pick a profile:**\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fdrona23\u002Fclaude-token-efficient\ncp claude-token-efficient\u002Fprofiles\u002FCLAUDE.coding.md your-project\u002FCLAUDE.md\n```\n\n**Option 3 - Manual:**\nCopy the contents of `CLAUDE.md` from this repo into your project root.\n\n---\n\n## Override Rule\n\nUser instructions always win.\nIf you explicitly ask for a detailed explanation or verbose output, Claude will follow your instruction - the file never fights you.\n\n---\n\n## Contributing\n\nFound a behavior that CLAUDE.md can fix?\nOpen an issue with:\n1. The annoying behavior (what Claude does by default)\n2. The prompt that triggers it\n3. The fix rule you propose\n\nCommunity submissions become part of the next version with full credit.\n\n---\n\n## Validation\n\nFull benchmark results with before\u002Fafter word counts:\nSee [BENCHMARK.md](.\u002FBENCHMARK.md)\n\n---\n\n## References and Credits\n\nThis project was built on real complaints from the Claude community.\nFull credit to every source that contributed a fix:\n\n- [GitHub #3382 - \"Claude says You're absolutely right about everything\"](https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-code\u002Fissues\u002F3382) - 350+ upvotes\n- [GitHub #14759 - \"Sycophantic behavior undermines usefulness as coding assistant\"](https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-code\u002Fissues\u002F14759)\n- [GitHub #9340 - \"Add --quiet flag to suppress tool call output\"](https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-code\u002Fissues\u002F9340)\n- [GitHub #21818 - \"Tool Output Verbosity Creates Visual Noise\"](https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-code\u002Fissues\u002F21818)\n- [GitHub #20542 - \"Verbose output overwhelms session and consumes excessive tokens\"](https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-code\u002Fissues\u002F20542)\n- [The Register - \"Claude Code's endless sycophancy annoys customers\"](https:\u002F\u002Fwww.theregister.com\u002F2025\u002F08\u002F13\u002Fclaude_codes_copious_coddling_confounds\u002F)\n- [DEV Community - \"7 Ways to Cut Your Claude Code Token Usage\"](https:\u002F\u002Fdev.to\u002Fboucle2026\u002F7-ways-to-cut-your-claude-code-token-usage-elb)\n- [Medium - \"Stop Wasting Tokens: Optimize Claude Code Context by 60%\"](https:\u002F\u002Fmedium.com\u002F@jpranav97\u002Fstop-wasting-tokens-how-to-optimize-claude-code-context-by-60-bfad6fd477e5)\n- [Anthropic Docs - Reduce Hallucinations](https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Ftest-and-evaluate\u002Fstrengthen-guardrails\u002Freduce-hallucinations)\n- [PromptHub - \"Three Prompt Engineering Methods to Reduce Hallucinations\"](https:\u002F\u002Fwww.prompthub.us\u002Fblog\u002Fthree-prompt-engineering-methods-to-reduce-hallucinations)\n- [GitHub Gist - Practical workflow for reducing token usage](https:\u002F\u002Fgist.github.com\u002Fdholdaway\u002F8009f089d3407e14f3d753f2a70eb63e)\n- [Token Checkup - Free diagnostic for token consumption patterns](https:\u002F\u002Fyurukusa.github.io\u002Fcc-safe-setup\u002Ftoken-checkup.html) - 5-question browser tool that analyzes your Claude Code token usage and suggests optimizations\n- [Cache Health Checker - Diagnose cache efficiency from \u002Fcost output](https:\u002F\u002Fyurukusa.github.io\u002Fcc-safe-setup\u002Fcache-health.html) - paste your `\u002Fcost` output to check if prompt caching is working correctly\n- [Claude Code Best Practices - community](https:\u002F\u002Frosmur.github.io\u002Fclaudecode-best-practices\u002F)\n- [Vaibhav Sisinty - GrowthSchool](https:\u002F\u002Fgrowthschool.io) - AI upskilling and prompt engineering best practices\n- [Vaibhav Sisinty on X](https:\u002F\u002Fx.com\u002FVaibhavSisinty) - Active discussions on Claude prompt optimization and AI workflows\n\n---\n\n## License\n\nMIT - free to use, modify, and distribute.\n\n---\n\n*Built by [Drona Gangarapu](https:\u002F\u002Fgithub.com\u002Fdrona23) - open to PRs, issues, and profile contributions.*\n","该项目通过一个CLAUDE.md文件，使Claude模型的响应更加简洁，从而减少在高输出工作流中生成的总令牌数。其核心功能在于无需修改代码即可实现对Claude回复风格的控制，包括去除冗余表达、避免使用特殊字符等，以达到节省成本的目的。适用于自动化流水线、重复性任务以及需要一致且可解析输出格式的团队环境中。对于单次简短查询或非频繁使用的场景，则可能不适用，因为加载该文件本身会增加少量开销。",2,"2026-06-11 03:52:15","high_star"]