Skill · Published 2026-08-08

claudemd-optimizer

Download claudemd-optimizer.zip 100% test coverage Ported from claudemd_optimizer

A Claude Skill for a CLAUDE.md that’s grown organically and might have accumulated duplicate instructions or stale references.

What it checks

python3 optimize_claudemd.py CLAUDE.md
python3 optimize_claudemd.py CLAUDE.md --known-ids id1,id2 --diff

Exact-duplicate lines, tokens that look like a rule-id reference but aren’t in the known-ids list you supply, total line count against a configurable threshold, and any heading that reads as workflow-specific (“When …”) — a candidate to move into a skill instead of always-loaded CLAUDE.md. Never writes to disk; --diff shows the proposed change.

Where this came from

Ported from the same module that runs inside PinkyAI’s own engine (claudemd_optimizer), re-implemented independently in dependency-free Python with its own full test suite — currently at 100% statement coverage. The source’s separate “CLAUDE.md compress” companion mode isn’t included, so this download has no dependency on the terseness-compressor skill — pair the two manually if you want both.

Honest scope

Exact-duplicate lines only — no semantic/fuzzy similarity, that needs an embedding model this tool doesn’t carry. You supply the “known-good” rule-id list yourself; this port has no built-in catalog of what’s valid for your project. Token counts are ~4-chars-per-token estimates, not a real tokenizer.

Preview the real source

Read straight out of this skill's own source directory, unedited — the exact bytes that ship inside claudemd-optimizer.zip, not a rewritten excerpt. Switch tabs to read a file before downloading, or use Copy to paste it somewhere else.

Choose a file to preview

← Back to skills