← 返回 Skills 市场
lava-chen

Bili Summary

作者 Xuanyu Chen · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
710
总下载
0
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install bili-summary
功能描述
Download Bilibili videos, extract or transcribe subtitles, and generate AI-powered detailed summaries using Gemini 2.5 Flash.
使用说明 (SKILL.md)

bili-summary

Bilibili (B站) video download, subtitle extraction, and AI summarization tool.

When to Use

USE this skill when:

  • "download Bilibili video"
  • "extract B站 subtitles"
  • "summarize B站 video"
  • "B站视频总结"
  • "bilibili transcription"
  • Any Bilibili video URL

Features

  • Get video info (title, duration, uploader)
  • Download B站 video (video + audio)
  • Extract subtitles (B站 CC subtitles)
  • Audio extraction + Whisper transcription (when no subtitles)
  • Gemini AI detailed summary (chapters + key content + key insights + conclusion)

Prerequisites

1. Install Dependencies

# Using miniconda3 (recommended)
~/miniconda3/bin/pip install yt-dlp faster-whisper

# Or using system Python (may require sudo)
pip install yt-dlp faster-whisper

2. Get Gemini API Key

This skill uses Google Gemini 2.5 Flash for AI summarization.

Steps:

  1. Visit https://aistudio.google.com/app/apikey
  2. Sign in with your Google account
  3. Click "Create API Key"
  4. Copy the generated key

Pricing: Gemini 2.5 Flash has generous free tier (15 RPM, 1M TPM)

3. Set Environment Variable

# Add to your ~/.bashrc or ~/.zshrc for permanent setup
echo 'export GEMINI_API_KEY="your-api-key-here"' >> ~/.bashrc
source ~/.bashrc

# Or set temporarily for current session
export GEMINI_API_KEY="your-api-key-here"

Quick Start

Full Workflow (Recommended)

# Download audio, transcribe, and summarize in one command
uv run {baseDir}/scripts/bili-summary.py "https://www.bilibili.com/video/BV1xx411c7mu" --action summary

Other Actions

# Get video info only
uv run {baseDir}/scripts/bili-summary.py "URL" --action info

# Download subtitle (if available)
uv run {baseDir}/scripts/bili-summary.py "URL" --action subtitle

# Download and transcribe audio only
uv run {baseDir}/scripts/bili-summary.py "URL" --action transcribe

# Download full video
uv run {baseDir}/scripts/bili-summary.py "URL" --action video

Options

Option Description Default
url Bilibili video URL (BV号或完整链接) required
--action Operation: info/subtitle/transcribe/video/summary summary
--output Output directory ~/openclaw/workspace/coding-agent/temp/bili-summary

Output Files

Default output: ~/openclaw/workspace/coding-agent/temp/bili-summary/

temp/bili-summary/
├── audio.m4a       # Downloaded audio (deleted after summary)
├── subtitle.txt    # Transcribed text (deleted after summary)
└── summary.txt    # AI summary content

Workflow

summary (full workflow)

  1. Get video info - yt-dlp fetches title, duration, uploader
  2. Try B站 subtitles - Call Bilibili API for CC subtitles
  3. Fallback to Whisper - If no subtitles, download audio + faster-whisper (tiny model) transcription
  4. AI Summary - Call Gemini 2.5 Flash API for detailed summary

Time Estimate

Step Time
Audio download ~15s
Whisper transcription (tiny) ~25s
Gemini summary ~5s
Total ~45s

API Configuration

Recommended API: Google Gemini

Alternative APIs (not implemented)

If you want to use other LLMs:

Note: Current implementation only supports Gemini. PRs welcome for other providers.

First-Time Setup Guide

Step 1: Install Python dependencies

# Check if miniconda3 exists
ls ~/miniconda3/bin/python

# Install dependencies
~/miniconda3/bin/pip install yt-dlp faster-whisper

# Or use uv
uv pip install yt-dlp faster-whisper

Step 2: Get API Key

  1. Go to https://aistudio.google.com/app/apikey
  2. Create new API key
  3. Copy the key

Step 3: Test the setup

# Set API key
export GEMINI_API_KEY="your-key-here"

# Test with a simple video
uv run {baseDir}/scripts/bili-summary.py "https://www.bilibili.com/video/BV1xx411c7mu" --action info

If you see JSON output with video title, duration, etc., you're ready!

Step 4: Run full summarization

uv run {baseDir}/scripts/bili-summary.py "https://www.bilibili.com/video/BV1xxx" --action summary

Troubleshooting

"No module named 'yt-dlp'"

~/miniconda3/bin/pip install yt-dlp faster-whisper

"GEMINI_API_KEY not found"

# Check if environment variable is set
echo $GEMINI_API_KEY

# Set it
export GEMINI_API_KEY="your-key"

"No subtitles available"

The skill automatically falls back to Whisper transcription. This may take longer but works for any video with audio.

"API rate limit exceeded"

Wait a minute and retry, or check your API quota at https://aistudio.google.com/app/apikey

Security Notes

  • ✅ API key is read from GEMINI_API_KEY environment variable only
  • ✅ No hardcoded API keys in source code
  • ✅ Temporary files stored in workspace temp directory
  • ⚠️ Audio/subtitle files are NOT auto-deleted (manual cleanup required)

File Structure

bili-summary/
├── SKILL.md              # This documentation
├── _meta.json            # ClawHub metadata (auto-generated)
└── scripts/
    └── bili-summary.py   # Main script

License

MIT License - Use at your own risk. Respect Bilibili's terms of service.

安全使用建议
What to check before installing/using this skill: - Confirm you are comfortable supplying a GEMINI_API_KEY: the runtime requires GEMINI_API_KEY (used to call Generative Language API). The registry metadata did NOT declare this requirement — expect to set it manually. - Expect network activity and file writes: the script downloads video/audio, may download Whisper model weights (faster-whisper will fetch models), and writes output under your home workspace (~/.openclaw/workspace/coding-agent/temp/bili-summary). Ensure you have disk space and are okay storing these files. - Key handling caution: the code places the API key in the request URL (?key=...), which can be exposed in logs; consider using a short-lived key or running in an isolated environment. - Clean-up behaviour: SKILL.md and the script disagree about auto-deletion. Assume audio/subtitle files may persist and delete them manually or run the tool in a disposable/sandboxed directory. - Confirm you have yt-dlp and Python environment, or run pip install yt-dlp faster-whisper as recommended. Be prepared for model downloads when transcribing. - If you need higher assurance: review the included script locally, run it in a container or VM with limited network/credentials, and test with a non-critical Gemini key. If the missing registry declarations or contradictory docs matter to your security posture, contact the skill author or avoid installing until corrected.
功能分析
Type: OpenClaw Skill Name: bili-summary Version: 1.0.0 The skill is designed for Bilibili video processing and summarization, using `yt-dlp` and `faster-whisper`. The `SKILL.md` instructions are clear and do not contain any prompt injection attempts. The `bili-summary.py` script uses `subprocess.run` with a list of arguments, which is the secure method to execute external commands, preventing shell injection. API keys are read from environment variables (`GEMINI_API_KEY`), and file operations are confined to a designated temporary workspace (`~/.openclaw/workspace/coding-agent/temp/bili-summary`). All network and file system interactions are aligned with the stated purpose, and there is no evidence of intentional malicious behavior such as data exfiltration, persistence, or unauthorized remote control.
能力评估
Purpose & Capability
The skill's code and SKILL.md align with the described purpose: it uses yt-dlp to download Bilibili content, faster-whisper for transcription, and the Gemini generativelanguage API for summaries. That capability set is coherent for a 'Bili Summary' tool. However, the skill metadata published in the registry declares no required env vars or install spec while the SKILL.md and script clearly require yt-dlp, Python packages (yt-dlp, faster-whisper), and a GEMINI_API_KEY — this metadata mismatch is unexpected.
Instruction Scope
The SKILL.md instructs the agent to read GEMINI_API_KEY from the environment and to install/run yt-dlp and faster-whisper; the included script reads the same env var and performs network calls to Bilibili and Google. The instructions and code stay within the stated purpose, but they reference an environment secret (GEMINI_API_KEY) that is not declared in the registry metadata. The SKILL.md also contains contradictory statements about whether audio/subtitle files are auto-deleted and shows a different workspace path than the script (~/openclaw vs ~/.openclaw), which increases risk of accidental data retention or confusion.
Install Mechanism
There is no formal install spec in the registry (instruction-only in practice). SKILL.md recommends pip installing yt-dlp and faster-whisper — these are well-known packages (moderate trust). The faster-whisper/Whisper model usage implies automatic model weight downloads (e.g., from Hugging Face) and significant disk/network activity; this is expected for transcription but should be documented. No arbitrary or obfuscated remote code sources are used in the included script.
Credentials
The only runtime secret the implementation requires is GEMINI_API_KEY, which is appropriate for calling the Gemini API. However, the registry metadata does not declare this required env var (declares none), creating an inconsistency. The script places the API key on the request URL as ?key=..., which can leak the key in logs or browser history if not handled carefully. No other unrelated credentials are requested.
Persistence & Privilege
The skill does not request always:true or other privileged persistence. It writes temporary files into a workspace directory under the user's home and does not alter other skills or system-wide settings. The script may retain audio/subtitle files by default (the documentation is contradictory), so files can persist on disk until manually removed.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bili-summary
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bili-summary 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of bili-summary: a Bilibili video download, subtitle extraction, and AI summarization tool. - Supports fetching video info, downloading videos, extracting subtitles, and transcribing audio using faster-whisper. - Provides detailed AI-powered summaries via Google Gemini 2.5 Flash. - Includes setup instructions, dependency installation, API configuration, and troubleshooting guidance. - Outputs summaries, transcriptions, and downloaded media to a dedicated temp directory.
元数据
Slug bili-summary
版本 1.0.0
许可证
累计安装 3
当前安装数 3
历史版本数 1
常见问题

Bili Summary 是什么?

Download Bilibili videos, extract or transcribe subtitles, and generate AI-powered detailed summaries using Gemini 2.5 Flash. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 710 次。

如何安装 Bili Summary?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install bili-summary」即可一键安装,无需额外配置。

Bili Summary 是免费的吗?

是的,Bili Summary 完全免费(开源免费),可自由下载、安装和使用。

Bili Summary 支持哪些平台?

Bili Summary 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Bili Summary?

由 Xuanyu Chen(@lava-chen)开发并维护,当前版本 v1.0.0。

💬 留言讨论