Skip to content
Agentmart
Submit a tool

epub-chapter-extractor

Extract all chapters from an EPUB file into separate markdown files.

Skill by Abilityai

IndexedApache-2.0
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/abilityai-epub-chapter-extractor

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

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.

Use cases: documents

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/epub-chapter-extractor

What's inside

Skill name
epub-chapter-extractor
Description
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.
License
Apache-2.0
Metadata
version: 1.1.1
Instructions
69 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Instructions call the network

Agent Skills spec issues

  • body: contains an absolute path from the author's machine

Files (2)

  • SKILL.md
  • extract_chapters.py

SKILL.md (first lines)

# EPUB Chapter Extractor

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

## Requirements

- Python 3.8+
- `uv` package manager (recommended) OR pip

## Instructions

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

**Using uv (recommended):**
```bash
uv run --with ebooklib --with beautifulsoup4 --with html2text --with lxml python "$(dirname "${0}")/extract_chapters.py" "/path/to/book.epub" [output_dir]
```

**Using pip (alternative):**
```bash
pip install ebooklib beautifulsoup4 html2text lxml
python "$(dirname "${0}")/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/me/Books/mybook.epub"

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

Output files will be at `/Users/me/Books/mybook/`:
- `01_introduction.md`
- `02_chapter_one.md`
- etc.

After extraction, open the output folder:

```bash
open /Users/me/Books/mybook
```

## Output Format

Each chapter file contains:

```markdown
# Chapter Title

[Chapter content in markdown format]
```

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

## Error Handling

| Error | Cause | Solution |
|-------|-------|----------|
| `uv not found` | uv package manager not installed | Run: `curl -LsSf https://astral.sh/uv/install.sh \| sh` |
| `EPUB has no chapters` | EPUB lacks proper table of contents | Script requires TOC entries; manually check EPUB structure |
| `File not found` | Invalid EPUB path | Verify file exists and path is correct |
| `Permission denied` | Can't write to output directory | Check write permissions on output folder |
| `Invalid EPUB format` | Corrupted or non-standard EPUB | Try a different EPUB reader to validate the file |
| `Module not found` | Dependencies not installed | Ensure ebooklib, beautifulsoup4, html2text, lxml are installed |

From Abilityai/trinity-skills, Apache-2.0.

More from Abilityai/trinity-skills

Signals

Stars
0
Forks
1
Open issues
1
Last commit (this folder)
Oct 10, 2026 (18 days ago)
Last release
Oct 21, 2026 (6 days ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
1.1.1
License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Abilityai

Cite this page

epub-chapter-extractor skill. Agent Mart. https://agentmart.dev/skills/abilityai-epub-chapter-extractor (last updated 2026-10-24)