split-docslisted
Install: claude install-skill sergeyklay/.agents
# Splitting a Large Doc into a Progressive-Disclosure Tree
A reference doc that has grown past a few hundred lines is read whole every time any part of it is relevant, which wastes context and buries the section that matters. The fix is to split it into one file per top-level section under a sibling directory, and replace the original with a curated index that routes a reader to the one section their task touches.
The hard constraint is that this is a *move*, not a *rewrite*. Section prose must survive byte-for-byte; only the index is new writing. Three failure modes recur and all are silent:
1. Dropped or reordered bytes during extraction.
2. Outbound links inside the moved sections that break because the section files now sit one directory deeper than the original.
3. Inbound links from elsewhere in the repo that pointed *into* the doc by section anchor (`thedoc.md#some-heading`), left dangling because that anchor no longer exists in the doc - it moved to a section file.
This skill makes all three verifiable instead of hoped-for. The third is the easiest to miss and the most damaging, because the dangling links sit in *other* files, often ones an agent never reopens during the split.
A frequent variant: the doc travels with a hand-written digest (`*-digest.md`, `*-summary.md`) that has drifted out of date. The digest's job - route a reader to the right part - is exactly what the new index does, so the digest is deleted after the split, not carried forward.
This docume