bilibili-rag-local

bilibili-rag-local is a skill for Claude Code, Codex from via007/bilibili-rag. It costs 72 tokens per session (660 once invoked), scanned A, original, Apache-2.0.

A guide for querying a locally running service that stores and answers questions about saved Bilibili videos. Bilibili is a Chinese video platform, and RAG means retrieving relevant saved content before generating an answer.

In plain words
What is it for?
Use it to search saved videos, summarize their content, show source titles and links, and check whether folders have been imported.
Why use it?
It keeps questions limited to the intended video collection and avoids unsupported answers when content has not been imported or the search scope is missing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to search saved videos, summarize their content, show source titles and links, and check whether folders have been imported.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/via007/bilibili-rag/bilibili-rag-local
About the project

Bilibili RAG turns videos saved in a Bilibili collection into a searchable, source-traceable knowledge base by transcribing their audio and indexing the resulting text. It is for reviewing interviews, lectures, courses, technical videos, and other saved content through retrieval and chat-based questions. The catalogue skill connects a locally running service to OpenClaw so an agent can search and question that knowledge base.

via007/bilibili-rag · 1,321 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add via007/bilibili-rag --skill bilibili-rag-local
Clone the repo
git clone --depth 1 https://github.com/via007/bilibili-rag

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bilibili-rag-local

README.md
[![agentmods](https://agentmods.dev/badge/skills/via007/bilibili-rag/bilibili-rag-local/github.svg)](https://agentmods.dev/skills/via007/bilibili-rag/bilibili-rag-local)
Your own site
<a href="https://agentmods.dev/skills/via007/bilibili-rag/bilibili-rag-local"><img src="https://agentmods.dev/badge/skills/via007/bilibili-rag/bilibili-rag-local/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bilibili-rag-local

Your own site · 80×15
<a href="https://agentmods.dev/skills/via007/bilibili-rag/bilibili-rag-local"><img src="https://agentmods.dev/badge/skills/via007/bilibili-rag/bilibili-rag-local.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 660 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00072 $0.00660
Opus 5 $0.00036 $0.00330
Sonnet 5 $0.00014 $0.00132
Haiku 4.5 $0.00007 $0.00066

Measured 13d ago against content hash 5f347b28d5b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

bilibili-rag-local scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/bilibili-rag-local/SKILL.md · 47 lines

What it actually says

Bilibili RAG Local

面向本地运行的 bilibili-rag 服务(默认 http://127.0.0.1:8000)。

执行前检查

  1. 检查服务可达:优先调用 GET /knowledge/stats
  2. 若不可达,明确提示“本地服务未启动或端口不是 8000”,不要编造结果。

会话与范围(关键)

  1. 执行 /chat/ask 前,先确保拿到 session_id
  2. 使用 GET /knowledge/folders/status?session_id=<session_id> 获取可用 media_id 列表,并作为 folder_ids 传入。
  3. 内容类问题调用 /chat/ask 时,默认必须传:question + session_id + folder_ids,不要传空 folder_ids
  4. 若缺少 session_idfolder_ids,先向用户索取或先查状态接口,不要直接调用无范围问答。

主要能力

  1. 检索片段:调用 POST /chat/search?query=<问题>&k=5
  2. 问答总结:调用 POST /chat/ask,请求体优先包含: questionsession_idfolder_ids
  3. 入库状态:调用 GET /knowledge/folders/status?session_id=<session_id>

返回格式要求

  1. 先给结论,再给证据。
  2. 证据优先来自接口返回的 sourcessearch results
  3. 每条证据给出 title + url,必要时补充 bvid
  4. /chat/ask 返回 sources=[] 或无召回时,明确说明可能是会话无范围或未入库,并提示检查 session_id/folder_ids 与同步状态。

交互策略

  1. 用户是闲聊或无关问题时,简短回复后再引导回收藏夹知识问答。
  2. 用户问题具体且与视频内容相关时,优先调用“带范围参数”的 /chat/ask,不要只按标题猜测回答。
  3. /chat/search 仅用于补充证据或列候选,不要替代最终问答结论。

安全边界

  1. 不输出任何 Cookie、Token、SESSDATA 等敏感信息。
  2. 不执行与本地 bilibili-rag 无关的高风险系统命令。
  3. 仅使用用户本机可访问的服务地址,不主动访问未知公网接口。
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 47 lines · 72 tokens per session scan A 5f347b28d5b8

Subscribe to this mod's changes

bilibili-rag-local is a skill published in the GitHub repository via007/bilibili-rag (1,321 stars, last pushed 4d ago), licensed Apache-2.0. It adds 72 tokens to every session and 660 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 tokens

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

9router-embeddings

Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.

decolua/9router · 66 tokens

azure-search-documents-dotnet

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…

microsoft/skills · 102 tokens

browserwing-admin

Manage and operate BrowserWing — an intelligent browser automation platform. Install dependencies, configure LLM, create/manage/execute automation scripts, use AI-driven exploration to generate scripts, browse the script marketplace, and troubleshoot issues.

MemTensor/MemOS · 47 tokens