book-writer: Skill for Claude Code

.claude/skills/epub-build/SKILL.md

epub-build is a skill for Claude Code from tobyilee/book-writer. It costs 100 tokens per session (3,202 once invoked), scanned A, original, MIT.

A build tool that turns a Markdown manuscript, cover image, and book manifest into a standards-compliant EPUB 3 e-book and a matching book-description file.

In plain words
What is it for?
Use it to create a versioned EPUB from a prepared book folder, apply book metadata such as title, author, language, licence, and rights, and validate the result with epubcheck.
Why use it?
It removes the need to convert and check these files by hand, helping catch missing inputs and invalid EPUB output before delivery.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is tobyilee/book-writer's own configuration. It tells Claude Code how to work on book-writer itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything book-writer configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/tobyilee/book-writer/main/.claude/skills/epub-build/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/tobyilee/book-writer

Made for: Claude Code.

Wrote 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.

agentmods badge for epub-build

README.md
[![agentmods](https://agentmods.dev/badge/skills/tobyilee/book-writer/epub-build/github.svg)](https://agentmods.dev/skills/tobyilee/book-writer/epub-build)
Your own site
<a href="https://agentmods.dev/skills/tobyilee/book-writer/epub-build"><img src="https://agentmods.dev/badge/skills/tobyilee/book-writer/epub-build/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.

agentmods 80×15 button for epub-build

Your own site · 80×15
<a href="https://agentmods.dev/skills/tobyilee/book-writer/epub-build"><img src="https://agentmods.dev/badge/skills/tobyilee/book-writer/epub-build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 100 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,202 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00100 $0.03202
Opus 5 $0.00050 $0.01601
Sonnet 5 $0.00020 $0.00640
Haiku 4.5 $0.00010 $0.00320

Measured 9d ago against content hash 72c9cf9c76d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

epub-build 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 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/build_epub.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/epub-build/SKILL.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

EPUB Build

통합 원고·표지·매니페스트를 입력받아 EPUB 3 파일을 생성하고, 같은 폴더에 책 소개 markdown을 함께 만든다. EPUB 변환은 결정적 빌드를 위해 scripts/build_epub.sh 스크립트에 위임하고, 책 소개 markdown은 epub-builder 에이전트가 매니페스트·계획·통합 원고를 읽어 직접 작성한다.

절차

  1. 입력 검증 — 세 파일이 모두 존재하는지
    • {slug}/04_manuscript.md
    • {slug}/cover.png
    • {slug}/book_manifest.json
  2. 매니페스트 필드 점검
    • title 비어있지 않음
    • author 필드 존재 (기본값 Toby-AI, 사용자 지정 시 매니페스트 값을 그대로 사용)
    • language 존재 (ko)
    • version 존재 (예: 1.0.0)
    • identifier (옵션) — 비어 있거나 플레이스홀더 urn:uuid:...이면 스크립트가 urn:uuid:{uuid4} 한 번 발급 후 매니페스트에 기록한다. 신간에 1회 발급되고 이후 재빌드에서 그대로 보존(불변) — version/date만 바뀐다. _prev에 다른 식별자가 있으면 경고
    • cover_alt (옵션) — 표지 대체 텍스트. 비어 있으면 기본값 {title} 표지. 스크립트가 표지 xhtml에 실제 alt(또는 SVG 표지의 role="img"+aria-label+<title>)로 주입해 a11y 대체 텍스트 주장을 뒷받침한다
    • license (옵션) — 비어 있으면 하네스 기본값 CC BY-NC-SA 4.0 적용. 다른 라이선스를 쓰려면 명시 ("CC BY 4.0", "CC0", "All rights reserved" 등)
    • harness_version (옵션) — 비어 있으면 루트 VERSION 파일에서 자동 주입
    • rights (옵션) — 비어 있으면 © {year} {author} — Licensed under {license}로 자동 생성
  3. 스크립트 실행scripts/build_epub.sh {slug}
  4. 결과 검증
    • 파일 존재, 크기 ≥ 50KB
    • epubcheck 실행 결과 점검 — epubcheck 실패는 빌드 실패다(각주가 아님). EPUBCHECK_STRICT(기본 켜짐 1)일 때 설치+실패면 빌드 로그를 쓴 뒤 종료 코드 5로 실패. epubcheck미설치면 EPUB은 검증되지 않은(UNVALIDATED) 상태로 산출되며 brew install epubcheck 안내를 stderr·빌드 로그에 남긴다 (EPUBCHECK_STRICT=0으로 실패를 경고로 강등 가능)
  5. 책 소개 markdown 생성 — EPUB과 같은 폴더(프로젝트 루트)에 {책-제목}-v{version}.md 작성
    • 파일명 슬러그화 규칙은 EPUB과 동일 (공백→하이픈, 특수문자 제거)
    • 콘텐츠 템플릿·작성 원칙은 epub-builder 에이전트의 "책 소개 markdown" 섹션 참조
    • 소스: book_manifest.json (메타), 02_plan.md (독자·아크), 04_manuscript.md (실제 차례)
    • 같은 버전 파일이 이미 있으면 _prev/로 이동 후 신규 작성
  6. 기록{slug}/build_log.md에 명령, 출력, 크기, 검증 결과, 책 소개 md 경로

스크립트 개요 (scripts/build_epub.sh)

pandoc을 이용해 원고와 메타데이터를 EPUB으로 변환한다. 요점:

pandoc {manuscript} \
  --from markdown \
  --to epub3 \
  --metadata-file={manifest_yaml} \
  --resource-path={slug} \
  --epub-cover-image={cover} \
  --css={styles/epub.css} \
  --toc --toc-depth=2 \
  --output {output_path}

Read the full file on GitHub · 122 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 9d ago First seen · 122 lines · 100 tokens per session scan A 72c9cf9c76d9

Subscribe to this mod's changes

epub-build is a skill published in the GitHub repository tobyilee/book-writer (81 stars, last pushed 23d ago), licensed MIT. It adds 100 tokens to every session and 3,202 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.

Related

Other skills, from other repositories