Communitygithub.com

课程生成器:手绘讲解视频

根据主题、书籍/PDF或研究资料,制作带旁白的手绘风格白板讲解视频和多节课教程(黑色画布、霓虹荧光涂鸦、逐笔绘制、粗犷手写体、约1.2倍速旁白)。当用户要求制作讲解视频、视频课程或教程,或将书籍、PDF或笔记转换为讲座时使用。

课程生成器:手绘讲解视频 是什么?

本课程生成器 AI 技能能够将任意主题、书籍、PDF 或研究内容转化为一系列手绘风格的白板讲解视频(格式为 1920×1080 30fps H.264+AAC MP4,并附带嵌入式字幕和 .srt 文件),仿若教师在黑色 iPad 上用霓虹荧光笔授课的风格(Caleb Eom 风格)。它支持 Claude Code、Cursor、Codex 等主流 AI 代理平台,核心工作流包括:研究 → 每个讲座编写紧凑的 spec.js(旁白与视觉元素一体)→ 引擎自动布局并根据语音时机精准控制每个绘图动作 → 渲染输出。该技能强制遵循关键风格:约1.2倍语速、手工质感、黑色背景+霓虹色编码、以及包含钩子、框架、直觉、回顾的教学结构。它提供构建(build.sh)、质量检查(qa.sh)和渲染(render_lecture.sh)脚本,支持多讲座排队渲染和云端交付,确保高质量、可重复的视频课程生产。

兼容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/olatzbeitia-me/Agent-skills/tree/HEAD/course-generator-handwritten

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

课程生成器:手绘讲解视频 是做什么的?

输出:一个或多个 1920×1080 30fps H.264+AAC MP4(带嵌入式字幕)以及 .srt 文件,风格类似于有人在黑色 iPad 上用霓虹荧光笔教学(Caleb Eom 风格)。每个讲座写成一个紧凑的 spec.js(旁白与视觉元素一体);引擎负责布局、将每个绘图动作与语音同步,并进行渲染。

research → spec.js per lecture → build.sh (extract → TTS → scenes.js) → qa.sh (stills) → fix → render_lecture.sh → zip + deliver

风格规则(不可协商)

  1. 语速 ≈ 1.2倍,绝不更快。 API 语音:先修剪静音,然后对表现力强的声音使用 ATEMPO=1.05,对语速慢的声音使用 ATEMPO=1.12。节拍之间留 0.2 秒间隙。1.25 倍以上会显得匆忙。
  2. 手工质感。 使用 Reenie Beanie 字体并添加逐字母抖动;rough.js 线条(粗糙度 ≥1.4)加上 SVG 湍流抖动。只有“打印”的证据卡片(表格、真实数字)才使用干净的无衬线字体。
  3. 黑色背景,霓虹角色: w 主色,g 好/有效,p 问题/警告,v 概念,o 动作/类比,y 高亮/数字,b 次要,gr 引用/旁白。

教学结构(每个讲座)

  1. 钩子(20–40秒): 一个 relatable 的情景,然后一个令人惊讶的事实,再提出一个问题。接着是一个标题节拍,预览整个框架。
  2. 框架(LAYERS,3–7项): 脊柱。每节在右上角显示一个带有其层编号的小抄。
  3. 各节: 每个节 1–3 个节拍。每个节拍只有一个想法和一个视觉元素。在旁白中说出来源名称,并在屏幕上以灰色显示。
  4. 直觉: 每节至少为一个抽象概念提供一个 analogy(“像烟雾报警器,而不是消防队”)。立即用通俗语言解释专业术语。
  5. 回顾与下集预告: 框架,已勾选的行,然后下一讲的标题,使整个课程连贯起来。

声音:就像同事边喝咖啡边解释。短句,“所以,”,“事情是这样的。”,“还记得 X 吗?”。按照口语方式写数字(“二零二六”,“一点七秒”)。避免在 say 中使用符号。

初学者友好模式(当要求让新手也能理解时):用自己的网络研究补充来源,为每个概念添加一个类比,并降低想法密度(每 3–4 分钟讲座约 500–650 词)。

准确性

对每个数字、日期和名称进行网络搜索。优先使用一手来源。将同一实验的数字保持在一起。标注供应商的说法(“供应商数据:请验证”)。切勿虚构书中未给出的示例;引用书中的原话。提供来源列表。

设置

在 ~/course 目录下工作,该目录是本技能 engine/ 文件夹的一份副本,这样音频和视频文件就不会存放在技能文件夹中。如果 ~/course 已存在,则跳过复制。

cp -r <this skill's folder>/engine ~/course && cd ~/course   # 例如 ~/.claude/skills/course-generator-handwritten/engine
npm i && npm run browsers        # Playwright + Chromium(需要 Node 20+)
pip install --break-system-packages soundfile numpy
cp .env.example .env             # 在 .env 中填写 TTS_*(切勿提交它)

必须安装 ffmpeg。讲座文件夹(~/course/L02_Architecture/spec.js)与脚本位于同一目录;可以从任何目录调用脚本。

TTS 可插拔(tts.py):任何兼容 OpenAI 的 POST /audio/speech,且返回 response_format: "pcm"(24 kHz s16le)。通过环境变量或 .env 配置 TTS_URL、TTS_API_KEY、TTS_MODEL 和 TTS_VOICE。选择声音时,请用 2–3 种声音测试同一个节拍,挑选最有表现力的(音高方差最大),而不是第一个。每个节拍的音频会附带文本 sidecar 进行缓存,因此只有编辑过的节拍才会重新生成语音。切勿在已提交的文件中硬编码密钥或模型名称。

编写讲座:<Dir>/spec.js

const LECT = { label: '讲座 2 · 幕后', title: '七层架构' };
const LAYERS = ['通道与触发器', '网关', '持久协调器', '代理循环'];
say({ hook: "…", title: "…", recap: "…", outro: "接下来,…" });          // 注册介绍/回顾节拍
intro('S01_Intro', 'hook', 'title', [ items… ]);
section('S02_Gateway', 1 /*层索引*/, 'v' /*颜色*/, [
  { b: 'ga1', t: '前门', cite: '来源,2026', say: "旁白…", v: [ items… ] },
]);
recap('S06_Recap', 'recap', 'outro', ['行', '行'], '下一讲标题');

每个节拍都有自己独立的面板,相机在不同面板之间平移。布局会自动缩放以适应内容。

Items [type, ...args, opts?]:

类型参数
big / textstr, colour, size
notestr, colour(带箭头前缀的旁白)
analogynull, str, 'o'(带框的“可以这样理解…”)
list`[lines], colour, {num
coltitle, colour, [lines](在 row 内部使用)
row[[item],[item]…], {vs, gap}(并排)
flow[labels], [colours](带箭头的框)
stack[labels], {rh,size,w,cols,step}
tokens[words], colour, {step, cols}(自动换行)
bars / hbars`[[label, value, colour, valueLabel]…], {h
eqstr, colour(带下划线的标题数字)
cardtitle, rows[][], {w, hi:[rowIdx], hit:[time]}(打印的表格;第 0 行是表头)
chart[[[x,y]…], colour, label]…], {h, xl, yl}
timeline / grid / gpus / people / down参见 dsl.js

Timing opts(最后一个对象):at: 'word' 使该元素在该单词被说出时开始(occ: 2 表示第二次出现);times: [[beat, frac, 'f'], …] 设置每个部分的时序为节拍的一部分;step 使各部分交错开始。起始时间会被限制,确保绘制在节拍结束前至少 2.6 秒完成。允许的 opt 键在 dsl.js(OPTK)中白名单;未知键会被视为数据,因此需要在那里添加新键。

构建、质量检查、渲染

./build.sh L02_Architecture            # beats.json, TTS, scenes.js;输出语音分钟数
./qa.sh L02_Architecture               # 节拍结束时定格画面平铺到 L02_Architecture/qa/sheet*.jpg
./render_lecture.sh L02_Architecture "02 - 七层架构"   # 2 条并行通道 → out/*.mp4 + .srt

在每个讲座渲染之前运行 QA 并检查每个画面。修复:

  • 标签溢出框(引擎会缩小字体,但长标签仍需缩短);
  • 卡片高亮显示在错误行(将表头计为第 0 行);
  • 内容超出画面;
  • at 单词不存在(日志中出现 WORDMISS)。

对于多讲座,使用队列:每个目录一个 READY 标志,一次渲染一个,当 scenes.js 比 MP4 新时重新渲染。在云端,完成一个讲座大约需要 3–4 分钟渲染。后台作业必须通过 harness 跟踪(不要在可能休眠的 VM 上使用 nohup)。

交付

压缩 out/*.mp4 + *.srt,使用带编号和标签的文件名(“00 - Title.mp4”)。在回复中提供运行时表格、一行方法说明以及来源。

示例

examples/agents-L00-spec.js(概念讲座)和 examples/inference-B4-spec.js(证据密集型讲座)是完整的、已渲染的 spec 文件,可供复制参考。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

field-marketing-event-strategy

Builds a researched, pipeline-led event strategy for a named company across named regions, covering which hosted events, trade shows, conferences and webinars to run or skip, why, and how to execute them (contracts, on-site, follow-up) with concrete pre- and post-event plays with sales. Use whenever the user names a company and asks which events it should attend, sponsor or host, or wants a field marketing plan, an event calendar or event budget for a region, trade show or conference selection, a webinar programme, or event follow-up with sales, even if they never say "strategy" or "field marketing".

gtm-automation-architect

Senior go-to-market automation architect and GTM engineer. Plans the vision, maps what goes where, designs, builds, tests and optimises GTM automation stacks and agentic workflows across Clay, Cargo, Outreach, HubSpot Breeze, Salesforce, n8n, Make, Zapier, Crossbeam, event platforms and AI agents. Use whenever the user wants to remove manual work from events, partner communications, product marketing, outbound, inbound routing or enrichment; decide which tool should own which job; design or debug a Clay table, Cargo play, Outreach Agent Studio workflow or n8n agent; build an automation roadmap for a company or growing programme; estimate or cut credit, Actions or execution spend; or test whether a workflow meets the business expectation — even if they never say "GTM engineering" or name a tool.

marketing-performance-audit

Audit a named company's marketing and demand generation from public evidence (ad libraries, organic social, website, search, press, reviews, events, job ads) and turn it into strategy for a given role and industry. Use whenever the user asks what a company is doing in marketing, wants a competitor teardown, is preparing an agency pitch, or is researching a company's marketing before an interview, even if they never say "audit".

martech-stack-audit

Audits a company's website to identify the marketing, sales and data tools behind it (advertising pixels, tag managers, analytics, marketing automation and email, CRM and lead-capture forms, chat, personalisation and A/B testing, reviews and loyalty, e-commerce, payments and subscriptions, consent management, CMS, hosting and CDN) and reports every tool with the evidence it was found in and a confidence rating of confirmed, likely or inferred. Use whenever the user gives a website URL or company domain and asks what tools, tech stack, martech, tracking, pixels, platforms or software it uses, wants a BuiltWith- or Wappalyzer-style lookup, or is researching a prospect, competitor, client or prospective employer's marketing set-up, even if they never say "audit".

相关技能