second-brain-os: Skill for Claude Code

.agents/skills/reindex/SKILL.md

reindex is a skill for Claude Code from the-sid-dani/second-brain-os. It costs 106 tokens per session (1,699 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/.agents/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/github.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/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 reindex

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,699 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.00106 $0.01699
Opus 5.5 $0.00042 $0.00680
Sonnet 5.5 $0.00021 $0.00340
Haiku 4.5 $0.00011 $0.00170

Measured 7d ago against content hash b0407868b920, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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.

.agents/skills/reindex/SKILL.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 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 stops the same file being recreated under a new name.

Why a generated index is fine when hand-kept index files aren't: hand-maintained index files drift. A machine-generated index is a derived cache of the frontmatter, which stays the source of truth, so it cannot drift; it just gets regenerated. 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).
  • When older projects never had an index — generating one for each.
  • 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 app-audit or "sync indexes" = audit Area app manifests; 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 Area 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 · 80 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 Changed · -2 lines · +1 tokens per session b0407868b920
  2. 1mo 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 (3 stars, last pushed 7d ago), licensed MIT. It adds 106 tokens to every session and 1,699 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

apply

A browser-based job application workflow for submitting applications through services such as Ashby, Greenhouse, Lever, and Hacker News. It uses prepared candidate information, answers, job links, and cover letters.

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

screenpipe-api

Query the user's local and synced-device data via the screenpipe REST API at localhost:3030 — recordings, audio, UI, meetings, connected services, and memory. Use for screen activity, other-device or cross-device history, productivity, media export, connections, durable memory, or discovering and automating saved…

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

retro-lost

Run a retrospective for an abandoned agent session (untouched for over 24 hours, never closed with a retro): rebuild context cold from the transcript, list what was built, sort Keep/Drop/Try and file the durable parts. Use from a nightly routine or on demand. Triggers: /retro-lost, retro for an abandoned session.

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

nsr

A routine for starting a new, visible coding-agent session automatically through a scheduled task, so it appears in the recent-session list without someone pressing a start button.

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

routine-opt

Audit and cut the cost of a machine's scheduled routines: measure tokens per run, pick a lever (cheaper model, split, lower frequency, shorter prefix, retire) and prove the saving with a before-and-after measurement. Use when background routines burn more than interactive work. Triggers: /routine-opt, /ropt, routine…

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

slot

Registry of reusable agent sessions and slot allocation: claim a free scheduled-task slot instead of creating a new session, set its prompt and fire time, and release it when done. Use when you need to spawn or reuse a visible background session.

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