skill-compact
A skill's frontmatter description loads into every session. Its body loads only when invoked. skill-compact attacks the always-on cost first, then the body, and refuses any change that drops an activation trigger.
Commands
analyze- token report: always-on description cost, over-budget skills, reclaimable tokensbody <skill> [--apply]- lossless body minify (strip HTML comments, collapse blank lines, trailing whitespace)check <skill> --desc "..."- dry-run: does a proposed description keep every trigger keyword and fit the budgetset-desc <skill> --desc "..." [--force]- validate then apply a new description (backup written)
Fidelity guarantee
check/set-desc extract trigger tokens from the original description (quoted
phrases, slash-commands, kebab and CamelCase identifiers, acronyms) and reject a
rewrite that drops any of them. The model proposes shorter prose; the tool
guarantees no trigger is lost. Every apply writes a timestamped .orig backup.
Workflow
python3 scripts/analyze.py --top 20 # find the worst offenders
python3 scripts/compact.py check <skill> --desc "<shorter>" # prove it is safe
python3 scripts/compact.py set-desc <skill> --desc "<shorter>" # apply
python3 scripts/compact.py body <skill> --apply # minify body