Knowledge Digest
by @ericn26-star
Converts textbooks or PDFs into personalized, multimodal interactive learning materials including handwritten notes, quiz webpages, slides, audio courses, an...
clawhub install eric-knowledge-digestπ About This Skill
name: knowledge-digest description: "Converts textbooks or PDFs into personalized, multimodal interactive learning materials including handwritten notes, quiz webpages, slides, audio courses, and mind maps. Trigger: learning materials, convert textbook, study notes, quiz generation, slides from PDF, mind map, audio course."
KnowledgeDigest β Unified Learning Content Converter
Overview
KnowledgeDigest converts textbooks, PDFs, or topic descriptions into personalized, multimodal learning experiences. It analyzes source content, then generates any combination of: handwritten-style notes (PDF), interactive quiz webpages (HTML), slides (PDF+PPTX), mind maps (image+Mermaid), and audio courses (MP3). All output is adapted to the learner's grade level and interests.
Workflow
Phase 1: Gather User Input
1. Identify what the user has provided: - Uploaded PDF/textbook file (optional) - Topic/direction description - Grade level (elementary / middle school / high school / university / professional) - Expected output format(s)
2. If no PDF/textbook uploaded and no source materials specified (only topic/direction provided): - Ask user: - Option A: "I have materials, uploading now" - Option B: "No materials, please search and generate courseware about [topic]" - If user selects B: - Use search tools to collect authoritative materials on the topic - Organize into structured content, generate a basic courseware PDF - Send PDF to user for confirmation: "This is the basic material I compiled for [topic], please confirm if usable?" - Continue after user confirmation
3. Default output formats (if user does not specify): mindmap + slides (PDF only) + quiz
Phase 2: Content Analysis
Parse the PDF or structured content to extract:
Document Parsing:
Core Concept Extraction:
Learning Objective Analysis:
Output structured analysis results in this format:
{
"document_info": {
"title": "Document title",
"total_pages": 100,
"language": "zh/en",
"subject": "Subject area"
},
"chapters": [
{
"chapter_id": "1",
"title": "Chapter title",
"page_range": [1, 20],
"sections": [
{
"section_id": "1.1",
"title": "Section title",
"core_concepts": ["Concept 1", "Concept 2"],
"key_terms": [
{"term": "Term", "definition": "Definition"}
],
"learning_objectives": ["Objective 1", "Objective 2"],
"difficulty": "easy/medium/hard",
"prerequisites": ["Prerequisite knowledge"]
}
]
}
],
"knowledge_graph": {
"nodes": ["Concept node list"],
"edges": [{"from": "Concept A", "to": "Concept B", "relation": "depends/contains/related"}]
}
}
Parsing Rules: 1. Chapter Recognition β Identify hierarchy based on font size, bold, numbering, etc. Handle documents without clear chapter markers by logically segmenting. 2. Concept Extraction β Identify bolded, highlighted, boxed important content. Extract proper nouns and term definitions. Identify formulas and theorems. 3. Difficulty Assessment β Assess based on concept abstraction level, prerequisite knowledge, and content complexity. 4. Quality Assurance β Ensure all chapters identified, verify knowledge point coverage completeness, check accuracy of concept definitions.
Phase 3: Generate Requested Formats
Based on user-selected output formats, generate each in sequence. For each format, follow the corresponding section below.
Phase 4: Deliver Assets
After all generation is complete:
Present to user using deliver_assets format:
-
file path
Supported Output Formats
| Format | Output | Description |
|--------|--------|-------------|
| notes | {topic}_notes.pdf | Handwritten-style notes (annotated on original or generated from scratch) |
| quiz | {topic}_quiz.html | Minimalist interactive HTML quiz with instant feedback |
| slides | {topic}_slides.pdf + {topic}_slides.pptx | Visual slides |
| mindmap | {topic}_mindmap.png + Mermaid text | Mind map image |
| audio | {topic}_audio.mp3 | Audio course in teacher-student dialogue format |
| all | All of the above | Generate every format |
Personalization: Grade Level Adaptation
All generated content must be adapted to the learner's grade level:
| Grade | Language & Tone | Content Density | Visual Style | |-------|----------------|-----------------|--------------| | Elementary | Lively, simple Q&A, encouraging, story-style | Low density, more drawings, large font | Fun elements, bright colors, short text | | Middle school | Guided questioning, moderate challenges, youth-oriented | Moderate, image-text combination, clear labels | Image-text combination, moderate information | | High school | In-depth discussion, logical reasoning, appropriate academic tone | Higher density, logic diagrams | Professional feel, data visualization | | University/Professional | Seminar-style, critical thinking, professional terminology | High density, professional charts, complex structures | Academic style, comprehensive application |
Interest Adaptation (applies to all formats):
Format 1: Notes Generation
Input Type Determination
Type A β Existing Paper/Courseware:
Type B β Non-existing Content:
Type A Workflow: Adding Notes to Original Document
Step 1: Analyze Original Structure
Analyze PDF content page by page:
Step 2: Plan Note Content
Plan handwritten annotations for each page (3-8 annotations per page, not too dense):
Annotation Types: 1. Chapter title translation/explanation β e.g., original "3.1 Preliminaries" β annotate "Background Knowledge" 2. Key questions β e.g., "Key: How to reduce complexity?" 3. Concept explanation β e.g., annotate "kernel trick" next to formula 4. Problem marking β e.g., "Problem: memory overflow" 5. Solutions β e.g., "Solution: forget gate" 6. Formula notes β e.g., "recursive form", "write operation & read operation" 7. Structure annotation β e.g., use braces to mark formula groups, write "β O(NΒ²) complexity" beside
Annotation Planning Principles:
Step 3: Generate Annotated Images
Convert each PDF page to image, then use image generation tool to add handwritten-style annotations.
Handwritten Annotation Style Requirements:
Step 4: Compile PDF
Type B Workflow: Generating Notes from Scratch
Step 1: Organize Content Structure
Step 2: Design Note Layout
Layout Elements:
Step 3: Generate Note Page Images
Each page contains:
Style Requirements:
Step 4: Compile PDF
Notes Output
{topic}_notes.pdfNotes Quality Standards
1. Content Accuracy β Annotations based on original text; translation/explanation accurate; no added information 2. Annotation Value β Annotations help understanding, not simple repetition; key points highlight important concepts; problems and solutions correspond clearly 3. Visual Effect β Handwritten style natural, not machine-printed; color coordination harmonious; annotation positions reasonable 4. Usability β PDF printable; suitable for screen reading; reasonable file sizeFormat 2: Quiz Generation
Question Design
At least 5 questions per section. Distribution:
Difficulty distribution:
Each question must include:
HTML Generation
Generate a single HTML file containing all questions and interaction logic.
Design Principle: Minimalist
Visual Style:
Interaction Design:
HTML Structure Template:
Chapter Quiz
Chapter Title - Quiz
1. Question content
Quiz Output
{topic}_quiz.htmlQuiz Quality Standards
1. Content Accuracy β All knowledge points based on original textbook; answers and explanations correct; question wording clear and unambiguous 2. Personalization β Question scenarios match user interests; difficulty matches grade level; language style suits target audience 3. Interaction Experience β Click response instant; feedback clear; explanations have teaching value 4. Visual Minimalism β No decorative elements; no framework dependencies; file size minimizedFormat 3: Slides Generation
Design Considerations
Treat these as a flexible menu, not a mandatory checklist:
1. Topic, Purpose & Audience β What is this about? Who needs to understand it? Where will it be presented? 2. Content Foundation & Sources β What materials or data need to be presented? 3. Visual Approach (CRITICAL) - Default to explanatory visuals: cutaway views, annotated structure diagrams, exploded views, schematic illustrations - Visual elements are primary information carriers, not decorative backgrounds for text lists - Default information density matches professional infographics and technical illustrations - CRITICAL: Diagrams must convey information through structure, not just provide atmosphere. Text should be labels/annotations, not main content. Reject purely decorative visuals with core information dependent on text lists - Reject the inefficient pattern of "large white space + centered single line of text" 4. Narrative Flow & Chapters β How should viewers move through the content? How is slide flow arranged? 5. Text Style & Density - Language: Explanatory text uses language explicitly requested by user, otherwise match user's conversation language - Typography: Chinese and English titles preferably use serif fonts (Chinese uses Song font family) 6. Visual Style, Color & Mood - Visual language of encyclopedias and reference books: explanatory diagrams, cutaway illustrations, annotated structures - Refined spatial composition and typographic precision of high-end journals - Intentional asymmetry and layered information design of contemporary design publications - Apply asymmetric grids, intentional breathing space, layered information organization, diagonal composition, dynamic typography as internalized design language - Color restriction: Unless user explicitly specifies, do NOT use blue or purple as theme color or background color
Slides Workflow
Step 1: Design Strategy β Create Content Script
Information architecture first: Structure content into hierarchical slides, each slide as an information unit defined by what data/facts/relationships it carries. Let content volume naturally determine slide count.
Output content_script.md:
# Slides Content ScriptSlide 1: [Title]
Subtopic A: [Label]
[50-80 word narrative paragraph describing information content to be visualized]Subtopic B: [Label]
[50-80 word narrative paragraph]
Slide 2: [Title]
...
Content Script Specification:
Step 2: Sequential Image Generation
Use image generation tool to generate slides one by one:
Format: Default 16:9 landscape ratio. Save each slide image locally.
Prompt Construction for Each Slide β Must include these 6 points:
1. Visualization Type β Prioritize diagram forms over text-dominated presentations: cutaway views, flowcharts, annotated structure diagrams, relationship diagrams, timeline overlays. Integrate multiple subtopics into unified visual structure. Avoid "parallel cards/grid displays/multi-column layouts" and text-heavy traditional typography.
2. Information Hierarchy β Primary and secondary information distinguished through visual hierarchy (size, position, contrast). Not flat lists.
3. Composition Instructions β Asymmetric layout, diagonal momentum, and other methods to break rigid symmetry.
4. Density Requirements β Clear information hierarchy over quantity. Appropriate white space serves readability, but not empty and sparse.
5. Layout Independence β Explicitly state this slide's visualization type is chosen based on its content, not copying previous slide. Re-evaluate what this specific content needs. But describe inherited elements in detail.
6. Style Consistency β If user provided visual style or reference images, each prompt must describe that style's characteristics in detail.
Step 3: Compile Output
After generating all slide images:
Slides Output
{topic}_slides.pdf + {topic}_slides.pptxFormat 4: Mind Map Generation
Mind Map Workflow
Step 1: Design Content Structure
Determine node hierarchy and relationships:
Step 2: Generate Image
Use gen_images to generate mind map image:
Step 3: Output
{topic}_mindmap.pngFormat 5: Audio Course Generation
Audio Workflow
Step 1: Write Dialogue Script
Write teacher-student dialogue script:
Opening (about 1 minute)
Teacher greets, introduces today's topic
Student responds, expresses existing knowledge or questions
Teacher builds connection using user's interest field Part One: Concept Introduction (about 4 minutes)
Teacher asks questions from user's interest scenario
Student observes/answers
Teacher introduces core concept, defines in conversational manner
Student requests examples
Teacher explains in detail with personalized examples
Student restates in own words to confirm understanding Part Two: Deep Understanding (about 5 minutes)
Teacher explains important characteristics of concept
Student raises common confusion/misconception
Teacher clarifies misconception
Student poses hypothetical questions
Teacher answers and extends Part Three: Application Practice (about 3 minutes)
Teacher gives question
Student thinks and answers
Teacher provides feedback (affirmation or guidance) Summary (about 2 minutes)
Student attempts to summarize what was learned
Teacher supplements and affirms
Student expresses gains, connects to practical application
Exchange farewells
Script Requirements:
Character Settings
Teacher Character:
Student Character:
Step 2: Generate Audio
Use audio generation tool to convert script to audio:
Step 3: Output
{topic}_audio.mp3Audio Quality Standards
1. Listening Experience β Sounds like real conversation, not script reading; rhythm varies; key content emphasized 2. Learning Effect β Concept explanation clear; student questions represent real confusion; practice section has testing effect 3. Personalization β Examples 100% from user's interest field; student character gives user identification; language style matches grade 4. Audio Quality β Clear sound; duration about 15 minutes; directly playableCritical Constraints
1. Content Fidelity β All content must be based on original textbook/source material. No unverified information added. 2. Grade Adaptation β Adjust content depth and expression based on grade level for ALL formats. 3. Output Rules β Only return file paths. No inline display of images/PDFs/audio/video. No auto-play. No intermediate files. 4. Color Constraints (Notes) β Maximum 2 colors per PDF. Default blue + pink. 5. Color Constraints (Slides) β Do NOT use blue or purple as theme/background color unless user explicitly requests. 6. Image Quality β Notes: 150 DPI, 90% compression. Slides: 150 DPI, 95% quality. 7. Mind Map Depth β No more than 4 levels. Node text no more than 10 characters. 8. Quiz Minimalism β No UI frameworks, no decorative elements, system default font only.
Common Mistakes to Avoid
1. Adding unverified information β Stick to the source material only 2. Ignoring grade level β Elementary content should not use university-level terminology 3. Previewing outputs in conversation β Never display images, PDFs, or play audio inline 4. Dense annotations on notes β Keep 3-8 annotations per page, not more 5. Decorative slides β Visuals must convey information through structure, not just atmosphere 6. Text-heavy slides β Diagrams should be primary carriers, not text lists with decorative backgrounds 7. Using blue/purple in slides β Forbidden unless user explicitly requests 8. Flat quiz feedback β "The answer is X" has no teaching value; always explain why 9. Robotic audio dialogue β Must sound like natural conversation with interjections and interruptions 10. Outputting intermediate files β Only deliver final output file paths
File & Output Conventions
| Format | Filename Pattern | File Type |
|--------|-----------------|-----------|
| Notes | {topic}_notes.pdf | PDF |
| Quiz | {topic}_quiz.html | HTML |
| Slides | {topic}_slides.pdf, {topic}_slides.pptx | PDF, PPTX |
| Mind Map | {topic}_mindmap.png | PNG |
| Audio | {topic}_audio.mp3 | MP3 |
All files use the topic name as prefix. Deliver all outputs together using format after all generation is complete.