Ingestion Skill

Convert EPUB books to Markdown and extract atomic notes using Gemini.

3|4|Updated Jul 20, 2026
One-click install
npx skills add https://github.com/xrcodexcode/xr_node --skill ingestion-skill-xrcodexcode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Ingestion Skill
Source: https://github.com/xrcodexcode/xr_node/tree/main/claude/skills/ingestion
Command: npx skills add https://github.com/xrcodexcode/xr_node --skill ingestion-skill-xrcodexcode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually reading books and converting their content into structured, linked knowledge notes is slow and inconsistent. This Skill automates the pipeline from raw EPUB files to atomic, cross-linked notes in a personal knowledge management vault. ## Core Features & Use Cases - EPUB to Markdown Conversion: Extracts book text and writes clean Markdown source files to the vault's raw source directory. - Structured Concept Extraction: Sends chapter chunks to the Gemini API with a strict Pydantic JSON schema to extract concepts, facts, definitions, methods, examples, and quotes. - Atomic Note Generation & Linking: Writes flat atomic notes linked to their source book, relevant Maps of Content, and related notes from the same run, then rebuilds the MOC index. - Use Case: Import a data structures textbook, process chapters 1-3, and receive dozens of tagged atomic notes automatically linked to your study MOC. ## Quick Start Run the ingestion script with your EPUB file path, optional tags, and a chapter range such as 1-3 to generate linked atomic notes in the vault.

Frequently Asked Questions about Ingestion Skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert an EPUB book to Markdown notes?

Run the ingest_book.py script with the --epub argument pointing to your book file. The script extracts the text, writes a Markdown source file, and uses Gemini to generate atomic notes linked to your vault's Maps of Content.

How do I process only specific chapters of an EPUB?

Use the --chapters argument with values like 1-3 for a range, 1,2,5 for specific chapters, 4 for a single chapter, or all for the entire book. The default processes chapters 1 through 3.

What API key do I need for Gemini book ingestion?

You need a Gemini API key stored in a .env file at the vault root as GEMINI_API_KEY. The default model is gemini-2.5-flash, which you can override with the --model argument.

Does EPUB ingestion work without a table of contents?

Yes. If the EPUB has no table of contents, the script falls back to chunking the book every 20 pages. Chapter-based chunking via the TOC is preferred for more logical extraction units.

Why does processing all chapters take a long time?

Each chapter chunk triggers a separate Gemini API call for structured extraction, so processing an entire book results in many requests. Limit the chapter range to reduce API usage and runtime.