book-to-skill

book-to-skill is a skill for Claude Code, Codex from apple-ouyang/book-to-skill. It costs 51 tokens per session (1,684 once invoked), scanned A, original, MIT.

A method for turning a book into an executable Skill for Claude Code, so an AI coding assistant can apply the book’s frameworks, methods, and examples. It also explains when to split a large book across multiple agents.

In plain words
What is it for?
Use it to estimate whether a book fits in one agent’s context, divide longer books into sections, and create structured skills from the book’s main ideas.
Why use it?
It provides a repeatable way to extract useful guidance from a book instead of leaving the material as information that the coding assistant cannot directly follow.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it to estimate whether a book fits in one agent’s context, divide longer books into sections, and create structured skills from the book’s main ideas.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/apple-ouyang/book-to-skill/book-to-skill
Install

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.

Any agent
npx skills add apple-ouyang/book-to-skill --skill book-to-skill
Clone the repo
git clone --depth 1 https://github.com/apple-ouyang/book-to-skill

Made for: Claude Code, Codex.

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 book-to-skill

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/apple-ouyang/book-to-skill/book-to-skill"><img src="https://agentmods.dev/badge/skills/apple-ouyang/book-to-skill/book-to-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,684 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.
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.00051 $0.01684
Opus 5 $0.00026 $0.00842
Sonnet 5 $0.00010 $0.00337
Haiku 4.5 $0.00005 $0.00168

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

Security

Grade A, and why

book-to-skill 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 12d 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.

skills/book-to-skill/SKILL.md · 176 lines

How it starts

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

拆书:从书籍到可执行 Skill

任务目标

把一本书中的核心框架、操作方法和真实案例,拆解成结构化的 Claude Code Skill,让 AI Agent 能在用户需要时自动调用书中的智慧。

前置依赖

  • PDF Skill:用于读取 PDF 格式书籍(npx @anthropic-ai/claude-code-skills install pdf
  • Swarm Skill:用于多 Agent 并行处理不同章节(当书籍超出单 Agent 上下文窗口时必须使用)

第一步:评估书籍规模,决定单 Agent 还是多 Agent

这是最关键的一步。 在开始拆书之前,必须先估算书籍内容是否能装进单个 Agent 的上下文窗口。

上下文窗口容量(按 100k token 估算)

语言 100k token ≈ 扣除格式开销后
英文 ~75,000 单词 / ~270 页 ~200 页
中文 ~50,000-65,000 字 / ~110 页 ~80 页

注:上下文窗口不只装书的内容,还要装 Skill 指令、Agent 提示词、输出缓冲等。所以实际可用于书籍内容的空间约为窗口的 70-80%。

操作:估算 PDF 页数

# 用 PDF Skill 读取页数
# 或者直接问用户:这本书大概多少页?

决策树

书籍页数?
├── 英文 ≤ 200 页 / 中文 ≤ 80 页
│   → 单 Agent 模式(直接读取全书,一个 Agent 完成所有提取)
│
├── 英文 200-500 页 / 中文 80-200 页
│   → Swarm 模式:2-3 个 Agent,每个负责一部分章节
│
└── 英文 > 500 页 / 中文 > 200 页
    → Swarm 模式:4-6 个 Agent,按主题/部分拆分

Agent 数量计算公式

所需 Agent 数 = ceil(书籍页数 / 单 Agent 可处理页数)

单 Agent 可处理页数:
- 英文:~200 页
- 中文:~80 页

示例:《行为设计学》中文版约 250 页 → ceil(250 / 80) = 4 个 Agent,实际拆成了 4 个 Skill(making-decisions + 3 个子 Skill),每个 Agent 负责 2-3 章。


第二步:通读目录,识别框架骨架

读取书籍目录和前言(这一步不需要读全书,单 Agent 即可),回答:

  1. 这本书解决什么核心问题?
  2. 作者提出的主框架是什么?(如 WRAP、OODA、第一性原理)
  3. 框架有几个核心步骤/模块?
  4. 每个步骤对应哪些章节?

输出:框架骨架表

| 框架步骤 | 对应章节 | 预计拆成的 Skill | 分配给 Agent |
|---------|---------|----------------|-------------|
| 步骤 1  | 第 1-3 章 | skill-name-1  | Agent 1     |
| 步骤 2  | 第 4-6 章 | skill-name-2  | Agent 2     |

第三步:确定 Skill 结构

根据框架复杂度决定:

  • 单 Skill:框架简单,3-5 个步骤,一个 SKILL.md 搞定
  • 主 Skill + 子 Skill:框架复杂,每个步骤本身就是一套方法论
    • 主 Skill 负责路由(判断用户场景 → 调度子 Skill)
    • 子 Skill 负责具体操作

判断标准:如果一个步骤的操作说明超过 100 行,就应该拆成独立子 Skill。


第四步:逐章提取

单 Agent 模式

直接读取全书 PDF,按章节顺序提取。

Swarm 多 Agent 模式

/swarm 启动团队,按第二步的分配表分配章节。

Agent 提示词模板

角色:章节提取员
职责:阅读第 X-Y 章(PDF 第 M-N 页),按以下格式提取内容

提取内容:
1. 核心概念(一句话总结)
2. 操作步骤(具体可执行,不是"思考一下",而是"问自己:___")
3. 案例(格式:人物/组织 → 情境 → 做法 → 结果 → 启示)
4. 警惕信号(什么情况下应该触发这个方法)
5. 注意事项(边界情况、常见误用)

输出要求:Markdown 格式,每章一个二级标题
完成标准:每章至少 2 个案例,操作步骤必须具体到 Agent 可以直接执行
文件范围:只读取 PDF 第 M-N 页,不要读其他部分

Read the full file on GitHub · 176 lines

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. 12d ago First seen · 176 lines · 51 tokens per session scan A a8f086ea969c

Subscribe to this mod's changes

book-to-skill is a skill published in the GitHub repository apple-ouyang/book-to-skill (132 stars, last pushed 6mo ago), licensed MIT. It adds 51 tokens to every session and 1,684 once invoked, about $0.0003 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

hr-onboarding

A new-hire onboarding plan as a single page — first week schedule, buddy + manager intro, learning track, equipment checklist, and "you're set when…" outcomes. Use when the brief mentions "onboarding", "new hire", "first week plan", or "入职".

nexu-io/open-design · 62 tokens

book-mirror

Take any book (EPUB/PDF), produce a personalized chapter-by-chapter analysis. Each chapter is preserved in detail (The Chapter) and mirrored back to the reader's actual life (The Mirror) using brain context. The mirror observes and resonates — a friend pointing out parallels, NOT a consultant rearranging the reader's…

garrytan/gbrain · 138 tokens

miniapp

Build a tiny interactive HTML playground only when someone asks to see, play with, or step through a mechanism.

yc-software/qm · 25 tokens

eli5

Explain research, papers, or technical ideas in plain English with minimal jargon, concrete analogies, and clear takeaways. Use when the user says "ELI5 this", asks for a simple explanation of a paper or research result, wants jargon removed, or asks what something technically dense actually means.

companion-inc/feynman · 63 tokens

deck-course-module

A course or workshop slide template with persistent learning goals, teaching pages, multiple-choice self-tests, and a wrap-up.

nexu-io/html-anything · 25 tokens

master-yinguang

A reference-based assistant for questions about Yinguang and Pure Land Buddhism, a Buddhist tradition focused on faith, ethical living, and practice connected with rebirth in the Pure Land. It can answer in Yinguang’s historical teaching style.

xr843/Master-skill · 274 tokens