# Epub To Markdown

> A Claude skill from jykim/claude-obsidian-skills.

- **Type:** Skill
- **Install:** `agentstack add skill-jykim-claude-obsidian-skills-epub-to-markdown`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [jykim](https://agentstack.voostack.com/s/jykim)
- **Installs:** 0
- **Category:** [Productivity](https://agentstack.voostack.com/c/productivity)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [jykim](https://github.com/jykim)
- **Source:** https://github.com/jykim/claude-obsidian-skills/tree/main/epub-to-markdown

## Install

```sh
agentstack add skill-jykim-claude-obsidian-skills-epub-to-markdown
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# EPUB to Markdown Skill

Convert EPUB files to well-formatted single markdown files with images extracted.

## Usage

```bash
python3 epub_to_markdown.py "" -o ""
```

## Features

- **Metadata extraction**: title, author, language, publisher, publication date
- **TOC parsing**: Extracts table of contents with hierarchy
- **HTML to Markdown**: Converts chapter HTML using html2text
- **Heading preservation**: Maintains H1-H6 hierarchy
- **Image extraction**: Extracts images to `_files_/` folder with book prefix
- **Single file output**: All chapters in one markdown file

## Output Structure

```
output_dir/
├── book.epub           # Original file
├── book.md             # Extracted markdown
└── _files_/            # Images folder
    ├── BookTitle_cover.jpg
    ├── BookTitle_figure1.png
    └── ...
```

## Image Prefix

Images are extracted with a book prefix derived from the title:
- Title: "Die Empty: Unleash Your Best Work Every Day"
- Prefix: `DieEmptyUnleash` (first 3 words, special chars removed)
- Image: `_files_/DieEmptyUnleash_cover.jpg`

This prevents filename collisions when extracting multiple books to the same folder.

## Output Format

```markdown
---
title: {from metadata}
author: {from metadata}
language: {from metadata}
source_file: original.epub
source_type: epub
extracted: YYYY-MM-DD HH:MM:SS
status: extracted
---

# {Book Title}

## Table of Contents
- Chapter 1
- Chapter 2
...

---

## Chapter 1

{content with  links}

---

## Chapter 2

{content}
```

## Dependencies

```bash
pip install ebooklib beautifulsoup4 html2text
```

Or use requirements.txt:
```bash
pip install -r requirements.txt
```

## Options

| Flag | Description |
|------|-------------|
| `-o`, `--output` | Output markdown file path (default: same as epub with .md) |
| `-q`, `--quiet` | Suppress progress messages |

## Limitations

- **DRM-protected EPUBs**: Cannot be extracted (will fail with error)
- **Complex formatting**: May simplify to plain text
- **Large EPUBs**: May take time for books with many chapters/images

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [jykim](https://github.com/jykim)
- **Source:** [jykim/claude-obsidian-skills](https://github.com/jykim/claude-obsidian-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-jykim-claude-obsidian-skills-epub-to-markdown
- Seller: https://agentstack.voostack.com/s/jykim
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
