book-to-skill: Compressing a technical book into a skill pack, and only reading the correct chapter when asking questions, saves 24-51 times the token than cramming the entire book into the contextbook-to-skill:把一本技术书压成技能包,提问时只读对的那一章,比把整本书塞进上下文省 24–51 倍 token
I bought a good book and read it again. After three months, I even forgot that Chapter 7 existed. It is also not cost-effective for an agent to read a PDF directly - it has to revisit the catalog, turn it over, and process the entire book again every time. The author of this cost project is called "Discovery Circular Tax". book-to-skill (36,000 stars, mit) does this all at once: extract the book or a batch of documents into structured skills - mental models, decision-making rules, anti-patterns, chapter-by-chapter documents, and then you ask what, the agent only loads the relevant chapter, and the answer comes from the original text rather than illusions.
买过的好书,读一遍,三个月后连第七章存在过都忘了。让代理直接读 PDF 也不划算——它每次都要重新翻目录、回翻、把整本书再处理一遍,这套开销项目作者叫「发现循环税」。book-to-skill(3.6 万星,MIT)把这件事一次性做完:把书或一整批文档抽成结构化的技能——心智模型、决策规则、反模式、按章拆分的文件,之后你问什么,代理只加载相关那一章,答案来自原文而不是幻觉。

3 steps to use三步就能用
1. Point to it:/book-to-skill./my-book.pdf -- You can also give a folder, a glob, or a string of files.
II. It distills: Draws out the frame, decision-making rules, and anti-patterns, and writes out a file for each chapter. Note the structure, not the summary - the summary is compressed and the structure is retrievable.
Third, the agent loads on demand: after you knock/my-book replication, it reads the corresponding chapter and answers as it is, without you posting the book again.
一、指给它:/book-to-skill ./my-book.pdf——也可以给一个文件夹、一个 glob、或一串文件。
二、它蒸馏:抽出框架、决策规则、反模式,写出每章一个文件。注意是「结构」,不是「摘要」——摘要是压缩,结构是可检索。
三、代理按需加载:之后你敲 /my-book replication,它去读对应章节,照原文回答,不用你把书再贴一遍。
What exactly does it generate?它到底生成了什么
SKILL.md: Core mental model + chapter index, about 4,000 tokens, which is the resident cost.
chapters/ch01- * .md…: one chapter, one file, about 1,000 tokens each, only loaded when asked, does not account for the skill budget.
glossary.md (glossary of terms, arranged alphabetically and labeled with chapter references), patterns.md (all tricks, algorithms, design patterns), cheatsheet.md (decision tables and cheatsheet rules).
By default, it falls in the cross-agent skills directory ~/.agents/skills<slug>//, Copilot CLI, Amp, Codex, OpenCode, OpenClaw can be found directly; under Claude Code, an additional attempt will be made to create a verified symbolic link to ~/.claude/skills/.
SKILL.md:核心心智模型 + 章节索引,约 4,000 token,这是常驻开销。
chapters/ch01-*.md …:一章一个文件,每个约 1,000 token,问到才加载,不占技能预算。
glossary.md(术语表,按字母排并标章节出处)、patterns.md(所有技巧、算法、设计模式)、cheatsheet.md(决策表与速查规则)。
默认落在跨代理技能目录 ~/.agents/skills/<slug>/,Copilot CLI、Amp、Codex、OpenCode、OpenClaw 都能直接发现;在 Claude Code 下还会额外尝试建一个经验证的符号链接到 ~/.claude/skills/。

What inputs are supported and how to choose an extractor支持哪些输入,以及怎么选提取器
Formats: PDF, EPUB, DOCX, HTML, RTF, MOBI/AZW3 (walk Calibre), TXT/Markdown/reStructuredText/AsciiDoc (built-in, no dependencies).
PDF is divided into two ways: technical books (with code, tables, formulas) use docling, which can retain Markdown tables and code blocks, about 1.5 seconds per page; plain text books use pdftotext, which is almost instantaneous. Before the conversion begins, it will ask you what category the book belongs to, and then automatically select the tool.
The scanned version (full page is an image, no text layer) must first OCR: ocrmypdf input.pdf output.pdf, and then take the results to convert. It detects and stops on the first few pages, and it doesn't give you an empty skill by running through it.
A command checks the environment: python3 scripts/extract.py --check, which lists which tools are installed in each format, what is missing, and which installation command to run.
格式:PDF、EPUB、DOCX、HTML、RTF、MOBI/AZW3(走 Calibre)、TXT/Markdown/reStructuredText/AsciiDoc(内置,无需依赖)。
PDF 分两条路:技术书(有代码、表格、公式)用 docling,能保留 Markdown 表格和代码块,约 1.5 秒/页;纯文字书用 pdftotext,几乎瞬间完成。转换开始前它会先问你书属于哪类,再自动选工具。
扫描版(整页是图片、没有文字层)必须先 OCR:ocrmypdf input.pdf output.pdf,再拿结果去转换。它会在头几页就检测出来并停下,不会白跑一整本给你一个空技能。
一条命令查环境:python3 scripts/extract.py --check,会列出每种格式装了哪个工具、缺什么、该跑哪条安装命令。
Not just books: these should be crafted into skills不只书:这些更该做成技能
Internal documentation: architectural decision records, runbooks, onboarding guides - fold the entire docs/into one skill and ask as you write the code.
Branding and design systems: Tone guides, component principles, turning a 60-page branding manual into a team searchable skill.
Research cluster: a bunch of papers plus their own notes, merged into a skill, new material until it folds in (update/fold-in mode).
Specifications and Standards: RFCs, API Contracts, Compliance Documentation - those that you will revisit but will never remember.
内部文档:架构决策记录、runbook、新人上手指南——把整个 docs/ 折成一个技能,写代码时随手问。
品牌与设计系统:语气指南、组件原则,把 60 页品牌手册变成团队可查询的技能。
研究集群:一堆论文加自己的笔记,合并成一个技能,新材料到了再折进去(update/fold-in 模式)。
规范与标准:RFC、API 契约、合规文档——你会反复查但永远记不住的那些。
Installation & Copyright Boundaries安装与版权边界
One line: npx skills add virgiliojr94/book-to-skill; or manually git clone to the skills directory and register the/book-to-skill command.
The project itself does not contain any book content, it is just a converter; the extraction and analysis are all running on your machine, and the files are not uploaded. The generated skill is "your own reading notes", which is a derivative arrangement, and do not redistribute the copyrighted works of others.
After conversion, you can also publish to GitHub (default private) with one click, and other machines can be installed with npx skills add.
一行装好:npx skills add virgiliojr94/book-to-skill;或手动 git clone 到技能目录,注册 /book-to-skill 命令。
项目本身不含任何书籍内容,只是转换器;提取和分析都在你本机跑,文件不上传。生成的技能是「你自己的读书笔记」,属于衍生整理,不要二次分发他人版权作品。
转换后还能一键发布到 GitHub(默认私有),别的机器用 npx skills add 就能装。
Use reminder使用提醒
Only work with documents that you own or have permission to read; skill suggestions generated by third-party books remain private. This article compiles self-public information and accompanies supporting resources, and the function is subject to the official warehouse.
请只处理你自己拥有或有权阅读的文档;第三方书籍生成的技能建议保持私有。本文整理自公开资料并附配套资源,功能以官方仓库为准。
⬇ Download · 点击下载:book-to-skill 官方仓库包(1.37MB)
取自 GitHub virgiliojr94/book-to-skill 主分支,MIT 许可,含 SKILL.md、Python 提取器、校验与基准工具及全部文档。
阅读与点赞数据保存在你的浏览器本地,欢迎留下你的想法。
今日正能量学一点,用一点;今天种下的种子,会长成明天的能力。去免费下载专区 →广告
评论 文明发言,让讨论更有价值