LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

token-efficiency

Token optimization best practices for cost-effective Claude Code usage. Automatically applies efficient file reading, command execution, and output handling strategies. Includes model selection guidance (Opus for learning, Sonnet for development/debugging). Prefers bash commands over reading files.

16stars2forksUpdated 7/11/2026
Developer Tools#claude-code#model-selection#best-practices#bash-workflows#cost-efficiency#token-optimization

Security Assessment

Safe(100/100)

Detected risks:

Agent-reviewed override(Best-practices guide that explicitly recommends AGAINST the flagged patterns: 'Always use rmdir instead of rm -rf', 'use shell=True (but avoid for security reasons)'. Describes safe patterns, does not run dangerous ones.)
Security Score100/100

About token-efficiency

Cost-effective use of Claude Code hinges on not spending tokens you do not need to, and this skill codifies a default set of optimization habits that apply across projects unless a user explicitly asks for verbose output or full file contents. Its baseline assumption is that users prefer efficient, cost-effective assistance, and it pairs concrete tactics with judgment about when to relax them.

Model selection comes first. Opus is recommended for learning and deep understanding - grasping a new codebase, broad exploration, deep analysis, and very complex or architectural debugging - while Sonnet is the default for regular development such as writing, editing, fixing, testing, documentation, and general questions. A typical session starts with a short Opus investment to understand the code, switches to Sonnet for implementation, and returns to Opus only when deep architectural understanding is needed, saving roughly 50 percent versus all-Opus usage. It also debunks the myth that many installed skills waste tokens, explaining that progressive disclosure loads only skill descriptions until a skill is activated.

The core is a set of optimization rules: use quiet or minimal output flags, never read entire log files, check lightweight sources like git status or package.json first, prefer Grep over reading whole files, read with offset and limit, and substitute bash commands such as cp, sed, cat, wc, and jq for Read plus Edit on pure transformations and inspection. It then refines that with a scope-based framing: the choice between bash and Read plus Edit is about whether the user benefits from seeing a reviewable diff. Code edits, validation-sensitive files, and interactive review favor Read plus Edit, while read-only inspection and large-file transformations favor bash or python. A decision tree and override rules round it out, telling the agent when to prioritize understanding over efficiency, such as reading a few key files fully while learning architecture.

FAQ

When should I use Opus versus Sonnet?

Use Opus for learning, broad exploration, deep analysis, and architectural debugging; use Sonnet as the default for writing, editing, debugging, testing, and general development tasks.

How much can model selection save?

Following the start-with-Opus-then-switch-to-Sonnet pattern is cited as saving roughly 50 percent in token cost versus using Opus for everything.

Does having many skills installed waste tokens?

No. Skills use progressive disclosure, so Claude only sees short skill descriptions at session start and loads full content when a skill is activated.

When should I use bash instead of Read plus Edit?

For read-only inspection of structured data and transformations of large files. Prefer Read plus Edit for code changes, validation-sensitive files, and when the user wants to review a diff.

When should these efficiency rules be overridden?

When the user explicitly asks for full output, when filtered output lacks needed context, when a file is known to be small, or when learning code structure and architecture.

All Files

5 files
learning-mode.md13.3 KB
View
examples.md11.8 KB
View
SKILL.md11.3 KB
View
project-patterns.md17.4 KB
View
strategies.md21.2 KB
View

Install token-efficiency

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

delphine-l/claude_global

Related Skills

dbt-sf-to-bq-translator

21,076

build-models

102

html-prototype

3,588

doc

448