A book-formatting skill that turns a messy manuscript into a clean, KDP-ready Word document — built for numbered law/principle-style books but adaptable to any repeating book structure, numbered or not.
- Detects and fixes merged sections, duplicate/missing numbering, combined words, and inconsistent formatting
- Builds a hyperlinked table of contents from body text automatically
- Outputs standard KDP trim size (6x9), correct margins, and consistent styling throughout
- Works on numbered books (Law 1, Law 2...) and non-numbered chapter/section books alike
Read SKILL.md first — it walks through the full workflow. reference/formatting_library.py has the tested, reusable code. reference/known_bugs.md documents every real formatting bug this skill was built to catch, with root cause and fix for each.
Works with any LLM that can read files and run Python (python-docx required).