brain-refresh

brain-refresh is a skill for Claude Code from jessepinkman9900/claude-second-brain. It costs 74 tokens per session (738 once invoked), scanned A, original, MIT.

A command that refreshes the search index for a personal knowledge vault, which is a folder of notes and source files. It finds changed files and regenerates the data used for similarity-based search.

In plain words
What is it for?
Use it after importing notes, editing wiki or source files in bulk, noticing stale search results, or changing the embedding model.
Why use it?
It makes newly added or edited notes appear in search and helps correct results that have become outdated. A full re-embedding is also available after changing the search model or related tools.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths.

Good fit Use it after importing notes, editing wiki or source files in bulk, noticing stale search results, or changing the embedding model.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jessepinkman9900/claude-second-brain/brain-refresh
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.

Any agent
npx skills add jessepinkman9900/claude-second-brain --skill brain-refresh
Clone the repo
git clone --depth 1 https://github.com/jessepinkman9900/claude-second-brain

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/jessepinkman9900/claude-second-brain/brain-refresh.svg)](https://agentmods.dev/skills/jessepinkman9900/claude-second-brain/brain-refresh)
Your own site
<a href="https://agentmods.dev/skills/jessepinkman9900/claude-second-brain/brain-refresh"><img src="https://agentmods.dev/badge/skills/jessepinkman9900/claude-second-brain/brain-refresh.svg" alt="Measured on agentmods" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 738 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.00074 $0.00738
Opus 5 $0.00037 $0.00369
Sonnet 5 $0.00015 $0.00148
Haiku 4.5 $0.00007 $0.00074

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

Security

Grade A, and why

brain-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 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.

template/.claude/skills/brain-refresh/SKILL.md · 77 lines

How it starts

The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Brain Refresh

Refreshes the qmd index so search reflects the current state of the vault. Wraps pnpm qmd:reindex (incremental) and the qmd CLI's force-embed flag.

Brain Discovery

All commands target the default brain registered in ~/.claude-second-brain/config.toml. Resolve the brain root via the CLI and run qmd through the CLI proxy:

BRAIN_PATH=$(npx -y claude-second-brain path)
npx -y claude-second-brain qmd -- status

Pass --brain <name> before the -- to target a non-default brain.

When to Use

  • After a /brain-ingest session (or several) — batch the refresh, don't run after every file edit
  • After manual edits to wiki/ or raw-sources/ files
  • When /brain-search results feel stale or miss recently added content
  • After upgrading @tobilu/qmd or changing the embedding model — use force mode

Procedure

All pnpm qmd:* commands must run from $BRAIN_PATH; the CLI proxy (claude-second-brain qmd) works from anywhere.

Default — Incremental Refresh

Run:

cd "$BRAIN_PATH" && pnpm qmd:reindex

This script does two things:

  1. Update — scans collections for new, changed, or deleted files and updates the index
  2. Embed — generates vector embeddings for any chunks that need them

Only chunks that changed get re-embedded, so this is fast on subsequent runs.

Force Mode (force argument)

When the user passes force, re-embed every chunk — not just the changed ones. Use after embedding-model changes or if embeddings appear corrupted.

# Step 1 — update the file index first
cd "$BRAIN_PATH" && pnpm qmd:reindex

# Step 2 — force re-embed everything
npx -y claude-second-brain qmd -- embed -f

Force mode is slow — confirm with the user before proceeding if the wiki is large.

Verify

After refresh, confirm with:

npx -y claude-second-brain qmd -- status

Document and embedding counts should be non-zero and reflect recent activity. If embeddings show as 0 or far below document count, re-run the refresh.

Read the full file on GitHub · 77 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. 8d ago First seen · 77 lines · 74 tokens per session scan A 9639f46d8200

Subscribe to this mod's changes

brain-refresh is a skill published in the GitHub repository jessepinkman9900/claude-second-brain (47 stars, last pushed 4mo ago), licensed MIT. It adds 74 tokens to every session and 738 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

waku-computer-use

Control local Mac apps through Waku Computer Use for tasks that require reading or operating app UI. Prefer purpose-built connectors, APIs, or CLIs when available.

egoist/waku · 37 tokens

x-to-obsidian

Capture high-signal X/Twitter posts into an Obsidian vault through the official Obsidian Web Clipper, then let LLM Wiki search, review, and promote the saved notes.

2233admin/obsidian-llm-wiki · 45 tokens

sync

Pull mentions, DMs, hot channel topics, calendar events, and Linear updates from the last 48h (24h for Slack DMs) into the wiki daily folder, and snapshot active vault notes. Sources: Gmail, Slack, Linear, Google Calendar, local wiki/notes/. Creates wiki/daily/ /{mentions.md, topics.md, linear.md, calendar.md…

eliransu/digital-brain · 157 tokens

note

Capture a short, time-bound note in the wiki vault under wiki/notes/. Notes carry a kind (task or reminder) and a due time. They auto-expire 7 days after creation — expired notes never resurface in /sync or /sup. /note writes the note file, updates wiki/notes/index.md, optionally touches wiki/hot.md if the due is in…

eliransu/digital-brain · 154 tokens

obsidian-setup

Guide the user through connecting Obsidian Bridge in three calm steps. Use when the plugin is newly installed, Obsidian is offline, the API key is missing/invalid, or the user asks how to connect Obsidian.

dkdottk/obsidian-bridge · 52 tokens

wiki-prune

Weekly janitor for the Obsidian wiki. Archives wiki/daily/YYYY-MM-DD/ folders older than 7 days into wiki/.archive/YYYY-WW/, keeping the rolled-up summaries that wiki-fold produced. Dry-run by default; --commit moves the folders; --hard deletes archive entries older than 30 days. Suggested cadence: every Monday…

eliransu/digital-brain · 124 tokens