agent-bridge CLAUDE.md

Repository guidance for agent-bridge, a tool that connects coding agents to other services. It requires user-facing communication in Chinese and documents the Bun commands, code structure and data-flow rules.

In plain words
What is it for?
Developing or reviewing the agent-bridge CLI and plugin bundle, following its architecture, and running its validation and build commands.
Why use it?
It prevents contributors from breaking project conventions or producing user-facing text in the wrong language. It also provides the commands needed to check types, run tests and build the project.

Instructions file

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/raysonmeng/agent-bridge/claude-md
Clone the repo
git clone --depth 1 https://github.com/raysonmeng/agent-bridge
Per session 2,848 This file is loaded in full into every session.
When invoked 2,848 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 $0.02848 $0.02848
Opus 5 $0.01424 $0.01424
Sonnet 5 $0.00570 $0.00570
Haiku 4.5 $0.00285 $0.00285

Measured 3d ago against content hash 4b3e247fb1f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-bridge 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 3d 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.md · 169 lines

How it starts

The opening of the file, as written. The whole thing — 169 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.

语言 / Language

  • 🔴 铁律:面向用户的叙述只可以用中文,禁止用英文。(用户多次强调,2026-06-11 再次明确"禁止说英文!!只可以说中文!")。聊天回复、状态汇报、表格标题、列表、解释、报告里的叙述文字——一律中文。唯一例外:代码、命令、文件路径、标识符、API 名、配置键、PR/commit 里既有的英文约定段落可保留原文(因为它们就是字面量)。除此之外任何句子都不许用英文。每次回复前自检:有没有冒出英文叙述句?有就改成中文。
  • 强制使用中文回复(用户明确要求 / 强制项目级规则)。所有面向用户的输出(解释、报告、问答、plan、commit message 中的中文部分、issue / report)使用中文。
  • 代码内的注释、变量名、提交信息中的英文部分、日志保持英文(与项目既有约定一致)。
  • 涉及给用户读的内容(README、用户文档、终端说明)必须中文优先。
  • 若用户用英文提问,仍用中文回复(除非他明确要求英文)。

Commands

Runtime is Bun — do not change the local Bun version.

Task Command
Install deps bun install
Type check bun run typecheck (= tsc --noEmit)
Run all tests bun test src
Run a single test file bun test src/unit-test/<name>.test.ts
Run a single test by name bun test src -t "<test name pattern>"
Full pre-commit check bun run check (typecheck + tests + plugin sync + plugin versions)
Build CLI binary bun run build:clidist/cli.js
Build plugin bundle bun run build:pluginplugins/agentbridge/server/{bridge-server,daemon}.js
Verify plugin sync bun run verify:plugin-sync
Validate plugin manifest bun run validate:plugin (requires claude CLI)
Local dev link bun link then agentbridge dev (registers local marketplace + installs plugin; repo checkout only)
Update global CLI + plugin bun run install:global (one command: rebuild, replace global install, sync plugin; --skip-plugin to opt out)
Start session agentbridge claude (one terminal) + agentbridge codex (another)
Show quota snapshot agentbridge budget [--json] (both agents' 5h/weekly usage, drift, pause state)
Stop everything agentbridge kill

Before committing: run bun run typecheck && bun test src.

After modifying src/: run bun run build:plugin before end-to-end testing. The installed plugin loads the bundled JS under plugins/agentbridge/server/, not the raw TS — forgetting to rebuild means you are testing the old code.

Read the full file on GitHub · 169 lines

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. 3d ago First seen · 169 lines · 2,848 tokens per session scan A 4b3e247fb1f9

Subscribe to this mod's changes

agent-bridge CLAUDE.md is an instructions file published in the GitHub repository raysonmeng/agent-bridge (315 stars, last pushed 4d ago), licensed MIT. It adds 2,848 tokens to every session, about $0.0142 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.