From ai-tools
Work with EPUB files - extract, update, and manage metadata, download and embed covers, update series info. Use when handling EPUB ebook libraries or metadata.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-tools:ebookThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Library paths are loaded from the `.env` file in the workspace root.
Library paths are loaded from the .env file in the workspace root.
EBOOK_LIBRARY_PATH=/path/to/ebook/library
You can configure multiple library paths as needed. The default structure follows Calibre conventions:
$EBOOK_LIBRARY_PATH/Author Name/Book Title (ID)/book.epub
scripts/scripts/README.mdkavita skill| Script | Purpose |
|---|---|
extract_metadata.py | Extract metadata from EPUBs to JSON |
update_metadata.py | Update Dublin Core metadata (title, author, publisher) |
update_series_metadata.py | Add Calibre-compatible series info |
embed_cover.py | Embed cover images into EPUBs |
download_cover.py | Download covers from OpenLibrary/Google Books (supports multiple ISBNs) |
check_metadata.py | Find EPUBs with missing metadata |
Extract metadata from all EPUB files in a directory recursively and save to JSON.
Analyze extracted metadata to find EPUBs missing title, author, or other key fields.
fetch-ebook-metadata from Calibre: https://manual.calibre-ebook.com/generated/en/fetch-ebook-metadata.htmlModify EPUB metadata (title, author, publisher) by editing the OPF file within the EPUB.
Add Calibre-compatible series metadata (calibre:series and calibre:series_index).
title, creator, publisher, date, language, identifier (ISBN)subject (genres/tags), description, rights, contributorEPUB files are ZIP archives containing:
mimetype - Must be first file, uncompressedMETA-INF/container.xml - Points to OPF filecontent.opf - Package document with metadataOEBPS/ - Content directory with XHTML, CSS, imagesfrom skills.ebook.scripts.extract_metadata import extract_epub_metadata, scan_epub_files
from pathlib import Path
metadata = extract_epub_metadata(Path("book.epub"))
all_metadata = scan_epub_files(Path(os.environ["EBOOK_LIBRARY_PATH"]))
from skills.ebook.scripts.update_metadata import update_epub_metadata
update_epub_metadata("book.epub", {
'creator': ['Author 1', 'Author 2'],
'publisher': 'Publisher Name'
})
from skills.ebook.scripts.download_cover import download_cover_multi_isbn
from skills.ebook.scripts.embed_cover import embed_cover_image
isbns = ['9780545060394', '0545060397']
source = download_cover_multi_isbn(isbns, 'temp/cover.jpg')
if source:
embed_cover_image('book.epub', 'temp/cover.jpg')
from skills.ebook.scripts.update_series_metadata import update_epub_series
update_epub_series('book.epub', 'Series Name', 1)
embed_cover_image() with remove_existing_covers=True.update_epub_series() to add Calibre series metadata.uv as the Python package manager.$WORKSPACE_PATH/temp/..backup extension.npx claudepluginhub hevangel/media-agent-skills --plugin ai-toolsCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.