chapter-content-generator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseChapter Content Generator
章节内容生成器
Version: 0.05
**版本:**0.05
Overview
概述
This skill generates detailed educational content for individual textbook chapters, transforming chapter outlines (title, summary, concept list) into comprehensive learning material with appropriate reading level, rich visual elements, and interactive components. The skill is designed to run after the skill has created the chapter structure.
book-chapter-generatorVersion 0.05 Features:
- Sequential execution - Generate content one chapter at a time to avoid excessive token usage. A user may override this with the phase "use parallel execution" but the skill will warn them that a 38% additional tokens will be used
本Skill为教材的单个章节生成详细的教育内容,将章节大纲(标题、摘要、概念列表)转换为符合相应阅读水平、包含丰富视觉元素和交互组件的完整学习材料。本Skill需在 Skill创建好章节结构后运行。
book-chapter-generator0.05版本特性:
- 顺序执行 - 一次生成一个章节的内容,避免过度消耗Token。用户可通过指定阶段"use parallel execution"来覆盖此设置,但Skill会警告用户这将额外消耗38%的Token
When to Use This Skill
使用场景
Use this skill when:
- The skill has created chapter directories with index.md files
book-chapter-generator - A chapter index.md contains: title, summary, and concepts covered list
- Detailed chapter content needs to be generated
- Content should be adapted to a specific reading level (junior high, senior high, college, graduate)
- Rich non-text elements (diagrams, MicroSims, infographics) are desired
Do NOT use this skill when:
- Chapter structure hasn't been created yet (use first)
book-chapter-generator - Content already exists and just needs editing (use Edit tool directly)
- Generating other types of content (prompts, glossaries, etc.)
- The user is almost out of tokens (over 95% of used in a 5-hour window)
在以下场景使用本Skill:
- Skill已创建包含index.md文件的章节目录
book-chapter-generator - 章节index.md文件包含:标题、摘要和涵盖的概念列表
- 需要生成详细的章节内容
- 内容需要适配特定阅读水平(初中、高中、大学、研究生)
- 需要丰富的非文本元素(图表、MicroSims、信息图)
请勿在以下场景使用本Skill:
- 章节结构尚未创建(请先使用)
book-chapter-generator - 内容已存在仅需编辑(直接使用编辑工具)
- 生成其他类型内容(提示词、术语表等)
- 用户的Token即将耗尽(5小时窗口内已使用超过95%)
Execution Modes
执行模式
Sequential Mode (Default for all use-cases)
顺序模式(默认适用于所有场景)
- Always only do one chapter at a time due to large overhead of parallel mode
- Wait for a chapter to totally finish and log the session before you begin the next chapter
- Clearly indicate to the user when each chapter is finished
- 始终一次仅处理一个章节,避免并行模式的大量开销
- 等待一个章节完全生成并记录会话后,再开始下一个章节
- 向用户明确提示每个章节的完成状态
Parallel Mode (Only on request)
并行模式(仅按需使用)
Parallel mode should ONLY be used when the user specifically request parallel execution.
Warn the user that there will be a substantial token penalty to pay for parallel execution.
仅当用户明确要求并行执行时,才可使用并行模式。需警告用户,并行执行将导致Token消耗大幅增加。
Single Chapter Mode
单章节模式
Use for:
- Updating one chapter after outline revision
- Testing content format before batch generation
适用于:
- 大纲修订后更新单个章节
- 批量生成前测试内容格式
Workflow
工作流程
Phase 1: Setup (Sequential)
阶段1:设置(顺序执行)
This phase runs once before any content generation, reading shared context that all agents will need.
本阶段在内容生成前运行一次,读取所有Agent需要的共享上下文。
Step 1.1: Capture Start Time for Logging
步骤1.1:记录开始时间
bash
date "+%Y-%m-%d %H:%M:%S" >>logs/ch-{NN}-content-generation.mdWhere {NN} is the two digit chapter number with zero padding.
Log the start time for the session report.
bash
date "+%Y-%m-%d %H:%M:%S" >>logs/ch-{NN}-content-generation.md其中{NN}为带前导零的两位章节编号。
记录会话报告的开始时间。
Step 1.2: Indicate Skill Running
步骤1.2:提示Skill正在运行
Notify the user: "Chapter Content Generator Skill v0.05 running in [parallel/sequential] mode."
通知用户:"章节内容生成器Skill v0.05正在[并行/顺序]模式下运行。"
Step 1.3: Read Shared Context
步骤1.3:读取共享上下文
Read and cache these files for all agents:
-
Course Description ()
docs/course-description.md- Extract target audience and reading level
- Note course objectives and tone guidelines in the project CLAUDE.md
- Identify any mascot or narrative elements (e.g., Delta in calculus) in the project CLAUDE.md
-
Learning Graph (or similar)
docs/learning-graph/learning-graph.csv- Load concept list with dependencies
- Understand concept relationships for pedagogical ordering
-
Glossary ()
docs/glossary.md- Load term definitions for consistent terminology if they exist
- In most cases the glossary is created after the content is generated
- Note which concepts have glossary entries
-
Project CLAUDE.md (if exists)
- Load project-specific guidelines
- Note any mascot specifications, tone requirements, or special formatting
-
Chapter List (scandirectory)
docs/chapters/- Enumerate all chapter directories
- Identify which chapters need content generation (have outline but no content)
读取并缓存以下文件供所有Agent使用:
-
课程描述 ()
docs/course-description.md- 提取目标受众和阅读水平
- 记录项目CLAUDE.md中的课程目标和语气指南
- 识别项目CLAUDE.md中的任何吉祥物或叙事元素(如微积分中的Delta)
-
学习图谱 (或类似文件)
docs/learning-graph/learning-graph.csv- 加载带有依赖关系的概念列表
- 理解概念间的关系以确定教学顺序
-
术语表 ()
docs/glossary.md- 加载术语定义以保持术语一致性(如果存在)
- 大多数情况下,术语表是在内容生成后创建的
- 记录哪些概念已有术语表条目
-
项目CLAUDE.md(如果存在)
- 加载项目特定指南
- 记录任何吉祥物规范、语气要求或特殊格式
-
章节列表(扫描目录)
docs/chapters/- 枚举所有章节目录
- 识别需要生成内容的章节(已有大纲但无内容)
Step 1.4: Determine Reading Level
步骤1.4:确定阅读水平
Extract the grade reading level from the course description:
Reading level indicators:
- "grade-school", "grade school", "grades 1-6", "elementary school" → Elementary School
- "junior-high", "junior high", "grades 7-9", "middle school" → Junior High
- "senior-high", "senior high", "grades 10-12", "high school" → Senior High
- "college", "undergraduate", "bachelor" → College
- "graduate", "master", "masters", "master's", "PhD", "doctoral" → Graduate
Reading level characteristics:
- Grade School (Grades 1-6): Very sentences (10-14 words), common vocabulary, concrete examples, frequent visual aids
- Junior High (Grades 7-9): Simple sentences (12-18 words), common vocabulary, concrete examples, frequent visual aids
- Senior High (Grades 10-12): Mixed sentence complexity (15-22 words), technical vocabulary with definitions, balance of concrete and abstract
- College: Academic style (18-25 words), technical terminology, case studies, research context
- Graduate: Sophisticated prose (20-30+ words), full jargon, theoretical depth, research literature
Default to Grade 10 (Senior High) if not specified.
从课程描述中提取阅读水平:
阅读水平标识:
- "grade-school", "grade school", "grades 1-6", "elementary school" → 小学
- "junior-high", "junior high", "grades 7-9", "middle school" → 初中
- "senior-high", "senior high", "grades 10-12", "high school" → 高中
- "college", "undergraduate", "bachelor" → 大学
- "graduate", "master", "masters", "master's", "PhD", "doctoral" → 研究生
阅读水平特征:
- 小学(1-6年级): 短句(10-14词),常用词汇,具体示例,频繁使用视觉辅助
- 初中(7-9年级): 简单句(12-18词),常用词汇,具体示例,频繁使用视觉辅助
- 高中(10-12年级): 混合句式复杂度(15-22词),带定义的专业词汇,兼顾具体与抽象内容
- 大学: 学术风格(18-25词),专业术语,案例研究,研究背景
- 研究生: 复杂文风(20-30+词),完整术语体系,理论深度,研究文献
若未指定,默认使用10年级(高中)水平。
Step 1.5: Plan Chapter Batches (Parallel Mode)
步骤1.5:规划章节批次(并行模式)
Divide chapters into batches for parallel processing:
Batch Size Guidelines:
- 4-8 chapters: 2 agents (2-4 chapters each)
- 9-15 chapters: 3-4 agents (3-4 chapters each)
- 16-24 chapters: 4-6 agents (4-5 chapters each)
- 25+ chapters: 5-6 agents (5-6 chapters each)
Example for 23 chapters:
Agent 1: Chapters 1-4 (Foundations)
Agent 2: Chapters 5-8 (Core Concepts Part 1)
Agent 3: Chapters 9-12 (Core Concepts Part 2)
Agent 4: Chapters 13-16 (Applications Part 1)
Agent 5: Chapters 17-20 (Applications Part 2)
Agent 6: Chapters 21-23 (Advanced Topics)将章节划分为批次以进行并行处理:
批次大小指南:
- 4-8章:2个Agent(每个处理2-4章)
- 9-15章:3-4个Agent(每个处理3-4章)
- 16-24章:4-6个Agent(每个处理4-5章)
- 25+章:5-6个Agent(每个处理5-6章)
23章示例:
Agent 1:第1-4章(基础内容)
Agent 2:第5-8章(核心概念第一部分)
Agent 3:第9-12章(核心概念第二部分)
Agent 4:第13-16章(应用第一部分)
Agent 5:第17-20章(应用第二部分)
Agent 6:第21-23章(高级主题)Phase 2: Content Generation (Parallel or Sequential)
阶段2:内容生成(并行或顺序)
Parallel Execution
并行执行
Spawn multiple Task agents simultaneously using the Task tool. Each agent receives:
- Shared context (course info, reading level, glossary terms, tone guidelines)
- Assigned chapters (specific chapter directories)
- Content format template (the standard format from this skill)
- Output instructions (write content to each chapter's index.md)
Agent Prompt Template:
You are generating educational content for an intelligent textbook. Generate
detailed chapter content for the following chapters.
COURSE CONTEXT:
- Course: [course name]
- Target audience: [audience]
- Reading level: [level] - [characteristics]
- Tone: [tone guidelines from course description or CLAUDE.md]
CONTENT GUIDELINES:
- No more than 4 paragraphs of pure text without a non-text element
- Use diverse element types (lists, tables, diagrams, MicroSims)
- Present concepts in pedagogical order (simple to complex)
- Include LaTeX equations where appropriate (backslash delimiters: `\( \)` for inline, `\[ \]` for display)
NON-TEXT ELEMENTS:
- Markdown lists and tables: embed directly (blank line before)
- Diagrams, MicroSims, infographics: use <details markdown="1"> blocks with #### Diagram: header
CHAPTERS TO PROCESS:
[List specific chapter directories with full paths]
FOR EACH CHAPTER:
1. Read the chapter index.md file to get title, summary, concepts covered
2. Generate comprehensive content (3000-5000 words)
3. Include 4-6 non-text elements per chapter
4. Verify all concepts from "Concepts Covered" list are addressed
5. Write the content to docs/chapters/[chapter-dir]/index.md
METADATA FORMAT (add to top of each file):
---
title: [Chapter Title]
description: [Short description]
generated_by: claude skill chapter-content-generator
date: [YYYY-MM-DD HH:MM:SS]
version: 0.04
---
REPORT when done:
- Chapter name
- Word count
- Non-text elements (lists, tables, admonitions, diagrams, MicroSims)
- Concepts covered (X of Y)使用Task工具同时启动多个Task Agent。每个Agent将收到:
- 共享上下文(课程信息、阅读水平、术语表术语、语气指南)
- 分配的章节(特定章节目录)
- 内容格式模板(本Skill提供的标准格式)
- 输出说明(将内容写入每个章节的index.md)
Agent提示模板:
你正在为智能教材生成教育内容。请为以下章节生成详细的章节内容。
课程上下文:
- 课程:[课程名称]
- 目标受众:[受众]
- 阅读水平:[水平] - [特征]
- 语气:[课程描述或CLAUDE.md中的语气指南]
内容指南:
- 纯文本段落不超过4段就需要加入非文本元素
- 使用多样化的元素类型(列表、表格、图表、MicroSims)
- 按照教学顺序呈现概念(从简单到复杂)
- 适当使用LaTeX公式(使用反斜杠分隔符:`\( \)`表示行内公式,`\[ \]`表示块级公式)
非文本元素:
- Markdown列表和表格:直接嵌入(列表前需空一行)
- 图表、MicroSims、信息图:使用带有#### Diagram:标题的<details markdown="1">块
待处理章节:
[列出带完整路径的特定章节目录]
每章处理步骤:
1. 读取章节index.md文件以获取标题、摘要、涵盖的概念
2. 生成完整内容(3000-5000词)
3. 每章包含4-6个非文本元素
4. 验证“涵盖的概念”列表中的所有概念都已覆盖
5. 将内容写入docs/chapters/[章节目录]/index.md
元数据格式(添加到每个文件顶部):
---
title: [章节标题]
description: [简短描述]
generated_by: claude skill chapter-content-generator
date: [YYYY-MM-DD HH:MM:SS]
version: 0.04
---
完成后报告:
- 章节名称
- 字数统计
- 非文本元素(列表、表格、提示框、图表、MicroSims)
- 涵盖的概念(X/Y)Sequential Execution
顺序执行
For sequential mode or fewer than 4 chapters, process each chapter one at a time following the per-chapter steps below.
对于顺序模式或章节数少于4章的情况,按照以下单章步骤依次处理每个章节。
Phase 2 Steps (Per Chapter - used by agents or sequential mode)
阶段2步骤(单章 - Agent或顺序模式使用)
Step 2.1: Verify Chapter File Exists
步骤2.1:验证章节文件存在
Verify that the chapter file exists and has required elements.
Expected input format:
- Chapter name: "01-intro-to-itil-and-config-mgmt" or "Chapter 1"
- Full path: "/docs/chapters/01-intro-to-itil-and-config-mgmt/index.md"
- Relative path: "chapters/01-intro-to-itil-and-config-mgmt/index.md"
Chapter directory structure:
/docs/chapters/NN-lowercase-name/index.mdWhere:
- = Two-digit chapter number with leading zero (e.g., "01", "07", "12")
NN - = URL-friendly lowercase name with dashes, no spaces
lowercase-name
Launching Parallel Agents:
This is done ONLY if the user request parallel execution.
Use the Task tool with multiple invocations in a SINGLE message to run agents in parallel:
markdown
[Call Task tool for Agent 1: Chapters 1-4]
[Call Task tool for Agent 2: Chapters 5-8]
[Call Task tool for Agent 3: Chapters 9-12]
[Call Task tool for Agent 4: Chapters 13-16]
[Call Task tool for Agent 5: Chapters 17-20]
[Call Task tool for Agent 6: Chapters 21-23]IMPORTANT: All Task tool calls MUST be in a single message to execute in parallel. If sent in separate messages, they will run sequentially.
验证章节文件存在且包含必要元素。
预期输入格式:
- 章节名称:"01-intro-to-itil-and-config-mgmt"或"Chapter 1"
- 完整路径:"/docs/chapters/01-intro-to-itil-and-config-mgmt/index.md"
- 相对路径:"chapters/01-intro-to-itil-and-config-mgmt/index.md"
章节目录结构:
/docs/chapters/NN-lowercase-name/index.md其中:
- = 带前导零的两位章节编号(如"01"、"07"、"12")
NN - = 小写、用短横线分隔的URL友好名称,无空格
lowercase-name
启动并行Agent:
仅当用户要求并行执行时才进行此操作。
在单个消息中多次调用Task工具以并行运行Agent:
markdown
[为Agent 1调用Task工具:第1-4章]
[为Agent 2调用Task工具:第5-8章]
[为Agent 3调用Task工具:第9-12章]
[为Agent 4调用Task工具:第13-16章]
[为Agent 5调用Task工具:第17-20章]
[为Agent 6调用Task工具:第21-23章]**重要提示:**所有Task工具调用必须在单个消息中发送才能并行执行。如果分开发送,将按顺序运行。
Step 2.2: Verify Chapter Outline
步骤2.2:验证章节大纲
Open the chapter file and check for required elements.
Required elements:
- Title in header 1 (# Title)
- Summary in level 2 header (## Summary)
- Concepts Covered in level 2 header (## Concepts Covered) with numbered list
Actions:
- Parse the chapter index.md file
- Extract:
- Chapter title
- Summary text
- List of concepts covered (numbered list)
- If any element is missing, skip chapter or ask user to provide content
- Store concepts list for verification in Step 2.5
打开章节文件并检查必要元素。
必要元素:
- 标题(一级标题 # Title)
- 摘要(二级标题 ## Summary)
- 涵盖的概念(二级标题 ## Concepts Covered)及编号列表
操作:
- 解析章节index.md文件
- 提取:
- 章节标题
- 摘要文本
- 涵盖的概念列表(编号列表)
- 若缺少任何元素,跳过该章节或请求用户提供内容
- 存储概念列表供步骤2.5验证使用
Step 2.3: Add Metadata
步骤2.3:添加元数据
Add metadata to the top of the index file:
markdown
---
title: Chapter Title
description: Short description of title
generated_by: claude skill chapter-content-generator
date: YYYY-MM-DD HH-MM-SS
version: 0.04
---在index文件顶部添加元数据:
markdown
---
title: 章节标题
description: 简短描述
generated_by: claude skill chapter-content-generator
date: YYYY-MM-DD HH-MM-SS
version: 0.04
---Step 2.4: Generate Detailed Chapter Content
步骤2.4:生成详细章节内容
Generate comprehensive educational content based on the chapter outline, concept list, and reading level.
Content generation principles:
-
Reading level adaptation:
- Apply appropriate sentence complexity, vocabulary, and explanation style
- See for specific guidelines
references/reading-levels.md
-
Concept ordering:
- Present simple concepts first, complex concepts last
- Follow natural pedagogical progression
- Do NOT necessarily follow the order in "Concepts Covered" list
- Build on previously explained concepts
-
Non-text elements:
- Goal: No more than 3 paragraphs of pure text without a non-text element.
- Use diverse element types (don't repeat the same type).
- Place special focus on interactive elements (infographics, MicroSims).
- When appropriate, render equations in LaTeX using backslash delimiters:
- Inline math: for equations within sentences
\( equation \) - Display math: for standalone equations on their own line
\[ equation \]
- Inline math:
- Do NOT use dollar sign delimiters (or
$)$$ - See the math-equations.md file in the references for proper formatting of equations.
Non-text element types:
Elements embedded directly in markdown (no block):
<details markdown="1">- Markdown lists (bullet or numbered) - ALWAYS put blank line before list
- Markdown tables - ALWAYS put blank line before table
Elements requiring diagram header and specification blocks:
<details markdown="1">- Diagrams/drawings - System architectures, relationships, data flows
- Interactive infographics - Clickable concept maps, progressive disclosure, hovers with definitions appearing in tooltips consistent with the glossary
- MicroSims - p5.js simulations with interactive controls
- Charts - Bar, line, pie charts with quantitative data
- Timelines - Historical progression, sequential events
- Maps - Geographic distribution with movement arrows
- Workflow diagrams - Business processes with hover text
- Graph data models - Entity relationships using vis-network
- Causal Loop Diagrams - used in systems thinking and explaining causality
For each block element, use this structure:
<details markdown="1">markdown
undefined根据章节大纲、概念列表和阅读水平生成完整的教育内容。
内容生成原则:
-
阅读水平适配:
- 使用合适的句式复杂度、词汇和解释风格
- 参考获取具体指南
references/reading-levels.md
-
概念排序:
- 先呈现简单概念,再呈现复杂概念
- 遵循自然的教学顺序
- 不必严格按照“涵盖的概念”列表的顺序
- 基于已解释的概念逐步深入
-
非文本元素:
- 目标:纯文本段落不超过3段就需要加入非文本元素
- 使用多样化的元素类型(避免重复使用同一类型)
- 重点关注交互元素(信息图、MicroSims)
- 适当使用LaTeX公式,使用反斜杠分隔符:
- 行内公式:表示句子中的公式
\( equation \) - 块级公式:表示单独一行的公式
\[ equation \]
- 行内公式:
- 不要使用美元符号分隔符(或
$)$$ - 参考references中的math-equations.md获取公式的正确格式
非文本元素类型:
可直接嵌入Markdown的元素(无需块):
<details markdown="1">- Markdown列表(项目符号或编号) - 列表前必须空一行
- Markdown表格 - 表格前必须空一行
需要图表标题和块的元素:
<details markdown="1">- 图表/绘图 - 系统架构、关系、数据流
- 交互式信息图 - 可点击的概念图、渐进式展示、带有与术语表一致的定义提示框的悬停效果
- MicroSims - 带交互控件的p5.js模拟
- 图表 - 带定量数据的柱状图、折线图、饼图
- 时间线 - 历史进程、顺序事件
- 地图 - 带移动箭头的地理分布
- 工作流图 - 带悬停文本的业务流程
- 图数据模型 - 使用vis-network的实体关系
- 因果循环图 - 用于系统思维和解释因果关系
对于每个块元素,使用以下结构:
<details markdown="1">markdown
undefinedDiagram: [Brief descriptive title]
Diagram: [简短描述性标题]
<details markdown="1">
<summary>[Brief descriptive title]</summary>
Type: [element-type]
**sim-id:** [kebab-case-directory-name]<br/>
**Library:** [p5.js | vis-network | Chart.js | Mermaid | Plotly | Leaflet | vis-timeline]<br/>
**Status:** Specified
[Detailed specification following guidelines in references/content-element-types.md]
Implementation: [Technology/approach]
</details>
```
The three structured fields enable machine-readable extraction by batch utilities:
- sim-id — kebab-case directory name (e.g., ), used by
angle-type-explorerextract-sim-specs.py - Library — JavaScript library for CDN selection by
generate-sim-scaffold.py - Status — initial lifecycle state (always for new specs)
Specified
Do not indent any text within a block. Do not put any leading spaces or tabs on newlines within a block.
<details markdown="1"><details markdown="1">Make SURE to put the level 4 header with the prefix before the details. This is REQUIRED!
#### Diagram:Specification requirements:
- Detailed enough that another skill or developer can implement without additional context
- Include all visual elements, data, labels, colors, interactions
- Specify canvas sizes, layout, default parameters
- Specify that the visual elements must have a responsive design that must respond to window resize events
- For MicroSims: describe learning objective, controls, visual elements, behavior
- See for complete specification guidelines for each element type
references/content-element-types.md
Content structure:
- Start with introductory paragraphs connecting to chapter summary
- Present concepts in pedagogical order (simple to complex)
- Integrate non-text elements naturally throughout
- Use markdown lists and tables frequently (with blank lines before them)
- Include blocks for complex visual/interactive elements
<details markdown="1"> - Place a level 4 markdown header before each block
details#### Diagram: [Diagram Name] - End with summary or key takeaways section
Interactive elements emphasis:
- Prioritize MicroSims and infographics that enable:
- Student interaction tracking
- Progress gauging
- Personalized content recommendations
- Each interactive element should have clear Learning objectives:
- Reference a section of the 2001 Bloom Taxonomy when you describe a learning objective:
- Remembering: Recalling facts, terms, basic concepts, and answers without necessarily understanding their meaning.
- Understanding: Explaining ideas or concepts, demonstrating comprehension by summarizing or rephrasing information.
- Applying: Using acquired knowledge to solve problems in new or unfamiliar situations.
- Analyzing: Breaking down information into parts to understand its structure and relationships, and drawing comparisons.
- Evaluating: Making judgments about information based on set criteria or standards, requiring critical thinking and justification.
- Creating: Producing new or original work by combining elements to form a novel whole or solution.
<details markdown="1">
<summary>[简短描述性标题]</summary>
Type: [元素类型]
**sim-id:** [短横线分隔的目录名称]<br/>
**Library:** [p5.js | vis-network | Chart.js | Mermaid | Plotly | Leaflet | vis-timeline]<br/>
**Status:** Specified
块内的文本不要缩进。块内的新行不要添加前导空格或制表符。
[遵循references/content-element-types.md中的指南编写详细规范]
Implementation: [技术/方法]
</details>
```
这三个结构化字段支持批量工具的机器可读提取:
- sim-id — 短横线分隔的目录名称(如),供
angle-type-explorer使用extract-sim-specs.py - Library — JavaScript库,供选择CDN
generate-sim-scaffold.py - Status — 初始生命周期状态(新规范始终为)
Specified
<details markdown="1">务必在details块前添加带前缀的四级标题!这是必填项!
#### Diagram:规范要求:
- 详细程度需确保其他Skill或开发人员无需额外上下文即可实现
- 包含所有视觉元素、数据、标签、颜色、交互
- 指定画布大小、布局、默认参数
- 指定视觉元素必须具备响应式设计,可适应窗口大小调整
- 对于MicroSims:描述学习目标、控件、视觉元素、行为
- 参考获取每种元素类型的完整规范指南
references/content-element-types.md
内容结构:
- 以连接章节摘要的介绍性段落开头
- 按照教学顺序呈现概念(从简单到复杂)
- 自然地整合非文本元素
- 频繁使用Markdown列表和表格(前需空一行)
- 为复杂的视觉/交互元素添加块
<details markdown="1"> - 在每个块前添加四级Markdown标题
details#### Diagram: [图表名称] - 以总结或关键要点部分结尾
交互元素重点:
- 优先选择支持以下功能的MicroSims和信息图:
- 学生交互跟踪
- 进度评估
- 个性化内容推荐
- 每个交互元素应明确学习目标:
- 描述学习目标时参考2001版布鲁姆分类法的对应章节:
- 记忆: 回忆事实、术语、基本概念和答案,无需理解其含义。
- 理解: 解释想法或概念,通过总结或改写信息展示理解。
- 应用: 将所学知识应用于新的或不熟悉的情境中解决问题。
- 分析: 将信息分解为各个部分以理解其结构和关系,并进行比较。
- 评价: 根据设定的标准或准则对信息做出判断,需要批判性思维和论证。
- 创造: 组合元素生成新的或原创的作品,形成新颖的整体或解决方案。
Step 2.5: Verify Completeness
步骤2.5:验证完整性
After generating chapter content, verify all concepts have been covered.
Verification process:
- Review the generated content
- Check that each concept from "Concepts Covered" list appears in the content
- Create a checklist showing which concepts were covered
- If any concepts missing:
- Add content covering those concepts
- Integrate them naturally into existing structure
- Update the chapter index.md file with the complete generated content
- Make Absolutely Sure that the content has been written to the chapter index.md file. Do a word count to make sure that ALL the content is present and that the TODO has been removed.
Actions:
- Replace the "TODO: Generate Chapter Content" placeholder with generated content
- Keep the existing title, summary, concepts list, and prerequisites sections
- Add the new detailed content after the prerequisites section
生成章节内容后,验证所有概念都已覆盖。
验证流程:
- 审阅生成的内容
- 检查“涵盖的概念”列表中的每个概念是否都出现在内容中
- 创建清单显示哪些概念已覆盖
- 若有遗漏的概念:
- 添加覆盖这些概念的内容
- 将其自然整合到现有结构中
- 将完整的生成内容更新到章节index.md文件
- 务必确保内容已写入章节index.md文件。通过字数统计确保所有内容都已存在且已移除TODO标记。
操作:
- 用生成的内容替换"TODO: Generate Chapter Content"占位符
- 保留现有的标题、摘要、概念列表和先决条件部分
- 在先决条件部分后添加新的详细内容
Phase 3: Aggregation (Sequential, after parallel agents complete)
阶段3:聚合(顺序执行,并行Agent完成后)
After all parallel agents complete, aggregate results.
所有并行Agent完成后,聚合结果。
Step 3.1: Collect Agent Results
步骤3.1:收集Agent结果
Wait for all Task agents to complete. Collect from each:
- List of chapter files created/updated
- Per-chapter statistics (word count, non-text elements, concepts covered)
- Any errors or issues encountered
等待所有Task Agent完成。从每个Agent收集:
- 创建/更新的章节文件列表
- 每章统计数据(字数、非文本元素、涵盖的概念)
- 遇到的任何错误或问题
Step 3.2: Generate Summary Report
步骤3.2:生成总结报告
Create a summary of all content generation:
markdown
undefined创建所有内容生成的总结:
markdown
undefinedChapter Content Generation Report
章节内容生成报告
Generated: YYYY-MM-DD
Execution Mode: Parallel (6 agents)
Wall-clock Time: X minutes Y seconds
生成时间:YYYY-MM-DD
执行模式:并行(6个Agent)
实际耗时:X分钟Y秒
Overall Statistics
总体统计
- Total Chapters: 23
- Total Words: ~100,000
- Avg Words per Chapter: ~4,350
- Total Non-text Elements: ~115
- **总章节数:**23
- 总字数:~100,000
- 每章平均字数:~4,350
- 总非文本元素数:~115
Execution Summary (Parallel Mode)
执行总结(并行模式)
| Agent | Chapters | Words | Elements | Time |
|---|---|---|---|---|
| Agent 1 | 1-4 | 17,200 | 20 | 3m 15s |
| Agent 2 | 5-8 | 18,100 | 22 | 3m 42s |
| Agent 3 | 9-12 | 17,800 | 19 | 3m 28s |
| Agent 4 | 13-16 | 18,500 | 21 | 3m 51s |
| Agent 5 | 17-20 | 17,900 | 18 | 3m 33s |
| Agent 6 | 21-23 | 13,200 | 15 | 2m 45s |
| Agent | 章节 | 字数 | 元素数 | 耗时 |
|---|---|---|---|---|
| Agent 1 | 1-4 | 17,200 | 20 | 3分15秒 |
| Agent 2 | 5-8 | 18,100 | 22 | 3分42秒 |
| Agent 3 | 9-12 | 17,800 | 19 | 3分28秒 |
| Agent 4 | 13-16 | 18,500 | 21 | 3分51秒 |
| Agent 5 | 17-20 | 17,900 | 18 | 3分33秒 |
| Agent 6 | 21-23 | 13,200 | 15 | 2分45秒 |
Per-Chapter Summary
每章总结
| Chapter | Words | Lists | Tables | Diagrams | MicroSims | Concepts |
|---|---|---|---|---|---|---|
| 1. Foundations | 4,200 | 6 | 3 | 2 | 1 | 15/15 ✓ |
| 2. Limits | 4,500 | 5 | 2 | 3 | 2 | 14/14 ✓ |
| ... | ... | ... | ... | ... | ... | ... |
undefined| 章节 | 字数 | 列表 | 表格 | 图表 | MicroSims | 概念 |
|---|---|---|---|---|---|---|
| 1. 基础 | 4,200 | 6 | 3 | 2 | 1 | 15/15 ✓ |
| 2. 极限 | 4,500 | 5 | 2 | 3 | 2 | 14/14 ✓ |
| ... | ... | ... | ... | ... | ... | ... |
undefinedStep 3.3: Capture End Time and Write Session Log
步骤3.3:记录结束时间并写入会话日志
Capture the end time:
bash
date "+%Y-%m-%d %H:%M:%S"Export the session information to :
logs/chapter-content-generator-YYYY-MM-DD.mdmarkdown
undefined记录结束时间:
bash
date "+%Y-%m-%d %H:%M:%S"将会话信息导出到:
logs/chapter-content-generator-YYYY-MM-DD.mdmarkdown
undefinedChapter Content Generator Session Log
章节内容生成器会话日志
Skill Version: 0.04
Date: YYYY-MM-DD
Execution Mode: Parallel (6 agents)
**Skill版本:**0.04
**日期:**YYYY-MM-DD
**执行模式:**并行(6个Agent)
Timing
时间统计
| Metric | Value |
|---|---|
| Start Time | YYYY-MM-DD HH:MM:SS |
| End Time | YYYY-MM-DD HH:MM:SS |
| Elapsed Time | X minutes Y seconds |
| 指标 | 数值 |
|---|---|
| 开始时间 | YYYY-MM-DD HH:MM:SS |
| 结束时间 | YYYY-MM-DD HH:MM:SS |
| 耗时 | X分钟Y秒 |
Token Usage
Token使用情况
| Phase | Estimated Tokens |
|---|---|
| Setup (shared context) | ~20,000 |
| Agent 1 (Ch 1-4) | ~80,000 |
| Agent 2 (Ch 5-8) | ~80,000 |
| ... | ... |
| Aggregation | ~5,000 |
| Total | ~500,000 |
| 阶段 | 预估Token数 |
|---|---|
| 设置(共享上下文) | ~20,000 |
| Agent 1(第1-4章) | ~80,000 |
| Agent 2(第5-8章) | ~80,000 |
| ... | ... |
| 聚合 | ~5,000 |
| 总计 | ~500,000 |
Results
结果
- Total chapters: N
- Total words: ~X
- All chapters written successfully: Yes/No
- 总章节数:N
- 总字数:~X
- 所有章节写入成功:是/否
Files Created/Updated
创建/更新的文件
[List all chapter index.md files]
undefined[列出所有章节index.md文件]
undefinedStep 3.4: Notify User
步骤3.4:通知用户
Notify the user:
"Chapter Content Generator v0.04 complete!
- Mode: Parallel (6 agents)
- Elapsed time: X minutes Y seconds
- Chapters processed: 23
- Total words: ~100,000
- Non-text elements: ~115
All chapter content has been written to their respective index.md files.
Session logged to "
logs/chapter-content-generator-YYYY-MM-DD.md向用户发送通知:
"章节内容生成器v0.04已完成!
- **模式:**并行(6个Agent)
- **耗时:**X分钟Y秒
- **处理章节数:**23
- 总字数:~100,000
- 非文本元素数:~115
所有章节内容已写入各自的index.md文件。
会话日志已保存到"
logs/chapter-content-generator-YYYY-MM-DD.mdResources
资源
This skill includes reference files that provide detailed guidelines for content generation:
本Skill包含提供内容生成详细指南的参考文件:
references/content-element-types.md
references/content-element-types.md
Comprehensive specifications for all non-text element types (3-11 above). Includes:
- When to use each element type
- Required information for specifications
- Implementation approaches
- Example specifications in block format
<details markdown="1"> - Place a level 4 Diagram header before each element
details
markdown
undefined所有非文本元素类型(上述3-11)的完整规范。包括:
- 每种元素类型的使用场景
- 规范所需的信息
- 实现方法
- 块格式的示例规范
<details markdown="1"> - 在每个元素前添加四级Diagram标题
details
markdown
undefinedDiagram: [Diagram Name]
Diagram: [图表名称]
Load this reference when generating content to ensure proper specification of diagrams, MicroSims, infographics, charts, timelines, maps, workflows, and graph models.
生成内容时加载此参考文件,确保图表、MicroSims、信息图、图表、时间线、地图、工作流和图模型的规范正确。references/reading-levels.md
references/reading-levels.md
Detailed guidelines for adapting content to different reading levels. Includes:
- Sentence structure and length guidelines
- Vocabulary choices
- Explanation styles
- Example complexity
- Assumed background knowledge
- Example text at each level
Load this reference when determining how to write content at the appropriate reading level.
适配不同阅读水平的详细指南。包括:
- 句式结构和长度指南
- 词汇选择
- 解释风格
- 示例复杂度
- 假定的背景知识
- 各水平的示例文本
确定如何以合适的阅读水平撰写内容时加载此参考文件。
Best Practices
最佳实践
-
Always read references: Loadand
references/content-element-types.mdbefore generating contentreferences/reading-levels.md -
Maintain blank lines: Always place blank line before markdown lists and tables (MkDocs requirement)
-
Pedagogical ordering: Don't feel constrained by concept list order - teach concepts in the most effective sequence
-
Visual variety: Mix different types of non-text elements rather than using the same type repeatedly
-
Interactive emphasis: Prioritize MicroSims and infographics that enable student engagement tracking
-
Detailed specifications: Makeblocks comprehensive enough for implementation without additional context
<details markdown="1"> -
Concept integration: Weave concepts together naturally rather than treating them as isolated topics
-
Appropriate depth: Match explanation depth to reading level (more scaffolding for junior high, more theory for graduate)
-
Verification: Always check that all concepts from "Concepts Covered" list appear in generated content
-
Consistent style: Maintain consistent voice, terminology, and visual style throughout chapter
-
Parallel execution: When processing 4+ chapters, always use parallel mode for efficiency
-
Real timestamps: Always use actual system timestamps, never synthetic data
-
**始终阅读参考文件:**生成内容前加载和
references/content-element-types.mdreferences/reading-levels.md -
**保持空行:**Markdown列表和表格前始终空一行(MkDocs要求)
-
**教学顺序:**不要受概念列表顺序的限制 - 以最有效的顺序教授概念
-
**视觉多样性:**混合使用不同类型的非文本元素,避免重复使用同一类型
-
**交互重点:**优先选择支持学生参与跟踪的MicroSims和信息图
-
**详细规范:**确保块足够详细,无需额外上下文即可实现
<details markdown="1"> -
**概念整合:**自然地将概念融合在一起,而非将其视为孤立主题
-
**适当深度:**根据阅读水平匹配解释深度(初中需要更多引导,研究生需要更多理论)
-
**验证:**始终检查“涵盖的概念”列表中的所有概念是否都出现在生成的内容中
-
**风格一致:**在整个章节中保持一致的语气、术语和视觉风格
-
**并行执行:**处理4章以上时,始终使用并行模式以提高效率
-
**真实时间戳:**始终使用实际系统时间戳,不要使用合成数据
Common Pitfalls to Avoid
常见误区
Content Quality:
- ❌ More than 3 paragraphs without a non-text element
- ❌ Using the same element type repeatedly
- ❌ Missing concepts from the "Concepts Covered" list
- ❌ Content too advanced or too simple for reading level
Formatting:
- ❌ Missing blank line before lists or tables
- ❌ Indenting content inside blocks
<details> - ❌ Missing header before details blocks
#### Diagram: - ❌ Missing closing tag
</details>
Parallel Execution:
- ❌ Sending Task calls in separate messages (runs sequentially)
- ❌ Not waiting for all agents before aggregation
- ❌ Forgetting to aggregate statistics from all agents
- ❌ Using synthetic timestamps instead of real ones
内容质量:
- ❌ 纯文本段落超过3段未加入非文本元素
- ❌ 重复使用同一元素类型
- ❌ 遗漏“涵盖的概念”列表中的概念
- ❌ 内容难度与阅读水平不符
格式:
- ❌ 列表或表格前未空一行
- ❌ 在块内缩进内容
<details> - ❌ details块前缺少标题
#### Diagram: - ❌ 缺少闭合标签
</details>
并行执行:
- ❌ 分开发送Task调用(将按顺序运行)
- ❌ 未等待所有Agent完成就进行聚合
- ❌ 忘记聚合所有Agent的统计数据
- ❌ 使用合成时间戳而非真实时间戳
Output Files Summary
输出文件总结
Required (Per Chapter):
- Chapter content:
docs/chapters/[chapter-name]/index.md
Recommended (Aggregate):
2. - Session log with timing
logs/chapter-content-generator-YYYY-MM-DD.mdOptional:
3. Summary report with per-chapter statistics
必填(每章):
- 章节内容:
docs/chapters/[章节名称]/index.md
推荐(聚合):
2. - 带时间统计的会话日志
logs/chapter-content-generator-YYYY-MM-DD.md可选:
3. 带每章统计数据的总结报告
Example Session
示例会话
Parallel Mode (Default)
并行模式(默认)
User: "Generate content for all chapters"
Claude (using this skill):
- Captures start time
- Notifies: "Chapter Content Generator Skill v0.04 running in parallel mode."
- Reads shared context (course description, learning graph, glossary, CLAUDE.md)
- Determines reading level (e.g., Senior High)
- Scans chapter directories, finds 23 chapters needing content
- Plans batches: 6 agents, ~4 chapters each
- Spawns 6 Task agents in a SINGLE message (parallel execution)
- Waits for all agents to complete
- Aggregates results from all agents
- Captures end time
- Writes session log
- Reports: "Chapter Content Generator v0.04 complete! Mode: Parallel. Time: 18m 32s. Chapters: 23. Words: ~100,000."
用户:"为所有章节生成内容"
Claude(使用本Skill):
- 记录开始时间
- 通知:"章节内容生成器Skill v0.04正在并行模式下运行。"
- 读取共享上下文(课程描述、学习图谱、术语表、CLAUDE.md)
- 确定阅读水平(如高中)
- 扫描章节目录,发现23个需要生成内容的章节
- 规划批次:6个Agent,每个约4章
- 在单个消息中启动6个Task Agent(并行执行)
- 等待所有Agent完成
- 聚合所有Agent的结果
- 记录结束时间
- 写入会话日志
- 报告:"章节内容生成器v0.04已完成!模式:并行。耗时:18分32秒。章节数:23。字数:~100,000。"
Sequential Mode
顺序模式
User: "Generate content for Chapter 3 only"
Claude (using this skill):
- Reads shared context
- Verifies Chapter 3 file exists with required elements
- Determines reading level
- Generates comprehensive content (~4,000 words)
- Includes 4-6 non-text elements
- Verifies all concepts covered
- Writes content to chapter index.md
- Reports: "Generated content for Chapter 3. Words: 4,200. Elements: 5. Concepts: 15/15."
用户:"仅为第3章生成内容"
Claude(使用本Skill):
- 读取共享上下文
- 验证第3章文件存在且包含必要元素
- 确定阅读水平
- 生成完整内容(~4,000词)
- 包含4-6个非文本元素
- 验证所有概念都已覆盖
- 将内容写入章节index.md
- 报告:"已为第3章生成内容。字数:4,200。元素数:5。概念:15/15。"
Example Report
示例报告
✅ Chapter content generated successfully!
Chapter: 01-intro-to-itil-and-config-mgmt
Reading level: Graduate
Content length: ~3,500 words
Non-text elements:
- 6 markdown lists
- 3 markdown tables
- 2 diagrams (CMDB architecture, ITIL process flow)
- 1 interactive timeline (ITIL evolution)
- 1 MicroSim (Configuration drift simulator)
- 1 workflow diagram (Change management process)
Interactive elements: 2 (timeline, MicroSim)
Skills required: 2 (microsim-p5 for MicroSim, infographic-generator for timeline)
All 20 concepts covered: ✓!!! Note
For admonitions to work, your mkdocs.yml must have admonition and pymdownx.details enabled.
✅ 章节内容生成成功!
章节:01-intro-to-itil-and-config-mgmt
阅读水平:研究生
内容长度:~3,500词
非文本元素:
- 6个Markdown列表
- 3个Markdown表格
- 2个图表(CMDB架构、ITIL流程)
- 1个交互式时间线(ITIL演进)
- 1个MicroSim(配置漂移模拟器)
- 1个工作流图(变更管理流程)
交互元素:2个(时间线、MicroSim)
所需技能:2个(MicroSim使用microsim-p5,时间线使用infographic-generator)
所有20个概念均已覆盖:✓!!! 注意
要使提示框生效,你的mkdocs.yml必须启用admonition和pymdownx.details。