markdown-compact
2
总安装量
2
周安装量
#65598
全站排名
安装命令
npx skills add https://github.com/nkootstra/skills --skill markdown-compact
Agent 安装分布
amp
2
opencode
2
cursor
2
kimi-cli
2
codex
2
github-copilot
2
Skill 文档
Markdown Compactor
Reduce token count while preserving every detail. No information loss â only waste removed.
Output
Infer preference from context (uploaded file â file output; pasted text â inline), or ask.
File output path: /mnt/user-data/outputs/<original-name>.min.md.
After compacting, report:
Original: ~N tokens (~N lines)
Compacted: ~N tokens (~N lines)
Reduction: N%
Estimate tokens as words à 1.3.
Compaction passes (apply in order)
- 1. Collapse redundant sections â merge sections repeating the same point; inline single-item headings into parent; remove preambles restating the title.
- 2. Terse prose â cut throat-clearing (“It is important to note that”, “In order to”, “Make sure to”); replace multi-word phrases (“at this point in time” â “now”, “in the event that” â “if”); prefer active voice; trim list items to minimum words.
- 3. Trim examples â cut examples that merely restate their rule; keep one (most concrete) when multiples illustrate the same point; replace long inline code with a
file:linereference or single representative snippet. - 4. Symbols â only where unambiguous:
â(leads to/then),e.g./i.e.,vs.,w/(bullets only). Never invent domain-specific abbreviations. - 5. Formatting â remove decorative bold/italic (keep for terms, warnings, key concepts); flatten lists >2 levels deep; remove blank lines between tight list items.
Hard rules
- No information loss. Every fact, instruction, and constraint must survive.
- Preserve code blocks exactly. No changes to code, commands, or paths.
- Keep headings unless section is fully absorbed into another.
- Keep YAML frontmatter intact.
- No summarization. Compaction â summarization â shorter, not lossy.