Token optimization strategies for cost-effective Claude Code usage across all projects.
Works with
Use Opus for learning and deep codebase understanding, Sonnet (default) for development, debugging, and implementation tasks; typical pattern saves ~50% tokens
Prefer bash commands over reading files for modifications: use sed , cp , cat instead of Read/Edit/Write cycles, saving 90-95% on file operations
Filter before reading with grep , head , tail , and check file metadata first; never read enti
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versiontoken-efficiencyExecute the skills CLI command in your project's root directory to begin installation:
Fetches token-efficiency from delphine-l/claude_global and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate token-efficiency. Access via /token-efficiency in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
4
total installs
4
this week
11
GitHub stars
0
upvotes
Run in your terminal
4
installs
4
this week
11
stars
This skill provides token optimization strategies for cost-effective Claude Code usage across all projects. These guidelines help minimize token consumption while maintaining high-quality assistance.
ALWAYS follow these optimization guidelines by default unless the user explicitly requests verbose output or full file contents.
Default assumption: Users prefer efficient, cost-effective assistance.
Use the right model for the task to optimize cost and performance:
Use Opus when:
Use Sonnet (default) for:
Typical session pattern:
Savings: ~50% token cost vs all-Opus usage.
Myth: Having many skills in .claude/skills/ increases token usage.
Reality: Skills use progressive disclosure - Claude sees only skill descriptions at session start (~155 tokens for 4 skills). Full skill content loaded only when activated.
It's safe to symlink multiple skills to a project. Token waste comes from reading large files unnecessarily, not from having skills available.
Use --quiet, -q, --silent flags by default. Only use verbose when user explicitly asks.
Always filter before reading: tail -100, grep -i "error", specific time ranges.
Check git status --short, package.json, requirements.txt before reading large files.
Search for specific content with Grep tool instead of reading entire files.
Use offset and limit parameters. Check file size with wc -l first.
CRITICAL OPTIMIZATION. Reading files costs tokens. Bash commands don't.
| Operation | Wasteful | Efficient |
|---|---|---|
| Copy file | Read + Write | cp source dest |
| Replace text | Read + Edit | sed -i '' 's/old/new/g' file |
| Append | Read + Write | echo "text" >> file |
| Delete lines | Read + Write | sed -i '' '/pattern/d' file |
| Merge files | Read + Read + Write | cat file1 file2 > combined |
| Count lines | Read file | wc -l file |
| Check content | Read file | grep -q "term" file |
When to break this rule: Complex logic, code-aware changes, validation needed, interactive review. For details, see strategies.md.
Limit scope: head -50, find . -maxdepth 2, tree -L 2.
Provide structured summaries of directory contents, code structure, command output.
head -100, tail -50, sample from middle with head -500 | tail -100.
Extract specific fields: jq '.metadata', jq 'keys'. For CSV: head -20, wc -l.
Get overview first (find, grep for classes/functions), read structure only, search for specific code, read only relevant sections.
Use Task/Explore subagent for broad codebase exploration. Saves 70-80% tokens vs direct multi-file exploration.
Batch 3-5 related searches in parallel. Save results immediately. Document "not found" items.
For detailed strategies, bash patterns, and extensive examples, see strategies.md.
Ask yourself:
Override efficiency rules when:
In learning mode:
In cases 1-3, explain token cost to user and offer filtered view first.
Model Selection (First Priority):
Before ANY file operation, ask yourself:
| Approach | Tokens/Week | Notes |
|---|---|---|
| Wasteful (Read/Edit/Write everything) | 500K | Reading files unnecessarily |
| Moderate (filtered reads only) | 200K | Grep/head/tail usage |
| Efficient (bash commands + filters) | 30-50K | Using cp/sed/awk instead of Read |
Applying these rules reduces costs by 90-95% on average.
This skill automatically applies these optimizations when:
You can always override by saying:
| File | Content | When to load |
|---|---|---|
| strategies.md | Detailed bash command strategies, file operation patterns, sed/awk examples, Jupyter notebook manipulation, safe glob patterns, macOS/Linux compatibility | When implementing specific file operations or need detailed bash patterns |
| learning-mode.md | Strategic file selection, targeted pattern learning workflows, broad repository exploration strategies, repository type identification | When entering learning mode or exploring a new codebase |
| examples.md | Extensive token savings examples with before/after comparisons, targeted learning examples (Galaxy wrappers, API patterns), cost calculations | When demonstrating token savings or learning from examples |
| project-patterns.md | Analysis file organization, task management with TodoWrite, background process management, repository organization, MANIFEST system, efficient file operations | When organizing projects, managing long-running tasks, or setting up navigation patterns |
Core motto: Right model. Right tool. Filter first. Read selectively. Summarize intelligently.
Model selection (highest impact):
Tool selection (primary optimization):
Secondary rules:
By following these guidelines, users can get 5-10x more value from their Claude subscription while maintaining high-quality assistance.
Make data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
ailabs-393/ai-labs-claude-skills
pproenca/dot-skills
mattpocock/skills
Solid pick for teams standardizing on skills: token-efficiency is focused, and the summary matches what you get after install.
I recommend token-efficiency for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
token-efficiency has been reliable in day-to-day use. Documentation quality is above average for community skills.
token-efficiency is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Useful defaults in token-efficiency — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
token-efficiency fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Registry listing for token-efficiency matched our evaluation — installs cleanly and behaves as described in the markdown.
We added token-efficiency from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
token-efficiency reduced setup friction for our internal harness; good balance of opinion and flexibility.
We added token-efficiency from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 53