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 69 stars 9 forks Updated today MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
61
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
6 months ago
Last Updated
today
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category