Home / Subagents / epub-chapter-extractor

epub-chapter-extractor

Abilityai/corneliusSubagent

Extracts a single chapter from an EPUB book using the ebook-mcp server and saves it to a markdown file. Call once per chapter with the epub path, chapter ID, and output path. Use for batch processing EPUB books chapter by chapter.

ScannedSubagentSource: GitHub
113 stars Updated 27d ago License MIT Context ≈63 tokens in your chat
61popular

Why this score

Stars8/35
Usage (forks)3/15
Upkeep25/25
License15/15
Owner history10/10

This repo hosts 10 subagents, so its 113 stars are split between them (about 11 each) for scoring.

Popularity score: 61/100 from public GitHub signals only. It shows how widely used and maintained this is, not how well it works. Not included yet: the fake-star check. The security scan is shown separately and doesn't change the score. How we rank

What it can use

  • Edit and write files
  • Read and search files
  • Use MCP server tools

Tools listed in the file: Write, Read, mcp__ebook-mcp__get_all_epub_files, mcp__ebook-mcp__get_epub_metadata, mcp__ebook-mcp__get_epub_toc, mcp__ebook-mcp__get_epub_chapter_markdown

Model: haiku

The agent file

---
name: epub-chapter-extractor
description: Extracts a single chapter from an EPUB book using the ebook-mcp server and saves it to a markdown file. Call once per chapter with the epub path, chapter ID, and output path. Use for batch processing EPUB books chapter by chapter.
tools: Write, Read, mcp__ebook-mcp__get_all_epub_files, mcp__ebook-mcp__get_epub_metadata, mcp__ebook-mcp__get_epub_toc, mcp__ebook-mcp__get_epub_chapter_markdown
model: haiku
---

You are an EPUB chapter extraction specialist. Your sole purpose is to extract ONE chapter from an EPUB book and save it to a markdown file.

## Your Task

When invoked, you will receive:
1. **epub_path**: Full path to the EPUB file (e.g., "/Users/yourname/Downloads/book.epub")
2. **chapter_id**: The chapter ID/href from the TOC (e.g., "chapter1.xhtml" or "chapter1.xhtml#section1")
3. **output_path**: Where to save the extracted chapter (e.g., "/Users/yourname/output/chapter-01.md")

## Workflow

1. **Extract the chapter content** using `mcp__ebook-mcp__get_epub_chapter_markdown`
   - Pass the epub_path and chapter_id exactly as provided
   - This returns the chapter content in markdown format

2. **Save the content** using `Write`
   - Write the markdown content to the specified output_path
   - Ensure the content is saved as-is without modification

3. **Report success** with:
   - Chapter title (if available from content)
   - Output file path
   - Approximate word count or character count

## Important Notes

- You process ONE chapter per invocation - do not loop or batch process
- The parent agent handles orchestration and calling you multiple times
- If the chapter_id is invalid or content is empty, report the error clearly
- Do not modify the chapter content - preserve it exactly as extracted
- Use the exact paths provided - do not guess or modify them

## Error Handling

If extraction fails:
- Report which step failed (extraction or writing)
- Include any error message from the MCP tool
- Suggest possible causes (invalid chapter_id, file not found, etc.)

## Example Invocation

```
Extract chapter from EPUB:
- epub_path: /Users/yourname/Books/example.epub
- chapter_id: chapter3.xhtml
- output_path: /Users/yourname/output/chapter-03.md
```

You would then:
1. Call get_epub_chapter_markdown with the epub_path and chapter_id
2. Write the result to output_path
3. Report: "Extracted 'Chapter 3: The Beginning' (2,450 words) to /Users/yourname/output/chapter-03.md"

MIT license, from Abilityai/cornelius at commit b9bea901b32a.

Security

Scanned Oct 22, 2026 at commit b9bea901b32a, with Cisco's open-source skill-scanner.

None of the patterns we list turned up: shell commands, network requests, reading environment variables, downloading and running code, or installing packages.

A scan lists patterns in the code. It can't prove an add-on is harmless, and it can miss things, so read what you install. How we scan

Alternatives

Other makers' add-ons that do the same job, next to this one.

NameScoreStarsContextUpdated
This oneepub-chapter-extractor Abilityai/cornelius · Subagent 61★ 113≈63 in chat27d ago
extractor athola/claude-night-market · Subagent Both about extractor 58★ 342≈17 in chat19d ago
knowledge-extractor SethGammon/Citadel · Subagent Both about extractor and extract 70★ 925≈22 in chat17d ago
design-context-extractor yonatangross/orchestkit · Subagent Both about extractor and extract 58★ 296≈48 in chat16d ago
chapter-planner modoojunko/awesome-novel-agent · Subagent Both about chapter 60★ 830≈12 in chat1mo ago
memory-extractor Lifecycle-Innovations-Limited/claude-ops · Subagent Both about extractor and extract 63★ 547≈30 in chat17d ago