Skip to content

Commit be8fbf0

Browse files
committed
refactor(bilibili-analyzer): simplify to core video preparation workflow
- Remove complex analysis pipeline (frame similarity, audio transcription, Claude CLI integration) - Delete 17 specialized analysis scripts, keeping only prepare.py for video download and frame extraction - Simplify skill description to focus on video-to-document conversion workflow - Update SKILL.md with new 3-step workflow: download/extract → analyze frames → generate docs - Reduce tags from 11 to 6, removing implementation-specific technologies - Change version from 2.0.0 to 3.0.0 reflecting architectural shift - Consolidate file manifest from 20+ files to just prepare.py and SKILL.md - Refocus tool purpose from automated frame analysis to AI-powered content reorganization - Emphasize output quality (structured tutorials/documentation) over technical metrics
1 parent 6ab10eb commit be8fbf0

26 files changed

Lines changed: 218 additions & 9348 deletions

skills/index.json

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,10 @@
330330
{
331331
"slug": "tools/bilibili-analyzer",
332332
"name": "Bilibili Analyzer",
333-
"summary": "自动分析B站视频内容,提取关键帧,使用Claude Code AI分析并生成带截图的Markdown总结报告",
334-
"description": "Bilibili视频分析器是一个自动化视频内容分析工具。提供B站视频URL后,系统会自动下载视频、每秒提取1帧图片、智能合并相似帧、提取音频并转文字、使用Claude Code CLI逐帧分析,并生成包含截图和时间戳的Markdown总结报告。支持相似帧检测、音频转录、断点续传等高级功能",
333+
"summary": "自动分析B站视频内容,下载视频并拆解成帧图片,使用AI分析并生成详细的专题文档或实操教程",
334+
"description": "B站视频内容分析工具。提供视频URL后,使用脚本下载视频并拆解成帧图片,然后AI分析内容,生成高质量的专题文档或实操教程。不是时间线流水账,而是重新组织整理成完整文档",
335335
"visibility": "public",
336-
"tags": ["bilibili", "video-analysis", "ai", "frame-extraction", "markdown", "automation", "yt-dlp", "ffmpeg", "chinese", "claude-code", "whisper"],
336+
"tags": ["bilibili", "video-analysis", "ai", "frame-extraction", "markdown", "tutorial"],
337337
"services": {
338338
"codex": { "compatible": true },
339339
"claudecode": { "compatible": true }
@@ -345,29 +345,11 @@
345345
"basePath": "skills/tools/bilibili-analyzer",
346346
"files": [
347347
{ "path": "SKILL.md", "sha256": "PENDING" },
348-
{ "path": "references/installation.md", "sha256": "PENDING" },
349-
{ "path": "references/faq.md", "sha256": "PENDING" },
350-
{ "path": "examples/basic-usage.md", "sha256": "PENDING" },
351-
{ "path": "scripts/__init__.py", "sha256": "PENDING" },
352-
{ "path": "scripts/main.py", "sha256": "PENDING" },
353-
{ "path": "scripts/models.py", "sha256": "PENDING" },
354-
{ "path": "scripts/exceptions.py", "sha256": "PENDING" },
355-
{ "path": "scripts/url_parser.py", "sha256": "PENDING" },
356-
{ "path": "scripts/metadata_fetcher.py", "sha256": "PENDING" },
357-
{ "path": "scripts/video_downloader.py", "sha256": "PENDING" },
358-
{ "path": "scripts/frame_extractor.py", "sha256": "PENDING" },
359-
{ "path": "scripts/frame_similarity.py", "sha256": "PENDING" },
360-
{ "path": "scripts/audio_extractor.py", "sha256": "PENDING" },
361-
{ "path": "scripts/audio_transcriber.py", "sha256": "PENDING" },
362-
{ "path": "scripts/claude_cli_analyzer.py", "sha256": "PENDING" },
363-
{ "path": "scripts/incremental_report.py", "sha256": "PENDING" },
364-
{ "path": "scripts/ai_analyzer.py", "sha256": "PENDING" },
365-
{ "path": "scripts/report_generator.py", "sha256": "PENDING" },
366-
{ "path": "scripts/logger.py", "sha256": "PENDING" }
348+
{ "path": "scripts/prepare.py", "sha256": "PENDING" }
367349
]
368350
},
369-
"version": "2.0.0",
370-
"buildId": "20260128.1",
351+
"version": "3.0.0",
352+
"buildId": "20260128.3",
371353
"status": "active",
372354
"updatedAt": "2026-01-28T00:00:00Z"
373355
}

skills/tools/bilibili-analyzer/SKILL.md

Lines changed: 79 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: bilibili-analyzer
3-
description: 自动分析B站视频内容,提取关键帧,使用Claude Code AI分析并生成带截图的Markdown总结报告
3+
description: 自动分析B站视频内容,下载视频并拆解成帧图片,使用AI分析并生成详细的专题文档或实操教程
44
metadata:
55
short-description: B站视频AI分析工具
66
source:
@@ -12,94 +12,111 @@ source:
1212

1313
## Description
1414

15-
自动化B站视频内容分析工具。提供视频URL后,系统自动:
16-
1. 下载视频
17-
2. 每秒提取1帧图片
18-
3. 智能合并相似帧,减少冗余
19-
4. 提取音频并转文字(可选)
20-
5. 使用 Claude Code CLI 逐帧分析
21-
6. 生成带截图和时间戳的 `视频分析报告.md`
15+
B站视频内容分析工具。提供视频URL后,自动下载视频、拆解成帧图片,然后使用AI分析内容,最终生成**高质量的专题文档或实操教程**
16+
17+
**核心特点**:
18+
- 不是简单的时间线记录,而是**重新组织整理**成一篇完整的文档
19+
- 实操类视频 → 生成**可直接使用的操作教程**
20+
- 知识类视频 → 生成**结构化的专题文档**
21+
- 报告中插入关键截图,使用 `![描述](./images/frame_xxxx.jpg)` 格式
2222

2323
## Trigger
2424

25-
- `/bilibili` 命令
25+
- `/bilibili-analyzer` 命令
2626
- 用户请求分析B站视频
27-
- 用户提供B站视频链接
27+
- 用户提供B站视频链接并要求分析
28+
29+
## Workflow
30+
31+
### Step 1: 下载视频并拆帧
2832

29-
## Usage
33+
使用提供的脚本下载视频并拆解成帧图片:
3034

3135
```bash
32-
# 基本用法(每秒1帧,自动合并相似帧)
33-
python scripts/main.py "https://www.bilibili.com/video/BV1xx411c7mD"
36+
python scripts/prepare.py "<视频URL>" -o <输出目录>
37+
```
3438

35-
# 自定义帧间隔(每2秒1帧)
36-
python scripts/main.py "https://www.bilibili.com/video/BV1xx411c7mD" -i 2
39+
参数说明:
40+
- `-o, --output`: 输出目录,默认当前目录
41+
- `--fps`: 每秒提取帧数,默认1(长视频可用0.5或0.2)
3742

38-
# 禁用音频分析(更快)
39-
python scripts/main.py "https://www.bilibili.com/video/BV1xx411c7mD" --no-audio
43+
执行后会生成:
44+
- `video.mp4` - 下载的视频
45+
- `images/` - 帧图片目录
4046

41-
# 调整相似帧阈值(0.9 = 更激进的合并)
42-
python scripts/main.py "https://www.bilibili.com/video/BV1xx411c7mD" -s 0.9
47+
### Step 2: 分析帧图片
4348

44-
# 指定输出目录
45-
python scripts/main.py "https://www.bilibili.com/video/BV1xx411c7mD" -o ./output
49+
使用 Task 工具并行分析 `images/` 目录中的图片,提取界面内容、文字、操作步骤等信息。
4650

47-
# 短链接
48-
python scripts/main.py "https://b23.tv/xxxxx"
49-
```
51+
### Step 3: 生成文档
5052

51-
## Parameters
53+
将分析结果**重新组织整理**`视频分析.md`
54+
- 实操类视频 → 操作教程格式
55+
- 知识类视频 → 专题文档格式
5256

53-
| 参数 | 说明 | 默认值 |
54-
|------|------|--------|
55-
| `url` | B站视频URL(必需) | - |
56-
| `-i, --interval` | 帧提取间隔(秒) | 1 |
57-
| `-m, --max-frames` | 最大帧数(0=不限制) | 0 |
58-
| `-s, --similarity` | 相似帧检测阈值(0-1) | 0.95 |
59-
| `-o, --output` | 输出目录 | ./bilibili |
60-
| `--no-audio` | 禁用音频提取和转录 | false |
61-
| `--whisper-model` | Whisper模型大小 | base |
62-
| `--language` | 音频语言代码 | zh |
63-
| `--scene-detection` | 启用场景变化检测 | false |
64-
| `--resume` | 断点续传 | false |
57+
**重要**: 不要按时间线流水账,要像写文章一样组织内容。
6558

66-
## Output Structure
59+
## 输出格式
6760

68-
```
69-
bilibili/{video_title}/
70-
├── 视频分析报告.md # 主报告文件
71-
├── images/ # 帧图片目录
72-
│ ├── frame_000001.jpg
73-
│ ├── frame_000002.jpg
74-
│ └── ...
75-
├── audio/ # 音频文件目录
76-
│ └── audio.wav
77-
├── transcript.json # 音频转录结果
78-
└── manifest.json # 帧清单
61+
### 实操教程类
62+
63+
```markdown
64+
# {教程主题}
65+
66+
## 简介
67+
{教程目标和前置条件}
68+
69+
## 环境准备
70+
{需要的软件和配置}
71+
72+
## 操作步骤
73+
74+
### 1. {步骤标题}
75+
{说明}
76+
![截图](./images/frame_xxxx.jpg)
77+
78+
### 2. {步骤标题}
79+
...
80+
81+
## 完整代码
82+
{汇总代码}
83+
84+
## 总结
85+
{核心要点}
7986
```
8087

81-
## Requirements
88+
### 知识文档类
8289

83-
- **FFmpeg**: 帧提取和音频提取必需
84-
- **Python**: requests, yt-dlp, Pillow, imagehash
85-
- **Claude Code CLI**: AI分析必需(`claude` 命令)
86-
- **Whisper** (可选): 音频转文字(`pip install openai-whisper``pip install faster-whisper`
90+
```markdown
91+
# {主题}
8792

88-
详细安装说明见 [references/installation.md](references/installation.md)
93+
## 概述
94+
{主题介绍}
8995

90-
## References
96+
## {章节标题}
97+
{内容}
98+
![配图](./images/frame_xxxx.jpg)
99+
100+
## 核心要点
101+
{总结}
102+
```
103+
104+
## Requirements
91105

92-
- [安装指南](references/installation.md) - 系统依赖和Python包安装
93-
- [常见问题](references/faq.md) - FAQ和错误处理
94-
- [改进计划](docs/plans/improvement-plan.md) - 开发计划文档
106+
- **yt-dlp**: `pip install yt-dlp`
107+
- **ffmpeg**: https://ffmpeg.org/download.html
95108

96-
## Examples
109+
## 文档质量要求
97110

98-
- [基本使用示例](examples/basic-usage.md) - 常用场景和命令示例
111+
1. **不要时间线流水账** - 重新组织内容
112+
2. **结构清晰** - 有章节划分和逻辑顺序
113+
3. **配图恰当** - 路径用 `./images/frame_xxxx.jpg`
114+
4. **代码完整** - 可直接复制使用
115+
5. **独立可读** - 不看视频也能理解
99116

100117
## Tags
101118

102-
`bilibili`, `video-analysis`, `ai`, `frame-extraction`, `markdown`, `claude-code`
119+
`bilibili`, `video-analysis`, `ai`, `frame-extraction`, `markdown`, `tutorial`
103120

104121
## Compatibility
105122

skills/tools/bilibili-analyzer/scripts/__init__.py

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)