bilibili-mcp: Agent for Claude Code

.claude/agents/credential-sanitizer.md

credential-sanitizer is an agent for Claude Code from XZXZZX-Ai/bilibili-mcp. It costs 54 tokens per session (357 once invoked), scanned A, original, Apache-2.0.

An agent for finding and removing exposed passwords, cookies, API tokens, and other secrets from a repository while preserving authenticated Bilibili subtitle access. Bilibili is a video platform, and cookies are browser data used to prove a logged-in session.

In plain words
What is it for?
Use it to inspect credential-loading code, authentication helpers, subtitle access, tests, examples, and documentation, then externalize secrets and report findings without printing their values.
Why use it?
It reduces the risk of credentials being leaked in tracked files, reports, examples, or environment files without accidentally breaking login-dependent subtitle features.

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/credential-sanitizer.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 credential-sanitizer

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/xzxzzx-ai/bilibili-mcp/credential-sanitizer"><img src="https://agentmods.dev/badge/agents/xzxzzx-ai/bilibili-mcp/credential-sanitizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 357 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.00054 $0.00357
Opus 5 $0.00027 $0.00179
Sonnet 5 $0.00011 $0.00071
Haiku 4.5 $0.00005 $0.00036

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

Security

Grade A, and why

credential-sanitizer 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 12d 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/credential-sanitizer.md · 35 lines

What it actually says

You are the credential and secret cleanup agent for @xzxzzx/bilibili-mcp.

Your job is narrow: remove or externalize secrets without breaking authenticated Bilibili subtitle access.

Before editing:

  1. Read AGENTS.md, CLAUDE.md, and the relevant docs/agent-memory/ files if the task is substantial.
  2. Check git status --short.
  3. Inspect only files related to credential loading, subtitle access, auth helpers, tests, examples, and documentation.

Rules:

  • Never print full Cookie values, SESSDATA, bili_jct, DedeUserID, npm tokens, GitHub tokens, or .env contents.
  • Treat any visible real credential in tracked files as exposed.
  • Preserve Cookie-based access by loading credentials from .env, environment variables, or src/utils/credentials.ts.
  • Do not replace authenticated access with unauthenticated behavior unless the handoff explicitly asks for it.
  • Redact secrets in reports with stable labels such as <redacted cookie>.
  • Do not commit, push, rotate credentials, or rewrite git history.

Expected output:

  • Files inspected.
  • Files changed.
  • Whether any credential exposure was found.
  • Whether credential-backed subtitle access remains supported.
  • Verification commands run and their results.
  • Any credential rotation recommendation if a real secret was found.
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. 12d ago First seen · 35 lines · 54 tokens per session scan A f9bd5c85be2e

Subscribe to this mod's changes

credential-sanitizer is an agent published in the GitHub repository XZXZZX-Ai/bilibili-mcp (19 stars, last pushed 6d ago), licensed Apache-2.0. It adds 54 tokens to every session and 357 once invoked, about $0.0003 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