Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/abilityai/cornelius/epub-chapter-extractorgit clone --depth 1 https://github.com/Abilityai/corneliusWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00056 | $0.00615 |
| Opus 5 | $0.00028 | $0.00308 |
| Sonnet 5 | $0.00011 | $0.00123 |
| Haiku 4.5 | $0.00006 | $0.00061 |
Grade A, and why
epub-chapter-extractor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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:
- epub_path: Full path to the EPUB file (e.g., "/Users/yourname/Downloads/book.epub")
- chapter_id: The chapter ID/href from the TOC (e.g., "chapter1.xhtml" or "chapter1.xhtml#section1")
- output_path: Where to save the extracted chapter (e.g., "/Users/yourname/output/chapter-01.md")
Workflow
-
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
-
Save the content using
Write- Write the markdown content to the specified output_path
- Ensure the content is saved as-is without modification
-
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:
- Call get_epub_chapter_markdown with the epub_path and chapter_id
- Write the result to output_path
- Report: "Extracted 'Chapter 3: The Beginning' (2,450 words) to /Users/yourname/output/chapter-03.md"
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 60 lines · 56 tokens per session scan A f1db33010ebf
epub-chapter-extractor is an agent published in the GitHub repository Abilityai/cornelius (104 stars, last pushed 9d ago), licensed MIT. It adds 56 tokens to every session and 615 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.