Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
hamsterider-m avatar

Bilibili Subtitle

  • 1.4k installs
  • Updated April 17, 2026
  • hamsterider-m/personal-skills

This is a copy of bilibili-subtitle by hamsterider-m - installs and ranking accrue to the original listing.

bilibili-subtitle is an agent-invokable skill that extracts or transcribes Bilibili video subtitles into structured outputs for developers who trigger it with bilibili.com URLs, BV IDs, or 提取B站字幕 requests.

About

bilibili-subtitle in hamsterider-m/personal-skills is a user-invocable agent skill for Bilibili caption and transcript extraction. It detects native or AI subtitles, falls back to ASR when missing, and emits SRT, VTT, Markdown, summaries, and JSON. Quick-reference commands include pixi run python -m bilibili_subtitle --check for preflight, basic extraction by BV ID, fast mode with --skip-proofread --skip-summary, --json-output, and bilingual --output-lang zh+en. Triggers cover bilibili.com URLs, BV IDs like BV1xxx, and Chinese requests such as 提取B站字幕. Developers reach for this skill when agents must automatically pull Chinese video text into notebooks, summaries, or downstream RAG pipelines.

  • Fetches and processes Bilibili video metadata and subtitle tracks
  • Generates accurate timed subtitles using LLM-powered transcription
  • Supports direct upload or export of subtitle files compatible with Bilibili
  • Automates the full subtitle workflow for video creators

Bilibili Subtitle by the numbers

  • 1,354 all-time installs (skills.sh)
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/hamsterider-m/personal-skills --skill bilibili-subtitle

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.4k
Security audit1 / 3 scanners passed
Last updatedApril 17, 2026
Repositoryhamsterider-m/personal-skills

How do agents extract Bilibili subtitles on request?

Automatically generate or synchronize subtitles for Bilibili video content using AI assistance.

Who is it for?

Developers who want a user-invocable agent skill with documented pixi CLI commands for Bilibili transcript extraction.

Skip if: Repositories that already install the standalone hamsterider-m/bilibili-subtitle repo and do not need the personal-skills wrapper.

When should I use this skill?

The user sends a bilibili.com URL, BV ID, or asks to 提取B站字幕 or transcribe a Bilibili video.

What you get

Subtitle files, Markdown transcripts, structured summaries, or JSON payloads from Bilibili video input.

  • JSON transcript output
  • Markdown transcript
  • bilingual subtitle text

By the numbers

  • Documents 5 quick-reference CLI task commands in its manifest
  • Supports bilingual zh+en output via --output-lang flag

Files

SKILL.mdMarkdownGitHub ↗

Bilibili 字幕提取工具

从 Bilibili 视频提取字幕,支持 AI 字幕检测和 ASR 转录回退。

Quick Reference

任务命令
前置检查pixi run python -m bilibili_subtitle --check
基本提取pixi run python -m bilibili_subtitle "BV1234567890"
快速模式pixi run python -m bilibili_subtitle "URL" --skip-proofread --skip-summary
JSON 输出pixi run python -m bilibili_subtitle "URL" --json-output
双语输出pixi run python -m bilibili_subtitle "URL" --output-lang zh+en

执行层级

┌─────────────────────────────────────────────────────────┐
│ Layer 0: Preflight Check (前置检查)                      │
│   --check → 验证 BBDown/API Keys/登录状态               │
├─────────────────────────────────────────────────────────┤
│ Layer 1: Video Detection (视频检测)                      │
│   URL → BBDown → 字幕存在性检测                         │
├─────────────────────────────────────────────────────────┤
│ Layer 2: Content Extraction (内容提取)                   │
│   有字幕 → 加载 SRT → 校对                               │
│   无字幕 → 下载音频 → ASR 转录 → 校对                    │
├─────────────────────────────────────────────────────────┤
│ Layer 3: Enhancement (增强处理)                          │
│   校对(ANTHROPIC_API_KEY) → 摘要(ANTHROPIC_API_KEY)     │
└─────────────────────────────────────────────────────────┘

前置条件检查

必须先运行,验证环境配置:

pixi run python -m bilibili_subtitle --check

输出示例:

✅ BBDown: Installed (1.6.3)
✅ BBDown Auth: Logged in
✅ ffmpeg: Installed
⚠️  ANTHROPIC_API_KEY: Not set (required for proofreading)
⚠️  DASHSCOPE_API_KEY: Not set (required for ASR)
✅ Python Dependencies: All installed

JSON 格式输出(便于父 skill 解析):

pixi run python -m bilibili_subtitle --check --check-json

错误分级

CodeLevel说明修复建议
E001FATALBBDown 未安装./install.sh
E002FATALBBDown 未登录BBDown login
E003RECOVERABLE下载失败检查 URL/网络
E004RECOVERABLE无字幕自动触发 ASR
E005FATALASR 未配置设置 DASHSCOPE_API_KEY
E006RECOVERABLEAI 功能未配置使用 --skip-* 或设置 API Key
E007FATALffmpeg 未安装pixi install
E008FATALURL 无效提供正确的 BV/URL
E010FATAL视频不存在检查视频是否删除/私有

退出码

  • 0 - 成功
  • 1 - 致命错误(FATAL)
  • 2 - 可恢复错误(RECOVERABLE,部分完成)
  • 3 - 部分成功(有警告)

作为子 Skill 的调用契约

标准调用

pixi run python -m bilibili_subtitle "<URL>" \
  -o /tmp/bilibili_output \
  --skip-summary \
  --json-output

成功判定

1. 退出码为 02 2. 输出目录存在 *.transcript.md

JSON 输出结构

{
  "exit_code": 0,
  "success": true,
  "output": {
    "video_id": "BV1xxx",
    "title": "视频标题",
    "files": {
      "transcript": "/path/to/xxx.transcript.md",
      "srt": "/path/to/xxx.srt",
      "vtt": "/path/to/xxx.vtt",
      "summary_json": null
    }
  },
  "warnings": [],
  "errors": []
}

父 Skill 集成示例

from bilibili_subtitle import build_cli_command, ExitCode

cmd = build_cli_command(
    "BV1xxx",
    output_dir="/tmp/output",
    skip_proofread=True,
    skip_summary=True,
)
# ['pixi', 'run', 'python', '-m', 'bilibili_subtitle', 'BV1xxx', ...]

输出文件

output/
├── {title}.srt          # SRT 字幕
├── {title}.vtt          # VTT 字幕
├── {title}.transcript.md   # Markdown 逐字稿
├── {title}.summary.json    # 结构化摘要 (可选)
└── {title}.summary.md      # 摘要 Markdown (可选)

API Keys

KeyProvider用途必需性
ANTHROPIC_API_KEYAnthropic校对/摘要推荐
DASHSCOPE_API_KEY阿里云ASR 转录无字幕时必需

安装

cd ~/.agents/skills/bilibili-subtitle
./install.sh
BBDown login  # 扫码登录

详细文档

  • references/preflight.md - 前置检查详解
  • references/errors.md - 错误处理指南
  • references/contract.md - 子 Skill 契约
  • references/agents.md - AI Agent 配置

---

版本: v0.2.0

Related skills

How it compares

Use this personal-skills wrapper when agents need manifest triggers and quick-reference commands; install the standalone repo for full install.sh and orchestrator docs.

FAQ

What triggers bilibili-subtitle in personal-skills?

bilibili-subtitle activates on bilibili.com URLs, BV IDs like BV1xxx, or Chinese requests such as 提取B站字幕, and is marked user-invocable in the skill manifest.

What CLI command runs bilibili-subtitle extraction?

bilibili-subtitle runs via pixi run python -m bilibili_subtitle with a URL or BV ID, plus optional flags like --json-output, --output-lang zh+en, and --skip-proofread.

Is Bilibili Subtitle safe to install?

skills.sh reports 1 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

AI & Agent Buildingagentsautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.