epub

epub is a skill for Claude Code, Codex from magnus919/agent-skills. It costs 105 tokens per session (4,282 once invoked), scanned A, original, MIT.

An EPUB ebook toolset for reading, creating, editing, inspecting, and checking EPUB2 and EPUB3 files. EPUB is a standard ebook format whose files are packaged like a ZIP archive.

In plain words
What is it for?
Use it to extract ebook content, create EPUB files, edit their contents, enrich their information, and validate them against the EPUB rules. It does not handle DRM-protected ebooks or Kindle formats such as MOBI and AZW.
Why use it?
It helps work with an ebook's text, metadata, reading order, images, styles, and internal file structure without treating it like an ordinary document.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to extract ebook content, create EPUB files, edit their contents, enrich their information, and validate them against the EPUB rules. It does not handle DRM-protected ebooks or Kindle formats such as MOBI and AZW.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magnus919/agent-skills/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 magnus919/agent-skills --skill epub
Clone the repo
git clone --depth 1 https://github.com/magnus919/agent-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin epub/plugin install epub after adding the marketplace above.

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 epub

README.md
[![agentmods](https://agentmods.dev/badge/skills/magnus919/agent-skills/epub/github.svg)](https://agentmods.dev/skills/magnus919/agent-skills/epub)
Your own site
<a href="https://agentmods.dev/skills/magnus919/agent-skills/epub"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/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 epub

Your own site · 80×15
<a href="https://agentmods.dev/skills/magnus919/agent-skills/epub"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/epub.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,282 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00105 $0.04282
Opus 5 $0.00053 $0.02141
Sonnet 5 $0.00021 $0.00856
Haiku 4.5 $0.00011 $0.00428

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

Security

Grade A, and why

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 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/test_epub_skill.sh), 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.

epub/SKILL.md · 382 lines

How it starts

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

EPUB — Ebook Creation, Extraction & Enrichment

Expert-level EPUB handling: read, write, edit, validate, and extract knowledge from EPUB 2 and EPUB 3 files. Ships with five Python CLI scripts and five detailed references covering the entire EPUB domain.

When not to use

  • Non-EPUB documents — Word, PDF, plain markdown, or web-page conversion tasks do not match any script here; route them to a document-handling skill instead of forcing an EPUB tool onto a non-EPUB file.
  • DRM-locked ebooks — these scripts read and write standard OCF/EPUB containers; they do not remove or bypass digital rights management.
  • Mobi/AZW/Kindle-native formats — use a dedicated converter first; this skill neither reads nor writes Amazon-proprietary containers.

EPUB Format Essentials

An EPUB file is a ZIP archive (Open Container Format, OCF) with a specific internal layout. The W3C EPUB 3.3 standard uses a "three planes" model:

Plane Contains Key Rule
Manifest All resources (XHTML, images, CSS, fonts) Every file must be listed in OPF <manifest>
Spine Linear reading order Only XHTML/SVG by default; other types need fallbacks
Content Resources embedded within documents Core media types guaranteed; foreign types need fallbacks

The package document (content.opf) holds metadata (Dublin Core), manifest (every resource), and spine (reading order). EPUB3 uses an XHTML nav document for navigation; EPUB2 uses .ncx XML. Both can coexist for compatibility.

Critical rules: mimetype must be the first ZIP entry, stored uncompressed. All content documents must be well-formed XML (XHTML, not HTML5). The manifest must list every file used in rendering. Read references/epub-format-internals.md for the full structure reference.

Decision Table — Which Script to Use

Task Script Notes
See structure, metadata, manifest, spine, TOC epub-info JSON output, --summary for compact
Extract clean reading-order text epub-text Per-chapter or single file
Create minimal valid EPUB from scratch epub-scaffold No dependencies needed
Extract facts, quotes, definitions, arguments epub-extract-knowledge Heuristic or LLM mode (env var auto-detect)
Validate against EPUB spec epub-validate EPUBCheck or Python fallback
Edit EPUB (metadata, chapters, spine, CSS) epub-edit v2 flagship — 8 subcommands, non-intrusive
Extract images epub-images List or extract to directory
Batch process multiple EPUBs epub-batch Wrap existing scripts across globs
Convert EPUB2 → EPUB3 epub-convert Add NAV, update NS, keep NCX
Diagnose & repair structural issues epub-repair Auto-fix common validation failures

Read the full file on GitHub · 382 lines

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. 7d ago Changed · +2 lines · +16 tokens per session cc5bb93f16e0
  2. 11d ago First seen · 380 lines · 89 tokens per session scan A f6e4a2d4c378

Subscribe to this mod's changes

epub is a skill published in the GitHub repository magnus919/agent-skills (76 stars, last pushed today), licensed MIT. It adds 105 tokens to every session and 4,282 once invoked, about $0.0005 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.