Skip to content
Education
Skill

/lecture-to-md

把课堂视频(本地或 B 站/YouTube)、文字稿、课件三者(任意组合)整理成一份详细的中文 Markdown 课堂笔记,输出按课程标题命名的 `{title_name}.md`(首行为 `# 文档标题`)+ 相对路径图片。Markdown 工作流,与上游 `lecture-to-notes` 的 LaTeX/PDF 输出并行存在;上游 skill 完全不动。触发词:markdown 笔记、md 笔记、视频转 markdown、Markdown 讲义、不要 LaTeX、不要 PDF、纯文本笔记。

From plugin
lecture-to-notes
3195 skills

Claude Code

$ npx -y skills add ysyecust/lecture-to-notes --skill lecture-to-md --agent claude-code

SKILL.md

lecture-to-md.SKILL.md
name: lecture-to-md
description: 把课堂视频(本地或 B 站/YouTube)、文字稿、课件三者(任意组合)整理成一份详细的中文 Markdown 课堂笔记,输出按课程标题命名的 `{title_name}.md`(首行为 `# 文档标题`)+ 相对路径图片。Markdown 工作流,与上游 `lecture-to-notes` 的 LaTeX/PDF 输出并行存在;上游 skill 完全不动。触发词:markdown 笔记、md 笔记、视频转 markdown、Markdown 讲义、不要 LaTeX、不要 PDF、纯文本笔记。

Lecture to Notes (Markdown)

把课堂视频(本地或 B 站/YouTube)、文字稿、课件三者(任意组合)整理成一份详细的中文 Markdown 课堂笔记,输出按课程标题命名的 `{title_name}.md`(首行为 `# 文档标题`)+ 相对路径图片。**作为上游 `lecture-to-notes` LaTeX/PDF 流的 Markdown 平行方案;本 skill 与上游 skill 完全独立,不修改也不依赖上游 skill 的脚本。**

> **子代理分工**:素材获取(下载/ASR/抽帧/课件转 PNG)委派 **S0** 子代理并行做;主代理通读文字稿定死一级标题结构 + **建证据表**(Phase 2.4),切素材(文字稿切片 / 帧按时段分目录 / 课件标页码)委派 **S1** 子代理做;然后每个撰写子代理领 1–3 个 H1 并行撰写 → 主代理汇总 → **对照文字稿重排目录结构**(只改标题、不动正文)→ **跑预交付门禁到 `OVERALL PASS`**(Phase 6.5)→ 交付。

> 切分与素材委派见 [`references/splitting.md`](references/splitting.md),派发与汇总见 [`references/subagent-workflow.md`](references/subagent-workflow.md),结构重排见 [`references/structure-reorder.md`](references/structure-reorder.md),门禁见 [`scripts/verify_notes_md.py`](scripts/verify_notes_md.py)。

与 LaTeX 版的区别

| | lecture-to-notes (LaTeX) | 本 skill (Markdown) | | ----- | ------------------------ | --------------------- | | 输出 | `.tex` + PDF | `{title_name}.md` + 图片 | | 抽帧 | 每 15s(按章节) | 严格每 5s | | 选图 | 全帧 + contact sheet 看图选 | **同样 contact sheet 看图选 + 逐张核对图注**(`vision: yes` 时强制) | | 配图优先级 | 视频帧 | 课件截图 > 视频帧 | | 证据表 | `teaching_atoms` / `numerical_claims` / `profile` | **同左**(Phase 2.4) | | 结构配额 | 密度/章节/公式/框多道门禁 | **同左,按 Markdown 重写**(Phase 5.0) | | 验收 | `verify_notes.py` → `OVERALL PASS` | `scripts/verify_notes_md.py` → `OVERALL PASS` | | 编译 | xelatex(两遍) | 无需编译(门禁代替编译日志检查) |

子技能(asr 与云端转写)

本 skill 包内自带两个 ASR 子 skill,**默认走本地 ASR(见下「ASR 选型」一节)**:

| 子 skill 路径 | 何时用 | | ---------------------------------------- | -------------------------------------------------------------------- | | [`local-asr/`](../local-asr/SKILL.md) | **默认**。无字幕时全文转写 / 短片段核验。已在 **macOS Apple Silicon**、**Linux ARM64**(CPU)与 **Windows**(PowerShell 5.1,CPU)端到端跑通。 | | [`volcengine-asr/`](../volcengine-asr/SKILL.md) | 备用。火山引擎豆包 BigASR / 豆包 2.0,需要 APP ID + Token;长音频首选异步模式 |

调用约定见各子 skill 的 SKILL.md,本 SKILL.md 不重复列参数。

ASR 选型

  • **首选 `local-asr/`**(sherpa-onnx X-ASR,跨平台路径齐备,int8 量化 + Apple Silicon AMX 矩阵加速 ~100× 实时);调用时默认带 `--timestamps`,以保留字幕时间轴。
  • 若用户已自带文字稿(火山引擎豆包、飞书妙记等),**跳过 ASR**,直接走 Phase 1 的文字稿核验。
  • 火山引擎走 `volcengine-asr/`,把产出的 `transcript.txt` 当作 S0-a 的产物继续。

Dependencies

跨平台检查命令是否就位,缺则按平台提示用户安装(具体安装命令见各子 skill 的 setup 脚本):

| 平台 | 检查命令 | 备注 | | ------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------------- | | macOS / Linux shell | `which <cmd>` 或 `command -v <cmd>` | 沙箱 PATH 可能不含 `/opt/homebrew/bin`(macOS)/ `/usr/local/bin`(Linux),见「已知坑」#1 | | Windows PowerShell 5.1 / cmd | `where.exe <cmd>` | **`which` 不是 Windows 内建命令**,PowerShell 5.1 也没有该 alias;只有装了 Git for Windows / msys2 时才会有 `which.exe`(实测)。Windows 沙箱 PATH 可能不含 winget links / scoop shims / Chocolatey bin,见「已知坑」#1 |

最简做法:跑 `local-asr/scripts/common.py::require("<cmd>")`,它内部已经做了 `shutil.which` 兜底 + 按平台补齐常见 bin 目录(macOS `/opt/homebrew/bin`、Windows `winget links` / `%ProgramFiles%\ffmpeg\bin` / `~\scoop\shims` / `%ProgramData%\chocolatey\bin` 等),并返回**绝对路径**,避免子进程再吃 PATH 的亏。

| 工具 | 必需 | 用途 | | ----------------------- | -- | ------------------------------------------------------------- | | `yt-dlp` | ✓ | 视频/字幕/元数据下载(YouTube + Bilibili) | | `ffmpeg` | ✓ | 5s 抽帧、音频提取(`ffprobe` 随 ffmpeg 一起装,Phase 4 判时长要用) | | `python3` | ✓ | `clean_subs.py` | | `pdftoppm` | △ | 课件 PDF → PNG | | `soffice` (LibreOffice) | △ | 课件 PPT/PPTX → PDF | | `local-asr/` | △ | 无字幕时全文转写 / 前 1min 核验;默认加 `--timestamps` 出 srt/vtt 时间戳 | | `volcengine-asr/` | △ | 调用火山引擎豆包 ASR(需要凭据) | | `sherpa-onnx` (pip 包) | △ | `local-asr/` 后端依赖,首次跑 `bash ../local-asr/scripts/setup.sh` 自动装 | | `magick` (ImageMagick) | △ | 拼 contact sheet 选图(Phase 5.1);装不了就逐帧 `read`,慢但可行 |

已知坑(务必遵守)

0. **先实测图片通道,再决定怎么选图**:很多宿主(含 pi)的 `read` 工具读 PNG 会**直接把图片送进上下文**(返回 `Read image file [image/png]` 并附带画面)。**不要读工具描述、不要凭“它只读文本”的直觉下结论**——直接 `read` 一张 `frames/f_00001.png` 试一次。能读图 → `lecture_profile.json` 记 `"vision": "yes"`,配图必须逐张看过再写图注;读不到 → 记 `"vision": "no"`,走 SKILL 的启发式(帧稳定性 + 边缘密度)并在交付时明说图注未逐张核验。另注意 `fetch_content` 挡本地路径/回环地址(`Invalid URL` / `Blocked internal address`),那不是图片通道。

0b. **B 站字幕要登录 cookie;yt-dlp 不认的浏览器可以手动解**:无 cookie 时 `--list-subs` 只给 `danmaku`,登录后才出现 `ai-zh`(AI 字幕)。`--cookies-from-browser` 只认 chrome/edge/safari/firefox/vivaldi 等固定名单——用户默认浏览器可能是名单外的 Chromium 系(如 Dia):

# 1) 拷 cookie 库(别直接读原库,可能被锁)
cp ~/Library/Application\ Support/Dia/User\ Data/Default/Cookies /tmp/dia.db
# 2) 取 Keychain 里该浏览器的 Safe Storage 口令
security find-generic-password -s "Dia Safe Storage" -w
# 3) v10 解密:PBKDF2-SHA1(口令,"saltysalt",1003,16) → AES-128-CBC(IV=16 空格) → 去掉 32 字节 host hash 前缀
# 4) 导出 Netscape cookies.txt 后:yt-dlp --cookies /tmp/cookies.txt ...

先 `ls /Applications` 看用户装了什么浏览器,别只试常见四个。注意:B 站 AI 字幕本身也有错(把「互斥」听成「护士」),**只能当交叉校对,不要直接当底稿**。

0c. **不许自造比喻/框架/公式**:笔记只写课上讲到的内容 + 写作必需的组织件(标题、本章小结、过渡句)+ 显式标注的教材补充。自己

Read more
@ysyecust
Ships withlecture-to-notes

把 YouTube / Bilibili / X(Twitter) 的讲座视频,变成可编译的中文 LaTeX 讲义 PDF 与在线网页。 按读者问题重构章节,每张配图带原视频时间脚注,每个数值可追溯到字幕或画面。 左:Stanford CS336 Lecture 3《现代大语言模型架构与超参数》封面与第 6 页;右:B 站《HBM 高带宽内存的原理与制造》第 3、11 页。

Stars on GitHub

Momentum

stars in total
319
Star history of ysyecust/lecture-to-notes on GitHub, a chart by star-history.com

Other skills on lecture-to-notes.

local-asr

local-asr

把本地长视频/音频转写成文字稿 + 可选字幕,纯本地(不上传云端),用 sherpa-onnx X-ASR Zipformer transducer 模型(int8 量化、中英双语、自动标点)。已在 macOS Apple Silicon(int8 +…

volcengine-asr

volcengine-asr

Transcribe local audio or video with Volcengine Doubao file ASR, including BigASR 1.0 Turbo direct upload and asynchronous 1.0…

paper-to-html

paper-to-html

Generate a self-contained, beautifully styled HTML analysis of an academic paper. Use when the user provides an arXiv link, paper…

More skills from other plugins.

lesson-quiz

lesson-quiz

Test a learner on a single Claude Code tutorial lesson (01-10) with 10 questions, scoring answers and flagging weak spots. Use…

@luongnv89@luongnv89Install Skill
build-personal-skill

build-personal-skill

Evidence-based creation of a reusable personal course-making Skill from the user's own classroom and chat history. Use when the…

@thu-maic@thu-maicInstall Skill

Questions about lecture-to-md.

Which coding agents can use lecture-to-md?
lecture-to-md installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.