kb-sync

kb-sync is a command for Claude Code from Galaxy-Dawn/claude-scholar. It costs 24 tokens per session (242 once invoked), scanned A, original, MIT.

A command that repairs and refreshes the structure of an Obsidian project knowledge base. An Obsidian knowledge base is a linked collection of notes, indexes, registries, and daily records.

In plain words
What is it for?
Use it after structural changes or batch updates to refresh the project folders, registry, index, daily note, project memory, and hub summary.
Why use it?
It removes the manual work of updating indexes and project records after notes are moved, imported, or changed. It helps keep the project’s note structure and links consistent.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the claude-scholar plugin — 45 skills, 34 commands, 6 agents, 5 hooks shipped together

Good fit Use it after structural changes or batch updates to refresh the project folders, registry, index, daily note, project memory, and hub summary.

Compare 6 commands from other repositories ↓
About the project

Claude Scholar is a semi-automated research assistant for academic research and software development, supporting literature review, coding, experiments, reporting, writing, and project knowledge management. Computer science and AI researchers use it across the research workflow with several coding-agent platforms; the catalogue contains its skills, commands, agents, hooks, plugin, and instruction.

Galaxy-Dawn/claude-scholar · 5,349 stars · on GitHub

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Galaxy-Dawn/claude-scholar
Claude Code
/plugin install claude-scholar

Made for: Claude Code.

Or install claude-scholar, the plugin that ships this one along with the rest of its 45 skills, 34 commands, 6 agents, 5 hooks.

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 kb-sync

README.md
[![agentmods](https://agentmods.dev/badge/commands/galaxy-dawn/claude-scholar/kb-sync.svg)](https://agentmods.dev/commands/galaxy-dawn/claude-scholar/kb-sync)
Your own site
<a href="https://agentmods.dev/commands/galaxy-dawn/claude-scholar/kb-sync"><img src="https://agentmods.dev/badge/commands/galaxy-dawn/claude-scholar/kb-sync.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 242 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.00024 $0.00242
Opus 5 $0.00012 $0.00121
Sonnet 5 $0.00005 $0.00048
Haiku 4.5 $0.00002 $0.00024

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

Security

Grade A, and why

kb-sync 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 8d 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.

commands/kb-sync.md · 35 lines

What it actually says

/kb-sync

Use this when you want a deterministic project-KB resync after structural changes, note moves, migrations, or batch updates.

python3 "${CLAUDE_PLUGIN_ROOT}/skills/obsidian-project-kb-core/scripts/project_kb.py" sync --cwd "$PWD" --scope "$scope"

Typical scopes:

  • auto
  • all
  • index
  • literature
  • experiments
  • results

This refreshes:

  • scaffold integrity under Research/{project-slug}/
  • _system/registry.md
  • 02-Index.md
  • today's Daily/YYYY-MM-DD.md
  • repo-local .claude/project-memory/<project_id>.md
  • 00-Hub.md recent changes when appropriate
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. 8d ago First seen · 35 lines · 24 tokens per session scan A b374962475ad

Subscribe to this mod's changes

kb-sync is a command published in the GitHub repository Galaxy-Dawn/claude-scholar (5,349 stars, last pushed 11d ago), licensed MIT. It adds 24 tokens to every session and 242 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.