Self-compressed prose variant (~975 tokens, ~90% functionality, LLM-estimated). Full reference: ../SKILL.reference.md.
Role: Help users compress verbose skills to reduce context window usage Understands: Skills are verbose for human clarity but costly for context Approach: Identify section types, score importance, remove/shorten low-value sections Boundaries: Preserve functionality, report what was removed, never hide trade-offs Tone: Technical, precise, transparent about trade-offs
Data handling: All analysis uses your agent's configured model. No external APIs.
Activate when the user asks:
FlagDefaultDescription--mode``thresholdthreshold (preserve X%), tokens (fit budget), oneliner--threshold``0.9Functionality preservation target (0.0-1.0)--tokens-Target token count--provider``autoollama, gemini, openai (auto-detects)--verbose``falseShow section-by-section analysis--dry-run``falseAnalyze without outputting
Full options (--model, --debug-stages, --with-ci): see SKILL.reference.md
Threshold = semantic capability, not size ratio. A 0.9 threshold means 90% of agent behavior preserved, not 90% of lines kept. Judge by understanding, not metrics.
Parse into sections: Frontmatter, Headers, Code blocks, Lists, Prose.
TypeImportanceCompressible?TRIGGER1.0NoCORE_INSTRUCTION1.0NoCONSTRAINT0.9PartiallyOUTPUT_FORMAT0.8PartiallyEXAMPLE0.5YesEXPLANATION0.3YesVERBOSE_DETAIL0.2Yes (first)
Protected patterns (boost to 0.85+): YAML name/ description, Task creation, N-count tracking, Checkpoint/state, BEFORE/AFTER markers.
Evaluate by semantic understanding, NOT metrics.
WrongRight"60% line reduction is too aggressive""Can an agent execute this skill?""Token ratio exceeds target""Are triggers and actions preserved?"
LLM scores 0-100 based on semantic capability, not line/token ratios. A 50% size reduction can preserve 95% functionality if removed content was verbose/redundant.
Append to .learnings/skill-distiller/calibration.jsonl with metrics and expected score.
text
Functionality preserved: 90% (uncalibrated - first 5 compressions build baseline)
Tokens: 2000 → 1800 (10% reduction)
Removed: [list], Kept: [list]
[Compressed skill markdown...]
PatternWhyYAML name/ descriptionREQUIRED by specN-count trackingObservation workflowTask creationCompaction resilience
If removed: -10% score penalty, flagged in output.
Parallel/serial decisions, performance hints, caching guidance. No score penalty.
Storage: .learnings/skill-distiller/calibration.jsonl
N-countMeaningN < 5Uncalibrated (LLM-only estimate)N > 10Calibrated (historical CI)
Feedback: /skill-distiller feedback --id=c1 --actual=85 --outcome="worked"
Guardrails:
Why 0.95: Capability loss compounds (0.95 x 0.95 = 0.90 at next level).
ErrorHintNo contentProvide SKILL.md path or pipe via stdinNo frontmatterAdd --- block with name/ descriptionLLM unavailableRun ollama serve or set GEMINI_API_KEY
VariantTokensFunctionalityskill-distiller (main)40090% (formula)compressed (this)97590% (prose)oneliner10070%
Full reference: SKILL.reference.md (~2,500 tokens, ~90%)
Token counts use 4 chars/token heuristic (+/-20%). Functionality scores are LLM-estimated.