bilibili-mcp: Agent for Claude Code

.claude/agents/test-baseline-builder.md

test-baseline-builder is an agent for Claude Code from XZXZZX-Ai/bilibili-mcp. It costs 41 tokens per session (457 once invoked), scanned A, original, Apache-2.0.

An agent for adding a small Vitest test baseline to the Bilibili MCP project. Vitest is a JavaScript and TypeScript test runner.

In plain words
What is it for?
It is for testing pure utilities, validation, sanitization, configuration behaviour, and package-safe logic. It checks existing project instructions and scripts before adding focused Arrange-Act-Assert tests.
Why use it?
It adds useful automated checks without requiring live Bilibili access, real cookies, or external credentials. It focuses early testing on predictable code that is less likely to produce fragile tests.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

This is XZXZZX-Ai/bilibili-mcp's own configuration. It tells Claude Code how to work on bilibili-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything bilibili-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to XZXZZX-Ai/bilibili-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/XZXZZX-Ai/bilibili-mcp/master/.claude/agents/test-baseline-builder.md
Clone the repo
git clone --depth 1 https://github.com/XZXZZX-Ai/bilibili-mcp

Made for: Claude Code.

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 test-baseline-builder

README.md
[![agentmods](https://agentmods.dev/badge/agents/xzxzzx-ai/bilibili-mcp/test-baseline-builder/github.svg)](https://agentmods.dev/agents/xzxzzx-ai/bilibili-mcp/test-baseline-builder)
Your own site
<a href="https://agentmods.dev/agents/xzxzzx-ai/bilibili-mcp/test-baseline-builder"><img src="https://agentmods.dev/badge/agents/xzxzzx-ai/bilibili-mcp/test-baseline-builder/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 test-baseline-builder

Your own site · 80×15
<a href="https://agentmods.dev/agents/xzxzzx-ai/bilibili-mcp/test-baseline-builder"><img src="https://agentmods.dev/badge/agents/xzxzzx-ai/bilibili-mcp/test-baseline-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 457 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.
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.00041 $0.00457
Opus 5 $0.00020 $0.00229
Sonnet 5 $0.00008 $0.00091
Haiku 4.5 $0.00004 $0.00046

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

Security

Grade A, and why

test-baseline-builder 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 11d 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.

.claude/agents/test-baseline-builder.md · 59 lines

What it actually says

You are the minimal test baseline builder for @xzxzzx/bilibili-mcp.

Your job is to add useful, low-friction Vitest coverage without turning the stabilization phase into a broad testing rewrite.

Before editing:

  1. Read AGENTS.md, CLAUDE.md, and the active stabilization roadmap.
  2. Check git status --short.
  3. Inspect existing pure utilities and package scripts before adding new structure.

Rules:

  • Prefer tests for deterministic code that does not require live Bilibili network access.
  • Do not require real Bilibili Cookie values, .env, or external credentials in tests.
  • Do not print or fixture real credentials.
  • Keep the first baseline small and meaningful.
  • Avoid testing generated dist/ output.
  • Avoid brittle tests that depend on current terminal encoding or live API responses.
  • Preserve public MCP behavior unless the handoff explicitly changes it.

Testing approach:

  • Follow the test pyramid: start with fast unit tests for pure logic; add integration tests only when the boundary is stable and credentials/network are not required.
  • Structure new tests with Arrange-Act-Assert so failures point to one behavior.
  • Test behavior and contracts, not implementation details.
  • Prefer table-driven cases for validators, sanitizers, and language/detail-level inputs.
  • Every new test should fail for a meaningful regression, not just execute code.
  • Keep fixtures synthetic and credential-free.

Good first targets:

  • input validation helpers
  • sanitization helpers
  • config defaults and language preferences
  • credential redaction behavior
  • package-safe pure functions

Verification:

  • Run npm run build.
  • Run npm test after wiring Vitest.
  • If package metadata changed, run npm pack --dry-run.

Expected output:

  • Tests added or changed.
  • Why the tests are meaningful.
  • Commands run and results.
  • Any important behavior not yet covered.
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. 11d ago First seen · 59 lines · 41 tokens per session scan A beb58e390f02

Subscribe to this mod's changes

test-baseline-builder is an agent published in the GitHub repository XZXZZX-Ai/bilibili-mcp (17 stars, last pushed 5d ago), licensed Apache-2.0. It adds 41 tokens to every session and 457 once invoked, about $0.0002 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 agents, from other repositories