← ClaudeAtlas

ai-chapter-consolidatelisted

Use AI to merge individual page HTML files into a unified chapter document. Creates continuous document format for improved reading experience and semantic consistency.
aiskillstore/marketplace · ★ 329 · AI & Automation · score 79
Install: claude install-skill aiskillstore/marketplace
# AI Chapter Consolidate Skill ## Purpose This skill uses AI to **intelligently merge individual page HTML files** into a single, continuous chapter document. Rather than simple concatenation, the AI: - Removes duplicate headers/footers from continuation pages - Ensures consistent heading hierarchy across pages - Maintains semantic structure throughout - Preserves all content without loss or repetition - Creates smooth content flow (no page breaks) The result is a **unified chapter document** in the continuous format (single `page-container`, single `page-content`). ## What to Do 1. **Collect all page HTML files for chapter** - Gather `04_page_XX.html` files for all pages in chapter - Verify all files exist and are valid - Sort by page number (ascending) 2. **Extract content from each page** - Load each HTML file - Extract main content from `<main class="page-content">` - Preserve semantic classes and structure 3. **Prepare consolidation inputs for AI** - Page 1: Full content including chapter header - Pages 2+: Extract content sections, remove chapter header/nav - Preserve all text and structure - Note any special sections (exhibits, tables, etc.) 4. **Invoke AI consolidation** - Send all page contents to Claude - Request merging into single continuous document - Specify structural requirements - Request heading hierarchy normalization 5. **Process AI output** - Extract consolidated HTML from response - Verify structu