OpenBiliClaw AGENTS.md

OpenBiliClaw AGENTS.md is an instructions file for Codex, OpenCode from whiteguo233/OpenBiliClaw. It costs 1,013 tokens per session, scanned A, original, MIT.

Repository instructions for developing the OpenBiliClaw project, including its structure, commands, configuration, testing, and worktree rules. A worktree is a separate working directory for a Git branch.

In plain words
What is it for?
Use it when changing OpenBiliClaw code, running its formatting, linting, type checks, or tests, configuring the local app, or modifying its browser extension.
Why use it?
It gives contributors one set of project-specific rules, reducing accidental changes to the wrong files or branch and making checks repeatable.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

About the project

OpenBiliClaw is a local, open-source AI agent that learns a person's interests and discovers content across multiple social platforms and the open web. It is for people who want personalized content recommendations with their usage data kept on their own machine.

whiteguo233/OpenBiliClaw · 3,206 stars · on GitHub · whiteguo233.github.io

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.

agentmods
npx agentmods add instructions/whiteguo233/openbiliclaw/agents-md
Clone the repo
git clone --depth 1 https://github.com/whiteguo233/OpenBiliClaw

Made for: Codex, OpenCode.

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 OpenBiliClaw AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/whiteguo233/openbiliclaw/agents-md.svg)](https://agentmods.dev/instructions/whiteguo233/openbiliclaw/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/whiteguo233/openbiliclaw/agents-md"><img src="https://agentmods.dev/badge/instructions/whiteguo233/openbiliclaw/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,013 This file is loaded in full into every session.
When invoked 1,013 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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.01013 $0.01013
Opus 5 $0.00507 $0.00507
Sonnet 5 $0.00203 $0.00203
Haiku 4.5 $0.00101 $0.00101

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

Security

Grade A, and why

OpenBiliClaw AGENTS.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 6d 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.

AGENTS.md · 38 lines

What it actually says

Repository Guidelines

项目结构与模块组织

主代码位于 src/openbiliclaw/agent/ 负责编排,bilibili/ 负责站点接入,memory/soul/discovery/recommendation/ 分别承载理解、发现与推荐链路。测试位于 tests/,命名采用 test_*.py。设计和路线文档集中在 docs/,其中 docs/v0.1-todolist.md 是当前 v0.1 的开发主线。浏览器插件代码单独放在 extension/,其中 extension/src/ 为脚本源码,extension/popup/ 为弹窗页面。

构建、测试与开发命令

先创建虚拟环境并安装开发依赖:pip install -e ".[dev]"。常用检查命令如下:

ruff format src/ tests/
ruff check src/ tests/
mypy src/
pytest
pytest --cov=openbiliclaw

本地体验 CLI 可使用 openbiliclaw startopenbiliclaw profileopenbiliclaw recommend。如修改配置相关逻辑,请同步验证 openbiliclaw config-showextension/ 当前未声明独立包管理脚本;若修改插件,请在 PR 中写明手动验证步骤。

开发顺序与配置约定

v0.1 开发建议以 docs/v0.1-todolist.md 为准,按“连接 -> 理解 -> 发现 -> 推荐 -> 学习 -> 插件 -> 稳定交付”的里程碑顺序推进,避免跳过底层依赖直接做上层体验。配置样例使用 config.example.toml;本地调试时基于它生成 config.toml,并仅在本机保存 API Key、Cookie 等敏感信息。

Worktree 开发约定

新增功能或修复 bug 必须先使用 git worktree add 创建独立 worktree 和对应分支,再在该 worktree 中编码、测试和提交;不得直接在当前主工作区实现这两类变更。开始前先确认当前工作区的未提交改动,不能覆盖、丢弃或混入已有改动。任务完成后保留清晰的分支边界,并在 worktree 中完成必要验证。

编码风格与命名约定

Python 统一使用 4 空格缩进、类型注解和清晰的模块边界;公开 API 与核心数据结构应补充简洁 docstring。格式化与 lint 由 Ruff 管理,静态类型检查使用 MyPy 严格模式。模块文件名使用小写下划线风格,如 openai_provider.py;测试函数采用 test_<behavior> 命名。

测试要求

新增功能默认同时补充单元测试;涉及真实 B 站或模型服务的流程,优先拆成可 mock 的单元测试,并将真实调用保留为手动或集成测试。v0.1 目标覆盖率参考 docs/v0.1-todolist.md,保持在 70% 以上。提交前至少运行 pytest,改动接口、配置或类型定义时同时运行 mypy src/ruff check src/ tests/

提交与 Pull Request 要求

提交信息遵循 Conventional Commits,例如 feat: add bilibili auth status commandfix: validate missing api key。PR 说明应包含:变更摘要、测试命令与结果、关联任务或文档入口;如改动 CLI 输出或插件页面,请附终端输出或截图。不要提交真实 config.toml、Cookie、API Key 或其他本地敏感数据。

文档更新要求(强制)

每次提交、合回 main 或发版,以及任何改动接口、模块边界、数据流、配置、CLI、依赖或对外集成的变更,均强制按范围同步模块文档、变更日志、架构图、CLI 与配置文档、安装器文档;权威逐项清单见 CLAUDE.md「Documentation Requirements」

AGENTS.md 面向可能不会自动加载 CLAUDE.md 的非 Claude agent,因此本义务在此独立生效:即使未自动读取 CLAUDE.md,也必须打开上述链接并遵循清单,缺少相应文档更新的分支不得合入。

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. 6d ago First seen · 38 lines · 1,013 tokens per session scan A ee4568b0ce9f

Subscribe to this mod's changes

OpenBiliClaw AGENTS.md is an instructions file published in the GitHub repository whiteguo233/OpenBiliClaw (3,206 stars, last pushed today), licensed MIT. It adds 1,013 tokens to every session, about $0.0051 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.