index-updater

index-updater is a skill for Claude Code, Codex from d3x293/code-crew. It costs 37 tokens per session (1,021 once invoked), scanned A, original, MIT.

A skill that maintains a three-layer index of a codebase after files change. The index records details such as file hashes, sizes, imports, exports, functions, and classes.

In plain words
What is it for?
Finding changed, deleted, and new files, then refreshing their stored metadata incrementally or rebuilding the index manually.
Why use it?
It keeps code-navigation metadata aligned with the files without rebuilding the entire index after every small edit.

Skill for Claude CodeCodex

Part of the codecrew plugin — 12 skills, 10 commands, 11 agents, 1 hook shipped together

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 skills/d3x293/code-crew/index-updater
Any agent
npx skills add d3x293/code-crew --skill index-updater
Clone the repo
git clone --depth 1 https://github.com/d3x293/code-crew

Made for: Claude Code, Codex.

Or install codecrew, the plugin that ships this one along with the rest of its 12 skills, 10 commands, 11 agents, 1 hook.

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 index-updater

README.md
[![agentmods](https://agentmods.dev/badge/skills/d3x293/code-crew/index-updater.svg)](https://agentmods.dev/skills/d3x293/code-crew/index-updater)
Your own site
<a href="https://agentmods.dev/skills/d3x293/code-crew/index-updater"><img src="https://agentmods.dev/badge/skills/d3x293/code-crew/index-updater.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,021 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.00037 $0.01021
Opus 5 $0.00018 $0.00511
Sonnet 5 $0.00007 $0.00204
Haiku 4.5 $0.00004 $0.00102

Measured 3d ago against content hash 9bdeb964996f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

index-updater 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 3d 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.

skills/index-updater/SKILL.md · 101 lines

How it starts

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

Index Updater - Incremental Index Maintenance

Keeps .claude/crew-index.json and .claude/crew-symbols.json up-to-date after code changes without rebuilding the entire index.

When to Activate

  • After any agent makes file edits (triggered by afterFileEdit hook or agent self-reporting)
  • When an agent notices the index is stale (hash mismatch)
  • Manually via /crew reindex for full rebuild

Incremental Update Process

Step 1: Identify changed files

The agent that made changes should report which files were modified. Alternatively, check file hashes:

For each file in crew-index.json:
  1. Compute current hash: shasum -a 256 <filepath>
  2. Compare with stored hash
  3. If different → mark for update
  4. If file deleted → mark for removal

Step 2: Update Layer 1 (crew-index.json)

For each changed file:

  1. Read the file
  2. Recompute: hash, size, lines, exports, imports, functions, classes
  3. Regenerate summary
  4. Replace the file's entry in crew-index.json

For deleted files:

  1. Remove the file's entry from crew-index.json

For new files (detected via Glob that aren't in index):

  1. Read and extract full metadata
  2. Add new entry to crew-index.json

Step 3: Update Layer 2 (crew-symbols.json)

For each changed file:

  1. Re-extract all symbols (functions, classes, methods) with signatures and line ranges
  2. Re-scan for calls to known symbols
  3. Update calledBy relationships for affected symbols in other files
  4. Replace all symbols for this file in crew-symbols.json
  5. Rebuild affected callGraph entries

Step 4: Update global metadata

  1. Recompute contentHash from all file hashes
  2. Update stats (totalFiles, totalLines)
  3. Update lastIndexed timestamp

Performance Rules

  • Never rebuild entire index for a single file change
  • Batch updates: If 3+ files changed in one edit cycle, update all at once
  • Skip non-source files: Don't index changes to .json, .md, .yml unless they're in the monitored set
  • Lazy callGraph: Only rebuild callGraph edges that involve the changed file

Read the full file on GitHub · 101 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. 3d ago First seen · 101 lines · 37 tokens per session scan A 9bdeb964996f

Subscribe to this mod's changes

index-updater is a skill published in the GitHub repository d3x293/code-crew (13 stars, last pushed 5mo ago), licensed MIT. It adds 37 tokens to every session and 1,021 once invoked, about $0.0002 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

handoffplan

Run /handoff to capture session data, then write a phased implementation plan that references it. Creates beads for tracking.

REMvisual/claude-handoff · 28 tokens

handoff

Create a structured session handoff when context is running low or work is pausing. Deep context mining, self-validation, multi-file splitting. Captures everything the next session needs.

REMvisual/claude-handoff · 39 tokens

client-context-system

Sets up a complete per-client workspace in Cowork with isolated context, preferences, deliverable templates, running notes, decision log, and automatic status reporting. For consultants, agencies, and professional services. Useful when onboarding a new client, during engagement kickoffs, for organizing existing client…

EAIconsulting/cowork-skills-library · 105 tokens

content-engine

Multi-step content production pipeline that takes a topic or brief and produces a full blog post, email newsletter excerpt, and three social posts — all in your voice. Useful for building a content batch, when repurposing a core idea across formats, during content sprint sessions, and for turning expertise into…

EAIconsulting/cowork-skills-library · 104 tokens

context-manager

Teaches you how to break large tasks into stages, save your place between sessions, and recover smoothly when a task gets interrupted. Use when planning a multi-day project, for breaking down large work into manageable stages, during recovery from an interrupted session, when managing complex ongoing work, or when the…

EAIconsulting/cowork-skills-library · 137 tokens

cowork-setup-wizard

A 15-minute guided setup that teaches Cowork who you are, how you work, and what tools you use — so every result feels tailored instead of generic. Use when setting up Cowork for the first time, for personalizing your workspace preferences, during onboarding after your first session, when configuring your tools and…

EAIconsulting/cowork-skills-library · 131 tokens