| license | Apache-2.0 |
| name | windagszip |
| description | This skill should be used when a SKILL.md file needs compression, deduplication, or token reduction. It provides an embedding-based compression pipeline that detects and removes redundant chunks within SKILL.md files using local embeddings (all-MiniLM-L6-v2). Two-pass approach: (1) free intra-skill deduplication via cosine similarity clustering, (2) optional LLM-judged graded eval to detect pretraining overlap. Typical result: 25-46% token reduction with zero quality loss. This skill is not intended for editing skill content, creating new skills, routing optimization, or cross-skill deduplication.
|
| category | Agent & Orchestration |
| tags | ["windags","packaging","distribution","compression","deployment"] |
| allowed-tools | Read,Write,Edit,Bash(python:*),Bash(pip:*),Glob,Grep |
| user-invocable | true |
| pairs-with | [{"skill":"skill-creator","reason":"Compress skills after creation to reduce context window cost"},{"skill":"skill-architect","reason":"Analyze skill structure to inform compression targets"},{"skill":"next-move","reason":"Include compression as a step in skill development workflows"}] |
/windagszip — Skill Compression via Embeddings
Analyze SKILL.md files for redundancy and produce compressed variants that preserve behavioral quality while cutting token count.
Two types of redundancy exist in skills:
- Intra-skill duplication — chunk A says the same thing as chunk B within the same skill. Detected by embedding cosine similarity. Cost: zero.
- Pretraining overlap — chunk teaches what Claude already knows from training data. Detected by LLM-judged quality eval. Cost: ~$0.011/test case.
Always run embeddings first (free), then graded eval on survivors (targeted).
When to Activate
- Compressing a SKILL.md to reduce context window consumption
- Analyzing redundancy patterns in one or many skills
- Generating ablation variants for quality testing
- Identifying which chunks carry unique signal vs. duplicate other chunks
- Pre-filtering before expensive graded eval
Compression Pipeline
flowchart LR
A[Chunk<br/>12 types] --> B[Embed<br/>384-dim]
B --> C[Similarity<br/>Matrix]
C --> D[Cluster<br/>BFS components]
D --> E[Variants<br/>per-cluster + max]
E --> F{Graded Eval?}
F -->|Free pass| G[Ship compressed]
F -->|Quality check| H[LLM Judge<br/>sonnet + haiku]
H --> G
Step 1: Analyze Redundancy
All scripts live in tools/skill-compression/ relative to the WinDAGs repo root.
python tools/skill-compression/embed_ablate.py <skill-name>
Output shows redundancy clusters — groups of chunks saying the same thing:
Cluster 1 (avg sim: 0.847, redundant tokens: 2,127)
KEEP [reference ] 1821tk Full CSS layering reference...
CUT [code_block ] 312tk .aurora-container { position: absol...
CUT [code_block ] 287tk .atmosphere-layer { position: absol...
KEEP = canonical version (most complete). CUT = duplicates the canonical.
Step 2: Generate Compressed Variants
python tools/skill-compression/embed_ablate.py <skill-name> --generate
Produces per-cluster variants (remove one cluster's redundancy) and a max-compression variant (remove all redundancy). Output in ablations/<skill-name>/.
Step 3: Validate Quality (Optional)
If a test suite exists for the skill:
python tools/skill-compression/eval_judge.py <skill-name> --
python tools/skill-compression/eval_judge.py <skill-name> --top-n 5
python tools/skill-compression/eval_judge.py <skill-name> --all
python tools/skill-compression/eval_judge.py <skill-name> --analyze