convert-pdf-to-epub

convert-pdf-to-epub is a skill for Claude Code from koreyba/Claude-Skill-pdf-to-epub. It costs 83 tokens per session (2,537 once invoked), scanned A, original, MIT.

A tool for converting PDF books into EPUB files, the ebook format used by many phones, tablets, and e-readers. It can analyze the PDF, convert its content, validate the result, and adapt it when needed.

In plain words
What is it for?
Use it to convert books, detect chapters, optimize extracted images, and preserve linked footnotes or endnotes.
Why use it?
PDFs often have a fixed page layout that is awkward to read on small screens, while EPUB text can adapt to the reader's screen.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to convert books, detect chapters, optimize extracted images, and preserve linked footnotes or endnotes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/koreyba/claude-skill-pdf-to-epub/pdf_to_epub
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 koreyba/Claude-Skill-pdf-to-epub --skill pdf_to_epub
Clone the repo
git clone --depth 1 https://github.com/koreyba/Claude-Skill-pdf-to-epub

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 convert-pdf-to-epub

README.md
[![agentmods](https://agentmods.dev/badge/skills/koreyba/claude-skill-pdf-to-epub/pdf_to_epub/github.svg)](https://agentmods.dev/skills/koreyba/claude-skill-pdf-to-epub/pdf_to_epub)
Your own site
<a href="https://agentmods.dev/skills/koreyba/claude-skill-pdf-to-epub/pdf_to_epub"><img src="https://agentmods.dev/badge/skills/koreyba/claude-skill-pdf-to-epub/pdf_to_epub/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 convert-pdf-to-epub

Your own site · 80×15
<a href="https://agentmods.dev/skills/koreyba/claude-skill-pdf-to-epub/pdf_to_epub"><img src="https://agentmods.dev/badge/skills/koreyba/claude-skill-pdf-to-epub/pdf_to_epub.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,537 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00083 $0.02537
Opus 5 $0.00042 $0.01269
Sonnet 5 $0.00017 $0.00507
Haiku 4.5 $0.00008 $0.00254

Measured 12d ago against content hash 5ea7d3c678ce, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

convert-pdf-to-epub 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 12d ago.

The scan reads SKILL.md. This mod also ships 38 executable files (__init__.py, conversion/__init__.py, conversion/converter.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.

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.

pdf_to_epub/SKILL.md · 328 lines

How it starts

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

PDF to EPUB Converter

Convert PDF documents to high-quality EPUB files with automatic chapter detection, image optimization, and footnote hyperlinking.

Quick Start

# Run conversion (from skill directory)
python -m scripts.convert input.pdf output.epub

# Validate result
python -m scripts.validate input.pdf output.epub

Workflow Overview

The conversion follows a 3-phase process with an optional 4th phase for adaptation:

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│  1. ANALYZE     │ ──► │  2. CONVERT     │ ──► │  3. VALIDATE    │
│  - PDF structure│     │  - Apply config │     │  - Check quality│
│  - Generate cfg │     │  - Build EPUB   │     │  - Report issues│
└─────────────────┘     └─────────────────┘     └─────────────────┘
                                                        │
                                                        ▼
                                              ┌─────────────────┐
                                              │  4. ADAPT       │
                                              │  (if needed)    │
                                              │  - Tune config  │
                                              │  - Modify code  │
                                              └─────────────────┘

Phase 1: Analyze

Before converting, analyze the PDF to determine the best configuration:

# Open PDF and examine structure
import fitz  # pymupdf
doc = fitz.open("input.pdf")

# Check for:
# 1. Number of pages
# 2. Presence of images
# 3. Multi-column layout (compare text block x-coordinates)
# 4. Footnotes/endnotes (numbers in margins or at page bottom)
# 5. Font sizes (for heading detection thresholds)

Generate initial config based on analysis:

  • Fiction book: Use default y_sort reading order
  • Academic paper: Enable xy_cut for columns
  • Magazine: Enable image optimization, use xy_cut

Ask user to confirm the proposed configuration before proceeding.

Read the full file on GitHub · 328 lines

Files

What ships with it

48 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. 12d ago First seen · 328 lines · 83 tokens per session scan A 5ea7d3c678ce

Subscribe to this mod's changes

convert-pdf-to-epub is a skill published in the GitHub repository koreyba/Claude-Skill-pdf-to-epub (34 stars, last pushed 7mo ago), licensed MIT. It adds 83 tokens to every session and 2,537 once invoked, about $0.0004 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.

Related

Other skills, from other repositories