markdown-to-epub-converter by smerchek/claude-epub-skill
npx skills add https://github.com/smerchek/claude-epub-skill --skill markdown-to-epub-converter此技能可将 Markdown 文档转换为专业的 EPUB 电子书文件。非常适合将研究文档、博客文章、文章或聊天对话摘要转换为便携、设备无关的电子书格式。
该技能接受多种格式的 Markdown 内容,并生成一个格式正确的 EPUB3 文件,该文件可在所有主流电子书阅读器上使用,包括:
直接在您的消息中提供 Markdown 内容:
Convert this markdown to EPUB:
# My Book Title
## Chapter 1
This is chapter one content...
提供要转换的 Markdown 文件的路径。
#)视为章节边界##)视为章节内的节标题广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
"Convert this markdown blog post to EPUB:
...content..."
"I have research notes in markdown format. Convert them to an EPUB ebook. The content is:
..."
"Summarize our conversation so far as markdown and convert it to an EPUB for reference"
该技能会生成一个可下载的 EPUB 文件,其中包含:
| 元素 | Markdown | 支持情况 | 备注 |
|---|---|---|---|
| 标题 | # H1 到 ###### H6 | 完全支持 | 自动生成目录 |
| 粗体 | **text** 或 __text__ | 完全支持 | |
| 斜体 | *text* 或 _text_ | 完全支持 | |
| 链接 | [text](url) | 完全支持 | 在电子书中可点击 |
| 列表 | - item 或 1. item | 完全支持 | 支持嵌套列表 |
| 代码块 | ````language` | 增强支持 | 语法高亮就绪,等宽字体 |
| 内联代码 | code | 增强支持 | 带样式背景和边框 |
| 表格 | Markdown 表格 | 增强支持 | 带样式的表头,交替行 |
| 块引用 | > quote | 完全支持 | 带左侧边框样式 |
| 水平线 | --- 或 *** | 完全支持 |
代码块经过精美格式化,具有以下特点:
示例:
def fibonacci(n):
if n <= 1:
return n
return fibonacci(n-1) + fibonacci(n-2)
表格以专业样式呈现:
示例:
| 功能 | 状态 | 备注 |
|---|---|---|
| 标题 | ✓ | 完全支持 |
| 代码 | ✓ | 增强样式 |
| 表格 | ✓ | 专业布局 |
您可以指定 EPUB 元数据:
章节自动检测自:
#)作为主要章节分隔符生成的 EPUB 使用干净、可读的默认样式,该样式:
生成后,文件将可供下载。然后您可以:
EPUB 无法打开:确保您的 Markdown 格式正确。检查链接中的括号是否匹配以及语法是否正确。
目录为空:确保您的 Markdown 包含 H1 标题来定义章节。
格式看起来不同:EPUB 阅读器会应用它们自己的字体和样式。这是正常且预期的行为。
epub_generator.py - 核心 EPUB 文件创建和格式化markdown_processor.py - Markdown 解析和结构提取每周安装次数
135
代码仓库
GitHub 星标数
99
首次出现
Jan 22, 2026
安全审计
安装于
opencode129
gemini-cli119
cursor116
codex114
github-copilot109
amp102
This skill transforms markdown documents into professional EPUB ebook files. Perfect for converting research documents, blog posts, articles, or chat conversation summaries into portable, device-agnostic ebook formats.
The skill accepts markdown content in multiple formats and generates a properly formatted EPUB3 file that works across all major ebook readers including:
Provide markdown content directly in your message:
Convert this markdown to EPUB:
# My Book Title
## Chapter 1
This is chapter one content...
Provide a path to a markdown file to be converted.
Markdown Parsing : Analyzes your markdown and automatically:
#) as chapter boundaries##) as section headings within chaptersStructure Generation : Creates proper EPUB structure:
File Creation : Generates a valid EPUB3 file ready for download and use
"Convert this markdown blog post to EPUB:
...content..."
"I have research notes in markdown format. Convert them to an EPUB ebook. The content is:
..."
"Summarize our conversation so far as markdown and convert it to an EPUB for reference"
The skill generates a downloadable EPUB file that includes:
| Element | Markdown | Support | Notes |
|---|---|---|---|
| Headers | # H1 through ###### H6 | Full | Auto TOC generation |
| Bold | **text** or __text__ | Full | |
| Italic | *text* or _text_ | Full |
Code blocks are beautifully formatted with:
Example:
def fibonacci(n):
if n <= 1:
return n
return fibonacci(n-1) + fibonacci(n-2)
Tables are rendered with professional styling:
Example:
| Feature | Status | Notes |
|---|---|---|
| Headers | ✓ | Full support |
| Code | ✓ | Enhanced styling |
| Tables | ✓ | Professional layout |
You can specify EPUB metadata:
Chapters are automatically detected from:
#) as primary chapter breaksThe generated EPUB uses clean, readable default styling that:
After generation, the file will be available for download. You can then:
Use Proper Markdown Structure : The skill works best when markdown follows standard conventions (H1 for titles, H2 for sections)
Clear Chapter Breaks : Use H1 headers to clearly mark chapter divisions
Descriptive Headers : Headers become the table of contents, so make them clear and descriptive
Content Organization : Place content logically between headers
Supported Formatting : Stick to basic markdown formatting for best compatibility across all readers
EPUB doesn't open : Ensure your markdown is properly formatted. Check for matching brackets in links and proper syntax.
Table of contents is empty : Make sure your markdown includes H1 headers to define chapters.
Formatting looks different : EPUB readers apply their own fonts and styling. This is normal and expected behavior.
epub_generator.py - Core EPUB file creation and formattingmarkdown_processor.py - Markdown parsing and structure extractionWeekly Installs
135
Repository
GitHub Stars
99
First Seen
Jan 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode129
gemini-cli119
cursor116
codex114
github-copilot109
amp102
Python PDF处理教程:合并拆分、提取文本表格、创建PDF文件
62,000 周安装
| Links | [text](url) | Full | Clickable in ebooks |
| Lists | - item or 1. item | Full | Nested lists supported |
| Code blocks | ````language` | Enhanced | Syntax highlighting ready, monospace fonts |
| Inline code | code | Enhanced | Styled background, borders |
| Tables | Markdown tables | Enhanced | Styled headers, alternating rows |
| Blockquotes | > quote | Full | Styled with left border |
| Horizontal rule | --- or *** | Full |