skill-compress
Skill1 starsChanged 7 months agoMITView on GitHub
Rewrite a verbose SKILL.md or prompt into its lean equivalent without changing behavior. Use when the user asks to compress, shrink, tighten, minify, rewrite-lean, or optimize the token count of a skill or prompt. Preserves triggers, output format, and hard rules. Reports before/after token counts.
In this repository11 other files it gives its agents.
- assumption-surfaceSkill
- description-craftSkill
- goal-criteriaSkill
- karpathy-codingSkill
- lean-responseSkill
- simplicity-auditSkill
- skill-graphSkill
- surgical-diffSkill
- token-auditSkill
- token-budget-checkSkill
- vixero-councilSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
After token-audit when user asks to apply the cuts
- Very specific: line 18
Frontmatter is sacred: Never change name. Only improve description if it fails the description-craft checklist.
- Distinctive: line 19
Strip preamble: Delete "I'll help", "Certainly", "Let me", "Sure", "Of course".
- Distinctive: line 22
Prose → table: when a table saves 30%+ tokens for the same information.
- Very specific: line 24
Collapse examples: Keep one best example per concept.
- Distinctive: line 25
Merge redundant sections: If "Guidelines" and "Rules" say similar things, merge.
- Distinctive: line 26
Code blocks stay: Never compress code. Compression errors in code cost more than tokens saved.
- Distinctive: line 54
Never drop a hard rule. Rewrite it shorter.
- Distinctive: line 55
Never drop a trigger keyword from the description.
- Distinctive: line 56
If cut < 15% after compression, append: "Already lean.
- Very specific: line 57
If user says "more aggressive" after first pass, apply lean-response register as well: drop all softening, fragment sentences are fine.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
skill-compress
Rewrite input at lowest token count that preserves behavior. Do not invent new behavior.
Trigger on
- "compress this skill / prompt"
- "make this leaner / tighter"
- "rewrite for fewer tokens"
- After
token-auditwhen user asks to apply the cuts
Rules, in order
- Frontmatter is sacred. Never change
name. Only improvedescriptionif it fails the description-craft checklist. Keep description 100–250 chars. - Strip preamble. Delete "I'll help", "Certainly", "Let me", "Sure", "Of course".
- Delete ceremony. "Please", "kindly", "feel free", "if you'd like".
- Imperative voice. "Do X" not "You should do X" or "It is recommended that X be done."
- Prose → table when a table saves 30%+ tokens for the same information.
- Lists over paragraphs for enumerations of three or more.
- Collapse examples. Keep one best example per concept. Move extras to an
examples/subfolder referenced by path. - Merge redundant sections. If "Guidelines" and "Rules" say similar things, merge.
- Code blocks stay. Never compress code. Compression errors in code cost more than tokens saved.
- Output format blocks stay verbatim. These are contracts.
Output
Return two sections:
1. Rewritten SKILL.md
Full content, ready to paste.
2. Diff summary
before: {n} tokens
after: {n} tokens
cut: {n} tokens ({pct}%)
preserved:
- trigger keywords
- output format
- hard rules
- behavior
changed:
- {specific change 1}
- {specific change 2}Hard rules
- Never drop a hard rule. Rewrite it shorter.
- Never drop a trigger keyword from the description.
- If cut < 15% after compression, append: "Already lean. Structural rewrite needed for more savings."
- If user says "more aggressive" after first pass, apply
lean-responseregister as well: drop all softening, fragment sentences are fine.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

