book-converter
EPUB形式の電子書籍を、pandocとAIを活用して高品質なMarkdown形式に変換し、PDF変換時の不具合修正、段落結合、コードブロック修正、ヘッダー標準化、目次作成などを行い、プロ品質の体裁に整えるSkill。
📜 元の英語説明(参考)
Convert EPUB books to high-quality formatted Markdown using pandoc and AI-assisted formatting. Use when the user provides an EPUB file path and wants to convert it to professionally formatted Markdown, similar to the Clean Code Collection formatting. This skill handles the complete workflow from EPUB extraction through AI-driven content formatting, including fixing PDF conversion artifacts, joining split paragraphs, correcting code blocks, standardizing headers, and creating proper Table of Contents.
🇯🇵 日本人クリエイター向け解説
EPUB形式の電子書籍を、pandocとAIを活用して高品質なMarkdown形式に変換し、PDF変換時の不具合修正、段落結合、コードブロック修正、ヘッダー標準化、目次作成などを行い、プロ品質の体裁に整えるSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o book-converter.zip https://jpskill.com/download/23715.zip && unzip -o book-converter.zip && rm book-converter.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/23715.zip -OutFile "$d\book-converter.zip"; Expand-Archive "$d\book-converter.zip" -DestinationPath $d -Force; ri "$d\book-converter.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
book-converter.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
book-converterフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 10
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Book Converter スキル
EPUB形式の書籍を、AIによる品質改善を加えてプロフェッショナルな形式のMarkdown書籍に変換します。
概要
このスキルは、EPUBファイルを以下の手順で高品質なMarkdownドキュメントに変換します。
- pandocを使用してEPUBから生のMarkdownを抽出します。
- 構造化されたプロジェクトディレクトリを作成します。
- AI駆動の書式設定修正を計画し、実行します。
- 章ごとの書式設定済み出力を生成します。
- 目次付きの結合された書籍ファイルを生成します。
クイックスタート
ユーザーはEPUBファイルのパスを提供します。
/Users/username/Downloads/Book.Name.2024.epub
変換ワークフローを実行します。
python3 scripts/convert_book.py "/path/to/book.epub"
これにより、完全な変換プロセスが開始されます。
ワークフロー
重要: メインコンテキストを汚染しないよう、すべての書式設定作業にはサブエージェントを使用してください。
フェーズ1: セットアップと抽出 (メインエージェント)
変換スクリプトを実行します。
python3 scripts/convert_book.py "/path/to/book.epub"
このスクリプトは以下の処理を行います。
- EPUBファイルが存在することを確認します。
- プロジェクト構造を作成します。
books/book-name/- メインディレクトリbooks/book-name/raw/- Pandoc出力books/book-name/chapters/- 書式設定済み章books/book-name/images/- 抽出された画像
- pandocを実行してMarkdownを抽出します。
- 書式設定標準をプロジェクトディレクトリにコピーします。
出力: books/book-name/raw/book-parsed.md に生のMarkdownが出力されます。
フェーズ2: 分析と計画 (スクリプト + サブエージェント)
ステップ1: 構造分析スクリプトを実行します (メインエージェント)。
python3 books/book-name/analyze_structure.py books/book-name
このスクリプトは以下の処理を行います。
- 行番号付きのすべてのヘッダーを抽出します。
- サンプリングによって書式設定の問題を検出します。
- 章の区切りを提案します。
STRUCTURE_ANALYSIS.mdレポートを作成します (35k行以上ではなく約5-10 KB)。
ステップ2: マッピングファイルを作成するために汎用サブエージェントを起動します。
Task(
subagent_type="general",
description="Create chapter map and formatting plan",
prompt="""Create CHAPTER_MAP.md and FORMATTING_PLAN.md:
1. Read books/book-name/STRUCTURE_ANALYSIS.md (concise report with headers and issues)
2. Read books/book-name/references/chapter-map-template.md for format
3. Read books/book-name/references/formatting-plan-template.md for format
4. Create books/book-name/CHAPTER_MAP.md:
- Use suggested chapter boundaries from analysis
- Verify line ranges make sense
- Create proper slugged filenames
5. Create books/book-name/FORMATTING_PLAN.md:
- Document issues found in analysis
- Add severity and priority
- Note book-specific patterns
6. Update books/book-name/progress.md to mark Phase 2 complete
Return: Summary of chapters found and major issues identified."""
)
出力: CHAPTER_MAP.md、FORMATTING_PLAN.md、および更新された progress.md
フェーズ3: 章の書式設定 (サブエージェントを使用)
各章について、個別の汎用サブエージェントを起動します。
# Example for Chapter 1
Task(
subagent_type="general",
description="Format Chapter 1",
prompt="""Format Chapter 1 following the chapter formatting workflow.
**Critical Instructions:**
1. Read and follow ALL steps in books/book-name/references/chapter-workflow.md
2. Apply formatting rules from books/book-name/references/formatting-standards.md
3. Use books/book-name/CHAPTER_MAP.md to find line ranges for Chapter 1
4. Read books/book-name/FORMATTING_PLAN.md for known issues to watch for
**Workflow Summary (see chapter-workflow.md for complete details):**
Step 1: Read Standards and Chapter Map
- Read references/formatting-standards.md
- Read CHAPTER_MAP.md for your chapter's line ranges
- Read FORMATTING_PLAN.md for known issues
Step 2: Extract Chapter Content
- Extract Chapter 1 from raw/book-parsed.md using line ranges
Step 3: Identify Issues follow the standards
- Headers using bold instead of #
- Shattered code blocks
- Split paragraphs
- Missing code language identifiers
- Emphasis artifacts [word]
- Corrupted footnotes
- Missing image alt text
- Broken links
Step 4: Apply Formatting Fixes
- Follow the three-pass approach in chapter-workflow.md:
* First pass: Structure (headers, code blocks)
* Second pass: Content (paragraphs, emphasis)
* Third pass: Details (footnotes, images, links)
Step 5: Create Output File
- Write to books/book-name/chapters/chapter-01-title.md
- Use structure from chapter-workflow.md
Step 6: Update Progress
- Update books/book-name/progress.md with completion status
- Document fixes applied
**Quality Checklist (from chapter-workflow.md):**
- [ ] All headers use proper # syntax
- [ ] All code blocks have language identifiers
- [ ] No shattered code blocks remain
- [ ] Text flows naturally without mid-sentence breaks
- [ ] All footnotes have [^N] format with definitions
- [ ] Images have descriptive alt text
Return: Confirmation with summary of fixes applied."""
)
重要:
- 効率のために、サブエージェントを並行してバッチ (3-5個ずつ) で起動してください。
- 各サブエージェントは
chapter-workflow.mdとformatting-standards.mdを読み込む必要があります。 - 一貫した品質を確保するために、体系的なワークフローに従ってください。
出力: books/book-name/chapters/ に書式設定済みの章が出力されます。
フェーズ4: 書籍の組み立て (メインエージェント)
merge_book.py スクリプトはすでにプロジェクトディレクトリにコピーされています。単に実行してください。
python3 books/book-name/merge_book.py books/book-name
このスクリプトは以下の処理を行います。
- 章の順序のために
CHAPTER_MAP.mdを読み込みます。 chapters/からすべての書式設定済み章を読み込みます。- 目次用にヘッダーを抽出します。
- 画像パスを修正します (最終的な場所に対する相対パス)。
- すべての章を順番に結合します。
- 包括的な目次を生成します。
books/book-name-book.mdに出力します。
出力: 完全な書式設定済み書籍を含む books/book-name-book.md
注: マージスクリプトは再利用可能です。書籍ごとに作成する必要はありません。
重要: 章の書式設定要件
フェーズ3のすべてのサブエージェントは、以下のことを必ず行ってください。
- まず
chapter-workflow.mdを読み込む - 完全なステップバイステップのプロセスが含まれています。 formatting-standards.mdを読み込む - すべての書式設定ルール (678行) が含まれています。- 以下の手順に従う
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Book Converter Skill
Convert EPUB books into professionally formatted Markdown books with AI-assisted quality improvements.
Overview
This skill converts EPUB files into high-quality Markdown documents by:
- Using pandoc to extract raw Markdown from EPUB
- Creating a structured project directory
- Planning and executing AI-driven formatting fixes
- Producing chapter-by-chapter formatted output
- Generating merged book file with Table of Contents
Quick Start
User provides an EPUB file path:
/Users/username/Downloads/Book.Name.2024.epub
Execute the conversion workflow:
python3 scripts/convert_book.py "/path/to/book.epub"
This initiates the complete conversion process.
Workflow
CRITICAL: Use subagents for all formatting work to avoid polluting main context.
Phase 1: Setup and Extraction (Main Agent)
Run the conversion script:
python3 scripts/convert_book.py "/path/to/book.epub"
This script:
- Verifies EPUB file exists
- Creates project structure:
books/book-name/- Main directorybooks/book-name/raw/- Pandoc outputbooks/book-name/chapters/- Formatted chaptersbooks/book-name/images/- Extracted images
- Runs pandoc to extract Markdown
- Copies formatting standards to project directory
Output: Raw Markdown in books/book-name/raw/book-parsed.md
Phase 2: Analysis and Planning (Script + Subagent)
Step 1: Run the structure analysis script (Main Agent):
python3 books/book-name/analyze_structure.py books/book-name
This script:
- Extracts all headers with line numbers
- Detects formatting issues by sampling
- Suggests chapter boundaries
- Creates
STRUCTURE_ANALYSIS.mdreport (~5-10 KB instead of 35k+ lines)
Step 2: Launch a general subagent to create mapping files:
Task(
subagent_type="general",
description="Create chapter map and formatting plan",
prompt="""Create CHAPTER_MAP.md and FORMATTING_PLAN.md:
1. Read books/book-name/STRUCTURE_ANALYSIS.md (concise report with headers and issues)
2. Read books/book-name/references/chapter-map-template.md for format
3. Read books/book-name/references/formatting-plan-template.md for format
4. Create books/book-name/CHAPTER_MAP.md:
- Use suggested chapter boundaries from analysis
- Verify line ranges make sense
- Create proper slugged filenames
5. Create books/book-name/FORMATTING_PLAN.md:
- Document issues found in analysis
- Add severity and priority
- Note book-specific patterns
6. Update books/book-name/progress.md to mark Phase 2 complete
Return: Summary of chapters found and major issues identified."""
)
Output: CHAPTER_MAP.md, FORMATTING_PLAN.md, and updated progress.md
Phase 3: Chapter Formatting (Use Subagents)
For EACH chapter, launch a separate general subagent:
# Example for Chapter 1
Task(
subagent_type="general",
description="Format Chapter 1",
prompt="""Format Chapter 1 following the chapter formatting workflow.
**Critical Instructions:**
1. Read and follow ALL steps in books/book-name/references/chapter-workflow.md
2. Apply formatting rules from books/book-name/references/formatting-standards.md
3. Use books/book-name/CHAPTER_MAP.md to find line ranges for Chapter 1
4. Read books/book-name/FORMATTING_PLAN.md for known issues to watch for
**Workflow Summary (see chapter-workflow.md for complete details):**
Step 1: Read Standards and Chapter Map
- Read references/formatting-standards.md
- Read CHAPTER_MAP.md for your chapter's line ranges
- Read FORMATTING_PLAN.md for known issues
Step 2: Extract Chapter Content
- Extract Chapter 1 from raw/book-parsed.md using line ranges
Step 3: Identify Issues follow the standards
- Headers using bold instead of #
- Shattered code blocks
- Split paragraphs
- Missing code language identifiers
- Emphasis artifacts [word]
- Corrupted footnotes
- Missing image alt text
- Broken links
Step 4: Apply Formatting Fixes
- Follow the three-pass approach in chapter-workflow.md:
* First pass: Structure (headers, code blocks)
* Second pass: Content (paragraphs, emphasis)
* Third pass: Details (footnotes, images, links)
Step 5: Create Output File
- Write to books/book-name/chapters/chapter-01-title.md
- Use structure from chapter-workflow.md
Step 6: Update Progress
- Update books/book-name/progress.md with completion status
- Document fixes applied
**Quality Checklist (from chapter-workflow.md):**
- [ ] All headers use proper # syntax
- [ ] All code blocks have language identifiers
- [ ] No shattered code blocks remain
- [ ] Text flows naturally without mid-sentence breaks
- [ ] All footnotes have [^N] format with definitions
- [ ] Images have descriptive alt text
Return: Confirmation with summary of fixes applied."""
)
Important:
- Launch subagents in parallel batches (3-5 at a time) for efficiency
- Each subagent must read chapter-workflow.md and formatting-standards.md
- Follow the systematic workflow to ensure consistent quality
Output: Formatted chapters in books/book-name/chapters/
Phase 4: Book Assembly (Main Agent)
The merge_book.py script is already copied to your project directory. Simply run it:
python3 books/book-name/merge_book.py books/book-name
The script will:
- Read
CHAPTER_MAP.mdfor chapter order - Load all formatted chapters from
chapters/ - Extract headers for Table of Contents
- Fix image paths (relative to final location)
- Combine all chapters in order
- Generate comprehensive TOC
- Output to
books/book-name-book.md
Output: books/book-name-book.md with complete formatted book
Note: The merge script is reusable - no need to create it per book!
Critical: Chapter Formatting Requirements
Every subagent in Phase 3 MUST:
- Read chapter-workflow.md first - Contains the complete step-by-step process
- Read formatting-standards.md - Contains all formatting rules (678 lines)
- Follow the workflow systematically - Don't skip steps
- Use the three-pass approach:
- First pass: Fix structure (headers, code blocks)
- Second pass: Fix content (paragraphs, emphasis)
- Third pass: Fix details (footnotes, images, links)
- Complete the quality checklist - Verify all items before finishing
Why this matters:
- Ensures consistent quality across all chapters
- Prevents common mistakes (skipped issues, inconsistent style)
- Proven process from Clean Code Collection (35k+ lines)
- Each chapter is only formatted once - must be thorough
The workflow documents are your complete instructions - trust them!
Subagent Usage Principles
Never process book content in main context. Always use subagents to:
- Keep main context clean: Book content is large and pollutes context
- Enable parallelization: Format multiple chapters simultaneously
- Isolate formatting work: Each chapter gets fresh context
- Avoid token limits: Raw content can exceed context windows
Subagent Selection: Always use subagent_type="general" for all book processing tasks.
Progress Tracking
Create and maintain books/book-name/progress.md:
# Book Name - Conversion Progress
## Phase 1: Setup ✓
- [x] EPUB extracted
- [x] Project structure created
## Phase 2: Planning ✓
- [x] Chapter map created (15 chapters identified)
- [x] Formatting plan documented
## Phase 3: Chapter Formatting (5/15 complete)
- [x] Front Matter
- [x] Chapter 1: Introduction
- [x] Chapter 2: Getting Started
- [x] Chapter 3: Advanced Topics
- [x] Chapter 4: Best Practices
- [ ] Chapter 5: Performance
- [ ] ...
## Phase 4: Assembly
- [ ] Merge script created
- [ ] Final book generated
Update after each subagent completes.
Quality Standards
All formatted output must meet these criteria:
- Headers: Use proper
#syntax, not bold text - Code Blocks: Include language identifiers, merge shattered blocks
- Text Flow: Join split sentences into natural paragraphs
- Emphasis: Use
*italic*and**bold**, not[brackets] - Footnotes: Standard
[^1]format with definitions - Images: Descriptive alt text, not generic filenames
- Links: Clean anchors, no PDF conversion artifacts
Complete standards reference: references/formatting-standards.md
Example Usage
User Request:
"Convert this EPUB to Markdown: /Users/john/Downloads/Effective.Java.3rd.Edition.epub"
Skill Execution:
- Run conversion script to extract content
- Analyze structure and create chapter map
- Format each chapter using AI subagents
- Merge into final book with TOC
- Provide user with
books/effective-java-final.md
Scripts
- convert_book.py: Main conversion script (Phase 1) - Extracts EPUB and sets up project
- analyze_structure.py: Structure analyzer (Phase 2) - Extracts headers and detects issues efficiently
- merge_book.py: Reusable merge script (Phase 4) - Combines all chapters into final book
References
- formatting-standards.md: Complete formatting rules (loaded as needed during formatting)
- chapter-workflow.md: Detailed chapter formatting workflow (loaded as needed)
- progress-template.md: Template for progress tracking file
- chapter-map-template.md: Template for chapter mapping
- formatting-plan-template.md: Template for formatting issue documentation
Notes
- High Quality Focus: Manual AI-driven formatting ensures prose flows naturally
- No Automated Scripts: Formatting requires human-like judgment for line joining
- Preserve Content: Never alter meaning or remove content
- Code Accuracy: Ensure code blocks are syntactically complete
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (10,298 bytes)
- 📎 LICENSE (1,062 bytes)
- 📎 references/chapter-map-template.md (3,696 bytes)
- 📎 references/chapter-workflow.md (7,344 bytes)
- 📎 references/formatting-plan-template.md (7,313 bytes)
- 📎 references/formatting-standards.md (15,354 bytes)
- 📎 references/progress-template.md (2,822 bytes)
- 📎 scripts/analyze_structure.py (12,264 bytes)
- 📎 scripts/convert_book.py (9,429 bytes)
- 📎 scripts/merge_book.py (7,783 bytes)