Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Turn a textbook or long-form source into a self-paced learning track: intake the material, build a chapter map, draft a lesson plan, then generate self-contained HTML lecture notes in a style the human specifies (layout, palette, emphasis), each lesson carrying worked examples, exercises, and checkpoint questions. Read this when the human wants to study a book without a teacher, asks for "lecture notes" / "study notes" / "course" / "syllabus" from a textbook or PDF, wants a customized HTML study
.claude/skills/lingtai-ai-textbook-distillation/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-11 | ✗→✓ | ▲ Improved | 171% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 137% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 135% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 140% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 63% | 0% |
You are helping a human teach themselves from a textbook (or a long technical document, lecture transcript, or paper set) without a live instructor. Your job is to distill the source into a structured learning track and ship self-contained HTML lecture notes in the style the human asks for: extract the concepts, structure, and worked logic, then re-explain them in your own words with your own examples. Distillation is never reproduction of the author's text. Read Source limits & safety before you intake anything — those boundaries shape every later step.
The frontmatter description carries the triggers and anti-triggers. Two boundaries deserve restating here: an ask framed as "summarize the whole book so I can skip buying it" or "paste me the chapter" crosses the copyright line — decline it and offer a legitimate distillation instead; and material the human cannot point to a legitimate source for is out of scope entirely. Both are spelled out under "Source limits, copyright & safety" below.
intake → chapter map → lesson plan → (per lesson) HTML lecture notes → review loopWork the phases in order. Do not jump to generating HTML before the human has seen and approved the chapter map and lesson plan — that approval is what keeps the track aligned to their goal, not your guess at it. This is a multi-round, human-in-the-loop flow: talk to the human through the active user-facing channel (mail/email or the relevant chat bridge), not internal scratch/text output, because each phase needs their input.
Goal: know exactly what you are distilling and confirm you are allowed to.
have access to (a PDF in the project, a URL, the human's own notes, a file the human pasted). Record the path or link — you will cite it in every artifact.
access to this material? Which parts do they want covered — whole book, a range of chapters, one topic? Do not proceed on material they cannot point to a legitimate source for.
curiosity, teaching it onward? Their level (beginner / refresher / advanced)? Time budget (one weekend vs. a semester)? These set lesson granularity.
Collect them now so the lesson plan and the HTML are designed for them, not retrofitted.
If you only have a partial source (e.g. a table of contents but not the body), say so explicitly — you will distill structure from the ToC and re-teach concepts from your own knowledge, clearly labeled, rather than inventing the book's specific treatment.
A chapter map is the skeleton: the source's structure plus what each unit is about and what it depends on. It is the contract the human approves before any lesson is written.
For each chapter / major section, capture:
Render the map as a table and send it to the human. Ask: Is this the right scope and ordering? Anything to drop, merge, or go deeper on? Iterate until they approve. The map may reorder or merge the book's units to fit the learning goal — note where you deviate from the book's own order and why.
Turn the approved chapter map into a sequence of lessons. A lesson is one sitting's worth of learning — usually one chapter, or a slice of a dense one.
For each lesson define:
tell the learner whether they can move on.
Send the lesson plan for approval. This is the last gate before you generate HTML, so make sure granularity, ordering, and exercise depth match what the human wanted.
Now produce the deliverable: one self-contained HTML file per lesson (or a single file for a short track), in the human's style.
Standalone-HTML mechanics are owned by the html-report reference — the skeleton, artifact hygiene, the validation checklist, and, critically, MathJax setup, since lecture notes for technical books almost always contain equations. Read ~/.lingtai-tui/utilities/swiss-knife/reference/html-report/SKILL.md (or load swiss-knife and route to html-report) and follow it rather than re-deriving it here.
Start from the bundled template at ~/.lingtai-tui/utilities/textbook-distillation/assets/lesson-template.html, which already wires MathJax, a print stylesheet, collapsible checkpoint answers, callout boxes, CSS variables for theming, and the lesson structure below. Copy it, apply the human's style, fill in the content.
Each lesson must carry, in order:
range), generation timestamp (date -u +%Y-%m-%dT%H:%M:%SZ), and the provenance caveat ("Distilled study notes — re-explained from the source, not a reproduction of it.").
callout boxes, with diagrams / tables / analogies as the style calls for.
<details> element so the learner attempts first.
is the signal to advance.
Run the html-report validation checklist against every file you write. Write them to a project-local path the human can find (e.g. study/<book-slug>/lesson-NN.html), never /tmp.
Send the first lesson and ask the human to react to both the teaching and the style before you batch the rest — it is far cheaper to adjust the template once than to regenerate twenty files. Then proceed lesson by lesson (or in small batches), checking in. Offer an index page linking all lessons once the track is built.
Capture these in Phase 1 and apply them in Phase 4. If the human is vague, propose a default and confirm:
template exposes these as CSS variables at the top of <style>.
warnings, key formulas). Honor the human's emphasis hierarchy consistently.
whether to include figures (describe-and-draw with HTML/SVG, do not copy the book's figures — see safety).
When the human gives a style, reflect it back in one line before generating, so a mismatch is caught before twenty files are produced.
These boundaries are not optional. They apply from intake onward.
own examples. Do not copy the author's prose, do not paste chapters or long passages, and do not recreate the book's figures/tables verbatim. Short quotes for commentary are fine; wholesale reproduction is not.
I don't have to buy/read it" or "give me the full text." Offer legitimate distillation (concepts, your own worked examples, study aids) instead.
the page/section range it draws from, plus a provenance caveat that these are re-explained study notes, not the original.
legitimate source for (owned copy, library/institutional access, open-access, their own notes). If they cannot, stop and say so.
rather than the specific source (e.g. you only have the ToC), label it clearly so the learner knows what is the book's treatment vs. general background. Note that your knowledge has a cutoff and the edition may differ — tell the human to verify specifics against the actual source.
numbers, no confidently wrong technical claims. If unsure of a fact, say so and point the learner to the source section to confirm.
| Phase | Output | Gate before next phase | |---|---|---| | 1 Intake | source identified, goal + style captured, access confirmed | — | | 2 Chapter map | table: units, concepts, prereqs, weight, source location | human approves scope/order | | 3 Lesson plan | sequenced lessons w/ objective, examples, exercises, checkpoint | human approves granularity | | 4 HTML notes | one self-contained styled .html per lesson | passes html-report checklist | | 5 Review loop | first lesson reviewed, then batch + index page | human reacts to lesson 1 |
| Mistake | Fix | |---|---| | Pasting/paraphrasing the book closely | Re-explain in your own words with your own examples | | Skipping exercises/checkpoints | A learning track without practice is just a summary | | Ignoring stated style, then regenerating all files | Reflect style back, review lesson 1 before batching | | Inventing the book's specific treatment from memory | Label own-knowledge sections; cite the source for specifics |
> Found a bug or issue? If you encounter any problems with this skill, load the lingtai-issue-report skill and follow its instructions to report it.
Other measured skills in the registry, with their headline benchmark lift.