optimize-prompt-token-efficiency

Solid

Iteratively optimizes prompts for token efficiency by maximizing information density - reduces verbosity, removes redundancy, tightens phrasing while preserving semantic content. Use when asked to compress, shorten, reduce tokens, tighten, maximize density, increase information density, or make a prompt more concise.

AI & Automation 73 stars 10 forks Updated today MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
62
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Optimize Prompt Token Efficiency Iteratively optimize prompt token efficiency by maximizing information density through verification loops. Primary goal: reduce token consumption while preserving all semantic content for AI-consumed prompts (CLAUDE.md, skills, agent prompts, specs). ## Overview This skill transforms verbose prompts into token-efficient versions through: 1. **Verification First** - `prompt-token-efficiency-verifier` checks for inefficiencies before any changes 2. **Optimization** - Apply targeted compression based on verifier feedback 3. **Re-verification** - Verify compression is lossless, iterate if issues remain (max 5 iterations) 4. **Output** - Atomic replacement only after verification passes **Loop**: Read → Verify → (Exit if efficient) → Optimize based on feedback → Re-verify → (Iterate if issues) → Output **Key principle**: Don't try to optimize in one pass. The verifier drives all changes - if it finds no inefficiencies, the prompt is already token-efficient. ## Workflow ### Phase 0: Create Task List (use task management immediately) Create todos tracking workflow phases. List reflects areas of work, not fixed steps. **Starter todos**: ``` - [ ] Input validation - [ ] Initial verification - [ ] (Expand: optimization iterations on INEFFICIENCIES_FOUND) - [ ] Output optimized prompt ``` ### Phase 1: Input Validation **Mark "Input validation" todo `in_progress`.** **Step 1.1: Parse arguments** Extract file path from `$ARGUMENTS`. If no pa...

Details

Author
doodledood
Repository
doodledood/manifest-dev
Created
8 months ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

prompt-token-efficiency

Rewrite prompts for minimal tokens, maximal clarity, and low ambiguity for LLM consumption.

5,185 Updated today
github
Data & Documents Listed

optimize-tokens

Token optimization advisor for the user. Trigger in two situations. (1) When the user explicitly says "optimize tokens", "reduce tokens", "token efficient", or asks how to prompt better for efficiency. (2) When the request has one of these shapes: pasting or pointing to a long document and asking for feedback, review or edits on all of it; asking for the same treatment applied across many files; asking for a full rewrite where a targeted edit would do; or repeating context already established earlier in this session. Always prioritize quality over reduction: this skill eliminates waste, not output. Does not fire for a task that is expensive because the output itself has to be long, such as writing a new article or report from scratch, since that cost is real and this skill says so rather than trying to cut it.

0 Updated 3 weeks ago
theAnirudhKumar
Data & Documents Listed

optimize-tokens

Token optimization advisor for the user. Triggers in two situations: (1) When the user explicitly says "optimize tokens", "reduce tokens", "token efficient", or asks how to prompt better for efficiency. (2) When a request is detectably token-heavy - e.g., involves processing many files, large rewrites, multi-step research, full document generation, long context dumps - and a lighter approach could achieve the same result. Always prioritize quality over reduction. This skill is about eliminating waste, not restricting output. Use this skill proactively when you sense the request could be restructured to save significant tokens without quality loss.

1 Updated 2 weeks ago
CSPulse