# Send Bili Summary to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "bili-summary",
    "name": "Bili Summary",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/lava-chen/bili-summary",
    "canonicalUrl": "https://clawhub.ai/lava-chen/bili-summary",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/bili-summary",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=bili-summary",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "scripts/bili-summary.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "bili-summary",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T02:11:17.280Z",
      "expiresAt": "2026-05-07T02:11:17.280Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=bili-summary",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=bili-summary",
        "contentDisposition": "attachment; filename=\"bili-summary-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "bili-summary"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/bili-summary"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/bili-summary",
    "downloadUrl": "https://openagent3.xyz/downloads/bili-summary",
    "agentUrl": "https://openagent3.xyz/skills/bili-summary/agent",
    "manifestUrl": "https://openagent3.xyz/skills/bili-summary/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/bili-summary/agent.md"
  }
}
```
## Documentation

### 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)

### 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:

Visit https://aistudio.google.com/app/apikey
Sign in with your Google account
Click "Create API Key"
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"

### 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

OptionDescriptionDefaulturlBilibili video URL (BV号或完整链接)required--actionOperation: info/subtitle/transcribe/video/summarysummary--outputOutput 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

### summary (full workflow)

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

### Time Estimate

StepTimeAudio download~15sWhisper transcription (tiny)~25sGemini summary~5sTotal~45s

### Recommended API: Google Gemini

Model: gemini-2.5-flash
Endpoint: https://generativelanguage.googleapis.com/v1/models/gemini-2.5-flash:generateContent
Free Tier: 15 requests/minute, 1M tokens/minute
Sign up: https://aistudio.google.com/app/apikey

### Alternative APIs (not implemented)

If you want to use other LLMs:

OpenAI GPT-4o - https://api.openai.com/v1/chat/completions
Anthropic Claude - https://api.anthropic.com/v1/messages
MiniMax - https://api.minimax.chat/v1/text/chatcompletion_v2

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

### 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

Go to https://aistudio.google.com/app/apikey
Create new API key
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

### "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.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: lava-chen
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-30T02:11:17.280Z
- Expires at: 2026-05-07T02:11:17.280Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/bili-summary)
- [Send to Agent page](https://openagent3.xyz/skills/bili-summary/agent)
- [JSON manifest](https://openagent3.xyz/skills/bili-summary/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/bili-summary/agent.md)
- [Download page](https://openagent3.xyz/downloads/bili-summary)