token-efficiency
$
npx mdskill add TheBushidoCollective/han/token-efficiencyReduce token costs by optimizing file edits and searches.
- Saves tokens on file modifications and content searches.
- Uses Edit, Write, Glob, and Grep tools for efficiency.
- Prioritizes diffs over full reads and structured output.
- Avoids redundant reads and verbose conversational text.
SKILL.md
.github/skills/token-efficiencyView on GitHub ↗
--- name: token-efficiency user-invocable: false description: Minimize token consumption through efficient tool usage patterns allowed-tools: [] --- # Token Efficiency ## Name han-core:token-efficiency ## Description Minimize token consumption without sacrificing quality. Every token spent on overhead is a token not available for thinking. ## File Operations - **Use Edit for modifications** — sends only the diff (~50-100 tokens), not the whole file - **Use Write only for new files** — full file content costs ~500-5000 tokens - **Never re-read a file you just wrote** — you already know its contents - **Batch related edits** to the same file in one Edit call ## Search Operations - **Use Glob for file finding** — faster and cheaper than Bash find - **Use Grep for content search** — cheaper than Bash grep - **Set head_limit on Grep** — avoid returning thousands of matches ## Context Management - **Don't repeat what the user said** — they can see their own message - **Lead with the answer** — skip preamble and filler - **Use structured output** — tables and lists over prose for data ## Anti-Patterns | Wasteful | Efficient | |----------|-----------| | Read file → Write entire file with 1 line changed | Edit the specific line | | `cat file.txt` via Bash | Read tool | | `find . -name "*.ts"` via Bash | Glob `**/*.ts` | | "Let me start by reading the file to understand..." | Just read it | ## When to Apply Always. Token efficiency is not premature optimization — it directly extends how much work fits in a session.
More from TheBushidoCollective/han
- absinthe-resolversUse when implementing GraphQL resolvers with Absinthe. Covers resolver patterns, dataloader integration, batching, and error handling.
- absinthe-schemaUse when designing GraphQL schemas with Absinthe. Covers type definitions, interfaces, unions, enums, and schema organization patterns.
- absinthe-subscriptionsUse when implementing real-time GraphQL subscriptions with Absinthe. Covers Phoenix channels, PubSub, and subscription patterns.
- act-docker-setupUse when configuring Docker environments for act, selecting runner images, managing container resources, or troubleshooting Docker-related issues with local GitHub Actions testing.
- act-local-testingUse when testing GitHub Actions workflows locally with act. Covers act CLI usage, Docker configuration, debugging workflows, and troubleshooting common issues when running workflows on your local machine.
- act-workflow-syntaxUse when creating or modifying GitHub Actions workflow files. Provides guidance on workflow syntax, triggers, jobs, steps, and expressions for creating valid GitHub Actions workflows that can be tested locally with act.
- ameba-configurationUse when configuring Ameba rules and settings for Crystal projects including .ameba.yml setup, rule management, severity levels, and code quality enforcement.
- ameba-custom-rulesUse when creating custom Ameba rules for Crystal code analysis including rule development, AST traversal, issue reporting, and rule testing.
- ameba-integrationUse when integrating Ameba into development workflows including CI/CD pipelines, pre-commit hooks, GitHub Actions, and automated code review processes.
- analyze-performanceAnalyze performance metrics and identify slow transactions in Sentry