🎬 哔哩哔哩视频转文档 | Claude Code Skill: 自动将B站视频AI字幕提取为结构化Markdown文档
# Add to your Claude Code skills
git clone https://github.com/programmerloverun/bilibili-to-docGuides for using ide extensions skills like bilibili-to-doc.
bilibili-to-doc is an open-source ide extensions skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by programmerloverun. 🎬 哔哩哔哩视频转文档 | Claude Code Skill: 自动将B站视频AI字幕提取为结构化Markdown文档. It has 62 GitHub stars.
bilibili-to-doc's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/programmerloverun/bilibili-to-doc" and add it to your Claude Code skills directory (see the Installation section above). bilibili-to-doc ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
Yes. SkillsLLM lists many other IDE Extensions skills you can browse and compare side by side. Open the IDE Extensions category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh bilibili-to-doc against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Extract Bilibili video content into a structured Markdown document by: (1) downloading AI-generated subtitles via yt-dlp with browser cookies, (2) parsing the SRT subtitle file, (3) reorganizing the transcript into a logical, well-structured document with sections, tables, and code blocks.
Trigger this skill when the user:
yt-dlp must be installed: pip3 install yt-dlpUse yt-dlp with browser cookies to download the AI Chinese subtitles:
yt-dlp --cookies-from-browser chrome "<BILIBILI_URL>" \
--write-subs --sub-lang ai-zh \
--skip-download \
-o "/tmp/bilibili_output"
Also get the video title:
yt-dlp --cookies-from-browser chrome "<BILIBILI_URL>" \
--print "%(title)s" --skip-download 2>&1 | tail -1
If chrome browser cookies are not available, try safari, firefox, or edge.
Read the downloaded .ai-zh.srt file, then:
Generate a Markdown document following this structure (from reference template):
# {Video Title}
> 来源:B站视频 {BV号} | 主讲:{author}
---
## 一、{Topic Overview}
{Summary of what the video covers}
## 二、{Main Content Sections}
{Organized by logical topic divisions}
## N、总结
{Key takeaways}
Save to the user's Desktop by default: ~/Desktop/{Video_Title}.md
See references/doc-template.md for the full document template.
一个 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.