RepoBrain is a repository knowledge engine that lets coding agents ask grounded questions about a codebase and receive answers linked to source files and lines. It is for developers using Claude Code, Cursor, Codex, Windsurf, and other AI coding tools. Catalogue add-ons extend its commands, instructions, skills, rules, plugin, and hook workflows.
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.
git clone --depth 1 https://github.com/study8677/repobrainWrote 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/commands/study8677/repobrain/rb-refresh)<a href="https://agentmods.dev/commands/study8677/repobrain/rb-refresh"><img src="https://agentmods.dev/badge/commands/study8677/repobrain/rb-refresh/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.
<a href="https://agentmods.dev/commands/study8677/repobrain/rb-refresh"><img src="https://agentmods.dev/badge/commands/study8677/repobrain/rb-refresh.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00025 | $0.00437 |
| Opus 5.5 | $0.00010 | $0.00175 |
| Sonnet 5.5 | $0.00005 | $0.00087 |
| Haiku 4.5 | $0.00003 | $0.00044 |
Grade A, and why
rb-refresh 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 yesterday.
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.
What it actually says
Run the RepoBrain CLI in the current project directory:
rb-refresh
--workspace defaults to the current directory. The engine automatically selects
first construction, a matching interrupted task, an incremental update, or an
already-current result. It requires a clean Git worktree and uses committed code.
If $ARGUMENTS contains --full, run rb-refresh --full to force a new complete
rebuild. Forward unsupported arguments to the CLI so removed or misspelled
options are rejected; do not translate them to a different refresh mode.
在当前项目目录运行 rb-refresh 即可;--workspace 默认当前目录。引擎自动选择
首次构建、匹配的中断续跑、增量更新或已是最新。要求 Git 工作区干净,只处理已提交
代码。$ARGUMENTS 包含 --full 时运行 rb-refresh --full,强制新建完整重建任务。
其他参数交给 CLI 检查,禁止将不支持的参数悄悄转换成其他刷新方式。
If rb-refresh is not found, explain that the engine CLI is missing and suggest:
如果找不到命令,提示安装 engine CLI:
pipx install "git+https://github.com/study8677/repobrain.git#subdirectory=engine"
Report whether this run builds, resumes, updates, skips, or fails. Full builds can take several minutes. Never treat a failed result as a successful refresh.
Completed local generations are selected by Git commit. Switching back to a previously indexed commit reuses its compatible knowledge without model calls; new commits update from a usable ancestor rather than another branch's tip.
简洁说明此次是构建、续跑、更新、跳过还是失败。完整构建可能需要几分钟,失败时 不能声称知识库已经更新。
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.
- yesterday Changed · +4 lines 7b41e49bd600
- 8d ago Changed · -7 lines · -4 tokens per session 2f97dc08a65e
- 1mo ago First seen · 44 lines · 29 tokens per session scan A eef30501fe64
rb-refresh is a command published in the GitHub repository study8677/repobrain (1,332 stars, last pushed 2d ago), licensed MIT. It adds 25 tokens to every session and 437 once invoked, about $0.0001 per session on Opus 5.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.
Other commands, from other repositories
copy-ai-context
Export converged workspace context to the clipboard for any AI chat.
setup-mcp-claude-code
Build and register the Contorium MCP server for Claude Code or Cursor Agent.
start-fresh-session
Start a fresh Contorium AI context session after a major task or workspace shift.
learn-workspace-intent
Run Contorium BYOK workspace intent learning when API keys are configured.
init-workspace-flow-questions
Phase 8 Questions of init-workspace-flow.
memo
Search, save, inspect, and maintain memo persistent memory.