AgentStack
SKILL verified MIT Self-run

Bilibili To Doc

skill-programmerloverun-bilibili-to-doc-bilibili-to-doc · by programmerloverun

>

No reviews yet
0 installs
10 views
0.0% view→install

Install

$ agentstack add skill-programmerloverun-bilibili-to-doc-bilibili-to-doc

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Bilibili To Doc? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Bilibili Video to Document (B站视频提取文档)

Overview

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.

When to Use

Trigger this skill when the user:

  • Provides a bilibili.com video URL and asks to extract/converter it to a document
  • "提取B站视频内容" / "B站视频转文档" / "将视频转成文章"
  • "把这个B站视频整理成笔记"
  • "generate document from Bilibili video"

Prerequisites

  • yt-dlp must be installed: pip3 install yt-dlp
  • Browser cookies are needed for Bilibili access (Chrome or other browser)
  • Python 3.10+ for subtitle processing

Workflow

Step 1: Download Subtitles

Use yt-dlp with browser cookies to download the AI Chinese subtitles:

yt-dlp --cookies-from-browser chrome "" \
  --write-subs --sub-lang ai-zh \
  --skip-download \
  -o "/tmp/bilibili_output"

Also get the video title:

yt-dlp --cookies-from-browser chrome "" \
  --print "%(title)s" --skip-download 2>&1 | tail -1

If chrome browser cookies are not available, try safari, firefox, or edge.

Step 2: Parse SRT and Generate Document

Read the downloaded .ai-zh.srt file, then:

  1. Strip SRT formatting: Remove sequence numbers, timestamps, empty lines
  2. Merge consecutive lines: Combine fragmented subtitle lines into complete sentences
  3. Identify logical sections: The AI should read through the full transcript and identify:
  • Topic/theme divisions
  • Step-by-step procedures
  • Key concepts and definitions
  • Configuration examples / code blocks
  1. Structure the document with proper heading hierarchy

Step 3: Document Structure

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}

Step 4: Save Output

Save to the user's Desktop by default: ~/Desktop/{Video_Title}.md

Document Writing Guidelines

  • Preserve technical details: Configuration code, SQL, JSON, YAML, shell commands should be formatted in code blocks
  • Use tables for comparisons: Feature comparisons, parameter lists, pros/cons
  • Bullet lists for key points: Use hierarchical bullet points for nested concepts
  • Add section numbers: Use Chinese numbered sections (一、二、三...) for main divisions
  • Keep code accurate: If the speaker mentions specific config/code, represent it faithfully
  • Add explanatory notes: Fill in gaps where the spoken word might be ambiguous without visuals
  • Trim filler content: Remove repeated phrases, verbal fillers (嗯, 啊, 这个), and self-promotion segments
  • Mark at the end: Add a disclaimer that the document is AI-generated from subtitles

Reference

See references/doc-template.md for the full document template.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.