ctx-index — Claude Code skill: what it does, how to install
Indexes local files and directories into context-mode's FTS5 database. It allows future searches to pull exact snippets without reloading raw project files into context.
npx skills add mksglu/context-mode --skill ctx-index -a claude-codeWhat ctx-index does
The skill indexes project content into a persistent FTS5 knowledge base for context-mode. When triggered, the assistant calls the ctx_index MCP tool and supplies the path rather than dumping file contents into the conversation. This keeps prompt tokens low. If the MCP server is not running, the skill falls back to the CLI command context-mode index.
For repository scans, the instructions recommend conservative boundaries with a depth of 5 and a ceiling of 200 files. Dependency folders, build artifacts, and secrets must not be indexed, using exclude or --exclude to filter noisy paths. If a large project requires raising maxFiles past 500, the assistant must ask for confirmation first. This stops the database from filling with noise. The run finishes by reporting the assigned source tag, the section count, and a matching ctx_search snippet.
What it helps with
- index local project files into a persistent FTS5 store
- run snippet searches via
ctx_searchwithout reparsing raw code - keep conversation context light by referencing paths instead of full file contents
- filter out build artifacts and dependency folders with exclude flags
Example prompts for the agent
- /context-mode:ctx-index
- /context-mode:ctx-index index the current repository as project:web
- /context-mode:ctx-index exclude build artifacts and save files to context-mode index
How to install ctx-index
1Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-index -a claude-code2Manually: put the files in place
~/.claude/skills/ctx-index/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ctx-index/
1Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-index -a codex2Manually: put the files in place
.agents/skills/ctx-index/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-index -a cursor2Manually: put the files in place
.cursor/skills/ctx-index/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install mksglu/context-mode ctx-index2Manually: put the files in place
.github/skills/ctx-index/SKILL.md1Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-index -a gemini-cli2Platform CLI
gemini skills install https://github.com/mksglu/context-mode --path skills/ctx-indexManually: put the files in place
.devin/skills/ctx-index/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-index -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set7
The whole set →Similar
Questions about ctx-index
How do I install ctx-index in Claude Code?
Run npx skills add mksglu/context-mode --skill ctx-index -a claude-code.
What does ctx-index do?
It registers local project files into the context-mode FTS5 database. Once indexed, tools like ctx_search can fetch targeted snippets instead of rereading full files every turn.
How does ctx-index handle large codebases?
It applies conservative bounds such as a depth of 5 and 200 files, and asks for confirmation before bumping maxFiles over 500.