Coding

EPUB Read

Try it

Task-mode-driven EPUB reading and analysis skill with overview, targeted reading, chunked full reading, extraction, complex-content inspection, and batch pro...

What it does

Task-mode-driven EPUB reading and analysis skill with overview, targeted reading, chunked full reading, extraction, complex-content inspection, and batch pro...

The skill document

Provide a strict, auditable EPUB workflow that safely handles long books through explicit task routing instead of loading full-book text by default.

  • The user mentions an .epub file or ebook
  • The user wants a quick structural overview
  • The user wants chapter-specific or chunk-specific reading
  • The user wants full-book sequential reading with chunking
  • The user wants structured extraction
  • The user wants to inspect images, tables, or other complex content
  • The user wants to batch-process multiple EPUB files

STEP 0 - Choose exactly one task mode before doing anything else

ModePurposeUse when
overviewFast structural overviewMetadata, TOC, themes, structure only
targeted_readFocused readingSpecific chapters, chunk ranges, or keyword hits
full_readSequential readingLong-book chunked reading with saved progress
extractStructured extractionKeywords, definitions, quotes, examples, action items, entities, tables, lists
complex_contentComplex-layout inspectionImages, tables, SVG, low-text sections
batchMulti-book planningMultiple EPUB files or folders

Default to overview or targeted_read when the user intent is ambiguous. Never load a long book's full body text by default.

STEP 1 - Parse if needed

  1. Check whether the output directory already exists and contains manifest.json.
  2. If not, run parse_epub.py.
  3. After parsing, report:
    • title
    • author
    • chapter count
    • chunk count if available
    • image count
    • table count
    • output directory

STEP 2 - Build an execution plan

Use task_router.py to decide whether parsing, chunking, or state updates are required:

python3 task_router.py  --mode  [params...]

The plan should tell you:

  • whether parsing is required
  • whether chunking is required
  • which files are recommended to read
  • whether session state must be updated

STEP 3 - Mode-specific behavior

overview

  • Read only metadata, TOC, reading index, and other structural outputs
  • Do not load the whole book body by default
  • Return:
    • title
    • author
    • chapter count
    • TOC structure
    • theme overview
    • suggested next actions

targeted_read

Support:

  • --chapter
  • --chapter-id
  • --chunk-start
  • --chunk-end
  • --keyword

Return:

  • the requested section
  • short context
  • concise summary

full_read

  • Prefer chunk-based reading for long books
  • Support continue, previous, next, and jump flows
  • Always update session_state.json
  • Never pretend progress exists if the session state is missing

extract

Support extracting:

  • keywords
  • definitions
  • quotes
  • examples
  • action_items
  • names
  • locations
  • organizations
  • tables
  • lists

Return a hit list with chapter references and short context.

complex_content

Inspect:

  • images
  • SVG
  • tables
  • image-heavy sections
  • low-text / high-resource sections

Return a structured report. OCR is not required by default.

batch

Support:

  • multiple EPUB file paths
  • directory scanning
  • batch planning
  • batch extraction requests

Return success / failure counts and a concise overview.

STEP 4 - Long-book safety rules

  • Never push the full body of a long book into context at once
  • Prefer chunks/ over chapter markdown for full sequential reading
  • When chunking is required, run chunk_book.py first
  • Use reading_index.json to map chapters to chunk ranges

STEP 5 - State management rules

When running full_read or any progress-sensitive flow:

  1. Read session_state.json first
  2. Update it after every progress-changing action
  3. Respect existing saved progress unless the user explicitly asks to restart

STEP 6 - Output style

Be explicit about:

  • what files were used
  • what mode was selected
  • why a long book was chunked instead of loaded fully
  • what the user can do next

When possible, point the user toward the safest next step:

  • continue reading
  • jump to a chapter
  • inspect a chunk range
  • extract a structure
  • review complex content

Before considering the task complete, check:

  • parsing outputs exist
  • chunk files exist when required
  • reading index and session state are coherent
  • extraction targets match the requested type
  • complex-content reports are generated from real parsed outputs

Related skills

Process EPUB files into structured extraction JSON, guide AI paragraph-aligned translation and summary filling, then assemble bilingual EPUBs with target-lan...

4 installs1 stars

Convert EPUB e-books to PDF using ebooklib + WeasyPrint with proper CJK font support.

1 stars

Use this skill when the user wants to convert ebook or document files between formats with Calibre, including EPUB to PDF, Markdown to EPUB, MOBI to EPUB, AZ...

21 installs

This skill should be used when the user provides an electronic book (PDF, EPUB, TXT, MD) and wants to automatically extract knowledge, analyze structure, and...

3 installs

优化 EPUB 文件的阅读体验:重写 CSS、统一中英文双语段落排版、强制字体(如 LXGW WenKai)、美化代码块与表格、解决阅读器白底白字问题。当用户需要美化/优化 EPUB 排版、修复 EPUB 显示异常、调整 EPUB 字体或颜色时调用。

1 installs

将英文 EPUB 文件逐段翻译为中文(保留原文,译文紧跟其下),自动跳过代码块、保留公式样式、表格采取双表对照。基于 Deepseek 大模型并行翻译。当用户提供 EPUB 并要求翻译/中英对照/汉化时调用。

1 installs