Agent skill · software engineering · jeremylongshore
cursor-codebase-indexing
Set up and optimize Cursor codebase indexing for semantic code search
Why this skill is useful
Adds specific commands and configuration patterns for optimizing Cursor's codebase indexing that the AI wouldn't reliably generate on its own.
What it needs
About 5k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Cursor Codebase Indexing Overview Configure codebase indexing so relevant source and documentation are available while sensitive, generated, oversized, and unrelated files remain excluded from AI context. Prerequisites Repository ownership, expected source/documentation paths, and reviewed .cursorignore/indexing exclusions. A non-sensitive verification fixture and a change-review path for configuration updates. Instructions 1. Define the intended workspace scope and add exclusions before the first indexing pass. 2. Verify required files can be found and excluded paths cannot be attached or discovered. 3. Reindex only after a reviewed configuration/workspace change and capture a redacted result. 4. Monitor index size/performance and narrow scope rather than weakening data controls. Output A verified index scope with explicit included/excluded paths and an owner for maintenance. Examples Index src/ and docs/ for a service while excluding .env, build output, vendor directories, and customer exports. Verify a sanitized source file is available and an excluded placeholder is not before allowing AI work on the repository. Set up and optimize Cursor's codebase indexing system. Indexing creates embeddings of your code, enabling @Codebase semantic search and improving AI context awareness across Chat, Composer, and Agent mode. How Indexing Works Key Architecture Details Merkle tree for change detection: only modified files are re-indexed (every 10 minutes) No plaintext storage: code is not stored server-side; only embeddings and obfuscated metadata Privacy Mode compatible: with Privacy Mode on, embeddings are computed without retaining source code Indexing runs in the background; small projects complete in seconds, large projects (50K+ files) may take hours initially Initial Setup 1. Open your project in Cursor 2. Indexing starts automatically on first open 3. Check status: look at the bottom status bar for "Indexing..." indicator 4. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/cursor-codebase-indexing