token-economy

Apply token optimization when writing docs, changelogs, MCP tasks. Quality

⭐2stars🔀0forks📁View on GitHub🕐Updated Nov 22, 2025

When & Why to Use This Skill

The Token Economy skill is a specialized utility designed to optimize text for AI context windows, ensuring maximum information density without sacrificing quality. It streamlines technical documentation, changelogs, and MCP (Model Context Protocol) tasks by applying 15 systematic techniques—such as converting prose to tables and eliminating linguistic fluff. This skill is essential for developers and AI power users looking to reduce token consumption, lower API costs, and improve the performance of LLMs by providing cleaner, more scannable context.

Use Cases

  • Technical Documentation Refactoring: Convert verbose software manuals into token-efficient formats using tables and numbered steps to fit more information into the AI's active context.
  • MCP Task Optimization: Refine Model Context Protocol task descriptions and progress notes using standardized templates to ensure agents understand requirements with minimal token overhead.
  • Changelog and Commit Summarization: Transform lengthy development logs into high-density summaries that preserve critical 'why' context while removing redundant prose.
  • Context Window Management: Condense large code samples and repetitive pattern statements into compact references to prevent context overflow in long-running AI chat sessions.
  • Cost-Effective Prompt Engineering: Apply 'inverted pyramid' information ordering and conditional verbosity to create prompts that are both effective and economical for high-volume API usage.
nametoken-economy
descriptionApply token optimization when writing docs, changelogs, MCP tasks. Quality #1, Tokens #2.
allowed-toolsRead, Edit, Grep

Token Economy

Optimize text for AI context: docs, changelogs, MCP tasks, subtasks.

Principle: Quality first. Never sacrifice essential info.

15 Techniques

# Technique Use Example
1 Tables over prose Comparisons Function params → table
2 Bullets with pipes Multi-part Part1 | Part2 | Part3
3 Numbered steps Workflows 1. Step → 2. Step
4 One example Code samples Keep best, remove rest
5 Pattern statements Repetition **Pattern**: All X do Y
6 Add "Why" Decisions **Why**: [reason]
7 Concrete errors Debugging **Error**: \exact message``
8 No fluff Decorations Remove ASCII art, emojis
9 Scannable Structure Headers, bullets, tables
10 Consolidate Duplicates Merge similar sections
11 Compact code Examples 3-5 key lines only
12 Quick lists Reference Command/param tables
13 Inverted pyramid Info order Critical → Details → Context
14 Conditional verbosity Complexity High for complex, low for simple
15 No teaching Reference State facts, skip basics

Quick Workflow

  1. Identify: Prose → tables? Multiple examples → one? ASCII → numbered? Teaching → facts?
  2. Apply: Convert, consolidate, compact
  3. Check: Essential info preserved? Scannable? No fluff?

MCP Templates

Task:

Requirements: [WHAT] | Files: [PATH:LINES] (action) | Acceptance: [CRITERIA] | Why: [CONTEXT]

progress_notes: [ACTION] [WHAT]. [NEXT]

completion_summary: [DONE]. [TECH]. Files: [PATHS]. [IMPACT]

Examples

Before (prose):

This function validates user input. Takes string input_text, returns bool.
If valid returns true, otherwise false. Checks empty, special chars, length ≤100.

After (compact):

**validate_input(input_text: str) → bool**: True if valid (non-empty, no special chars, ≤100)

Before (ASCII art - 180 tokens):

┌─────────┐
│  Auth?  │
└────┬────┘
     ▼
┌─────────┐
│ Valid?  │
└──┬───┬──┘
   Y   N

After (numbered - 36 tokens):

1. Check auth
2. Valid → YES: Process | NO: Reject

Common Fixes

Issue Fix
Multiple examples Keep 1 (#4)
Prose comparison Table (#1)
Teaching Facts only (#15)
ASCII art Numbered (#3)
No "why" Add context (#6)

See TEMPLATES.md for copy-paste templates.