Graphic tutorial: Turn a 400-page technical book into a portable skill, from checking the environment to asking questions in five steps图文教程:把一本 400 页的技术书变成随身技能,从检查环境到开口提问只要五步
Then do it again: load the skill → check extractor and → choose the parsing method to → run a conversion to see what it generates → and really use it in the session. All local processing, your book will not be uploaded.
跟着做一遍:装技能 → 查提取器 → 选对解析方式 → 跑一次转换看它生成什么 → 在会话里真正用起来。全程本地处理,你的书不会上传。

Step 1: Install the skills and confirm that the command is第一步:装技能并确认命令在
Run npx skills add virgiliojr94/book-to-skill in the terminal, it will load the cross-agent skills directory and register the/book-to-skill command.
Do not want to use npx manually: git clone repository to ~/.claude/skills/book-to-skill (Copilot CLI with ~/.copilot/skills/, cross-agent unified directory is ~/.agents/skills/).
After installing and reopening a session, tap/book-to-skill to see if there is a completion prompt - it means that the host has recognized this skill.
在终端跑 npx skills add virgiliojr94/book-to-skill,它会装进跨代理技能目录,并注册 /book-to-skill 命令。
不想用 npx 就手动来:git clone 仓库到 ~/.claude/skills/book-to-skill(Copilot CLI 用 ~/.copilot/skills/,跨代理统一目录是 ~/.agents/skills/)。
装完重开一个会话,敲 /book-to-skill 看有没有补全提示——有就说明宿主已经识别到这个技能。

Step 2: An order to check what is missing in the environment第二步:一条命令查环境缺什么
Go to the skills directory and run python3 scripts/extract.py --check. It lists by format: what PDF is used, what EPUB is used, what DOCX/HTML/RTF is used, what is installed, what is missing, which command should be run.
The most convenient combination: pip3 install pypdf should be a plain text PDF; the technical book should be supplemented with pip3 install docling (the first run will download the model, it is normal to slow down).
EPUB recommends ebooklib + beautifulsoup4 (best quality); you can run without it, you will be returned to the standard library zipfile scheme, which is less effective.
进到技能目录,跑 python3 scripts/extract.py --check。它会按格式列出:PDF 用什么、EPUB 用什么、DOCX/HTML/RTF 用什么,哪些已装、哪些缺、缺的该跑哪条命令。
最省事的组合:pip3 install pypdf 应付纯文字 PDF;技术书再补 pip3 install docling(首次运行会下载模型,慢一点是正常的)。
EPUB 建议装 ebooklib + beautifulsoup4(质量最好);不装也能跑,会退回标准库的 zipfile 方案,效果差一些。

Step 3: Determine which category your book belongs to第三步:判断你的书属于哪一类
The technical book (with code blocks, tables, formulas, architecture diagram notes) docling,→ which can keep tables and code as Markdown, is worth waiting for those 1.5 seconds/page.
Plain text book (prose, management, biography)→ pdftotext, almost instantaneous and of sufficient quality.
Scanned version first to see if there is a text layer: randomly select a piece of text to see if it can be copied, can not be a picture version, first run ocrmypdf input.pdf output.pdf and then convert.
Before the skill starts, I will take the initiative to ask you what kind of book this book belongs to. Just answer the truth and it will cut the tool itself.
技术书(有代码块、表格、公式、架构图注)→ docling,能把表格和代码保留成 Markdown,值得等那 1.5 秒/页。
纯文字书(散文、管理、传记)→ pdftotext,几乎瞬间完成,质量足够。
扫描版先看有没有文字层:随便选中一段文字看能不能复制,不能就是图片版,先跑 ocrmypdf input.pdf output.pdf 再转换。
技能开始前会主动问你这本书属于哪类,照实回答即可,它自己切工具。

Step 4: Run the transition and see what it says第四步:跑转换,看它写出什么
Knock/book-to-skill./yourbook.pdf, or fold a batch of documents into one skill for the entire directory/book-to-skill./docs. Add one more parameter to specify the name:/book-to-skill./book.pdf kubernetes-internals.
Run to ~/.agents/skills/<slug>/to see the directory: SKILL.md, chapters/one file in the next chapter, glossary.md, patterns.md, cheatsheet.md.
Just check the format compliance: python3 tools/validate_skill.py ~/.agents/skills/--lens<slug> claude (host can also change copilot/amp/hermes/opencode).
If you just want to analyze and not generate it first, use the analyze-only mode; the analysis results are satisfactory, and then let it be generated according to the analysis results, saving you a run again.
敲 /book-to-skill ./你的书.pdf,或者给整个目录 /book-to-skill ./docs 把一批文档折成一个技能。想指定名字就再加一个参数:/book-to-skill ./book.pdf kubernetes-internals。
跑完去 ~/.agents/skills/<slug>/ 看目录:SKILL.md、chapters/ 下一章一个文件、glossary.md、patterns.md、cheatsheet.md。
顺手校验一下格式合规:python3 tools/validate_skill.py ~/.agents/skills/<slug> --lens claude(宿主也可换 copilot / amp / hermes / opencode)。
如果只想先分析不生成,用 analyze-only 模式;分析结果满意再让它按分析结果生成,省一次重跑。

Step 5: Ask it in real work第五步:在真实工作里问它
Don't ask “what this book says” - it's an abstract question, blinded by structure. Ask specifically: "In the chapter on replication in/my-book, when the master-slave delay exceeds the threshold, does it recommend degrading the reader first or expanding the reader first?"
The proxy will only load the matching chapter, and the answer has the chapter source; this is why it saves 24-51 times the token than the whole plug context.
New materials to use the update/fold-in mode into the existing skills, do not need to rebuild; remember to clear the copyright content before sharing, only their own collation.
别问「这本书讲了什么」——那是摘要式提问,白瞎了结构。要问具体的:「/my-book 里讲 replication 的那章,主从延迟超过阈值时它建议先降级读还是先扩容?」
代理会只加载匹配的那一章,答案带章节出处;这也是它比整本塞上下文省 24–51 倍 token 的原因。
新材料到了用 update / fold-in 模式折进已有技能,不用重建;对外分享前记得清掉版权内容,只留自己的整理。

Use reminder使用提醒
This article compiles self-public information and accompanies supporting resources; the functions and commands of the involved tools are subject to the official warehouse. Resources are for learning exchange only, please follow source permission.
本文整理自公开资料并附配套资源;涉及工具的功能与命令以官方仓库为准。资源仅供学习交流,请遵循来源许可。
⬇ Download · 点击下载:教程配套:book-to-skill 官方仓库包(1.37MB)
含 SKILL.md、scripts/extract.py 提取器、tools/validate_skill.py 校验工具与 docs 文档,按教程步骤即可使用。
阅读与点赞数据保存在你的浏览器本地,欢迎留下你的想法。
今日正能量学一点,用一点;今天种下的种子,会长成明天的能力。去免费下载专区 →广告
评论 文明发言,让讨论更有价值