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.
npx agentmods add instructions/chanmaoganda/bili-rust/claude-mdgit clone --depth 1 https://github.com/chanmaoganda/bili-rustWrote 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.
[](https://agentmods.dev/instructions/chanmaoganda/bili-rust/claude-md)<a href="https://agentmods.dev/instructions/chanmaoganda/bili-rust/claude-md"><img src="https://agentmods.dev/badge/instructions/chanmaoganda/bili-rust/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01927 | $0.01927 |
| Opus 5 | $0.00963 | $0.00963 |
| Sonnet 5 | $0.00385 | $0.00385 |
| Haiku 4.5 | $0.00193 | $0.00193 |
Grade A, and why
bili-rust CLAUDE.md 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What this is
Tauri 2 desktop Bilibili client. Cargo workspace with two members:
src-tauri/— Rust backend (Tauri host process, Bilibili API client)ui/— Leptos 0.8 + WASM frontend, built by Trunk
The release profile in the workspace Cargo.toml uses lto = true, codegen-units = 1, strip = true — first release build is slow, subsequent ones are cached.
Reference
- Upstream Bilibili HTTP API docs: https://sessionhu.github.io/bilibili-API-collect/ — primary source for endpoint shapes, query params, and the WBI signing scheme. Consult this before adding a new
Bili::*method.
Commands
| Task | Command |
|---|---|
| Dev (hot-reload UI + backend) | cargo tauri dev |
| Release build (binary + bundles) | cargo tauri build |
| Release binary, no installers | cargo tauri build --no-bundle |
Linux installers + binary tarball (deb/rpm → dist/) |
./scripts/linux.sh |
Cross-build Windows NSIS installer from Linux (→ dist/) |
./scripts/windows.sh (needs mingw-w64-gcc + nsis) |
UI alone (WASM → ui/dist/) |
cd ui && trunk build --release |
| UI dev server only | cd ui && trunk serve --port 1420 |
| Backend type-check | cargo check -p bili-rust (or cd src-tauri && cargo check) |
| Live integration smoke test | cargo test --test smoke -- --ignored --nocapture (requires valid cookies.json) |
| Refresh login cookies | Launch the app and visit /login — the in-app QR flow writes cookies.json |
cargo tauri dev/build auto-runs the Trunk step via tauri.conf.json's beforeDevCommand/beforeBuildCommand — don't run Trunk separately unless iterating on the UI in isolation.
Prereqs: rustup target add wasm32-unknown-unknown, cargo install trunk tauri-cli@^2.
Architecture
Backend (src-tauri/src/)
lib.rs—run()is the Tauri entry point. Loadscookies.jsononce at startup, builds anArc<Bili>HTTP client, registers thebilistream://andbiliimg://URI scheme handlers, and exposes commands.api.rs—Bilistruct wraps a singletonreqwest::Client+ cookie jar. WBI keys cached inArc<RwLock<Option<(WbiKeys, Instant)>>>with a 1-hour TTL. Shared to commands via TauriState<Arc<Bili>>.commands.rs—#[tauri::command]s grouped by purpose: read (get_user_info,get_rcmd,get_related,get_play_info,get_view_info,get_danmaku,get_comments,get_action_state), write (like_video,coin_video,triple_video,follow_user,feed_dislike), and diagnostics (get_decoder_probe). All returnResult<_, String>(errors stringified at the Tauri boundary). Register new commands inlib.rs'sinvoke_handler!.wbi.rs— Bilibili WBI signature scheme (mixin-key permutation +wts/w_rid). Most endpoints reject unsigned requests with HTTP 412 — always sign viaBili's helpers, don't hand-build query strings.stream.rs— Async URI scheme handler. Rewrites HTTPS DASH segment URLs tobilistream://seg/<base64>and image URLs tobiliimg://img/<base64>so the frontend can embed them without CSP violations. The handler proxies the actual HTTPS fetch throughBiliso Bilibili CDN'sReferer/Originrequirements are met.cookies.rs— Readscookies.jsonat startup (path overridable viaBILI_COOKIES). The in-app QR flow (commands::qr_login_poll→Bili::replace_cookies) writescookies.jsonand swaps the in-memory session atomically, so re-login does not require an app restart.danmaku.rs— Parses Bilibili'slist.soXML response, auto-detecting raw deflate vs. pre-inflated payloads.
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.
- 5d ago First seen · 73 lines · 1,927 tokens per session scan A 4cc1d7c3c42e
bili-rust CLAUDE.md is an instructions file published in the GitHub repository chanmaoganda/bili-rust (11 stars, last pushed 4mo ago), licensed MIT. It adds 1,927 tokens to every session, about $0.0096 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-31.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.