Agent Skills
› nodetool-ai/nodetool
› sandbox-epub
sandbox-epub
GitHub提供在沙箱环境中读取 EPUB 电子书元数据、目录及提取章节文本的能力,支持异步操作与自定义分隔符。
Trigger Scenarios
需要解析或提取 EPUB 电子书内容时
获取电子书元数据(如标题、作者)或目录结构时
Install
npx skills add nodetool-ai/nodetool --skill sandbox-epub -g -y
SKILL.md
Frontmatter
{
"name": "sandbox-epub",
"description": "Read an EPUB's metadata, table of contents, and chapters in a Code node or CodeAct action, with epub2 running on the host"
}
EPUB e-books in the sandbox
Specifier: @nodetool-ai/sandbox-epub. Import it at the top of the body.
epub2 reads from a file path, not a buffer, so this pack is a host module: the host stages your bytes in a temp file for the call and removes it afterward. The import resolves to a generated facade over NodeTool's own implementation.
metadata — title, author, language, and the rest
import { metadata } from "@nodetool-ai/sandbox-epub";
const bytes = await workspace.readBytes("book.epub");
const meta = await metadata(bytes); // { title, creator, language, publisher, ... }
tableOfContents — chapter titles in reading order
import { tableOfContents } from "@nodetool-ai/sandbox-epub";
const toc = await tableOfContents(bytes);
// [{ id, title, href, order }, ...]
extractText — every chapter, concatenated
import { extractText } from "@nodetool-ai/sandbox-epub";
const text = await extractText(bytes);
const withCustomBreaks = await extractText(bytes, { chapterSeparator: "\n\n---\n\n" });
chapterSeparator defaults to "\n\n".
extractChapters — each chapter as its own item
import { extractChapters } from "@nodetool-ai/sandbox-epub";
const chapters = await extractChapters(bytes);
// [{ id, title, href, text }, ...]
Get the bytes from workspace.readBytes, or from a fetched body with
await response.bytes().
Gotchas
- Every export is async.
- 10 MB per book. Larger input is refused by name.
- HTML is stripped, not rendered.
extractText/extractChaptersreturn plain text — no headings, links, or images survive the conversion.
Version History
- a6a7e57 Current 2026-08-20 09:52


