markdown-to-epub-converter

Convert markdown documents into formatted EPUB3 ebook files with automatic table of contents.

Updated Aug 12, 2026
One-click install
npx skills add https://github.com/Barbaros911/As-mine --skill markdown-to-epub-converter-barbaros911
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: markdown-to-epub-converter
Source: https://github.com/Barbaros911/As-mine/tree/main/.claude/skills/markdown-to-epub
Command: npx skills add https://github.com/Barbaros911/As-mine --skill markdown-to-epub-converter-barbaros911

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ebooklib, markdown2, Pygments, and includes scripts (resource) components.

What problem does it solve? Turning markdown notes, articles, or chat summaries into a portable ebook normally requires manual conversion tools and formatting work. This Skill parses markdown structure and produces a valid EPUB3 file readable on Kindle, Apple Books, Google Play Books, and other EPUB readers. ## Core Features & Use Cases - Structured Conversion: Treats H1 headers as chapters and H2-H6 headers as sections, generating an automatic table of contents and EPUB3 navigation. - Rich Formatting Support: Renders bold, italic, links, lists, blockquotes, tables with styled headers, and code blocks with line numbers and Pygments-based syntax highlighting. - Metadata Handling: Extracts title, author, language, and date from YAML frontmatter or the first H1 header. - Use Case: After a long research conversation, ask for a markdown summary and convert it directly into an EPUB you can read offline on your Kindle or tablet. ## Quick Start Convert the attached markdown file 'research-notes.md' into an EPUB ebook titled 'My Research Notes'.

Frequently Asked Questions about markdown-to-epub-converter

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

FAQPage Schema
How do I convert markdown to EPUB in Python?▼

Parse the markdown into chapters and sections, then use ebooklib to build the EPUB structure with metadata, CSS styling, and navigation. This Skill's create_epub_from_markdown function handles the full pipeline from raw markdown text to a written EPUB file.

What markdown elements are supported when converting to EPUB?▼

Headers H1 through H6, bold, italic, links, ordered and unordered lists, blockquotes, horizontal rules, tables, and code blocks are supported. Code blocks get line numbers and Pygments syntax highlighting, and tables receive styled headers with alternating row colors.

Can I read the generated EPUB on a Kindle?▼

Yes, the output is standard EPUB3 with UTF-8 encoding, which works on Kindle apps and devices via email or cloud upload, as well as Apple Books, Google Play Books, and Kobo readers.

How are chapters and table of contents generated from markdown?▼

H1 headers define chapter boundaries and H2-H6 headers become sections within chapters. The table of contents and EPUB3 navigation document are built automatically from this header hierarchy, with anchors generated from header text.

Why is my EPUB table of contents empty?▼

The table of contents is built from H1 headers, so markdown without any H1 headers produces no chapter entries. Add H1 headers to mark chapter divisions and H2 headers for sections within each chapter.

Does the converter support images or cover pages?▼

No, image embedding and cover page generation are listed as planned future enhancements and are not implemented in the current version. The converter handles text-based markdown elements only.