rb-refresh

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

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 commands/study8677/repobrain/rb-refresh
Clone the repo
git clone --depth 1 https://github.com/study8677/repobrain
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 375 The whole file, excluding the scripts and references it only reads on demand.
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.00029 $0.00375
Opus 5 $0.00015 $0.00187
Sonnet 5 $0.00006 $0.00075
Haiku 4.5 $0.00003 $0.00038

Measured yesterday against content hash eef30501fe64, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 · 44 lines

What it actually says

Run the RepoBrain CLI for the current workspace.

通过 RepoBrain CLI 刷新当前工作区知识库。

Use Bash:

rb-refresh --workspace "$PWD"

使用 Bash:

rb-refresh --workspace "$PWD"

If $ARGUMENTS contains quick, add --quick. Quick mode compares only committed changes, requires a clean worktree, and lets RepoBrain's ImpactPlanner plus an independent Verifier update only affected Agent groups. It never falls back to a full refresh. If $ARGUMENTS contains failed-only, add --failed-only to resume the failed/pending groups for the same target commit.

如果 $ARGUMENTS 包含 quick,追加 --quick。quick 只比较已提交变更,要求工作区 干净,由 RepoBrain ImpactPlanner 与独立 Verifier 只更新受影响 Agent 分组,且绝不 自动降级为全量刷新。如果 $ARGUMENTS 包含 failed-only,追加 --failed-only, 续跑同一目标提交中失败或待处理的分组。

If rb-refresh is not found, tell the user the engine CLI is not installed and suggest:

如果找不到 rb-refresh,说明 engine CLI 尚未安装,建议用户运行:

pipx install "git+https://github.com/study8677/repobrain.git#subdirectory=engine"

Report progress concisely; full refresh can take several minutes.

简洁汇报进度;完整 refresh 可能需要几分钟。

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 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,321 stars, last pushed 3d ago), licensed MIT. It adds 29 tokens to every session and 375 once invoked, about $0.0001 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.