Install
openclaw skills install @jiaxinmmhh/book-to-skill【知识技能化】把技术书/PDF/白皮书/设计规范/运营手册蒸馏成可导入的 AI 技能(知识包)——不是 RAG 检索原文,而是把书里方法论内化为决策规则、模板、心智模型,让 AI 边干活边套用专业方法。适合:把《Clean Code》变代码审查 Skill、把品牌规范变审图 Skill、把投资问答录变投研 Skill。当用户说"把这本书变成 skill""把 PDF 转成技能""知识即服务"时使用。
openclaw skills install @jiaxinmmhh/book-to-skillTurn a technical book (or any structured document) into an importable Skill: a distilled, procedural knowledge pack an agent loads on demand so it applies the book's methods while working — not merely retrieves its text.
pdfplumber for Step 1 (PDF parsing): pip install pdfplumber. Step 2–4 (distilling + assembling) need no extra deps.metadata.json reports scanned_pages, OCR the PDF first — image-only files have no extractable text.description. That portability is the product.Parse the PDF into a navigable structure:
python scripts/extract.py --pdf "<path-to.pdf>" --out "<output-dir>" --name "<skill-slug>"
This produces in <output-dir>:
structure.md — table of contents (section #, title, page range, size)sections/sec_NNN.md — per-chapter raw extracted textmetadata.json — page count, font stats, likely_scanned flagIf metadata.json shows "likely_scanned": true, STOP and tell the user to OCR the PDF first (image-only file → no extractable text).
Read structure.md, then load the relevant sections/*.md and rewrite each into procedural knowledge following references/distill-guide.md:
<skill-slug>/
├── SKILL.md # name + description (trigger text) + how to apply the book
└── references/
└── <book>.md # distilled, sectioned knowledge (the curated pack)
SKILL.md description must list concrete triggers ("when implementing X from …").SKILL.md lean (<5k words); put detail in references/.scripts/search_knowledge.py pointing at references/.references/<book>.md covers the high-value sections from structure.md.python scripts/search_knowledge.py --base references --query "topic" --top 5references/ by part; keep it one level deep from SKILL.md.