Markdown compression

From attilaszasz/sdd-pilot · View interactive version

Markdown compression is an AI agent skill from the GitHub repository attilaszasz/sdd-pilot. Safely compresses narrative Markdown using deterministic compaction plus validator checks. Only for allowlisted and gated artifacts.

How to use this skill

Skill file

Markdown Compression

Use this only for safe narrative Markdown or explicitly gated governance prose. This is not a general rewrite tool.

Safe Targets

Gated Targets

Blocked Targets

Process

  1. Run node scripts/compress-markdown.mjs --check <path> to confirm the path is allowlisted or explicitly gated and validator-safe.
  2. For preview only, run node scripts/compress-markdown.mjs --stdout <path>; gated targets automatically use narrative-only mode.
  3. Review the proposed diff. For a manual narrative-only preview, add --narrative-only.
  4. To write the compressed file, run node scripts/compress-markdown.mjs <path>.
  5. Run node scripts/compress-markdown.mjs --idempotent <path> after writing and in CI.
  6. The script creates <name>.original.md once, then preserves it on later runs.
  7. If validation fails, stop. Do not write partial output.
  8. Symbolic-link paths are blocked; authorization uses the canonical target path.

Validation Guarantees

The validator preserves these elements exactly:

Compression Rules

Fallback

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.