SuperAPI AI Directory

bilibili-chapter-generator

General & other

View repository

Updated 10-16 01:33

About this skill

Bilibili Video Chapter Generator

Generate a chapter list for a Bilibili video based on the subtitle content; users can copy it directly to the Bilibili video editing page.

Bilibili Chapter Format Specifications

00:00 引言
01:23 第一部分标题
05:30 第二部分标题

Format requirements (Bilibili hard limits):

  • The first chapter must start from 00:00 start(this is mandatory)
  • Number of chapters: 3-10(must be > 2 and ≤ 10)
  • Chapter titles cannot contain special symbols(use of : : 、 , 。 ! ? 【】 () , etc. is prohibited)
  • Time format:MM:SS(minutes:seconds) or HH:MM:SS(hours:minutes:seconds)
  • One chapter per line:时间戳 章节标题
  • The interval between chapters must be ≥ 5 seconds

Workflow

Step 1: Get the SRT file

Ask the user for the SRT subtitle file path, or get it from the context.

Step 2: Parse the subtitle content

Call the srt-to-structured-data skill to parse the subtitles:

python3 ~/.claude/skills/srt-to-structured-data/scripts/parse_srt.py "<srt_file_path>" --stats

This will output:

  • The JSON structure of the subtitles (including time codes and text)
  • Statistics (total duration, number of subtitles, etc.)

Step 3: Analyze the subtitle content

Read the subtitle content and understand the video's:

  • Theme and structure
  • Content turning points
  • Key topic changes

Step 4: Generate the chapter list

Based on the user's described intent (if any) or automatic analysis, generate the chapter list:

  1. Identify content turning points: find topic changes and the positions where new paragraphs begin
  2. Determine chapter titles: concisely describe the content of that section (2-8 characters recommended)
  3. Validate time intervals: ensure the interval between adjacent chapters is ≥ 5 seconds
  4. Format the output: use the MM:SS 标题 format

Step 5: Output the result

Output the chapter list in plain text format so users can copy it directly:

00:00 开场介绍
02:15 核心概念讲解
08:30 实战演示
15:00 总结回顾

Usage Examples

User input:

帮我把 ./视频字幕.srt 转成B站章节

Or a more detailed request:

帮我生成B站章节,要求:
- 字幕文件:./demo.srt
- 大概分成 5-6 个章节
- 重点突出实战部分

Chapter Division Suggestions

Bilibili limit: 3-10 chapters (must be > 2 and ≤ 10)

  • Short videos (< 5 minutes): 3-4 chapters
  • Medium videos (5-15 minutes): 4-7 chapters
  • Long videos (> 15 minutes): 7-10 chapters

Notes

  1. The first chapter must be 00:00, named "Opening", "Introduction", or directly state the topic
  2. Special symbols are prohibited in chapter titles: colons, Chinese enumeration commas, commas, parentheses, etc. cannot be used; only pure Chinese/English/numbers
  3. Chapter titles should be concise and powerful, making it easy for viewers to quickly locate content (2-8 characters recommended, plain text)
  4. The last chapter can be "Summary", "Conclusion", or "Easter Egg"
  5. Avoid chapters that are too dense (intervals that are too short appear cluttered)
  6. The timestamp should use the start time of the subtitle segment, rounded down to the second
  7. The total number of chapters must be > 2 and ≤ 10, otherwise Bilibili will reject it

Chapter title examples

Correct example:

  • 00:00 开场介绍
  • 03:35 Agent演示加载skill流程
  • 05:39 环境配置
  • 08:38 源码解析

Incorrect example (contains special symbols):

  • 03:35 Agent演示:加载skill的流程 (contains a colon)
  • 05:39 环境准备、安装依赖 (contains an enumeration comma)
  • 08:38 代码解析(核心逻辑) (contains parentheses)