← ClaudeAtlas

meta-consolidate-claude-mdlisted

Use when the same guidance is copy-pasted across many CLAUDE.md (or other always-loaded doc) files in a tree and has drifted - a section repeated in 20 repos, a rule stated at three levels, a table that no longer matches the tool it documents. Covers measuring the duplication, verifying each claim against ground truth before keeping it, converging the variants to one correct text, and lifting it to the true common ancestor without leaving a reader meeting the same heading twice.
bitranox/bitranox-skills · ★ 1 · AI & Automation · score 57
Install: claude install-skill bitranox/bitranox-skills
# Consolidating duplicated CLAUDE.md content Copy-pasted guidance does not stay identical. It forks, and each fork ages separately, so the duplication problem becomes a CORRECTNESS problem: some copies now describe a tool that changed, a file that was deleted, a target that never existed. Deduplicating without checking which copy is right just picks one lie and installs it at an ancestor, where it binds every repo below. **The order is: measure, verify, converge, lift.** Skipping straight to the lift is the failure this skill exists to prevent. ## 1. Measure - byte-identical groups and their true common ancestor `scripts/claudemd_variance.py` does this measurement, so it never needs hand-rolling again - two sessions wrote this exact script from scratch before it shipped: ``` uv run scripts/claudemd_variance.py --root ~/src --json ``` It splits every `CLAUDE.md` into `## ` sections, hashes each body (whitespace-normalised, so trivial reflowing does not read as a different variant - the definition is in `--help`), groups the identical ones, and reports each group's common ancestor plus the largest variant's share of the group. For each group of 3+, its common ancestor - not the one you assumed - is where the text belongs; `--lift-threshold` marks which variants clear that bar. Enumeration is a plain filesystem WALK, never the session `grep` or any gitignore-aware tool: `grep` routes to a gitignore-aware backend and silently drops ignored files. Measured on one tree: 73 f