multi-format-book-extractor

multi-format-book-extractor is a skill for Claude Code from Abilityai/cornelius. It costs 75 tokens per session (1,185 once invoked), scanned B, original, MIT.

A book-chapter extractor for PDF, MOBI, and AZW3 files that creates separate numbered Markdown files. Markdown is plain text with simple formatting; scanned PDFs can be read with Gemini-based optical character recognition, which converts page images into text.

In plain words
What is it for?
Use it to extract chapters from non-EPUB ebooks, process text-based PDFs, or convert scanned PDFs into searchable Markdown chapters.
Why use it?
It saves you from splitting books into chapters by hand and handles PDFs that contain only page images. MOBI and AZW3 files require Calibre, an ebook-conversion program.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Good fit Use it to extract chapters from non-EPUB ebooks, process text-based PDFs, or convert scanned PDFs into searchable Markdown chapters.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abilityai/cornelius/multi-format-book-extractor
Install

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.

Any agent
npx skills add Abilityai/cornelius --skill multi-format-book-extractor
Clone the repo
git clone --depth 1 https://github.com/Abilityai/cornelius

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for multi-format-book-extractor

README.md
[![agentmods](https://agentmods.dev/badge/skills/abilityai/cornelius/multi-format-book-extractor/github.svg)](https://agentmods.dev/skills/abilityai/cornelius/multi-format-book-extractor)
Your own site
<a href="https://agentmods.dev/skills/abilityai/cornelius/multi-format-book-extractor"><img src="https://agentmods.dev/badge/skills/abilityai/cornelius/multi-format-book-extractor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for multi-format-book-extractor

Your own site · 80×15
<a href="https://agentmods.dev/skills/abilityai/cornelius/multi-format-book-extractor"><img src="https://agentmods.dev/badge/skills/abilityai/cornelius/multi-format-book-extractor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,185 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 68
    uvx/uv tool run commands without ==version create a rug-pull risk.
    Fix: Pin the version: uvx package-name==1.2.3
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00075 $0.01185
Opus 5.5 $0.00030 $0.00474
Sonnet 5.5 $0.00015 $0.00237
Haiku 4.5 $0.00007 $0.00119

Measured 5d ago against content hash 21db3325f4fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

multi-format-book-extractor scanned grade B with 1 finding 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 5d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (extract_book.py, ocr_pdf.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Trinity server (Debian): `sudo apt-get install -y calibre` - installed by `.trinity/setup.sh`
.claude/skills/multi-format-book-extractor/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Multi-Format Book Extractor

Extract chapters from PDF, MOBI, and AZW3 files into individual numbered markdown files. Mirrors the epub-chapter-extractor pattern for non-EPUB formats.

Dependencies

  • PDF: pymupdf — auto-installed via --with pymupdf
  • Scanned PDF OCR fallback: requests (--with requests) + a Gemini key in $GEMINI_API_KEY / $GOOGLE_API_KEY (read from cornelius/.env if unset)
  • MOBI / AZW3: calibre's ebook-convert must be on the machine
    • Trinity server (Debian): sudo apt-get install -y calibre - installed by .trinity/setup.sh
    • Mac: brew install --cask calibre
  • uv: on the Trinity server it is ~/.local/bin/uv (symlinked to /usr/local/bin/uv), installed by .trinity/setup.sh

Every command below starts by resolving these two paths, so the same lines work on the server and on the user's Mac (run from the agent root - scripts are called by path, never cd into the skill folder, so relative book paths keep resolving):

UV="$(command -v uv || echo "$HOME/.local/bin/uv")"
SKILL="$(git rev-parse --show-toplevel)/.claude/skills/multi-format-book-extractor"

Single Book

"$UV" run --with pymupdf --with requests python "$SKILL/extract_book.py" "/path/to/book.pdf" [output_dir]

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

Scanned / Image-Only PDFs (auto-OCR)

Some PDFs are pure page scans with no text layer — pymupdf extracts nothing and would silently write empty files. extract_book.py now samples the text layer first (_has_text_layer) and, when a PDF looks image-only, automatically routes it to Gemini 2.5 Flash OCR (ocr_pdf.py).

  • Renders each page to PNG (~180 DPI), batches pages per API call, transcribes verbatim to Markdown (preserves verse line breaks, Sanskrit/Tibetan diacritics, footnotes), and writes NN_pages-S-E.md chunk files.
  • Resumable: re-running skips chunk files already written (≥200 chars), so an interrupted long book picks up where it left off.
  • Cost is ~$0.002/page on Flash (a 300-page book ≈ $0.60).

Read the full file on GitHub · 101 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 5d ago Changed · +6 lines scan A → B 21db3325f4fb
  2. 1mo ago Changed 9fcf1a5a117a
  3. 3mo ago First seen · 95 lines · 75 tokens per session scan A 0bfbe65c3115

Subscribe to this mod's changes

multi-format-book-extractor is a skill published in the GitHub repository Abilityai/cornelius (123 stars, last pushed 2d ago), licensed MIT. It adds 75 tokens to every session and 1,185 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

multi-format-book-extractor compared with skills from other repositories

multi-format-book-extractor next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
multi-format-book-extractorAbilityai/corneliusSkill1232d agoMITB75Claude Code
apify-youtube-transcript-scrapersickn33/agentic-awesome-skillsSkill51ktodayMITA48Claude Code
report-to-pdfasgeirtj/system_prompts_leaksSkill74k2d agoCC0-1.0A17Claude Code, Codex
skill-doc-deliverynyldn/claude-octopusSkill4.5ktodayMITA29Claude Code
pdf-extract-create-workflowHKUDS/OpenSpaceSkill8.1k18d agoMITA22Claude Code, Codex
document-direct-pythonHKUDS/OpenSpaceSkill8.1k18d agoMITA20Claude Code, Codex
pdf-verification-cliHKUDS/OpenSpaceSkill8.1k18d agoMITA19Claude Code, Codex