bbc-skill
БесплатноЗапускает вложенные скриптыНе проверенFetch Bilibili (哔哩哔哩) video comments for UP主 self-analysis. Use when the user asks to collect, download, export, or analyze comments on a Bilibili video (BV号…
от Agents365-ai★ 108 звёзд на GitHubОб этом скилле
bbc-skill — Bilibili Comment Collector
Download all comments (top-level + nested + pinned) for a Bilibili video and produce data that Claude Code can analyze downstream.
Update check
Throttle to one check per 24 hours per installation; never mutate the skill directory without explicit user consent.
If
<this-skill-dir>/.last_updateexists and is less than 24 hours old, skip this step entirely.Otherwise, fetch the latest tag from upstream:
git -C <this-skill-dir> ls-remote --tags origin 'v*' 2>/dev/null \ | awk '{print $2}' | sed 's|refs/tags/||' \ | sort -V | tail -1Compare with this skill's
metadata.versionfrom the frontmatter. If the upstream tag is strictly newer (semver), tell the user one line and ask:"A newer version of this skill is available: vX.Y.Z → vA.B.C. Want me to
git pull?"If they say yes, run
git -C <this-skill-dir> pull --ff-only. Refresh.last_updateeither way so the prompt doesn't repeat for 24 hours.If upstream is the same or older, refresh
.last_updatesilently and continue.On any failure (offline, not a git checkout — e.g. ClawHub-installed copy, read-only path, no permission), swallow the error silently and continue with the user's task. Do not mention the failure.
When to use
Trigger this skill when the user:
- Asks to get / fetch / download / export / collect / analyze comments of a specific Bilibili video (BV 号, URL, or video page).
- Asks to analyze audience feedback / sentiment / keywords / top comments / IP distribution of their own Bilibili videos.
- Provides a Bilibili URL like
https://www.bilibili.com/video/BVxxxxxxxxxx/. - Mentions their UP主 UID and wants batch analysis across their videos.
Do not use for: posting / deleting comments, downloading videos, barrage (弹幕), live stream data, or private messages.
Prerequisites
Python 3.9+ (stdlib only — zero pip install).
Bilibili cookie. The user must be logged in to bilibili.com. The recommended path:
- Install the Chrome/Edge extension Get cookies.txt LOCALLY (open-source, fully local, no upload).
- On a logged-in bilibili.com tab, click Export → save
www.bilibili.com_cookies.txt. - Pass via
--cookie-fileor set$BBC_COOKIE_FILE.
Alternatives:
$BBC_SESSDATAenv var with just the SESSDATA value.- Browser auto-detection (Firefox / Chrome / Edge on macOS) via
--browser auto. Works best for Firefox; Chrome/Edge needs a logged-in profile with cookies flushed to disk.
Auth delegation (Principle 7): the skill never runs OAuth flows. The human is expected to log in via browser; the agent only consumes the resulting cookie.
Quick start
Before any fetch, verify the cookie works:
python3 -m bbc cookie-check
Success envelope (stdout):
{"ok":true,"data":{"mid":441831884,"uname":"探索未至之境","vip":false}}
Fetch all comments for a single video:
python3 -m bbc fetch BV1NjA7zjEAU
Or pass a URL:
python3 -m bbc fetch "https://www.bilibili.com/video/BV1NjA7zjEAU/"
Output (default ./bilibili-comments/<BV>/):
comments.jsonl— one comment per line, flattenedsummary.json— video metadata + statistics + top-Nraw/— archived API responses.bbc-state.json— resume state
Commands
| Command | Purpose |
|---|---|
bbc fetch <BV|URL> |
Fetch all comments for one video |
bbc fetch-user <UID> |
Batch fetch all videos of a UP主 |
bbc summarize <dir> |
Rebuild summary.json from existing comments.jsonl |
bbc cookie-check |
Validate cookie; print logged-in user |
bbc schema [cmd] |
Return JSON schema for commands (for agent discovery) |
Call bbc <cmd> --help or bbc schema <cmd> for full parameter details — do
not guess flag names.
Agent contract
Stdout vs stderr
- stdout: stable JSON envelope
{"ok":true,"data":...}or{"ok":false,"error":...}. JSON is the default when stdout is not a TTY. Pass--format tablefor human-readable tables. - stderr: human log lines + NDJSON progress events for long tasks.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Runtime / API error |
| 2 | Auth error (cookie invalid / missing) |
| 3 | Validation error (bad BV number, bad flag) |
| 4 | Network error (timeout / retries exhausted) |
Error envelope
{
"ok": false,
"error": {
"code": "auth_expired",
"message": "SESSDATA 已过期,请重新登录 B 站",
"retryable": true,
"retry_after_auth": true
}
}
Error codes: validation_error, auth_required, auth_expired, not_found,
rate_limited, api_error, network_error. See bbc schema for the full
contract.
Dry-run
Every fetch command supports --dry-run to preview the planned request
without making network calls:
python3 -m bbc
Установить bbc-skill в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл bbc-skill?
Fetch Bilibili (哔哩哔哩) video comments for UP主 self-analysis. Use when the user asks to collect, download, export, or analyze comments on a Bilibili video (BV号 / URL / UID). Produces JSONL + summary.json suitable for further Claude Code analysis (sentiment, keywords, audience trends). Read-only; does not post/edit/delete.
Как установить скилл bbc-skill?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bbc-skill запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic