A greppable code-index installer as a skill for Claude Code (and any agent that supports skills — OpenCode, Codex, Cursor). Let agents locate files and symbols with one grep on one file instead of rescanning the whole project every session.
Survey → Install index.sh → Wire up (CLAUDE.md + hook) → Validate with measurements → Report
The skill generates an index.sh that emits, per repo (or per workspace
member), a single markdown file at .claude/index/<member>.md with three
sections — ## dirs, ## files, ## symbols (path:line:definition) — so an
agent answers "where is X?" without fanning Glob/Grep/Read across the tree.
Measured on a real multi-repo workspace: same accuracy as free exploration, ~30% less context processed, ~40% less wall time, zero junk matches (worktree / vendored copies excluded by construction via
git ls-files).
- Surveys the project — single repo vs. multi-member workspace, submodules, languages present, existing ctags/LSP tooling.
- Installs
index.sh(fromassets/index.sh.template) and wires/.claude/index/into.gitignore. Covers TS/JS (incl. routes), Rust, Go, shell, Python, and shebang executables. - Wires it up — adds a
CLAUDE.mdsection so every session greps the index first, plus an optionalSessionStarthook to auto-refresh in seconds. - Validates with measurements — syntax + full run, edge-case sandbox, a measured recall check (≥7/8 elements locatable via the index alone), staleness detection, optional A/B benchmark.
- Reports — files installed, index sizes + generation time, validation table, what was skipped.
Runtime: stock macOS bash 3.2 + BSD tools under set -euo pipefail; works on
Linux too. git ls-files (not find/rg) is what excludes worktrees,
node_modules, and build output by construction.
npx add-skill Gamma-Software/setup-indexing-skill # all detected agents
npx add-skill Gamma-Software/setup-indexing-skill --global # globallyOr manually:
git clone https://github.com/Gamma-Software/setup-indexing-skill.git
ln -s "$PWD/setup-indexing-skill" ~/.claude/skills/setup-indexing # or copy itJust ask — it auto-triggers ("set up code indexing", "the agent keeps
re-scanning the repo", "make agent search faster", "give me a symbol index /
code map") — or run /setup-indexing.
| Agent | Global path | Project path |
|---|---|---|
| Claude Code | ~/.claude/skills/setup-indexing/ |
.claude/skills/setup-indexing/ |
| OpenCode | ~/.config/opencode/skill/setup-indexing/ |
.opencode/skill/setup-indexing/ |
| Codex | ~/.codex/skills/setup-indexing/ |
.codex/skills/setup-indexing/ |
| Cursor | ~/.cursor/skills/setup-indexing/ |
.cursor/skills/setup-indexing/ |
setup-indexing-skill/
├── SKILL.md # the 5-step install+validate procedure
├── assets/
│ └── index.sh.template # the index generator (copied into target project)
├── references/
│ └── validation.md # the validation gates
└── evals/
└── evals.json # trigger evals
git,grep,sort,cut(stock POSIX / BSD tools)- bash 3.2+
MIT