daymade/claude-code-skills

bilibili-source

Fetch comprehensive, login-free data for any Bilibili (B站) video — title, UP name and follower count, publish date, partition, tags, per-part cids, live stats (view, like, coin, favorite, share, reply, danmaku), and full danmaku (bullet-comment) text.

ソースを見る
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

bilibili-source

Fetch real, verifiable data for a Bilibili video so you can cite it instead of guessing. Engagement numbers are the backbone of any honest "why did this do well" analysis, and hand-typed or estimated numbers are the fastest way a knowledge base rots. This skill makes the numbers cheap to fetch — so there is no excuse to invent them.

Quick start

bash
scripts/bili-fetch.sh BV1xxxxxxxxx

Returns one JSON object with everything from a single view/detail API call:

json
{
  "bvid": "BV1xxxxxxxxx",
  "aid": 1234567890,
  "fetched_at": "2026-06-07T13:54:17Z",
  "url": "https://www.bilibili.com/video/BV1xxxxxxxxx",
  "title": "<video title>",
  "up": { "name": "<UP name>", "mid": 12345678, "fans": 45600 },
  "pubdate": "2026-01-10T00:50:47Z",
  "tname": "<partition, may be empty>",
  "tags": ["<tag>", "<tag>"],
  "videos": 1,
  "duration_s": 372,
  "stat": { "view": 48000, "like": 1200, "coin": 180, "favorite": 950,
            "share": 64, "reply": 210, "danmaku": 130 },
  "pages": [ { "cid": 12345678, "page": 1, "part": "<part title>", "duration": 372 } ]
}

bili-fetch.sh accepts any form a user might paste — BVID, `av` number, `b23.tv` short link, or full URL — and normalizes it. For multi-part videos it returns every part's cid in pages[] (you need the per-part cid to fetch that part's danmaku or subtitles).

Scripts

ScriptWhat it doesLogin
scripts/bili-fetch.sh <ref>Core: full metadata + live stats (run this first)No
scripts/bili-danmaku.sh <ref> [P]Danmaku (bullet-comment) full text for a partNo
scripts/bili-subs.sh <ref> [browser]Subtitle/transcript trackYes
scripts/bili-selftest.shHealth-check every capability against the live APINo

All three execute (don't read them as reference). bili-danmaku.sh reuses bili-fetch.sh to resolve the part's cid, so they must stay siblings in scripts/.

Danmaku are time-synced comments overlaid on the video — a Bilibili-specific signal of where and how viewers reacted, qualitatively richer than a flat reply count:

bash
scripts/bili-danmaku.sh BV1xxxxxxxxx     # P1; add a part number for multi-part videos

Rules that keep the data honest

  • Live metrics → always cite `fetched_at`. The same video re-fetched minutes later drifts (a view count can tick up by a few within a single session). That is not an error — it is proof the data is live. A bare "12,000 views" with no timestamp is meaningless and silently goes stale.
  • NO FABRICATION. If a number can't be fetched, write "未获取/未核实" — never estimate. The whole point of the skill is that the number is cheap to fetch.
  • The scripts already handle the network quirks so you don't reinvent them: they strip the local proxy (Bilibili is a domestic CN service that a 127.0.0.1 proxy breaks), send a browser User-Agent + Referer (avoids the occasional HTTP 412), and retry with backoff. If you call the API by hand, do the same — see references/bilibili_api.md. One trap the env-strip does NOT cover: Python urllib falls back to the macOS system proxy when proxy env vars are absent, causing intermittent 503s in batches — build the opener with an explicit ProxyHandler({}) (details in the reference's Request basics).
  • CJK post-processing trap. When you later grep/sort the fetched Chinese text or filenames, sort/comm mishandle CJK collation and report false "missing"/"broken" results. Verify with find -name or grep -F, not comm.

Subtitles require login (no bypass)

Stats and danmaku are login-free. Subtitles are not. Verified across many videos (new and old) plus anonymous cookies: the public player API returns an empty subtitle list for anonymous requests, and yt-dlp reports "Subtitles are only available when logged in." There is no login-free path — do not try to bypass it.

bili-subs.sh therefore needs the user's Bilibili session via browser cookies. Because it reads their logged-in session, ask the user before running it:

bash
scripts/bili-subs.sh BV1xxxxxxxxx chrome   # or firefox / safari / edge

The ai-zh track is Bilibili's AI-generated subtitle — treat it as a draft transcript (same-sound/segmentation errors), mark it as AI-ASR in whatever you produce, and don't claim it is a human-checked verbatim. If a video has no subtitle track, there is nothing to fetch — don't invent one. A SESSDATA-env API alternative is documented in the reference.

Going deeper

For the full endpoint catalog (UP fan history, video tags, real-time viewer count, danmaku archive, the SESSDATA subtitle path, favorites-folder enumerationx/v3/fav/*, login-gated, no WBI needed), the WBI request-signing algorithm needed for space/wbi/* endpoints, and every gotcha with a tested command, see [references/bilibili_api.md](references/bilibili_api.md).

Verified status

  • Stats / metadata / danmaku (view/detail, relation/stat, dm/list.so, online/total): verified login-free, 2026-06-07. Metrics re-fetched repeatedly and matched independently; danmaku count matched stat.danmaku.
  • Subtitles: confirmed login-gated, 2026-06-07 (empty for anonymous across all videos tested). Needs yt-dlp for the cookie path. The SESSDATA/cookie-jar API path verified logged-in 2026-08-29 across a ~400-video batch (multi-part included).
  • Favorites (x/v3/fav/folder/created/list-all, x/v3/fav/resource/list): verified logged-in 2026-08-29, plain params without WBI; 26 consecutive pages fetched without rate-limiting. Enumeration is login-gated (anonymous list-all answers code 0 with an empty list even for accounts with publicly-readable folders); a public folder's contents are anonymously readable only if you already know its media_id.

Maintenance

This skill wraps a third-party API that drifts over time — fields get renamed, endpoints add WBI signing, anti-bot tightens. Before trusting it after a gap, or whenever output looks wrong, run the health-check:

bash
scripts/bili-selftest.sh

It hits every capability (and the login-gate invariant) against a stable public fixture and prints one PASS/FAIL row per capability, so drift surfaces as a clear FAIL pointing at what broke — not a silent wrong answer. When a row fails, the endpoint paths, field names, and WBI signing needed to fix it are in references/bilibili_api.md; update the "Verified" dates above once you re-confirm.

同じリポジトリから

関連する Skills

すべての Skills
daymade
コミュニティ

i18n-expert

This skill should be used when setting up, auditing, or enforcing internationalization/localization in UI codebases (React/TS, i18next or similar, JSON locales), including installing/configuring the i18n framework, replacing hard-coded strings, ensuring en-US/zh-CN coverage, mapping error codes to localized messages, and validating key parity, pluralization, and formatting.

導入数
1
GitHub Stars
1416
更新日
9月22日
daymade
コミュニティ

frontend-visual-qa

- Audits already-rendered web, landing-page, HTML deck/slide, browser tool/game, dashboard/admin, design-system, and desktop UIs using real-browser or native-app journeys, inspected screenshots, DOM geometry, responsive or projection viewports, and a bundled Playwright sweep. Use after UI implementation to find typography, wrapping, overlap, overflow, responsive, route, overlay, map, transient-state, data-visualization, browser-output, file-dialog, PDF/print, or Electron-shell defects, or to compare a rendered artifact with a visual reference. Do not use for greenfield UI design, extracting a design system from screenshots, general QA-program setup, or nonvisual code debugging.

導入数
2
GitHub Stars
1414
更新日
9月21日
daymade
コミュニティ

github-ops

- Operates GitHub through gh CLI and the REST/GraphQL APIs with explicit target, authorization, impact preview, and independent readback. Use for pull requests, issues, Actions, repositories, collaborators, teams, organization member privileges, base permissions, 2FA enforcement, repository settings, API automation, parallel or superseded PR convergence, and public or enterprise GitHub. Also use when a GitHub write returned success but the requested state did not change, or when deciding whether a setting is writable through CLI, REST, GraphQL, or only the GitHub UI.

導入数
1
GitHub Stars
1411
更新日
9月20日
daymade
コミュニティ

ashare-news-fetcher

- 抓取 A 股消息面情报:从财联社、华尔街见闻、金十、新浪 7x24、东财快讯、 证监会/央行/上交所/财政部政策公告、东方财富股吧等公开来源抓取与股票相关的 新闻、政策、情绪,输出结构化 JSON 或 Markdown。 当用户提到“A 股消息面”、“抓新闻”、“个股消息”、“政策监管”、“股吧情绪”、 “财联社”、“东财快讯”、“市场情绪”或需要把某只股票相关的公开情报聚合出来时 触发。也适用于“帮我看看 000001 最近有什么消息”这类口语化请求。

導入数
1
GitHub Stars
1396
更新日
9月16日