prompt-compression
Installation
SKILL.md
Prompt Compression
Reduces prompt token count without losing effectiveness. Covers semantic deduplication, example pruning, instruction consolidation, and format directive compression. Critically: distinguishes between safe cuts and cuts that silently degrade output.
Phase 1 — Audit Before Cutting
Read the full prompt. Map it into buckets before touching anything:
- Role/persona block — who the model is
- Behavioral constraints — what it must/must not do
- Task instructions — what to actually produce
- Format directives — how to structure output
- Examples — few-shot demonstrations
- Context/background — grounding information
Compression failures almost always come from cutting across buckets without noticing. A constraint buried in an example isn't redundant with the same constraint stated in instructions — it's reinforcement. Flag these before cutting.