rb-refresh

rb-refresh is a command for Claude Code from study8677/repobrain. It costs 25 tokens per session (437 once invoked), scanned A, original, MIT.

A command that rebuilds RepoBrain's knowledge base for the current workspace. RepoBrain is a tool that keeps searchable project information for an agent.

In plain words
What is it for?
Running a full refresh, a quicker refresh of affected parts after committed changes, or resuming failed parts of an earlier refresh.
Why use it?
After major code changes, the agent's project knowledge can become outdated; refreshing it brings that information up to date.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the repobrain plugin — 4 skills, 7 commands, 1 hook shipped together

Good fit Running a full refresh, a quicker refresh of affected parts after committed changes, or resuming failed parts of an earlier refresh.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/study8677/repobrain/rb-refresh
About the project

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.

study8677/repobrain · 1,332 stars · on GitHub · deepwiki.com

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.

Clone the repo
git clone --depth 1 https://github.com/study8677/repobrain

Made for: Claude Code.

Or install repobrain, the plugin that ships this one along with the rest of its 4 skills, 7 commands, 1 hook.

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 rb-refresh

README.md
[![agentmods](https://agentmods.dev/badge/commands/study8677/repobrain/rb-refresh/github.svg)](https://agentmods.dev/commands/study8677/repobrain/rb-refresh)
Your own site
<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.

agentmods 80×15 button for rb-refresh

Your own site · 80×15
<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>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 437 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.00025 $0.00437
Opus 5.5 $0.00010 $0.00175
Sonnet 5.5 $0.00005 $0.00087
Haiku 4.5 $0.00003 $0.00044

Measured yesterday against content hash 7b41e49bd600, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

commands/rb-refresh.md · 41 lines

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.

简洁说明此次是构建、续跑、更新、跳过还是失败。完整构建可能需要几分钟,失败时 不能声称知识库已经更新。

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. yesterday Changed · +4 lines 7b41e49bd600
  2. 8d ago Changed · -7 lines · -4 tokens per session 2f97dc08a65e
  3. 1mo ago First seen · 44 lines · 29 tokens per session scan A eef30501fe64

Subscribe to this mod's changes

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.