本文へ移動
cccskills
無料GitHub で公開

bilibili

Interact with Bilibili (B站) — browse trending videos, view video details, read comments, search videos and users, view user profiles, like, coin, and favorite videos. Use this skill whenever the user mentions Bilibili, B站, wants to browse Bilibili content, search Bilibili videos, read Bilibili comments, look up Bilibili users, or interact with Bilibili content. Also trigger when the user pastes a Bilibili URL (e.g. bilibili.com/video/BV...) or mentions a BV ID.

インストール方法を見る

含まれるファイル(31)

  • SKILL.md11.0 KB
  • references/provider-config.yaml468 B
  • scripts/bilibili_client.py6.7 KB
  • scripts/bilibili_coin.py1.8 KB
  • scripts/bilibili_comments.py2.3 KB
  • scripts/bilibili_dynamic.py3.0 KB
  • scripts/bilibili_favorite.py2.7 KB
  • scripts/bilibili_history.py3.2 KB
  • scripts/bilibili_hot.py1.6 KB
  • scripts/bilibili_like.py1.8 KB
  • scripts/bilibili_me.py1.9 KB
  • scripts/bilibili_popular.py1.7 KB
  • scripts/bilibili_ranking.py2.0 KB
  • scripts/bilibili_search.py3.7 KB
  • scripts/bilibili_subtitle.py4.1 KB
  • scripts/bilibili_user.py2.6 KB
  • scripts/bilibili_video.py1.3 KB
  • tests/test_bilibili_coin.py1.8 KB
  • tests/test_bilibili_comments.py3.4 KB
  • tests/test_bilibili_dynamic.py2.9 KB
  • tests/test_bilibili_favorite.py2.1 KB
  • tests/test_bilibili_history.py2.3 KB
  • tests/test_bilibili_hot.py2.7 KB
  • tests/test_bilibili_like.py1.8 KB
  • tests/test_bilibili_me.py1.8 KB
  • tests/test_bilibili_popular.py2.3 KB
  • tests/test_bilibili_ranking.py3.1 KB
  • tests/test_bilibili_search.py3.8 KB
  • tests/test_bilibili_subtitle.py3.7 KB
  • tests/test_bilibili_user.py2.9 KB
  • tests/test_bilibili_video.py2.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Bilibili

Browse trending videos, view video details, read comments, search content, view user profiles, and interact with Bilibili (B站).

Skill Directory

<SKILL_DIR> is the directory containing this SKILL.md file. Determine it ONCE at the start and reuse it.

Setup (run FIRST — every time, before any operation)

You MUST complete this setup before running any script. Do NOT skip this step.

sig status bilibili 2>&1

Check the JSON output fields configured and valid:

  • configured: false → run Provider Setup below. Do NOT proceed without completing it.
  • valid: false (but configured: true) → run sig login bilibili, then re-check.
  • valid: true → detect proxy (see below), then execute the user's request.

Provider Setup

  1. Read <SKILL_DIR>/references/provider-config.yaml
  2. Append the provider block to ~/.sig/config.yaml under providers:
  3. Ask the user: "Do you need a proxy to access this site?" — if yes, add networkProxy: <url> under the provider in config.yaml
  4. Run sig login bilibili (with --network-proxy <url> if proxy was specified)
  5. Verify: run sig status bilibili again — must show valid: true before proceeding

Proxy Detection (after provider is valid)

grep -A15 "^\s*bilibili:" ~/.sig/config.yaml | grep networkProxy | awk '{print $2}'

If this outputs a URL, prefix ALL python3 commands with HTTPS_PROXY=<url> HTTP_PROXY=<url>. If using socks5, convert to socks5h for python (e.g. socks5://... → socks5h://...). If empty, no proxy needed.

Running Scripts

All scripts require setup to be completed first (see above).

Read operations — use sig run to inject cookie (enables authenticated features):

sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_hot.py --cookie "$SIG_BILIBILI_COOKIE" --limit 10'

Write operations — require sig run (cookie is mandatory):

sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_like.py --cookie "$SIG_BILIBILI_COOKIE" --aid 123456'

Env var: SIG_BILIBILI_COOKIE

On auth error (401/403): run sig login bilibili automatically (no user prompt), then retry.

Scripts Reference

All scripts are in this skill's scripts/ directory. Run via Bash tool.

Read Operations

ScriptPurposeAuth
bilibili_video.pyVideo details by BVNone
bilibili_hot.pyHot/trending videosNone
bilibili_popular.pyPopular videosNone
bilibili_ranking.pyRanking by categoryNone
bilibili_search.pySearch videos/usersNone
bilibili_comments.pyVideo commentsNone
bilibili_user.pyUser profile + vidsNone
bilibili_dynamic.pyDynamic feed (动态)Required
bilibili_me.pyCurrent user profileRequired
bilibili_history.pyWatch historyRequired
bilibili_subtitle.pyVideo subtitlesNone

Write Operations

ScriptPurposeAuth
bilibili_like.pyLike/unlike a videoRequired
bilibili_coin.pyGive coins to videoRequired
bilibili_favorite.pyFavorite/unfavoriteRequired

bilibili_video.py

--bvid ID             Video BV ID (e.g. BV1xx411c7mD) (required)

bilibili_hot.py

--limit N             Max videos to return (default: 20)
--page N              Page number (default: 1)

bilibili_popular.py

--limit N             Max videos to return (default: 20)
--page N              Page number (default: 1)

bilibili_ranking.py

--category NAME       Category: all, anime, music, dance, game, tech, knowledge, life, food, animal, car, fashion, entertainment, movie, tv (default: all)
--limit N             Max videos to return (default: 20)

bilibili_search.py

--keyword TEXT        Search keyword (required)
--type TYPE           Search type: video, user (default: video)
--page N              Page number (default: 1)
--limit N             Max results (default: 20)

bilibili_comments.py

--bvid ID             Video BV ID (required)
--limit N             Max comments to return (default: 20)
--page N              Page number (default: 1)

bilibili_user.py

--mid N               User mid (numeric ID) (required)
--include-videos      Include recent videos (flag)

bilibili_dynamic.py

--cookie COOKIE       Bilibili session cookie (required)
--limit N             Max items to return (default: 20)
--offset TOKEN        Pagination offset from previous response

bilibili_me.py

--cookie COOKIE       Bilibili session cookie (required)

bilibili_history.py

--cookie COOKIE       Bilibili session cookie (required)
--limit N             Max items to return (default: 20)
--view-at N           Cursor from previous response for pagination

bilibili_subtitle.py

--bvid ID             Video BV ID (required)
--lang CODE           Subtitle language code (e.g. zh-CN, en-US, ai-zh). Default: first available
--cookie COOKIE       Bilibili session cookie (may be needed for some videos)

bilibili_like.py

--cookie COOKIE       Bilibili session cookie (required)
--aid N               Video aid (numeric ID) (required)
--undo                Unlike instead of like (flag)

bilibili_coin.py

--cookie COOKIE       Bilibili session cookie (required)
--aid N               Video aid (numeric ID) (required)
--multiply N          Number of coins: 1 or 2 (default: 1)

bilibili_favorite.py

--cookie COOKIE       Bilibili session cookie (required)
--aid N               Video aid (numeric ID) (required)
--folder-id N         Favorites folder ID (optional, defaults to first folder)
--undo                Remove from favorites instead of adding (flag)

Safety

Write operations are visible to the user's Bilibili account. Like and favorite are reversible via --undo. Coins cannot be taken back once given.

Always confirm with the user before calling bilibili_coin.py since coins are a limited, non-refundable currency on Bilibili.

Key Concepts

BV IDs — Bilibili videos are identified by BV IDs (e.g. BV1xx411c7mD). Most read scripts accept BV IDs directly.

AIDs — Numeric video IDs used by write operations. Get the aid from video details (bilibili_video.py).

WBI Signing — Search and user profile endpoints require WBI parameter signing. The client handles this automatically.

CSRF Token — Write operations need a bili_jct CSRF token extracted from the session cookie. The client extracts it automatically.

Categories — Ranking supports categories: all (0), anime (1), music (3), dance (129), game (4), tech (188), knowledge (36), life (160), food (211), animal (217), car (223), fashion (155), entertainment (5), movie (181), tv (177).

Pagination — List endpoints accept --page for page number and --limit for page size.

Error Handling

ErrorCauseFix
HTTP_412Request blocked by anti-spamWait and retry, or use different IP
HTTP_404Video/user not foundCheck the ID is correct
AUTH_REQUIREDNo cookie for write opAuto-run sig login (no user prompt needed), retry
NO_CSRFNo bili_jct in cookieAuto-run sig login (no user prompt needed), retry
API_ERRORBilibili returned error codeCheck error message for details

Workflow Examples

Browse hot videos

  1. sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_hot.py --cookie "$SIG_BILIBILI_COOKIE" --limit 10'
  2. Next page: sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_hot.py --cookie "$SIG_BILIBILI_COOKIE" --limit 10 --page 2'

Get video details

  1. sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_video.py --cookie "$SIG_BILIBILI_COOKIE" --bvid BV1xx411c7mD'

Search for videos

  1. sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_search.py --cookie "$SIG_BILIBILI_COOKIE" --keyword "machine learning" --limit 10'

Search for users

  1. sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_search.py --cookie "$SIG_BILIBILI_COOKIE" --keyword "username" --type user'

Read video comments

  1. sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_comments.py --cookie "$SIG_BILIBILI_COOKIE" --bvid BV1xx411c7mD --limit 20'

View ranking

  1. sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_ranking.py --cookie "$SIG_BILIBILI_COOKIE" --category music --limit 10'

Like a video

  1. Get the aid: sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_video.py --cookie "$SIG_BILIBILI_COOKIE" --bvid BV1xx411c7mD' (check the aid field)
  2. sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_like.py --cookie "$SIG_BILIBILI_COOKIE" --aid 123456'

Give coins

  1. Confirm with user first — coins are non-refundable
  2. sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_coin.py --cookie "$SIG_BILIBILI_COOKIE" --aid 123456 --multiply 1'

Add to favorites

  1. sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_favorite.py --cookie "$SIG_BILIBILI_COOKIE" --aid 123456 --folder-id 100'

View my profile

  1. sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_me.py --cookie "$SIG_BILIBILI_COOKIE"'

Browse dynamic feed

  1. sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_dynamic.py --cookie "$SIG_BILIBILI_COOKIE" --limit 10'
  2. Next page: sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_dynamic.py --cookie "$SIG_BILIBILI_COOKIE" --offset TOKEN'

View watch history

  1. sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_history.py --cookie "$SIG_BILIBILI_COOKIE" --limit 20'

Get video subtitles

  1. sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_subtitle.py --cookie "$SIG_BILIBILI_COOKIE" --bvid BV1xx411c7mD'
  2. Choose language: sig run bilibili -- bash -c 'python3 <SKILL_DIR>/scripts/bilibili_subtitle.py --cookie "$SIG_BILIBILI_COOKIE" --bvid BV1xx411c7mD --lang en-US'

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

douyin

無料

Provide authenticated cookies for Douyin (抖音/TikTok China) — two providers: douyin (www.douyin.com for scraping) and douyin-live (live.douyin.com for livestream). Use this skill whenever the user needs Douyin cookies for scraping tools like DouYin_Spider, or needs to authenticate with Douyin services. Trigger when the user mentions 抖音, Douyin, TikTok China, douyin cookies, or wants to use tools that require Douyin login cookies.

日本語の概要は準備中です。原文の説明を表示しています。

sigcli/sigcli2932026年9月28日 更新

Interact with Hacker News (news.ycombinator.com) — browse top, new, and best stories, read item details and comment threads, look up user profiles, and search posts via Algolia. Use this skill whenever the user mentions Hacker News, HN, YCombinator news, ycombinator.com, news.ycombinator.com, wants to browse tech news, read HN discussions, search HN posts, or look up HN users. Also trigger when the user pastes an HN URL (e.g. news.ycombinator.com/item?id=12345). Keywords: Hacker News, HN, YC, ycombinator, tech news, Show HN, Ask HN, HN front page.

日本語の概要は準備中です。原文の説明を表示しています。

sigcli/sigcli2932026年9月28日 更新

linkedin

無料

Interact with LinkedIn — view your profile, browse other profiles, read the feed, search jobs/posts/people, get job details, create posts, like/unlike posts, comment, send connection requests, and follow/unfollow users. Use this skill whenever the user mentions LinkedIn, wants to search for jobs or people, read their LinkedIn feed, view a profile, get job details, create a post, like or comment on content, send a connection request, or follow someone. Also trigger when the user pastes a LinkedIn URL (e.g. linkedin.com/in/..., linkedin.com/jobs/view/...) or mentions LinkedIn networking.

日本語の概要は準備中です。原文の説明を表示しています。

sigcli/sigcli2932026年9月28日 更新

msteams

無料

Interact with Microsoft Teams — send and read messages, search conversations, look up people, check calendar, get meeting transcripts, and manage chats. Use this skill whenever the user mentions Teams, MS Teams, Microsoft Teams, wants to send a message, read chat history, search conversations, look up a colleague, check their calendar, find meeting recordings or transcripts, see direct reports or manager, or do anything involving Teams communication. Also trigger when the user asks about scheduling, org chart, people search, or wants to message someone.

日本語の概要は準備中です。原文の説明を表示しています。

sigcli/sigcli2932026年9月28日 更新

outlook

無料

Interact with Outlook email — read inbox, send emails, search messages, reply/forward, manage folders, download attachments. Use this skill whenever the user mentions email, Outlook, inbox, mail, send email, check email, unread messages, email search, attachments, reply to email, forward email, 邮件, 收件箱, or wants to read, send, search, reply to, forward, or manage emails.

日本語の概要は準備中です。原文の説明を表示しています。

sigcli/sigcli2932026年9月28日 更新

reddit

無料

Interact with Reddit — browse subreddits, read posts and comments, search content, view user profiles, post comments, vote, save posts, subscribe to subreddits. Use this skill whenever the user mentions Reddit, r/, subreddit, wants to browse Reddit posts, read Reddit discussions, search Reddit, look up Reddit users, or interact with Reddit content. Also trigger when the user pastes a Reddit URL (e.g. reddit.com/r/programming/...) or mentions a subreddit name.

日本語の概要は準備中です。原文の説明を表示しています。

sigcli/sigcli2932026年9月28日 更新

sigcli のスキルをすべて見る

このスキルの問題を報告する