Epub chapter extractor

From aiskillstore/marketplace · View interactive version

Epub chapter extractor is an AI agent skill from the GitHub repository aiskillstore/marketplace. Extract all chapters from an EPUB file into separate markdown files. Use when the user wants to split an EPUB into individual chapter files, extract EPUB chapters, or convert an ebook to separate markdown documents.

How to use this skill

Skill file

EPUB Chapter Extractor

Extract each chapter from an EPUB file into its own markdown file.

Instructions

When the user wants to extract chapters from an EPUB, run the extraction script with uv:

cd ~/.claude/skills/epub-chapter-extractor && uv run --with ebooklib --with beautifulsoup4 --with html2text --with lxml python extract_chapters.py "/path/to/book.epub" [output_dir]

If output_dir is omitted, creates a folder named after the EPUB in the same directory.

Example

User: "Extract chapters from /Users/yourname/Books/mybook.epub"

cd ~/.claude/skills/epub-chapter-extractor && uv run --with ebooklib --with beautifulsoup4 --with html2text --with lxml python extract_chapters.py "/Users/yourname/Books/mybook.epub"

Output files will be at /Users/yourname/Books/mybook/:

After extraction, open the output folder:

open /Users/yourname/Books/mybook

Output Format

Each chapter file contains:

# Chapter Title

[Chapter content in markdown format]

Files are numbered for proper sorting: 01_, 02_, etc.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.