markdown-compression
Skill98 starsChanged 24 days agoMITView on GitHub
Safely compresses narrative Markdown using deterministic compaction plus validator checks. Only for allowlisted and gated artifacts.
In this repository73 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- sddp-amendSkill
- sddp-analyzeSkill
- sddp-autopilotSkill
- sddp-checklistSkill
- sddp-clarifySkill
- sddp-devopsSkill
- sddp-devsetupSkill
- sddp-implement-qc-loopSkill
- sddp-implementSkill
- sddp-initSkill
- sddp-planSkill
- sddp-prdSkill
- sddp-projectplanSkill
- sddp-qcSkill
- sddp-regenSkill
- sddp-reverseengineerSkill
- sddp-specifySkill
- sddp-systemdesignSkill
- sddp-tasksSkill
- sddp-amendSkill
- sddp-analyzeSkill
- sddp-autopilotSkill
- sddp-checklistSkill
- sddp-clarifySkill
- sddp-devopsSkill
- sddp-devsetupSkill
- sddp-implement-qc-loopSkill
- sddp-implementSkill
- sddp-initSkill
- sddp-planSkill
- sddp-prdSkill
- sddp-projectplanSkill
- sddp-qcSkill
- sddp-regenSkill
- sddp-reverseengineerSkill
- sddp-specifySkill
- sddp-systemdesignSkill
- sddp-tasksSkill
- adr-authoringSkill
- artifact-conventionsSkill
- clarification-strategiesSkill
- compact-communicationSkill
- evidence-led-authoringSkill
- implementation-standardsSkill
- instructions-managementSkill
- plan-authoringSkill
- quality-assuranceSkill
- sdd-methodologySkill
- sddp-amendSkill
- sddp-analyzeSkill
- sddp-autopilotSkill
- sddp-checklistSkill
- sddp-clarifySkill
- sddp-devopsSkill
- sddp-devsetupSkill
- sddp-implement-qc-loopSkill
- sddp-implementSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this only for safe narrative Markdown or explicitly gated governance prose.
- Distinctive: line 21
all other governance files require a separate manifest entry and dry-run review before compression
- Very specific: line 26
all unlisted workflow, agent, instruction, and wrapper Markdown under .github/, .agents/, .claude/, .windsurf/, .opencode/, .codex/
- Very specific: line 32
Run node scripts/compress-markdown.mjs --check <path> to confirm the path is allowlisted or explicitly gated and validator-safe.
- Very specific: line 36
Run node scripts/compress-markdown.mjs --idempotent <path> after writing and in CI.
- Distinctive: line 38
If validation fails, stop.
- Distinctive: line 56
every line outside gated narrative blocks
- Distinctive: line 63
Keep commands, paths, and structural lines exact.
- Distinctive: line 65
Prefer concise normal prose, not stylized shorthand, for persisted files.
- Distinctive: line 69
If Node is unavailable, do not auto-compress.
- Distinctive: line 70
If the target is blocked, leave it unchanged and tighten the source workflow instructions instead.
≈ “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
Markdown Compression
Use this only for safe narrative Markdown or explicitly gated governance prose. This is not a general rewrite tool.
Safe Targets
README.mddocs/**/*.mdspecs/<feature>/research.mdspecs/<feature>/analysis-report.mdspecs/<feature>/manual-test.md
Gated Targets
.github/sddp/workflows/implement-tasks/WORKFLOW.md- exact manifest entry; compresses only prose inside<rules>and<workflow>blocks- all other governance files require a separate manifest entry and dry-run review before compression
Blocked Targets
project-instructions.md,AGENTS.md,CLAUDE.md- all unlisted workflow, agent, instruction, and wrapper Markdown under
.github/,.agents/,.claude/,.windsurf/,.opencode/,.codex/ specs/prd.md,specs/sad.md,specs/dod.md,specs/project-plan.md,specs/adrs/*.md,specs/plan/*.md- feature-workspace parser-sensitive artifacts:
spec.md,plan.md,tasks.md,qc-report.md,checklists/*.md,autopilot-log.md
Process
- Run
node scripts/compress-markdown.mjs --check <path>to confirm the path is allowlisted or explicitly gated and validator-safe. - For preview only, run
node scripts/compress-markdown.mjs --stdout <path>; gated targets automatically use narrative-only mode. - Review the proposed diff. For a manual narrative-only preview, add
--narrative-only. - To write the compressed file, run
node scripts/compress-markdown.mjs <path>. - Run
node scripts/compress-markdown.mjs --idempotent <path>after writing and in CI. - The script creates
<name>.original.mdonce, then preserves it on later runs. - If validation fails, stop. Do not write partial output.
- Symbolic-link paths are blocked; authorization uses the canonical target path.
Validation Guarantees
The validator preserves these elements exactly:
- frontmatter
- headings
- fenced code blocks
- inline code
- bare URLs and Markdown links
- requirement and task identifiers
- table rows
- checkbox lines
- Markdown list prefixes and indented lines
- HTML comment blocks
<rules>and<workflow>tag lines- every line outside gated narrative blocks
- HTML blocks, tables, nested blockquotes, and ordered-parenthesis lists
- original line endings
Compression Rules
- Normalize redundant whitespace and punctuation spacing only; do not substitute words or phrases.
- Keep commands, paths, and structural lines exact.
- Compress governance prose only inside the explicitly supported narrative blocks.
- Prefer concise normal prose, not stylized shorthand, for persisted files.
Fallback
- If Node is unavailable, do not auto-compress.
- If the target is blocked, leave it unchanged and tighten the source workflow instructions instead.
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.

