# Extract EPUB Chapters to Markdown

Large EPUB files are difficult to review, quote, or reorganize as a single document. This skill splits an EPUB into numbered markdown chapter files for easier editing and analysis.

## Install

```bash
npx skillstore add abilityai/epub-chapter-extractor
```

## Metadata

- - Slug: abilityai-epub-chapter-extractor
- - Version: 1.0.0
- - Author: Abilityai
- - GitHub username: Abilityai
- - License: MIT
- - Repository: https://github.com/Abilityai/cornelius/tree/main/.claude/skills/epub-chapter-extractor
- - Ref: main
- - Supported tools: Claude, Codex, Claude Code
- - Risk level: medium
- - Risk factors: filesystem, external\_commands
- - Quality score: 50
- - Quality tier: warning
- - Public page: https://skillstore.pages.dev/skills/abilityai-epub-chapter-extractor
- - Manifest: https://skillstore.pages.dev/api/skills/abilityai-epub-chapter-extractor/manifest

## Capabilities

- Reads an EPUB file with ebooklib.
- Uses the EPUB table of contents to identify chapters.
- Converts chapter HTML into markdown text.
- Writes each chapter to a numbered markdown file.
- Creates a default output folder beside the source EPUB.
- Reports extraction progress and failed chapters in the terminal.

## Use Cases

- Prepare Manuscript Review Files: Split a book into chapter files for comments, summaries, or editorial review.
- Build Research Notes from Ebooks: Convert chapters into markdown files that can be searched, annotated, and linked in a notes system.
- Create Publishing Workflow Inputs: Extract clean chapter text before restructuring content for documentation or publishing tools.

## Prompt Templates

### Extract One EPUB

```
Extract chapters from /path/to/book.epub into separate markdown files.
```

### Choose Output Folder

```
Extract chapters from /path/to/book.epub and save them in /path/to/output-folder.
```

### Review Extraction Results

```
Extract chapters from /path/to/book.epub, then tell me how many chapter files were created and list any failures.
```

### Prepare Markdown for Editing

```
Extract chapters from /path/to/book.epub into /path/to/draft-chapters, then inspect the output filenames for ordering problems.
```

## Limitations

- Requires uv and Python package downloads or cached packages.
- Depends on a usable EPUB table of contents.
- Removes images, scripts, styles, navigation, and embedded media.
- May not preserve complex EPUB layouts or nested section boundaries perfectly.

## Best Practices

- Use a dedicated empty output folder to avoid overwriting existing markdown files.
- Confirm the EPUB path and output directory before running the command.
- Review extracted chapters for formatting issues before using them in production.

## Anti Patterns

- Do not run extraction against files you do not have permission to process.
- Do not choose a broad system folder as the output directory.
- Do not assume images or complex layouts will be preserved.

## Security Audit

- - Safe to publish: true
- - Audited at: 2026-06-28T04:35:13.784\+00:00
- - Summary: Static filesystem findings are true positives because the script creates an output directory and writes markdown files. Static external command findings are expected for this skill because SKILL.md instructs the assistant to run uv and open the output folder. The hidden home directory and weak cryptography alerts are false positives, with no evidence of prompt injection, network access, credential access, or malicious intent.

## Stats

- - Views: 140
- - Downloads: 8
- - Favorites: 0
- - Popularity score: 0
