# Send Bilibili Up To Kb 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": "bilibili-up-to-kb",
    "name": "Bilibili Up To Kb",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/shanjiaming/bilibili-up-to-kb",
    "canonicalUrl": "https://clawhub.ai/shanjiaming/bilibili-up-to-kb",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/bilibili-up-to-kb",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=bilibili-up-to-kb",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/dependencies.md",
      "scripts/batch_channel.sh",
      "scripts/batch_clean.sh",
      "scripts/clean_transcript.sh",
      "scripts/generate_index.sh"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/bilibili-up-to-kb"
    },
    "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/bilibili-up-to-kb",
    "downloadUrl": "https://openagent3.xyz/downloads/bilibili-up-to-kb",
    "agentUrl": "https://openagent3.xyz/skills/bilibili-up-to-kb/agent",
    "manifestUrl": "https://openagent3.xyz/skills/bilibili-up-to-kb/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/bilibili-up-to-kb/agent.md"
  }
}
```
## Documentation

### Bilibili UP to KB

Convert B站 videos (single or entire channels) into cleaned, structured text knowledge bases.

### Design Principle

Agent orchestrates, scripts execute. The agent's job is to decide WHAT to do and kick off
the right script. All mechanical, repetitive work (downloading, transcribing, cleaning) is
handled by shell scripts with built-in parallelism. The agent NEVER loops through videos
one by one — it runs ONE command and the script handles concurrency internally.

### Output Structure

kb/UP主名_UID/
├── BV号_视频标题.txt          # Cleaned transcript (user-facing)
├── BV号_视频标题.meta.json    # Video metadata
├── index.md                   # Summary index
└── .raw/                      # Hidden: whisper transcripts (if any)
    └── BV号_视频标题.txt

Key decisions:

File names include title for readability (BV1xxx_标题.txt)
Folder includes UP主 name (UP主名_UID/)
Raw transcripts hidden in .raw/
No _clean suffix — clean files are the main files
Per-video .meta.json with title, uploader, duration, etc.

### Step 1: Download AI subtitles (fast, high concurrency OK)

# 30-50 concurrent is fine — B站 CDN handles it
scripts/batch_channel.sh "https://space.bilibili.com/UID/" ./kb/output zh 0 30

### Step 2: For videos without AI subtitles, run whisper (LOW concurrency!)

# Metal GPU can only handle 1-4 parallel whisper instances
# More = slower total (GPU saturation)
scripts/batch_channel.sh "https://space.bilibili.com/UID/" ./kb/output zh 0 2 --whisper-only

### Step 3: Clean + Index

# Clean whisper transcripts (AI subtitles skip automatically)
scripts/batch_clean.sh ./kb/UP主名_UID/
scripts/generate_index.sh ./kb/UP主名_UID/

### Concurrency Guide

Critical: Different stages need different concurrency!

StageBottleneckRecommendedWhyAI subtitle downloadNetwork30-50B站 CDN handles high parallelWhisper transcribeMetal GPU1-4GPU饱和，多了反而慢Transcript cleaningAPI rate limitALL (0)Network I/O only

### Quick Start — Single Video

scripts/transcribe.sh "https://www.bilibili.com/video/BV..." ./output zh

### Transcript Cleaning

AI subtitles are clean enough — skipped by default.

SourceCleaning needed?B站 AI subtitlesNo — directly usablewhisper fallbackYes — goes through cleaning

Cleaning uses opencode/minimax-m2.5-free:

Fix homophones and garbled words
Add punctuation
Output MUST be Simplified Chinese
Keep uncertain proper nouns unchanged
Never substitute one real term for another

Chunk size: 80 lines. Retry: 3 attempts with 3s delay.

### ⚠️ Long-running tasks

Use nohup to avoid session compaction killing processes:

nohup bash scripts/batch_clean.sh ./kb/UP主名_UID/ 0 80 > /tmp/clean.log 2>&1 &

batch_clean.sh is resumable — safe to re-run after interruption.

### ⚠️ Large Channel Handling (1000+ videos)

Script auto-detects large channels (>800 videos) and fetches in chunks to avoid timeout.

# Auto-chunked, just re-run to resume
nohup bash scripts/batch_channel.sh "https://space.bilibili.com/UID/" ./kb/output > /tmp/batch.log 2>&1 &

If still fails, manually fetch URL list:

for i in $(seq 1 500 2000); do
  yt-dlp --flat-playlist --playlist-start $i --playlist-end $((i+499)) \\
    --print url "https://space.bilibili.com/UID/" >> /tmp/urls.txt
done
cat /tmp/urls.txt | xargs -P 20 -I {} bash scripts/transcribe.sh {} ./kb/OUTPUT zh

### ⚠️ Thermal & Fan Warning

Keep system cool — avoid fan spin!

StageRiskMitigationWhisper (GPU)HIGHKeep concurrency ≤2, monitor tempsAI subtitle downloadLowCan run 30-50 concurrentCleaning (API)NonePure network I/O, no local load

If fans start spinning:

Stop whisper processes immediately
Wait for cooldown
Resume with lower concurrency (1-2)

# Check GPU temp (if using CUDA)
nvidia-smi

# Check Mac CPU/GPU temp
sudo powermetrics --sample-rate 1000 -i 1 -n 1 | grep -E "CPU|GPU"

### Dependencies

Required: yt-dlp, ffmpeg, whisper.cpp (+ model), opencode CLI
Optional: Browser cookies for member-only content (--cookies-from-browser chrome)

### Environment Variables

VariableDefaultDescriptionWHISPER_CLIwhisper-cliPath to whisper.cppWHISPER_MODEL~/.whisper-cpp/ggml-small.binWhisper modelOPENCODE_BIN~/.opencode/bin/opencodeopencode CLICLEAN_MODELopencode/minimax-m2.5-freeCleaning model

### Tips

China users: Use hf-mirror.com for whisper model
Long videos (1h+): Auto-segmented into 10-min chunks
Resumable: All batch scripts skip already-processed files
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: shanjiaming
- Version: 0.1.0
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-23T16:43:11.935Z
- Expires at: 2026-04-30T16:43:11.935Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/bilibili-up-to-kb)
- [Send to Agent page](https://openagent3.xyz/skills/bilibili-up-to-kb/agent)
- [JSON manifest](https://openagent3.xyz/skills/bilibili-up-to-kb/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/bilibili-up-to-kb/agent.md)
- [Download page](https://openagent3.xyz/downloads/bilibili-up-to-kb)