v1.0.0 — Agent-Native CLI

bbc-skill

Fetch every comment on your Bilibili videos and hand them to Claude Code / Codex for sentiment, keyword, and audience analysis. Zero dependencies. Built for AI agents.

git clone https://github.com/Agents365-ai/bbc-skill.git ~/.claude/skills/bbc-skill

Why This Skill

The only Bilibili comment tool designed for AI agents: structured JSON output, self-describing schema, delegated auth, and a strict sequential batch mode.

🐍

Zero Dependencies

Pure Python 3.9+ standard library. No pip install. All cookie decryption goes through system binaries (security, openssl).

💬

Complete Comments

Top-level + nested (楼中楼) + pinned (置顶). Full video metadata: views, likes, coins, favorites, tags, owner info.

🤖

Agent-Native CLI

Stable JSON envelope on stdout, NDJSON progress on stderr, distinct exit codes, dry-run preview, schema introspection.

🧑‍🎤

Sequential Batch Mode

Fetch every video of a UP主 one-by-one. Never parallel. 5-10s randomised cooldown between videos. Resume-safe.

🔐

Delegated Auth

Human logs in via browser, exports cookie via the open-source Get cookies.txt LOCALLY extension. Agent never touches OAuth.

♻️

Resumable & Incremental

Re-running the same fetch skips completed pages. --since pulls only new comments for ongoing monitoring.

Quick Start

From zero to analyzed comments in three steps.

1

Install the "Get cookies.txt LOCALLY" Chrome extension

Fully offline, open-source, uploads nothing. On a logged-in bilibili.com tab, click Export and save www.bilibili.com_cookies.txt.

2

Install bbc-skill

Pick the path that matches your agent (see full table below).

git clone https://github.com/Agents365-ai/bbc-skill.git ~/.claude/skills/bbc-skill
3

Fetch and analyze

Verify the cookie, fetch the video, then ask Claude Code to analyze the output.

bbc cookie-check --cookie-file ~/Downloads/www.bilibili.com_cookies.txt
bbc fetch BV1NjA7zjEAU --cookie-file ~/Downloads/www.bilibili.com_cookies.txt
# Then ask Claude Code: "Read bilibili-comments/BV1NjA7zjEAU/summary.json
# and tell me the audience sentiment and top feedback themes."

Multi-Platform Support

Same SKILL.md + agents/openai.yaml sidecar, six platforms.

PlatformStatusInstall path
Claude Code✓ Native~/.claude/skills/bbc-skill/
OpenAI Codex✓ Native~/.agents/skills/bbc-skill/
OpenClaw / ClawHub✓ Native~/.openclaw/skills/bbc-skill/
Hermes Agent✓ Native~/.hermes/skills/data/bbc-skill/
Opencode✓ Native~/.config/opencode/skills/bbc-skill/
SkillsMP✓ Indexedskills install bbc-skill

Output

Flat JSONL for comments + rich summary.json for Claude to read first.

bilibili-comments/BV1NjA7zjEAU/
├── comments.jsonl       # one comment per line, 59 lines
├── summary.json         # video meta + stats + Top-N (~13KB)
├── raw/                  # archived API responses
└── .bbc-state.json      # resume / incremental state

// summary.json preview
{
  "video": {
    "title": "会魔法吗?3步搞定Claude Code…",
    "stat": { "view": 7287, "like": 97, "coin": 70, "reply": 59 }
  },
  "counts": { "total": 59, "top_level": 44, "nested": 14, "pinned": 1,
              "completeness": 1.0, "unique_users": 46 },
  "time_distribution": { "earliest_iso": "…", "by_day": [...] },
  "top_liked": [...],
  "top_replied": [...],
  "ip_distribution": { "浙江": 5, "广东": 4, ... }
}

⚠️ Responsible Use

This tool is for personal, low-volume, legal use. Please read before running.

✅ OK

  • Analyze your own videos — the primary use case.
  • Assist another creator with their explicit permission.
  • Respect the built-in throttling: 1s per request, 5-10s random cooldown between videos in batch mode. Don't patch these out.

❌ NOT OK

  • Mass-scraping strangers' videos or entire categories of UP主.
  • Commercial resale / public redistribution of the scraped data.
  • Bypassing rate limits, spoofing User-Agents, or using proxy pools to evade Bilibili's anti-bot systems.
  • High-frequency automation — e.g. scheduled daily scans of the same channel.
  • Harassment, doxxing, or coordinated attacks using the scraped user IDs / IP locations.

For organization or commercial use, switch to the Bilibili Open Platform official APIs. Apply data-minimization: fetch, analyze, delete. This project is not affiliated with bilibili.com; account risk control, bans, and legal consequences are the user's responsibility.