Agent skill

Bilibili Hub

by OpenMinis in OpenMinis/MinisSkills

A skill for reading and writing Bilibili data with Python + UV, using bilibili-api-python + aiohttp.

MITAuto-check passedMedia & Creative

Install Bilibili Hub

skills CLI
$ npx skills add OpenMinis/MinisSkills --skill bilibili-hub -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OpenMinis/MinisSkills bilibili-hub --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OpenMinis/MinisSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/bilibili-hub .claude/skills/bilibili-hub && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bilibili-hub
GitHub stars
446
Token cost
~2.2k tokens
SKILL.md length
599 words
Files
6 (incl. scripts)
Skills in repo
49
Repo updated
First seen
Licence
MIT

At a glance

A skill for reading and writing Bilibili data with Python + UV, using bilibili-api-python + aiohttp.

  • Works in 3 steps: Use browser_use navigate to open… → Use browser_use get_cookies to retrieve… → Load the offload env file
  • Tasks that involve Transcription
  • SKILL.md covers File Structure, Authentication Methods, Quick Start and API Method Quick Reference, plus 2 more sections
  • Runs Python scripts from its folder; calls uv and ffmpeg; reaches bilibili.com

What it does

Bilibili Hub is an agent skill from OpenMinis/MinisSkills. A skill for reading and writing Bilibili data with Python + UV, using bilibili-api-python + aiohttp. It automatically obtains cookies through browseruse getcookies for authentication, so no manual copying is required. Supports video details, subtitles, AI summaries, comments, user profiles, search, popular videos/rankings, following dynamics feed, favorites, Watch Later, viewing history, interactions (likes, coins, triple action), publishing and deleting dynamics, and more. When a user mentions "Bilibili,"…

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts (for example `scripts/__init__.py`, `scripts/client.py` and `scripts/exceptions.py`).

It sits in Media & Creative, covering Transcription, Browser automation and Video and podcast notes. It works with Bilibili and Python. The repository describes itself as: Skills collection for Minis. The licence is MIT.

When your agent uses it

  • Tasks that involve Transcription
  • Tasks that involve Browser automation
  • Tasks that involve Video and podcast notes

Example prompts

  • “Bilibili,”
  • “bilibili,”
  • “Bilibili videos,”
  • “/bilibili-hub”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Use browser_use navigate to open https://www.bilibili.com and confirm that you are logged in.
  2. Use browser_use get_cookies to retrieve cookies (raw values do not appear in the conversation).
  3. Load the offload env file

What it can do on your machine

Read from SKILL.md and the folder at commit ae8c5db. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv
    • ffmpeg

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • bilibili.com

    Also links to:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bilibili Hub loads about 2.2k tokens when it runs. Until then it costs about 204 tokens; SKILL.md has 599 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~204
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from OpenMinis/MinisSkills at commit ae8c5db, republished under its MIT licence (© OpenMinis). 599 words, ~2,208 tokens.

Download SKILL.mdSave it as .claude/skills/bilibili-hub/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
bilibili-hub
description
A skill for reading and writing Bilibili data with Python + UV, using bilibili-api-python + aiohttp. It automatically obtains cookies through `browser_use get_cookies` for authentication, so no manual copying is required. Supports video details, subtitles, AI summaries, comments, user profiles, search, popular videos/rankings, following dynamics feed, favorites, Watch Later, viewing history, interactions (likes, coins, triple action), publishing and deleting dynamics, and more. When a user mentions "Bilibili," "bilibili," "Bilibili videos," "Bilibili popular," "bilibili-hub," "get Bilibili data," "Bilibili subtitles," "Bilibili comments," "Bilibili favorites," "Bilibili dynamics," or any scenario that requires programmatically reading or writing Bilibili content, this skill must be triggered.

bilibili-hub

Modified from: jackwener/bilibili-cli (Apache-2.0)

This skill simplifies and modifies the original repository as follows:

  • Removed the browser-cookie3 / click / rich / PyYAML / qrcode dependencies
  • Changed cookie authentication to accept a dict directly or read from environment variables, without automatic browser extraction
  • Removed the CLI layer (commands/), QR login, formatters, and related components
  • Kept all API methods and wrapped them uniformly as synchronous interfaces (asyncio.run)
  • Core dependency: bilibili-api-python, a third-party SDK that reverse engineers the Bilibili API
  • In the Minis environment, cookies are obtained automatically through browser_use get_cookies

File Structure

/var/minis/skills/bilibili-hub/
├── SKILL.md
├── pyproject.toml          # bilibili-api-python + aiohttp
└── scripts/
    ├── __init__.py
    ├── exceptions.py       # 6 structured exception types
    ├── payloads.py         # Data structure normalization (normalize_* functions)
    └── client.py           # BiliClient core class (all API methods)

Authentication Methods

The Bilibili Web API uses three key cookies:

CookieDescription
SESSDATAUser session (required for read operations)
bili_jctCSRF token (required for write operations: likes, coins, posting dynamics, etc.)
DedeUserIDUser ID (recommended)
buvid3Device ID (recommended; reduces the likelihood of triggering risk control)
Method 1: Automatically retrieve via browser_use (preferred in Minis environments)
  1. Use browser_use navigate to open https://www.bilibili.com and confirm that you are logged in.
  2. Use browser_use get_cookies to retrieve cookies (raw values do not appear in the conversation).
  3. Load the offload env file:
bash
. /var/minis/offloads/env_cookies_www_bilibili_com_xxx.sh
export BILI_SESSDATA="$COOKIE_SESSDATA"
export BILI_JCT="$COOKIE_BILI_JCT"
export BILI_USERID="$COOKIE_DEDEUSERID"
export BILI_BUVID3="$COOKIE_BUVID3"

Note: get_cookies only applies to the current page's domain. Navigate to https://www.bilibili.com before calling it.

Method 2: Manually retrieve from browser DevTools
  1. Log in to Bilibili, then open DevTools -> Application -> Cookies -> https://www.bilibili.com.
  2. Find the values of SESSDATA, bili_jct, and DedeUserID.
  3. Store them in the Minis environment variables: BILI_SESSDATA / BILI_JCT / BILI_USERID.
Ways to pass cookies (three methods)
python
# Method 1: From environment variables (recommended)
client = BiliClient.from_env()

# Method 2: Pass a dict directly
client = BiliClient({
    "SESSDATA":   os.environ["BILI_SESSDATA"],
    "bili_jct":   os.environ["BILI_JCT"],
    "DedeUserID": os.environ["BILI_USERID"],
})

# Method 3: Read-only operations (no write permissions required)
client = BiliClient({"SESSDATA": os.environ["BILI_SESSDATA"]})

Quick Start

Environment setup
bash
cd /var/minis/skills/bilibili-hub
uv sync
Calling as a Python library
python
import os, json, sys
sys.path.insert(0, "/var/minis/skills/bilibili-hub")
from scripts.client import BiliClient

client = BiliClient.from_env()

# Current user information
me = client.whoami()
print("User:", me.get("name"), "UID:", me.get("mid"))

# Search videos
videos = client.search_videos("Python Tutorial", count=5)
for v in videos:
    print(f"  {v['bvid']} {v['title']} ({v['duration']})")

# Get video details (including subtitles)
detail = client.get_video("BV1xx411c7mD", subtitle=True)
print(detail["video"]["title"])
print(detail["subtitle"]["text"][:200])

# Popular videos
hot = client.get_hot(count=10)
for v in hot:
    print(f"  {v['bvid']} {v['title']} 👁{v['stats']['view']}")

API Method Quick Reference

Account
MethodDescription
whoami()Get information about the currently logged-in user
Video
MethodDescription
get_video(bvid, *, subtitle, subtitle_timeline, ai_summary, comments, related)Get video details (optional subtitles/AI summary/comments/related videos)

bvid supports a BV number or full URL and is extracted automatically.

Users
MethodDescription
get_user(uid)Get user profile information + following/follower counts
get_user_videos(uid, count=20)Get videos posted by a user
MethodDescription
search_videos(keyword, page=1, count=20)Search videos
search_users(keyword, page=1)Search users
Discover
MethodDescription
get_hot(page=1, count=20)Site-wide popular videos
get_rank(day=3, count=50)Site-wide rankings (day: 1/3/7)
get_feed(offset=0)Following dynamics feed (login required)
get_my_dynamics(offset=0)Dynamics I published (login required)
post_dynamic(text)Post a text dynamic (login + bili_jct required)
delete_dynamic(dynamic_id)Delete a dynamic (login + bili_jct required)
Show full SKILL.md (238 more words)Show less
Favorites / History
MethodDescription
get_favorites()Get the favorites folder list (login required)
get_favorites(folder_id)Get videos in a favorites folder
get_following(page=1)Get the following list (login required)
get_watch_later()Get the Watch Later list (login required)
get_history()Get viewing history (login required)
Download
MethodDescription
download_video(bvid, output_dir, filename=None)Download the full video (mp4), automatically handling DASH merging
download_audio(bvid, output_dir, filename=None)Download only the audio stream (m4a), suitable for ASR transcription

Download process:

  • DASH streams (common): download the video stream and audio stream separately -> merge with ffmpeg copy -> if merging fails, keep the silent video
  • FLV/MP4 streams (rare): download directly, no merging required
  • Without logging in, downloads are limited to 480P; after logging in, 1080P is available (premium members can download higher quality)
MethodDescription
like(bvid) / like(bvid, undo=True)Like / unlike (requires bili_jct)
coin(bvid, num=1)Give 1 or 2 coins (requires bili_jct)
triple(bvid)Perform the one-click triple action (requires bili_jct)
unfollow(uid)Unfollow a user (requires bili_jct)

Error Handling

python
from scripts.exceptions import (
    AuthenticationError,  # Cookie missing or expired
    RateLimitError,       # Triggered risk control (412)
    NotFoundError,        # Video/user does not exist
    NetworkError,         # Network/timeout error
    InvalidBvidError,     # Invalid BV number format
    BiliError,            # Other API error (base class)
)

try:
    detail = client.get_video("BV1xx411c7mD")
except AuthenticationError:
    print("Cookie has expired. Please retrieve it again.")
except RateLimitError:
    print("Risk control triggered. Try again later.")
except NotFoundError:
    print("Video does not exist.")
except BiliError as e:
    print(f"API error: {e}")

Important Notes

  • SESSDATA is the minimum requirement for read operations. Write operations (likes, coins, posting dynamics) also require bili_jct.
  • Cookies are usually valid for several days to several weeks. After they expire, retrieve them again through browser_use get_cookies.
  • Bilibili applies risk control to high-frequency requests (HTTP 412). An operation interval of at least 1 second is recommended.
  • bilibili-api-python is a community-maintained reverse-engineering project, and its interfaces may break when Bilibili updates.
  • Write operations (coins, triple action, etc.) cannot be reversed. Use them with caution.

© OpenMinis, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts) in bilibili-hub of OpenMinis/MinisSkills.

  • SKILL.md
  • pyproject.toml
  • scripts/__init__.py
  • scripts/client.py
  • scripts/exceptions.py
  • scripts/payloads.py

Open the folder on GitHubat commit ae8c5db

Compare with similar skills

Bilibili Hub next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bilibili Hub compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bilibili Hub this skillOpenMinis/MinisSkills446—~2.2kAutomated safety check: PassMIT
Video To NotesKIRVO-REPORTING/video-to-notes105—~1.5kAutomated safety check: PassMIT
Video To Subtitle Summaryimlewc/video-to-subtitle-summary-skill218—~4.6kAutomated safety check: NotesMIT
Media To TranscriptbozhouDev/video-skills-toolkit150—~1.8kAutomated safety check: NotesMIT
Bilibili Page ReaderMisaka-Mikoto-Tech/agent-skills278—~3.6kAutomated safety check: PassMIT
Video SummaryLeoYeAI/openclaw-master-skills2.2k—~4.2kAutomated safety check: PassMIT

Similar skills

  • Video To Notes

    KIRVO-REPORTING/video-to-notes

    Use immediately for any bare YouTube or YouTube Shorts URL, youtu.be link, Bilibili or b23.tv link, or other video URL; do not ask what the user wants.

    105 GitHub stars~1.5k tokensUpdated 1 mo ago
    Media & CreativeAuto-check passed
  • Video To Subtitle Summary

    imlewc/video-to-subtitle-summary-skill

    A skill your agent uses when user provides a short video platform URL or local video/audio file and wants subtitles/AI summary, or when user asks to list their own AI Douyin historical tasks.

    218 GitHub stars~4.6k tokensUpdated 2 mo ago
    Media & CreativeAuto-check: notes
  • Media To Transcript

    bozhouDev/video-skills-toolkit

    Convert audio/video URLs or local media into corrected Markdown transcripts through Volcengine recording-file ASR 2.0.

    150 GitHub stars~1.8k tokensUpdated 2 mo ago
    Media & CreativeAuto-check: notes
  • Bilibili Page Reader

    Misaka-Mikoto-Tech/agent-skills

    Get content from Bilibili videos: official subtitles, danmaku (density/peaks/sample), comments.

    278 GitHub stars~3.6k tokensUpdated 20 days ago
    Media & CreativeAuto-check passed
  • Video Summary

    LeoYeAI/openclaw-master-skills

    Video summarization for Bilibili, Xiaohongshu, Douyin, and YouTube.

    2.2k GitHub stars~4.2k tokensUpdated 2 mo ago
    Media & CreativeAuto-check passed
  • Gemini Live API Dev

    google-gemini/gemini-skills

    Official

    A skill your agent uses when building real-time, bidirectional streaming applications with the Gemini Live API, or migrating legacy Live models (2.0/2.5/3.1) to Gemini 3.8 Live.

    4.3k GitHub stars~4.6k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed

More from OpenMinis/MinisSkills

All 49 skills in this repo
  • Android UI Automation

    OpenMinis/MinisSkills

    Automate Android apps that have no public API or web version by driving the UI layer through the Accessibility Service.

    446 GitHub stars~1.6k tokensUpdated 3 days ago
    Auto-check passed
  • Codex On Ish

    OpenMinis/MinisSkills

    Install and run OpenAI Codex CLI inside the Minis/iSH Alpine sandbox on iOS, where rustls TLS and async sockets are broken.

    446 GitHub stars~1k tokensUpdated 3 days ago
    Auto-check passed
  • Evidence Chain Builder

    OpenMinis/MinisSkills

    Score a claim against the evidence behind it. An agent skill from OpenMinis/MinisSkills.

    446 GitHub stars~2.4k tokensUpdated 3 days ago
    Auto-check passed
  • Hyperframes CLI

    OpenMinis/MinisSkills

    HyperFrames CLI and Minis rendering. An agent skill from OpenMinis/MinisSkills.

    446 GitHub stars~3.5k tokensUpdated 3 days ago
    Auto-check passed
  • Whenpeak

    OpenMinis/MinisSkills

    Predict when a person's brain works best from their sleep, using the WhenPeak performance-intelligence API, and turn it into concrete scheduling advice.

    446 GitHub stars~2.3k tokensUpdated 3 days ago
    Auto-check passed
  • Openstreetmap Marker

    OpenMinis/MinisSkills

    Generate a mobile-first, immersive, Amap(Gaode)-style custom landmark marker HTML map for travel itinerary planning, place showcasing, location sharing, etc.

    446 GitHub stars~1.9k tokensUpdated 3 days ago
    Auto-check passed

Works with

Questions about Bilibili Hub

What does Bilibili Hub do?

A skill for reading and writing Bilibili data with Python + UV, using bilibili-api-python + aiohttp. Bilibili Hub is an agent skill from OpenMinis/MinisSkills. A skill for reading and writing Bilibili data with Python + UV, using bilibili-api-python + aiohttp.

When should I use Bilibili Hub?

Bilibili Hub fits situations like: tasks that involve Transcription; tasks that involve Browser automation; tasks that involve Video and podcast notes.

How do I install Bilibili Hub in Claude Code?

Run `npx skills add OpenMinis/MinisSkills --skill bilibili-hub -a claude-code`. Or copy the skill folder (bilibili-hub in OpenMinis/MinisSkills) into .claude/skills/bilibili-hub in your project. Claude Code loads it when a task matches its description.

How do I install Bilibili Hub in Codex?

Run `npx skills add OpenMinis/MinisSkills --skill bilibili-hub -a codex`. Or copy the skill folder (bilibili-hub in OpenMinis/MinisSkills) into .agents/skills/bilibili-hub in your project. Codex loads it when a task matches its description.

Can I use Bilibili Hub in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenMinis/MinisSkills --skill bilibili-hub -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bilibili-hub, .gemini/skills/bilibili-hub, .github/skills/bilibili-hub and .opencode/skills/bilibili-hub in your project.

What does Bilibili Hub need to run?

Going by SKILL.md and its folder, Bilibili Hub needs Python for the scripts in its folder and the command-line tools its instructions call (uv and ffmpeg). Our summary lists: Python 3.

Does Bilibili Hub access the network?

SKILL.md names 2 domains. In commands or code: bilibili.com; the agent is likely to contact it when it follows the instructions. As links in the text: github.com. This is read from the text; nothing was executed.

Is Bilibili Hub safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Bilibili Hub use?

Bilibili Hub is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bilibili Hub use?

About 2.2k tokens (SKILL.md is roughly 8.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bilibili Hub?

Skills that share tags, products or a category with Bilibili Hub: Video To Notes (KIRVO-REPORTING/video-to-notes, 105 stars), Video To Subtitle Summary (imlewc/video-to-subtitle-summary-skill, 218 stars), Media To Transcript (bozhouDev/video-skills-toolkit, 150 stars) and Bilibili Page Reader (Misaka-Mikoto-Tech/agent-skills, 278 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bilibili Hub?

OpenMinis (a GitHub organization) maintains it in OpenMinis/MinisSkills, which has 446 GitHub stars. The repository holds 49 skills in this directory. The repository was last updated on October 7, 2026.

Source: OpenMinis/MinisSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.