Are you the author? Sign in to claim
🎬 哔哩哔哩视频转文档 | Claude Code Skill: 自动将B站视频AI字幕提取为结构化Markdown文档
一个 Claude Code Skill,自动将 B 站视频的 AI 字幕提取并整理成结构化 Markdown 文档。非常适合快速将技术教程、知识分享类视频转化为可检索的笔记 / 参考文档。
A Claude Code skill that automatically extracts Bilibili video AI subtitles and reorganizes them into well-structured Markdown documents. Perfect for turning tech tutorials and educational videos into searchable, shareable written notes.
输入:一个 B 站视频链接
输出:一份结构化的教程文档,包含目录、代码块、表格、要点总结
| Before (原始字幕) | After (结构化文档) |
|---|---|
| 碎片化的逐句字幕,含时间戳 | 有章节标题、代码块、表格的 Markdown 文章 |
# 【IT老齐772】ETL中间件 SeaTunnel 快速上手
## 一、SeaTunnel 概述
### 1.1 什么是 SeaTunnel
SeaTunnel 是 Apache 孵化开源的 ETL 工具...
### 1.2 核心优势:简单易用
只要会写 SQL 语句,就能完成 ETL 的工作。
## 二、案例演示:MySQL → Redis 准实时同步
...
## 三、环境准备
### 3.2 Docker Compose 编排
- 1 个主节点(Master):负责管理和资源调度
- 2 个工作节点(Worker):具体执行数据处理任务
## 四、任务配置(HOCON 格式)
```hocon
{
source { MySQL-CDC { ... } }
transform { Sql { ... } }
sink { Redis { ... } }
}
</details>
---
## 安装 / Installation
### 前置依赖 / Prerequisites
- [Claude Code](https://claude.ai/code) CLI
- Python 3.10+
- `yt-dlp`(用于下载字幕 / for downloading subtitles)
- 浏览器(Chrome/Safari/Firefox/Edge 任一,用于读取 cookies 以访问 B 站)
```bash
pip3 install yt-dlp
# 克隆仓库到 Claude Code skills 目录
git clone https://github.com/programmerloverun/bilibili-to-doc.git ~/.claude/skills/bilibili-to-doc
安装后,在 Claude Code 对话中发送 B 站视频链接即可自动触发。
你:把这个B站视频整理成文档 https://www.bilibili.com/video/BV1v5TuzJE4v
Claude:正在下载字幕... 正在生成文档... ✅ 已保存到桌面
| 中文 | English |
|---|---|
| "提取B站视频" | "extract Bilibili video" |
| "B站视频转文档" | "convert Bilibili to doc" |
| "把这个B站视频整理成笔记" | "turn this Bilibili video into notes" |
或者直接粘贴 bilibili.com/video/BV... 链接并说明需求。
默认保存到桌面:~/Desktop/{视频标题}.md
B站视频链接
│
├─► yt-dlp + 浏览器 Cookies 下载 AI 中文字幕 (.srt)
│
├─► 解析 SRT,去除时间戳和编号,合并碎片句子
│
├─► AI 识别逻辑章节,将文字重组为结构化文档
│ ├─ 章节标题
│ ├─ 代码块(配置 / SQL / Shell)
│ ├─ 对比表格
│ └─ 要点总结
│
└─► 输出 Markdown 文件到桌面
safari / firefox / edgebilibili-to-doc/
├── SKILL.md # Skill 定义文件(Claude Code 加载入口)
├── references/
│ └── doc-template.md # 文档模板参考
├── README.md # 本文件
└── LICENSE # MIT License
编辑 SKILL.md 中的 Workflow 部分即可调整行为:
--sub-lang 参数(如 ai-en 获取英文字幕)references/doc-template.md 调整模板结构MIT © programmerloverun
欢迎提 Issue 和 PR!
如果你有好的改进建议(比如支持更多语言字幕、支持视频下载后本地转写等),欢迎一起完善。
Welcome to open Issues and PRs! Ideas like supporting more subtitle languages, offline speech-to-text fallback, etc. are all welcome.
1000+ skills curated from Anthropic, Vercel, Stripe, and other engineering teams
Agent harness performance optimization with skills, instincts, memory, and security
Design enforcement with memory — keeps your UI consistent across a project
Detects 37 AI writing patterns and rewrites text with human rhythm across 5 voice profiles