epub-to-markdown

Convert EPUB HTML chapters into a single Markdown document.

1|1|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/brianlan/improved-ai-agent --skill epub-to-markdown-brianlan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: epub-to-markdown
Source: https://github.com/brianlan/improved-ai-agent/tree/main/skills/epub-to-markdown
Command: npx skills add https://github.com/brianlan/improved-ai-agent --skill epub-to-markdown-brianlan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This tool helps convert content extracted from EPUB files into a single, easy-to-read Markdown document while preserving reading order and formatting.

Core Features & Use Cases

  • Parses OPF to determine reading order
  • Converts HTML to Markdown with headings, lists, emphasis, links, and tables
  • Concatenates chapters with clean separators for a readable book-like document
  • Use case: you have an ebook in EPUB form and want to produce a plain-text Markdown version for quick reading or indexing

Quick Start

Convert an extracted EPUB directory to a markdown file using the included script.

Frequently Asked Questions about epub-to-markdown

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert an EPUB ebook to Markdown?

To convert an EPUB to Markdown, this tool parses the OPF file to determine chapter reading order, converts the HTML content to Markdown formatting, and concatenates everything into a single readable document.

Can I extract text from EPUB files while preserving chapter reading order?

Yes, EPUB text extraction can preserve reading order by parsing the OPF manifest, which defines the correct sequence of HTML chapters to concatenate into a continuous Markdown file.

What's the best way to turn extracted EPUB HTML chapters into a single document?

The best way to merge extracted EPUB HTML chapters is to parse the OPF for reading order, convert each chapter's HTML to Markdown, and concatenate them with clean separators for a book-like document.

Does EPUB to Markdown conversion preserve formatting like lists, tables, and links?

EPUB to Markdown conversion preserves formatting by converting HTML headings, lists, emphasis, links, and tables into their corresponding Markdown syntax during the text extraction process.

Do I need an extracted EPUB directory to use this Markdown conversion?

Yes, you need an extracted EPUB directory containing the OPF file and HTML chapters, because the conversion script parses these specific extracted files to determine reading order and content.

Why does my EPUB to Markdown output have chapters in the wrong order?

Incorrect chapter order during EPUB to Markdown conversion happens when the OPF manifest is not parsed properly; this tool explicitly reads the OPF spine to ensure chapters are concatenated in the correct reading order.