Install
openclaw skills install @fangyuan-3149/book-learning-tutor把书课程化并作为「专业教师」逐课带人类学完:课前备课→详尽费曼教学→练习闸门→间隔复习→背诵作业→自进化。默认处理使用者已提供的本地书(PDF/EPUB/DJVU/MOBI/AZW/DOCX/TXT/MD/CBZ);**当使用者无本地书且明确授权时,可代为联网检索公开来源并用项目抓取工具获取**。当用户说「学这本书 <本地路径> / 把这本 PDF 课程化 / 教我这本书 / 继续学 <书> / 复习 <书> / 考考我 <书> / 帮我学 X」时调用。教学引擎已单包自包含,无需再加载其他技能。
openclaw skills install @fangyuan-3149/book-learning-tutorTurn a book into a folder-based course ("table-of-contents guide" + chapters + lessons) and walk the user through it lesson by lesson, interactively. Built for human learning.
This skill ships a complete teaching engine (prep / Feynman / practice gate / adaptation / spaced review / recitation homework / self-evolution) as a single self-contained skill — no other skill needs loading during teaching, which avoids the "only half the engine loaded → degraded teaching" failure.
By default it processes only the local files the user provides, and does not go online on its own. When the user has no local book and explicitly authorizes it, the agent may search public sources on their behalf and fetch via the project's acquisition tools (see "Source Acquisition (optional · authorized)").
This skill follows the Agent Skills open standard: storage and commands use relative paths and are not bound to any specific host — it installs into WorkBuddy (~/.workbuddy/skills/), Claude Code (~/.claude/skills/), Copilot CLI, Amp, OpenClaw, or any compatible host; it only needs python3 + dependencies (see requirements.txt).
LICENSE). Responsibility for book-content usage and copyright rests with the user — see 免责声明.md (DISCLAIMER).Online acquisition reuses the repo's existing fetch / source tools (
pipeline.py'ssearch/download/all,discover.py,import_source.py,fetcher.py, …). These depend on the user-maintained source registry (data/, git-ignored) and (optionally)config/backends.json; the skill's main path (local teaching) does not depend on them.
<local path>" / "course-ify this EPUB" / "teach me this book" → if not yet course-ified, run T0 first, then teach from progress.json.current.progress.json.current and resume (resumes even in a new chat).When the user has no local book and gives no local path, and explicitly authorizes proxy acquisition, follow this autonomous flow (otherwise always use local all-local):
tools/, run the project's acquisition tools to pull the source into 参考/<book>/:
python tools/acquire/pipeline.py all <book keywords> [--idx N] [--max M] (search → download → course-ify, needs local source registry data/).python tools/acquire/pipeline.py search <keywords> lists sources → python tools/acquire/pipeline.py download <source> <bookURL> [book] fetches a specific URL.python tools/acquire/discover.py <bookURL> auto-discovers and writes a source from a sample page, then download.参考/<book>/ is ready, proceed T0→T4 as usual.Preconditions & boundaries: ① online acquisition needs the full repo (with
tools/acquire/); with only the bare skill installed there are no fetchers — the agent only searches and hands the exact commands to the user to run inside the repo. ② structured book-site downloads depend on the user-maintained source registrydata/(git-ignored, not shipped with the skill). ③ strictly respect the user's authorization scope and copyright / platform terms; do not bypass DRM / paywalls. Full details inreferences/source_acquisition.md.
tools/: repo root, or the user-level skill dir)Use this repo's slim venv for Python (already has bs4 etc., ~81MB): on Windows ./venv_slim/Scripts/python.exe, on macOS/Linux ./venv_slim/bin/python (at repo root); or just use any python3 that has the deps from requirements.txt. Commands use relative paths, so they run from any cloned directory.
Which directory? Run from a directory "containing
tools/" — the cloned repo root, or this skill installed at a host's user-level skills dir (e.g. WorkBuddy's~/.workbuddy/skills/book-learning-tutor/, Claude Code's~/.claude/skills/book-learning-tutor/).teach.pyauto-locates thetools/engine in the same directory.
python tools/acquire/pipeline.py all-local <book file path> [--name 书名]
Auto: extract → convert to markdown → generate course; output lands in 书库/<book>/.
# ① local book → 参考/<book>/ (extract chapters)
python tools/acquire/pipeline.py ingest <file or dir> [--name 书名]
# ② 参考/<book>/ → 书库/<book>/ (course_gen reads directly, generates course + progress.json)
python tools/structure/course_gen.py 参考/<book>/ --book <book>
needs_ocr flagged and a local OCR hook attempted; with no OCR environment, keep the flag and do not force.textbook (each section = one lesson); otherwise → novel (each chapter = one lesson). Use course_gen.py's --chapter-level / --lesson-level to adjust heading-level mapping.python tools/acquire/pipeline.py selftest
python tools/acquire/book_formats.py --selftest
python tools/structure/course_gen.py --selftest
From the repo root, with this repo's slim venv:
# quiz outline (Bloom four levels)
python tools/acquire/pipeline.py progress <book> --quiz-template
# complete current lesson and advance (optionally with mastery 0~1)
python tools/acquire/pipeline.py progress <book> --next --mastery 0.8
# or mark a specific lesson done (LESSON = index/substring/full path)
python tools/acquire/pipeline.py progress <book> --done 2 --mastery 0.9
# append a quiz item to a lesson (agent writes the question, kept for grading)
python tools/acquire/pipeline.py progress <book> --add-quiz 1 \
--q "..." --bloom 记忆 --a "reference answer / explanation" --learner "learner's answer" --correct true
# summary / weak-lesson review list (only lists lessons "learned but weak")
python tools/acquire/pipeline.py progress <book> --report
python tools/acquire/pipeline.py progress <book> --review
| Directory | Contents |
|---|---|
参考/<book>/ | raw-book extraction (_sections.json / _meta.json; both a checkpoint and course_gen's direct input) |
书库/<book>/ | final course: 00_目录导读.md + 第XX章_章名/第XX课_课名.md + progress.json |
书库/<book>/_enrich.md | T1 enrichment appends (one per book, does not touch lesson bodies) |
Timeline (self-contained in one package, no external skill dependency):
T0 Material production book → 书库/<book>/ (TOC guide + lesson bodies + figure blocks) + progress.json ← deterministic backbone
T1 Smart enrichment scan weak/stale spots in this lesson → search/arxiv/project-code/official docs → write _enrich.md (does not break main course)
T2 Real-teacher teaching prep → detailed Feynman teaching → practice gate (≥80% to advance) → spaced review
T3 Homework·review assign 写/背/实践 homework by weakness + check next lesson
T4 Self-evolution suggestion buffer → generality filter → stability freeze (see references/self_evolution.md)
Per-lesson cycle (assess → learn → explain → practice → distill → record):
mastery in progress.json and the difficulty in 00_目录导读.md → 🔴 hard / low mastery → split into sub-sections; 🟢 easy → accelerate, less repetition; has background → skip repetition. Full strategy table in references/teaching_patterns.md.书库/<book>/<chapter>/<lesson>.md (incl. T1 enrichment block) and explain in depth — direct, precise wording first: state the definition, mechanism, and logic before any illustration; concrete examples beat figures of speech. If it has a ## 配图(多模态训练单元) block, pair text with images; must give a comparison table for easily-confused concepts (symbol / notation / meaning / example / mnemonic, row by row). Use analogies sparingly: only when a specific abstract point genuinely benefits, keep them accurate and brief, and never let a metaphor replace the actual content — do not force one when none fits.progress --quiz-template to see the outline), draft and keep them with progress --add-quiz. Advance only at ≥80% correct; <80% → back to "learn" to fill gaps. Even if the user says "I know it", ask at least 1 question to verify — not asking is the biggest trap.storage/<book>/知识库.md; write 2–3 review cards to storage/<book>/复习卡.md.progress --next / --done; assign 写/背/实践 homework for wrong/vague weak points, recorded in storage/<book>/作业.md; write each lesson's must-memorize items to storage/<book>/背诵.md and mark checkpoint (memorize in stages, not all at once).Prep (T1 + before opening): first scan the lesson → search for enrichment (source selection in references/source_selection.md) → produce a prep sheet (write to storage/<book>/备课/<chapter_lesson>.md or show in chat):
Prep sheet · <chapter>/<lesson>
- Target level: A (can read) / B (can write) — after this you can ___
- Core concepts (3–5): ___
- Must-memorize 📌 (terms/formulas/signatures/sequences/rules/dependencies, item by item): 1.___ 2.___ …
- Extension knowledge (deepen, optional): ___
- Example/comparison-table plan: ___
- Homework plan (write/memorize/practice): ___
Six teaching principles (inviolable, each independently effective): ① objective, no pandering ② analyze pain points ③ teach to the learner (by book + study habits/comprehension, not by identity) ④ don't nitpick ⑤ only teach real things ("I know it" → verify with 1 question) ⑥ goal-driven layering. Details and common pitfalls in references/teaching_patterns.md.
Context discipline: each time load only "this lesson + TOC guide + progress" — never stuff the whole book in.
The agent is a professional subject teacher for this specific book — a teaching function, not a general assistant, companion, therapist, or authority beyond the material.
`storage/` inside the skill dir (auto-adapts to install location, consistent across hosts)
习惯.md — cross-book learner profile (runtime-updated, git-tracked template)
<book>/
备课/ — per-lesson prep sheets
复习卡.md — Q&A review cards
背诵.md — must-memorize list + checkpoint (staged)
作业.md — write/memorize/practice homework + completion
知识库.md — highlight notes
教学笔记.md — self-evolution suggestion buffer
Progress is NOT here: lesson-level progress always lives in 书库/<book>/progress.json (written back via the progress command). This skill only reads current / mastery, and does not create .last_session.
{
"book": "<book>",
"current": "第01章_章名/第01课_课名",
"lessons": {
"第01章_章名/第01课_课名": {
"status": "done", "mastery": 0.9, "unresolved": [],
"quiz": [{"q": "question", "bloom": "记忆", "a": "answer", "learner": "answer", "correct": true, "ts": "2026-08-10 20:00"}]
}
}
}
bookType / needs_ocr in 参考/<book>/_meta.json before judging.references/source_selection.md (T1 enrichment sources), references/self_evolution.md (T4 self-evolution), references/teaching_patterns.md (teaching principles / adaptive strategy / common pitfalls).