second-brain-os: Skill for Claude Code

.claude/skills/reindex/SKILL.md

reindex is a skill for Claude Code from the-sid-dani/second-brain-os. It costs 105 tokens per session (1,677 once invoked), scanned A, original, MIT.

A command that rebuilds machine-generated index files showing what documents and repositories exist in the workspace.

In plain words
What is it for?
Use it to regenerate indexes, sync them after bulk changes, or audit code repositories and orphaned projects.
Why use it?
It keeps directory summaries current after files move or change and helps reveal missing or untracked repositories.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

This is the-sid-dani/second-brain-os's own configuration. It tells Claude Code how to work on second-brain-os itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything second-brain-os configures →

Reuse

Borrowing it

Nothing to install: this file belongs to the-sid-dani/second-brain-os. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/the-sid-dani/second-brain-os/main/.claude/skills/reindex/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/the-sid-dani/second-brain-os

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 reindex

README.md
[![agentmods](https://agentmods.dev/badge/skills/the-sid-dani/second-brain-os/reindex.svg)](https://agentmods.dev/skills/the-sid-dani/second-brain-os/reindex)
Your own site
<a href="https://agentmods.dev/skills/the-sid-dani/second-brain-os/reindex"><img src="https://agentmods.dev/badge/skills/the-sid-dani/second-brain-os/reindex.svg" alt="Measured on agentmods" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,677 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.00105 $0.01677
Opus 5 $0.00053 $0.00839
Sonnet 5 $0.00021 $0.00335
Haiku 4.5 $0.00011 $0.00168

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

Security

Grade A, and why

reindex 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 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (reindex.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.claude/skills/reindex/SKILL.md · 82 lines

How it starts

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

reindex

Regenerates the OKF index.md files across the workspace. Each index.md is a machine-generated, never-hand-edited view of the markdown files in its directory — file name, OKF type, and one-line description pulled from frontmatter, plus a subdirectory listing. It answers "what already exists here and where do new files go" cheaply, which is the fix for the file-recreation problem (OKF Pass 7, 2026-06-28).

Why this doesn't violate decision #15 ("no static INDEX file"): #15 banned hand-maintained index files because they drift. A machine-generated index is a derived cache of the frontmatter that #15 already calls the source of truth — it cannot drift, it just gets regenerated. #15 was amended 2026-06-28 to permit machine-generated indexes only. Every index.md carries an AUTO-GENERATED header; the generator refuses to clobber any index.md that lacks it (so a human-authored one is surfaced, never overwritten).

When to use

  • After moving / renaming files in bulk (the live hook only fires on single edits).
  • During the project retrofit (Pass 7.5) — generating indexes for projects that never had them.
  • When an index.md looks stale or you want a full rebuild.
  • /reindex with no args = full rebuild of each child bundle under 1-Projects/, 2-Areas/, and 4-Resources/.
  • /reindex code-audit or "sync indexes" = audit the grandfathered code index; do not generate OKF files.

The everyday case is handled automatically by .claude/hooks/okf-index-regen.mjs (PostToolUse) — you rarely need to run this by hand.

Process

All paths resolve from the Configuration section in root CLAUDE.md (workspace.root, workspace.projects, workspace.areas). The runner script is at .claude/skills/reindex/reindex.sh; the generator it calls is .claude/hooks/lib/okf-index.mjs.

Default — full rebuild (no args)

Reindex every project under 1-Projects/, every HQ under 2-Areas/, and every Resources subfolder under 4-Resources/ (the primary OKF surface) as its own bundle root. Never generate an index.md at the 1-Projects/ or 2-Areas/ root itself — those roots are managed by inject-projects.mjs (project discovery) and are too broad for a file-level index.

Read the full file on GitHub · 82 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 82 lines · 105 tokens per session scan A 6c734904508d

Subscribe to this mod's changes

reindex is a skill published in the GitHub repository the-sid-dani/second-brain-os (2 stars, last pushed 1mo ago), licensed MIT. It adds 105 tokens to every session and 1,677 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

claudeai-sync

One-command incremental sync of a claude.ai WEB account into the Obsidian vault — pull only new/changed chats, fold them in as notes (idempotent, never overwrites curated ones), extract artifacts as first-class notes, concept-link the new artifacts, refresh the RAG index + dashboard. Trigger on "/claudeai-sync", "pull…

tonydzi/second-brain-starter-kit · 89 tokens

gmail

Check / search / digest Gmail on demand across multiple mailboxes (personal / assistants / work) via the owner's own OAuth connector — no browser needed, 0 tokens for the raw pull. Trigger on "/gmail", "check mail", "any important emails", "find the email about ", "mail digest". Read-only by default; drafting/sending…

tonydzi/second-brain-starter-kit · 81 tokens

inbox

Check this machine's cross-machine mailbox — messages Claude on ANOTHER computer left for Claude here, via a file-synced bus folder (no couriers). Trigger on "/inbox", "check inbox", "messages from the other machine". Also the way to SEND a message to Claude on another machine. A session-start hook auto-shows new…

tonydzi/second-brain-starter-kit · 86 tokens

chatgpt-sync

On-demand pull of FRESH ChatGPT conversations into the Obsidian vault — the manual twin of the scheduled nightly sync. Incremental + idempotent (keyed by conversationid; never clobbers concept-enriched notes, never duplicates). Both entry points call the SAME orchestrator script (single source of truth). Trigger on…

tonydzi/second-brain-starter-kit · 91 tokens

coach

A daily AI coach — a forward-looking accountability + mirror loop grounded in the owner's FULL identity layer (the vault knows them better than anyone). Trigger on "/coach", "morning review", "evening review", "what should I do today", "keep me on track". Runs a MORNING kick (mirror → accountability → one rock →…

tonydzi/second-brain-starter-kit · 96 tokens

faaa-sync

On-demand pull of FRESH follow-up call notes from a dedicated Telegram group into the CRM layer of the vault. Incremental + idempotent (dedup by Telegram message id) — safe to re-run, never makes duplicates. Manual counterpart of the weekly scheduled sync; both call the SAME scripts (single source of truth). Trigger…

tonydzi/second-brain-starter-kit · 84 tokens