# Consolidate HTML Chapters with AI

Long documents split across many page files are hard to read and validate. This skill guides Claude, Codex, or Claude Code to merge page HTML into one structured chapter.

## Install

```bash
npx skillstore add abejitsu/ai-chapter-consolidate
```

## Metadata

- Status: approved
- Slug: abejitsu-ai-chapter-consolidate
- Skillstore revision: r1
- Version status: missing
- Tree hash: 5d0ac52aa81e064ebc21d637dedd8228b223c9d0b0d9950fd13acee8c2c44083
- Author: AbeJitsu
- GitHub username: AbeJitsu
- License: MIT
- Repository: https://github.com/AbeJitsu/Game-Settings-Panel/tree/main/.claude/skills/calypso/ai-chapter-consolidate
- Ref: 7db9b9f06e0ab79c575b58bc48c4d8dc9849f424
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, filesystem
- Quality score: 69
- Public page: https://skillstore.pages.dev/skills/abejitsu-ai-chapter-consolidate
- Manifest: https://skillstore.pages.dev/api/skills/abejitsu-ai-chapter-consolidate/manifest

## Capabilities

- Collects page-level HTML files for a chapter and orders them by page number.
- Defines how to extract main page content while removing duplicate continuation headers.
- Prompts AI to merge pages into one continuous HTML5 chapter document.
- Preserves headings, lists, tables, figures, semantic classes, and stylesheet links.
- Specifies output paths for the consolidated chapter and consolidation log.
- Provides quality checks for HTML validity, content completeness, and heading hierarchy.

## Use Cases

- Prepare textbook chapters: Merge scanned or extracted textbook page HTML into one readable chapter for review.
- Normalize multi-page documents: Create consistent headings and semantic structure across page fragments before validation.
- Build chapter artifacts: Generate a chapter HTML file and metadata log for later quality gates.

## Prompt Templates

### Consolidate one chapter

```
Use this skill to merge the page HTML files for chapter 2 into one continuous chapter document.
```

### Check inputs before merging

```
Use this skill to list the required page HTML files for chapter 3 and confirm the expected inputs before consolidation.
```

### Preserve document semantics

```
Use this skill to consolidate chapter 4 and pay special attention to heading hierarchy, tables, figures, and semantic classes.
```

### Run full artifact workflow

```
Use this skill to consolidate chapter 5, save the chapter artifact, produce the consolidation log, and report the quality checks that still need validation.
```

## Limitations

- Requires valid page HTML files from an earlier workflow step.
- Depends on AI judgment for ambiguous heading hierarchy and duplicate content.
- Does not include the Python wrapper implementation in the skill file.
- May expose document content to an AI provider during consolidation.

## Best Practices

- Review source HTML for sensitive content before sending it to an AI provider.
- Run the consolidation from the expected project directory so fixed relative paths resolve correctly.
- Use the quality checklist before moving the chapter to later validation gates.

## Anti Patterns

- Do not use this skill on incomplete page artifacts without recording the missing content.
- Do not assume AI output is final without checking HTML validity and content completeness.
- Do not change headings or wording manually unless the source document requires correction.

## Security Audit

- Audited at: 2026-07-09T01:11:54.057\+00:00
- Summary: Most static findings are false positives caused by Markdown backticks, HTML examples, and fixed relative paths. One real risk remains: the skill instructs local shell execution of a Python wrapper, and it also sends full page HTML content to an external AI service.

## Stats

- Views: 160
- Downloads: 14
- Favorites: 0
- Popularity score: 0
