{
  "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": {
    "downloadMode": "redirect",
    "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",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/dependencies.md",
      "scripts/batch_channel.sh",
      "scripts/batch_clean.sh",
      "scripts/clean_transcript.sh",
      "scripts/generate_index.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/bilibili-up-to-kb",
    "agentPageUrl": "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"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Bilibili UP to KB",
        "body": "Convert B站 videos (single or entire channels) into cleaned, structured text knowledge bases."
      },
      {
        "title": "Design Principle",
        "body": "Agent orchestrates, scripts execute. The agent's job is to decide WHAT to do and kick off\nthe right script. All mechanical, repetitive work (downloading, transcribing, cleaning) is\nhandled by shell scripts with built-in parallelism. The agent NEVER loops through videos\none by one — it runs ONE command and the script handles concurrency internally."
      },
      {
        "title": "Output Structure",
        "body": "kb/UP主名_UID/\n├── BV号_视频标题.txt          # Cleaned transcript (user-facing)\n├── BV号_视频标题.meta.json    # Video metadata\n├── index.md                   # Summary index\n└── .raw/                      # Hidden: whisper transcripts (if any)\n    └── BV号_视频标题.txt\n\nKey decisions:\n\nFile names include title for readability (BV1xxx_标题.txt)\nFolder includes UP主 name (UP主名_UID/)\nRaw transcripts hidden in .raw/\nNo _clean suffix — clean files are the main files\nPer-video .meta.json with title, uploader, duration, etc."
      },
      {
        "title": "Step 1: Download AI subtitles (fast, high concurrency OK)",
        "body": "# 30-50 concurrent is fine — B站 CDN handles it\nscripts/batch_channel.sh \"https://space.bilibili.com/UID/\" ./kb/output zh 0 30"
      },
      {
        "title": "Step 2: For videos without AI subtitles, run whisper (LOW concurrency!)",
        "body": "# Metal GPU can only handle 1-4 parallel whisper instances\n# More = slower total (GPU saturation)\nscripts/batch_channel.sh \"https://space.bilibili.com/UID/\" ./kb/output zh 0 2 --whisper-only"
      },
      {
        "title": "Step 3: Clean + Index",
        "body": "# Clean whisper transcripts (AI subtitles skip automatically)\nscripts/batch_clean.sh ./kb/UP主名_UID/\nscripts/generate_index.sh ./kb/UP主名_UID/"
      },
      {
        "title": "Concurrency Guide",
        "body": "Critical: Different stages need different concurrency!\n\nStageBottleneckRecommendedWhyAI subtitle downloadNetwork30-50B站 CDN handles high parallelWhisper transcribeMetal GPU1-4GPU饱和，多了反而慢Transcript cleaningAPI rate limitALL (0)Network I/O only"
      },
      {
        "title": "Quick Start — Single Video",
        "body": "scripts/transcribe.sh \"https://www.bilibili.com/video/BV...\" ./output zh"
      },
      {
        "title": "Transcript Cleaning",
        "body": "AI subtitles are clean enough — skipped by default.\n\nSourceCleaning needed?B站 AI subtitlesNo — directly usablewhisper fallbackYes — goes through cleaning\n\nCleaning uses opencode/minimax-m2.5-free:\n\nFix homophones and garbled words\nAdd punctuation\nOutput MUST be Simplified Chinese\nKeep uncertain proper nouns unchanged\nNever substitute one real term for another\n\nChunk size: 80 lines. Retry: 3 attempts with 3s delay."
      },
      {
        "title": "⚠️ Long-running tasks",
        "body": "Use nohup to avoid session compaction killing processes:\n\nnohup bash scripts/batch_clean.sh ./kb/UP主名_UID/ 0 80 > /tmp/clean.log 2>&1 &\n\nbatch_clean.sh is resumable — safe to re-run after interruption."
      },
      {
        "title": "⚠️ Large Channel Handling (1000+ videos)",
        "body": "Script auto-detects large channels (>800 videos) and fetches in chunks to avoid timeout.\n\n# Auto-chunked, just re-run to resume\nnohup bash scripts/batch_channel.sh \"https://space.bilibili.com/UID/\" ./kb/output > /tmp/batch.log 2>&1 &\n\nIf still fails, manually fetch URL list:\n\nfor i in $(seq 1 500 2000); do\n  yt-dlp --flat-playlist --playlist-start $i --playlist-end $((i+499)) \\\n    --print url \"https://space.bilibili.com/UID/\" >> /tmp/urls.txt\ndone\ncat /tmp/urls.txt | xargs -P 20 -I {} bash scripts/transcribe.sh {} ./kb/OUTPUT zh"
      },
      {
        "title": "⚠️ Thermal & Fan Warning",
        "body": "Keep system cool — avoid fan spin!\n\nStageRiskMitigationWhisper (GPU)HIGHKeep concurrency ≤2, monitor tempsAI subtitle downloadLowCan run 30-50 concurrentCleaning (API)NonePure network I/O, no local load\n\nIf fans start spinning:\n\nStop whisper processes immediately\nWait for cooldown\nResume with lower concurrency (1-2)\n\n# Check GPU temp (if using CUDA)\nnvidia-smi\n\n# Check Mac CPU/GPU temp\nsudo powermetrics --sample-rate 1000 -i 1 -n 1 | grep -E \"CPU|GPU\""
      },
      {
        "title": "Dependencies",
        "body": "Required: yt-dlp, ffmpeg, whisper.cpp (+ model), opencode CLI\nOptional: Browser cookies for member-only content (--cookies-from-browser chrome)"
      },
      {
        "title": "Environment Variables",
        "body": "VariableDefaultDescriptionWHISPER_CLIwhisper-cliPath to whisper.cppWHISPER_MODEL~/.whisper-cpp/ggml-small.binWhisper modelOPENCODE_BIN~/.opencode/bin/opencodeopencode CLICLEAN_MODELopencode/minimax-m2.5-freeCleaning model"
      },
      {
        "title": "Tips",
        "body": "China users: Use hf-mirror.com for whisper model\nLong videos (1h+): Auto-segmented into 10-min chunks\nResumable: All batch scripts skip already-processed files"
      }
    ],
    "body": "Bilibili UP to KB\n\nConvert B站 videos (single or entire channels) into cleaned, structured text knowledge bases.\n\nDesign Principle\n\nAgent 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.\n\nOutput Structure\nkb/UP主名_UID/\n├── BV号_视频标题.txt          # Cleaned transcript (user-facing)\n├── BV号_视频标题.meta.json    # Video metadata\n├── index.md                   # Summary index\n└── .raw/                      # Hidden: whisper transcripts (if any)\n    └── BV号_视频标题.txt\n\n\nKey decisions:\n\nFile names include title for readability (BV1xxx_标题.txt)\nFolder includes UP主 name (UP主名_UID/)\nRaw transcripts hidden in .raw/\nNo _clean suffix — clean files are the main files\nPer-video .meta.json with title, uploader, duration, etc.\nFull Pipeline\nStep 1: Download AI subtitles (fast, high concurrency OK)\n# 30-50 concurrent is fine — B站 CDN handles it\nscripts/batch_channel.sh \"https://space.bilibili.com/UID/\" ./kb/output zh 0 30\n\nStep 2: For videos without AI subtitles, run whisper (LOW concurrency!)\n# Metal GPU can only handle 1-4 parallel whisper instances\n# More = slower total (GPU saturation)\nscripts/batch_channel.sh \"https://space.bilibili.com/UID/\" ./kb/output zh 0 2 --whisper-only\n\nStep 3: Clean + Index\n# Clean whisper transcripts (AI subtitles skip automatically)\nscripts/batch_clean.sh ./kb/UP主名_UID/\nscripts/generate_index.sh ./kb/UP主名_UID/\n\nConcurrency Guide\n\nCritical: Different stages need different concurrency!\n\nStage\tBottleneck\tRecommended\tWhy\nAI subtitle download\tNetwork\t30-50\tB站 CDN handles high parallel\nWhisper transcribe\tMetal GPU\t1-4\tGPU饱和，多了反而慢\nTranscript cleaning\tAPI rate limit\tALL (0)\tNetwork I/O only\nQuick Start — Single Video\nscripts/transcribe.sh \"https://www.bilibili.com/video/BV...\" ./output zh\n\nTranscript Cleaning\n\nAI subtitles are clean enough — skipped by default.\n\nSource\tCleaning needed?\nB站 AI subtitles\tNo — directly usable\nwhisper fallback\tYes — goes through cleaning\n\nCleaning uses opencode/minimax-m2.5-free:\n\nFix homophones and garbled words\nAdd punctuation\nOutput MUST be Simplified Chinese\nKeep uncertain proper nouns unchanged\nNever substitute one real term for another\n\nChunk size: 80 lines. Retry: 3 attempts with 3s delay.\n\n⚠️ Long-running tasks\n\nUse nohup to avoid session compaction killing processes:\n\nnohup bash scripts/batch_clean.sh ./kb/UP主名_UID/ 0 80 > /tmp/clean.log 2>&1 &\n\n\nbatch_clean.sh is resumable — safe to re-run after interruption.\n\n⚠️ Large Channel Handling (1000+ videos)\n\nScript auto-detects large channels (>800 videos) and fetches in chunks to avoid timeout.\n\n# Auto-chunked, just re-run to resume\nnohup bash scripts/batch_channel.sh \"https://space.bilibili.com/UID/\" ./kb/output > /tmp/batch.log 2>&1 &\n\n\nIf still fails, manually fetch URL list:\n\nfor i in $(seq 1 500 2000); do\n  yt-dlp --flat-playlist --playlist-start $i --playlist-end $((i+499)) \\\n    --print url \"https://space.bilibili.com/UID/\" >> /tmp/urls.txt\ndone\ncat /tmp/urls.txt | xargs -P 20 -I {} bash scripts/transcribe.sh {} ./kb/OUTPUT zh\n\n⚠️ Thermal & Fan Warning\n\nKeep system cool — avoid fan spin!\n\nStage\tRisk\tMitigation\nWhisper (GPU)\tHIGH\tKeep concurrency ≤2, monitor temps\nAI subtitle download\tLow\tCan run 30-50 concurrent\nCleaning (API)\tNone\tPure network I/O, no local load\n\nIf fans start spinning:\n\nStop whisper processes immediately\nWait for cooldown\nResume with lower concurrency (1-2)\n# Check GPU temp (if using CUDA)\nnvidia-smi\n\n# Check Mac CPU/GPU temp\nsudo powermetrics --sample-rate 1000 -i 1 -n 1 | grep -E \"CPU|GPU\"\n\nDependencies\n\nRequired: yt-dlp, ffmpeg, whisper.cpp (+ model), opencode CLI Optional: Browser cookies for member-only content (--cookies-from-browser chrome)\n\nEnvironment Variables\nVariable\tDefault\tDescription\nWHISPER_CLI\twhisper-cli\tPath to whisper.cpp\nWHISPER_MODEL\t~/.whisper-cpp/ggml-small.bin\tWhisper model\nOPENCODE_BIN\t~/.opencode/bin/opencode\topencode CLI\nCLEAN_MODEL\topencode/minimax-m2.5-free\tCleaning model\nTips\nChina users: Use hf-mirror.com for whisper model\nLong videos (1h+): Auto-segmented into 10-min chunks\nResumable: All batch scripts skip already-processed files"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/shanjiaming/bilibili-up-to-kb",
    "publisherUrl": "https://clawhub.ai/shanjiaming/bilibili-up-to-kb",
    "owner": "shanjiaming",
    "version": "0.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "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"
  }
}