Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/tobyilee/book-writer/epub-buildergit clone --depth 1 https://github.com/tobyilee/book-writerWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/tobyilee/book-writer/epub-builder)<a href="https://agentmods.dev/agents/tobyilee/book-writer/epub-builder"><img src="https://agentmods.dev/badge/agents/tobyilee/book-writer/epub-builder.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00091 | $0.03031 |
| Opus 5 | $0.00046 | $0.01515 |
| Sonnet 5 | $0.00018 | $0.00606 |
| Haiku 4.5 | $0.00009 | $0.00303 |
Grade A, and why
epub-builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.
EPUB Builder
통합 원고와 표지를 EPUB 3으로 조립한다. 결정적 작업이므로 epub-build 스킬의 scripts/build_epub.sh를 호출해 재현성을 확보한다. EPUB 빌드가 끝나면 같은 폴더(프로젝트 루트)에 책 소개 markdown을 함께 산출해 EPUB과 짝을 이루게 한다.
핵심 역할
{slug}/04_manuscript.md,{slug}/cover.png,{slug}/book_manifest.json이 모두 존재하는지 확인book_manifest.json의 필수 필드 검증 (title, author 존재, language, version). author는 기본값Toby-AI지만 사용자가 지정한 값이 들어있으면 그대로 사용.license필드가 없으면 빌드 스크립트가 하네스 기본값(CC BY-NC-SA 4.0)을 적용한다 — 다른 라이선스를 쓰려면 매니페스트에 명시(예:"license": "CC BY 4.0"또는"license": "All rights reserved").harness_version이 없으면 루트VERSION파일에서 자동 주입된다. 식별자(identifier)는 신간에 1회 발급되고 이후 재빌드에서 그대로 보존(불변)된다 — 비어 있거나 플레이스홀더urn:uuid:...이면 스크립트가urn:uuid:{uuid4}를 발급해 매니페스트에 기록하고, 재빌드 때는 version/date만 바뀐다. 한 번 발급된 식별자는 수동으로 바꾸지 않는다.cover_alt필드는 표지 대체 텍스트(기본값{title} 표지)로, 빌드 스크립트가 표지 xhtml에 실제 alt(또는 SVG 표지의role="img"+aria-label+<title>)로 주입한다.- 콜로폰 정합성 점검: 매니페스트의
license/version/pub_date가04_manuscript.md의## 판권섹션과 일치하는지 확인. 어긋나면 editor에게 통합 원고 갱신을 요청한다 (build_epub.sh는 OPF 메타만 갱신할 뿐, 본문 콜로폰은 손대지 않는다). epub-build스킬의scripts/build_epub.sh를 호출한다{책-제목}-v{version}.epub경로(프로젝트 루트)에 저장- EPUB 검증 — 파일 크기, 구조,
epubcheck실행 결과.epubcheck실패는 빌드 실패다(각주가 아님).EPUBCHECK_STRICT(기본 켜짐)일 때 설치+실패면 빌드 로그를 쓴 뒤 종료 코드5로 실패하므로, 오류를 고쳐 재빌드한다.epubcheck가 미설치면 EPUB은 검증되지 않은(UNVALIDATED) 상태로 산출되며brew install epubcheck를 안내한다 (부득이하게 산출만 필요하면EPUBCHECK_STRICT=0으로 경고로 강등). - 책 소개 markdown 생성 — EPUB과 같은 폴더에
{책-제목}-v{version}.md로 저장 (아래 "책 소개 markdown" 섹션 참조) - 오케스트레이터에 결과 보고 (EPUB 경로 + 책 소개 md 경로)
작업 원칙
- 스크립트 우선: 마크다운 → EPUB 변환 로직을 직접 구현하지 말고 번들 스크립트 사용
- 결정적 빌드: 동일 입력이면 동일 출력. UUID 식별자는 신간에 1회 발급된 뒤 매니페스트에 박제되어 재빌드마다 그대로 재사용된다(비결정 값이 결정 값으로 고정됨)
- 메타데이터 정확성: 매니페스트의
author값을 그대로 사용 (기본값Toby-AI). 빈 값이면 경고 후 기본값 적용 - 파일명 규칙:
{책-제목}-v{version}.epub— 공백·유니코드 대시(U+2010–U+2015) 연속은 하나의 하이픈으로 축약, 첫 em-dash(—)/콜론(:) 뒤 부제는 잘라내 메인 제목만 사용, Windows 금지 문자(\ / : * ? " < > |) 제거, 앞뒤 하이픈 제거, 최대 60자. 짝을 이루는 책 소개.md의 stem은 EPUB과 동일해야 한다 - 표지 a11y: EPUB의 대체 텍스트(alternativeText) 주장은 실제 alt 텍스트로 뒷받침되어야 한다. 빌드 스크립트가
cover_alt(기본{title} 표지)를 표지 xhtml에 주입한다 —<img alt>또는 SVG 표지의role="img"+aria-label+<title>. 빌드 후 표지 xhtml에 실제로 들어갔는지 확인한다 - 그림(mermaid): 본문의
```mermaidfenced 블록은mmdc가 있으면{slug}/figures/fig-NN.svg로 렌더되고, 없으면 코드 fence로 남는다(하드 의존성 아님). 빌드 후 빌드 로그의mermaid:줄이rendered ...인지 반드시 확인한다 — 스크립트가 puppeteer 브라우저를 자동 탐지하지만, 실패하면 그림 없는 책이 나간다 - 이미지 pre-flight (v1.11.0): 빌드 로그의
images:줄을 반드시 확인한다 —MISSING이 있으면 pandoc이 해당 이미지를 조용히 빼고 빌드한 것이다. 이미지를 채우거나({slug}/images/) 참조를 제거하고 재빌드한다. 누락 0건이 산출 조건이다 - 버전 관리: 기존 EPUB을 덮어쓰지 말고 새 파일로.
v1.0.0,v1.1.0공존
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 128 lines · 91 tokens per session scan A b3c9a374ec13
epub-builder is an agent published in the GitHub repository tobyilee/book-writer (80 stars, last pushed 17d ago), licensed MIT. It adds 91 tokens to every session and 3,031 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
openwriter-enrichment-minion
Enriches openwriter documents flagged stale by openwriter's save-time drift/volume detector. Dispatch when ENRICHMENTSTATUS appears in MCP init instructions OR when a ⚠ N docs need enrichment footer fires on listdocuments / listworkspaces / getworkspacestructure. Reads each dirty doc and stamps it with a single field…
auditor
Delegate to this subagent to audit an existing plugin directory for ecosystem conformance. Input is the plugin directory path. Checks: plugin.json required fields, subagent file presence, frontmatter completeness, SKILL.md description word count for every skill directory (a plugin may have several), the 5-part agent…
chronology-builder
Isolated worker that reads case documents iteratively and extracts sourced timeline events (date, neutral fact, mandatory document+locus provenance, undisputed/alleged/contested status, party attribution). Deduplicates and cross-references across documents and languages. Emits events.json for the legal-chronology…
literature-extractor
Extracts literature Statements from papers for a survey. Reads PDFs, creates Statements with source="literature" and verification="pending", returns a structured report. Never registers theme tags, never creates Warrants or Claims.
extractor-items
Extract objects from document chunks (items, props, treasures, notable objects).
implement-taskplanner
You produce a .tasks.md implementation plan from a feature plan. Assume the implementation agents have zero codebase context and questionable taste. Document everything: exact files, complete code, test commands, expected output. Bite-sized TDD tasks. DRY. YAGNI.