Curriculum Designer
Design customized curricula for Apni Pathshala PODs with real YouTube video links.
FEATURES:
- - ✅ Staged execution with checkpointing (recovery from failures)
- ✅ YouTube link verification with fallback logic (no blank URLs)
- ✅ Context capping per lesson (reduced token usage)
- ✅ Every topic gets a valid video OR search query fallback
⚡ Quick Start
How This Skill Works
When invoked, the agent follows a 5-stage workflow with checkpointing:
| Stage | What Happens | Checkpoint File |
|---|
| 1 | Gather requirements | INLINECODE0 |
| 2 |
Research YouTube videos |
research-results.json |
| 3 | Verify videos +
fallback logic |
validated-resources.json |
| 4 | Design curriculum (one lesson at a time) |
curriculum-structure.json |
| 5 | Create Google Sheet |
final-sheet-url.txt |
Checkpoint Behavior
- - Each stage saves its output to a checkpoint file
- If checkpoint exists, stage loads it and skips processing
- If checkpoint doesn't exist, stage runs from scratch
- Re-running resumes from first incomplete stage
Trigger
User message contains:
- - "Design curriculum" → Start curriculum creation
- "Create curriculum for [POD name]" → Start with POD context
- "Build learning plan" → Start curriculum creation
- "Curriculum for [subject/topic]" → Start with topic context
Target User
This skill is designed for Madhur (Academic Associate) who designs curricula for PODs.
Configuration
- - API Keys: Stored locally in
~/.openclaw/workspace/skills/curriculum-designer/.env (NOT in git) - Output Folder:
1upJQu-IVmZRJQsNGmJNRzq9IwL67MVL9 (Curriculum Designer) - Checkpoint Directory: INLINECODE7
YouTube API Key:
CODEBLOCK0
Get from: https://console.cloud.google.com/apis/credentials
Agent Workflow Instructions
Model Allocation for Stages
Action: Use different LLM models for different stages to optimize cost and performance.
Stage-Specific Model Assignment
| Stage | Recommended Model | Reason |
|---|
| Stage 1: Requirements Collection | glm-4.7 | Quick reasoning, sufficient for form filling |
| Stage 2: YouTube Research |
glm-5 | Fast research, needs latest web knowledge |
| Stage 3: Video Validation | glm-4.7 | Pattern matching, simple logic |
| Stage 4: Curriculum Design |
glm-4.7 | Structured generation, cost-effective for lessons |
| Stage 5: Sheet Creation | glm-4.7 | JSON formatting, simple transformations |
How to Set Models
Option 1: Specify model when calling agent
CODEBLOCK1
Option 2: Configure in SKILL.md
Each stage should include model recommendation in its instructions:
CODEBLOCK2
Agent Workflow Instructions
Stage 1: Gather Requirements
Action: Ask the user these questions (from SOP):
Basic Information
- 1. POD Name - Which POD is this curriculum for?
- Target Audience - Grade level or age group of students?
- Subject Areas - What subjects/topics should be covered?
- Duration - How long is the program? (e.g., 1 month, 3 months, 6 months)
- Frequency - How many classes per week?
- Daily Lab Hours - How many hours will the lab operate?
- Previous Exposure - Have students done digital learning before?
Teacher Context
- 8. Teacher Capability - Can teachers operate computers independently?
- Teacher Training Needed - Do teachers need any training?
Learning Outcomes
- 10. Learning Area Focus - Which area(s) to prioritize?
- Digital Literacy
- Academic Empowerment
- Skill Development
- Employment Readiness
- 11. Specific Skills - What specific skills should students acquire?
- Assessment Method - How will learning be measured?
Output: Save to checkpoint as JSON:
CODEBLOCK3
Checkpoint: ~/.openclaw/workspace/curriculum-designer-checkpoints/<timestamp>-<session-id>/requirements.json
Stage 2: Research YouTube Resources
Action: Search YouTube for videos based on requirements
API: Use YouTube Data API v3 with key from INLINECODE9
Search Queries (Default):
CODEBLOCK4
Search Parameters:
- - INLINECODE10
- INLINECODE11
- INLINECODE12
- INLINECODE13
- INLINECODE14 (5-10 minutes preferred)
- INLINECODE15 (Hindi preference)
Output Structure:
CODEBLOCK5
Research Summary (Before Validation)
After completing all searches, summarize the research results before passing to validation stage.
Why summarize?
- - Reduces token usage when passing to Stage 3 (validation)
- Provides cleaner input for validation logic
- Allows easy review of what was researched
Summary Structure:
CODEBLOCK6
Save summary:
- - Append
research_summary to INLINECODE17 - Validation stage uses summary for context, not raw results
Checkpoint: ~/.openclaw/workspace/curriculum-designer-checkpoints/<timestamp>-<session-id>/research-results.json
Stage 3: Verify Videos + Fallback Logic
Action: Verify each video via YouTube oEmbed API. If invalid, retry with alternative search terms.
Verification Method
Use oEmbed endpoint (fast, lightweight):
CODEBLOCK7
- - HTTP 200 = Valid video
- HTTP 404 = Invalid/deleted video
- HTTP 4xx/5xx = Try again (rate limit or temporary error)
Fallback Logic (CRITICAL)
For each topic, follow this logic:
CODEBLOCK8
Output Structure (With Fallbacks)
CODEBLOCK9
IMPORTANT: Every topic MUST have either:
- - A valid video URL, OR
- A search query fallback
Checkpoint: ~/.openclaw/workspace/curriculum-designer-checkpoints/<timestamp>-<session-id>/validated-resources.json
Stage 4: Design Curriculum (Context Capping + Summarization)
Action: Generate curriculum structure, processing one lesson at a time with summarization and context cleanup.
How Context Capping + Summarization Works
Instead of:
CODEBLOCK10
Do this:
CODEBLOCK11
Lesson-by-Lesson Process
For lesson N:
- 1. Load context:
- Lesson N topic
- Lesson N resources (from validated-resources.json)
- Previous lesson summary (if N > 1)
- 2. Generate lesson:
- Daily learning objectives
- Daily assessment
- Module content
- YouTube link/fallback
- 3. Summarize lesson:
- Create concise summary of lesson N
- Focus on: key skills, tools used, assessment type
- 4. Save to curriculum:
- Full lesson details
- Lesson summary (for next lesson's context)
- 5. Context cleanup:
- Remove lesson N's full context from memory
- Keep only lesson N's summary for N+1
Lesson Summary Template
CODEBLOCK12
Lesson Generation Template
For each lesson, generate:
| Field | Description |
|---|
| Day | Lesson number (1, 2, 3, ...) |
| Subject |
Subject area / Learning area |
| Module | Module/Topic name |
| Daily Learning Objectives | What students learn that day |
| Daily Assessment | How to assess understanding |
| YouTube Link | Valid video URL OR search query fallback |
| YouTube Title | Video title (if applicable) |
| Tools Used | Required software/platforms |
| Fallback Search Query | Search query if no valid video (or blank) |
|
Lesson Summary |
Concise summary for next lesson's context |
Sample Lesson Output (With Summary)
CODEBLOCK13
With Fallback Example
CODEBLOCK14
Final Curriculum Summary (When All Lessons Complete)
After generating all lessons:
- 1. Summarize entire curriculum:
- Total lessons
- Subject areas covered
- Key skills progression
- Assessment approach
- Tools/software used
- 2. Save to curriculum structure:
CODEBLOCK15
- 3. Update Stage 2 checkpoint:
- Add
curriculum_summary field to
research-results.json
- This keeps summary alongside research results for reference
Checkpoint: INLINECODE22
Also updates: ~/.openclaw/workspace/curriculum-designer-checkpoints/<timestamp>-<session-id>/research-results.json (adds curriculum_summary)
Stage 5: Create Google Sheet
Action: Create Google Sheet with curriculum data using gog CLI.
Step 1: Create Sheet
CODEBLOCK16
Step 2: Add Headers
CODEBLOCK17
Step 3: Populate with Lessons
CODEBLOCK18
Data format:
- - Column A: Day (1, 2, 3, ...)
- Column B: Subject
- Column C: Module
- Column D: Daily Learning Objectives
- Column E: Daily Assessment
- Column F: YouTube Link
- Column G: YouTube Title
- Column H: Tools Used
- Column I: Fallback Search Query
Validation:
- - One row per lesson
- Include fallback search queries (if any)
- Ensure no blank YouTube Links OR populated Fallback Search Query
Step 4: Share Sheet
CODEBLOCK19
Step 5: Save URL
CODEBLOCK20
Checkpoint: ~/.openclaw/workspace/curriculum-designer-checkpoints/<timestamp>-<session-id>/final-sheet-url.txt
Learning Areas Framework
| Learning Area | Focus |
|---|
| Digital Literacy | Basic computer skills, internet safety, AI tools |
| Academic Empowerment |
Study skills, exam prep, note-taking |
| Skill Development | Programming, design, content creation |
| Employment Readiness | Resume, communication, job skills |
Video Selection Criteria
- - ✅ 5-10 minutes max - keeps engagement high
- ✅ Clear explanations - no jargon-heavy content
- ✅ Hindi or bilingual - accessible for all students
- ✅ Recent content - prefer 2023+ videos
- ❌ Long lectures - students lose interest
- ❌ Advanced content - match to target audience level
Important Guidelines
⚠️ CRITICAL: Sharing Permissions
- - ALWAYS share sheet with
--to anyone --role reader before returning link - NEVER return a restricted link - user cannot view it
- Command: INLINECODE26
⚠️ CRITICAL: No Blank URLs
- - Every topic MUST have either:
- A valid YouTube URL, OR
- A search query fallback
- - Never leave both fields blank
Assessment Design
- - Formative (daily): Quick quizzes, practice exercises, short tasks
- Summative (end): Projects, presentations, comprehensive tests
- Keep assessments practical and hands-on
Folder Reference
| Resource | Link |
|---|
| Curriculum Designer Folder | INLINECODE27 |
| Example Curriculum (AI Tools) |
https://docs.google.com/spreadsheets/d/1hYC2Q2KlW8dM71biC97RPSvFnxTQa-zN |
| SOP Document |
https://docs.google.com/document/d/1Y5qetW8S4RWsTg7hycIyujgTwTCFn9VV |
Security Note
⚠️ API keys are stored locally in .env file - NEVER commit this file to git!
Future Improvements
- 1. Resume from specific stage - Ability to jump to any stage, not just first failed one
Automatic Checkpoint Cleanup (Cron Job)
Purpose
Delete checkpoint directories older than 7 days to prevent disk space bloat while keeping recent sessions for debugging.
Cron Job Configuration
Option 1: Add to User Crontab
CODEBLOCK21
Option 2: Using OpenClaw Cron
CODEBLOCK22
Cron Schedule Options
| Schedule | Crontab Format | Description |
|---|
| Daily at midnight | INLINECODE31 | Every day at 00:00 |
| Weekly on Sunday |
0 0 * * 0 | Every Sunday at 00:00 |
| Every 6 hours |
0 */6 * * * | Every 6 hours (may be too frequent) |
| Twice daily |
0 0,12 * * * | At 00:00 and 12:00 |
Verification
After setting up cron, verify it's working:
CODEBLOCK23
Manual Cleanup Test
Test the cleanup command manually before setting up cron:
CODEBLOCK24
Notes
- -
-mtime +7: Files/directories modified more than 7 days ago -type d: Only directories (sessions), not individual files-exec rm -rf {} \;: Remove directory and all contents- Checkpoints are preserved after completion for review, then auto-cleaned after 7 days
- Adjust
+7 to a different value if you want different retention period (+3, +14, +30)
Notes
- - Always search for REAL video URLs before creating curriculum
- Save curriculum sheets in the designated folder
- Share viewable link at the end
- Consider teacher training needs if curriculum requires new tools
- Checkpoints are preserved after completion for review
- Every topic in final curriculum must have valid video OR search query fallback
课程设计师
为Apni Pathshala PODs设计定制化课程,包含真实的YouTube视频链接。
功能特性:
- - ✅ 分阶段执行并设置检查点(可从故障中恢复)
- ✅ YouTube链接验证并配备回退逻辑(无空白URL)
- ✅ 每节课设置上下文上限(减少令牌使用量)
- ✅ 每个主题都有有效视频或搜索查询回退方案
⚡ 快速入门
该技能的工作原理
调用时,代理将遵循包含检查点的5阶段工作流程:
| 阶段 | 操作内容 | 检查点文件 |
|---|
| 1 | 收集需求 | requirements.json |
| 2 |
搜索YouTube视频 | research-results.json |
| 3 | 验证视频 +
回退逻辑 | validated-resources.json |
| 4 | 设计课程(每次一节课) | curriculum-structure.json |
| 5 | 创建Google表格 | final-sheet-url.txt |
检查点行为
- - 每个阶段将其输出保存到检查点文件
- 如果检查点存在,则阶段加载它并跳过处理
- 如果检查点不存在,则阶段从头开始运行
- 重新运行时从第一个未完成阶段继续
触发条件
用户消息包含:
- - 设计课程 → 开始创建课程
- 为[POD名称]创建课程 → 基于POD上下文开始
- 构建学习计划 → 开始创建课程
- [学科/主题]课程 → 基于主题上下文开始
目标用户
该技能专为Madhur(学术助理)设计,负责为PODs设计课程。
配置
- - API密钥: 本地存储在~/.openclaw/workspace/skills/curriculum-designer/.env(不在git中)
- 输出文件夹: 1upJQu-IVmZRJQsNGmJNRzq9IwL67MVL9(课程设计师)
- 检查点目录: ~/.openclaw/workspace/curriculum-designer-checkpoints/
YouTube API密钥:
YOUTUBEAPIKEY=yourkeyhere
获取方式:https://console.cloud.google.com/apis/credentials
代理工作流指令
各阶段模型分配
操作: 在不同阶段使用不同的LLM模型以优化成本和性能。
各阶段模型分配
| 阶段 | 推荐模型 | 原因 |
|---|
| 阶段1:需求收集 | glm-4.7 | 快速推理,足以完成表单填写 |
| 阶段2:YouTube搜索 |
glm-5 | 快速搜索,需要最新的网络知识 |
| 阶段3:视频验证 | glm-4.7 | 模式匹配,简单逻辑 |
| 阶段4:课程设计 |
glm-4.7 | 结构化生成,对课程而言成本效益高 |
| 阶段5:表格创建 | glm-4.7 | JSON格式化,简单转换 |
如何设置模型
选项1:调用代理时指定模型
bash
搜索阶段使用glm-5
agent.chat --model glm-5 --message 搜索YouTube视频...
设计阶段使用glm-4.7
agent.chat --model glm-4.7 --message 生成课程结构...
选项2:在SKILL.md中配置
每个阶段应在其指令中包含模型推荐:
阶段2:搜索YouTube资源
操作: 根据需求在YouTube上搜索视频
推荐模型: glm-5(快速搜索,最新的网络知识)
原因: 搜索需要最新信息和快速处理。
代理工作流指令
阶段1:收集需求
操作: 向用户询问以下问题(来自SOP):
基本信息
- 1. POD名称 - 该课程是为哪个POD设计的?
- 目标受众 - 学生的年级或年龄段?
- 学科领域 - 应涵盖哪些学科/主题?
- 时长 - 项目持续多长时间?(例如1个月、3个月、6个月)
- 频率 - 每周多少节课?
- 每日实验室时长 - 实验室每天开放多少小时?
- 先前接触 - 学生之前是否进行过数字化学习?
教师背景
- 8. 教师能力 - 教师能否独立操作计算机?
- 教师培训需求 - 教师是否需要培训?
学习成果
- 10. 学习领域重点 - 优先关注哪个/哪些领域?
- 数字素养
- 学术赋能
- 技能发展
- 就业准备
- 11. 具体技能 - 学生应获得哪些具体技能?
- 评估方法 - 如何衡量学习效果?
输出: 保存到检查点,格式为JSON:
json
{
pod_name: 示例POD,
target_audience: 8-10年级,
subject_areas: [数字素养, 计算机基础],
duration: 1个月,
frequency: 每周3天,
dailylabhours: 2,
previous_exposure: 无,
teacher_capability: 基础,
teachertrainingneeded: true,
learningareafocus: [数字素养],
specific_skills: [基本计算机操作, 互联网安全],
assessment_method: 实践练习和测验
}
检查点: ~/.openclaw/workspace/curriculum-designer-checkpoints/<时间戳>-<会话ID>/requirements.json
阶段2:搜索YouTube资源
操作: 根据需求在YouTube上搜索视频
API: 使用YouTube Data API v3,密钥来自.env
搜索查询(默认):
python
search_queries = [
计算机基础教程 印地语 初学者,
打字练习 印地语 教程,
互联网浏览器基础 印地语,
Gmail电子邮件教程 印地语 初学者,
Google文档教程 印地语,
Google表格教程 印地语,
ChatGPT教程 印地语 初学者 2024,
AI工具 学生 印地语
]
搜索参数:
- - part=snippet
- q=<查询>
- type=video
- maxResults=5
- videoDuration=medium(首选5-10分钟)
- relevanceLanguage=hi(印地语优先)
输出结构:
json
{
resources: [
{
topic: 计算机基础,
videos: [
{
title: 印地语计算机基础初学者教程,
channel: TechGuruji,
url: https://youtube.com/watch?v=ABC123,
video_id: ABC123
}
]
}
]
}
搜索摘要(验证前)
完成所有搜索后,在传递到验证阶段之前总结搜索结果。
为什么要总结?
- - 减少传递到阶段3(验证)时的令牌使用量
- 为验证逻辑提供更清晰的输入
- 便于审查搜索内容
摘要结构:
json
{
research_summary: {
total_searches: 8,
topics_researched: [
计算机基础,
打字练习,
互联网浏览器基础,
Gmail电子邮件教程,
Google文档教程,
Google表格教程,
ChatGPT教程,
AI工具 学生
],
totalvideosfound: 24,
video_channels: [TechGuruji, LearnWithMe, DigitalSkills, HindiTechTutorials],
search_language: 印地语优先,
videodurationpreference: 5-10分钟,
notes: 大部分视频来自2023-2024年。频道种类丰富。部分主题结果较少,可能需要回退搜索。
}
}
保存摘要:
- - 将research_summary附加到research-results.json
- 验证阶段使用摘要作为上下文,而非原始结果
检查点: ~/.openclaw/workspace/curriculum-designer-checkpoints/<时间戳>-<会话ID>/research-results.json
阶段3:验证视频 + 回退逻辑
操作: 通过YouTube oEmbed API验证每个视频。如果无效,使用替代搜索词重试。
验证方法
使用oEmbed端点(快速、轻量级):
https://www.youtube.com/oembed?url=https://youtube.com/watch?v=VIDEO_ID
- - HTTP 200 = 有效视频
- HTTP 404 = 无效/已删除视频
- HTTP 4xx/5xx = 重