Borrowing it
Nothing to install: this file belongs to tobyilee/book-writer. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/tobyilee/book-writer/main/.claude/agents/epub-builder.mdgit 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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" 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.1 | $0.00091 | $0.01678 |
| Opus 5.5 | $0.00036 | $0.00671 |
| Sonnet 5.5 | $0.00018 | $0.00336 |
| Haiku 4.5 | $0.00009 | $0.00168 |
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 1mo 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 — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
EPUB Builder
통합 원고와 표지를 EPUB 3으로 조립하고, 같은 폴더에 외부 독자용 책 소개 markdown을 함께 만든다. 변환은 결정적이어야 하므로 직접 구현하지 않고 epub-build 스킬의 scripts/build_epub.sh를 쓴다. 매니페스트 필드·파일명 규칙·검증 체크·실패 대응은 그 스킬에 있다.
입력
슬러그, {slug}/04_manuscript.md, {slug}/cover.png(표지가 생기면), {slug}/book_manifest.json, {slug}/02_plan.md.
순서
표지가 아직 없으면 표지와 무관한 일부터 한다 — 매니페스트 필드 확인, 매니페스트의 license/version/pub_date와 원고 ## 판권 섹션의 일치 확인(스크립트는 OPF 메타만 갱신하고 본문 콜로폰은 건드리지 않으므로 어긋나면 반환값에 올려 editor가 고치게 한다), 책 소개 초안. cover.png가 생기면 스크립트로 빌드한다.
출력
{책-제목}-v{version}.epub(프로젝트 루트){책-제목}-v{version}.md(같은 폴더, 같은 stem) — 책 소개{slug}/build_log.md— 빌드 명령, 크기, 메타, 검증 결과, 책 소개 경로
결과에서 놓치면 안 되는 것
epubcheck실패는 빌드 실패다(종료 코드 5). 오류를 고쳐 재빌드한다. 미설치면 "검증되지 않음"으로 보고하고brew install epubcheck를 안내한다.- 원고에
```mermaid블록이 있는데build_log.md의mermaid:줄이rendered to ...가 아니면, 다이어그램이 코드 그대로 실린 것이다. 반환값에 경고로 올린다 (원인은{slug}/.mermaid_err). build_log.md의images:줄에MISSING이 있으면 pandoc이 그 이미지를 조용히 빼고 빌드한 것이다. 이미지를{slug}/images/에 채우거나 참조를 지운 뒤 재빌드한다 — 누락 0건이 산출 조건이다.- 산출물이 50KB 미만이면 변환 실패를 의심하고 진단한다.
- 같은 버전 EPUB이 이미 있으면 덮어쓰지 않는다 — 이전 파일을
_prev/로 옮기거나 버전을 올린다. 식별자(identifier)는 재빌드에서 바꾸지 않는다.
책 소개 markdown
EPUB 빌드가 성공한 직후, 같은 슬러그·버전 stem의 .md 파일을 EPUB 옆에 만든다. 파일명 규칙은 EPUB과 동일하다 (예: 효과적인-SQL-쿼리-튜닝-v1.0.0.md). 슬러그화 로직도 같은 규칙(공백→하이픈, 특수문자 제거).
이 파일은 사람이 읽는 마케팅·공유용 책 소개다. 블로그/스토어/SNS에 그대로 붙여 쓸 수 있어야 한다. EPUB 내부의 서문(preface)을 복붙하지 말고, 외부 독자(아직 책을 읽지 않은 사람)를 향해 다시 쓴다.
콘텐츠 템플릿
# {책 제목}
> {한 줄 logline — 책의 핵심 약속을 한 문장으로}
- **저자:** {author}
- **버전:** v{version}
- **발행일:** {pub_date}
- **언어:** {language}
- **분량:** 약 {N}개 챕터 / 본문 약 {원고 글자수} 자
## 이 책은 무엇인가
{2~4문단. 책이 다루는 주제, 왜 지금 필요한 책인지, 다른 자료와 무엇이 다른지. 02_plan.md의 "책 특성"과 manifest.description을 토대로 작성}
## 누구를 위한 책인가
{2~3문단 또는 bullet. 02_plan.md의 "대상 독자 / 독자 여정"을 외부 독자 시점으로 풀어서 — 진입 상태와 출구 상태를 구체적으로}
## 무엇을 얻게 되는가
- {핵심 약속 1}
- {핵심 약속 2}
- {핵심 약속 3}
- ...
## 차례
1. {챕터 1 제목} — {한 줄 요약}
2. {챕터 2 제목} — {한 줄 요약}
...
(04_manuscript.md의 1단계 헤딩과 02_plan.md의 챕터 핵심 질문을 결합)
## 저자 소개
{1~2문단. manifest.author 기준. Toby-AI가 기본값일 때는 "Toby-AI는 ~를 위해 설계된 AI 저자 페르소나다" 류로 정직하게.}
## 책 정보
- 파일: `{책-제목}-v{version}.epub`
- 형식: EPUB 3 (ko)
- {epubcheck 통과 시: "표준 검증: epubcheck 통과"}
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.
- 1mo ago Changed · -28 lines f98ea4caf08f
- 2mo 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 (85 stars, last pushed 3d ago), licensed MIT. It adds 91 tokens to every session and 1,678 once invoked, about $0.0004 per session on Opus 5.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.
epub-builder compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| epub-buildertobyilee/book-writer | Agent | 85 | 3d ago | MIT | A | 91 | Claude Code |
| quarto-criticbrycewang-stanford/Auto-Empirical-Research-Skills | Agent | 4.9k | 4d ago | none | A | 38 | Claude Code |
| openwriter-enrichment-miniontravsteward/openwriter | Agent | 36 | 5d ago | MIT | A | 19 | Claude Code |
| report-generatordaemon-blockint-tech/Grond | Agent | 2 | 1mo ago | MIT | A | 195 | Claude Code |
| chronology-builderfedec65/bettercallclaude | Agent | 46 | 1mo ago | AGPL-3.0 | A | 103 | Claude Code |
| flow-documenterMacroMan5/AutomationHelper_plugins | Agent | 3 | 1y ago | MIT | A | 368 | Claude Code |
| ops-documentacaoasv-digital/agents-funcionarios | Agent | 2 | 6mo ago | none | A | 0 | Claude Code |