ctx-search — Claude Code skill: search project index
Searches a persistent project knowledge base without reloading source files into context. Queries indexed code, documentation, and session memory via FTS5.
npx skills add mksglu/context-mode --skill ctx-search -a claude-codeWhat ctx-search does
ctx-search queries a local knowledge base that ctx-index maintains. Instead of reloading project files into conversation, you write a search query and the agent retrieves relevant passages from the indexed content. This saves context space and speeds up responses.
The skill works two ways: through the ctx_search MCP tool (if available) or via the CLI context-mode search. Keep queries short and precise—two to four technical terms. You can narrow the search to a specific project using source: "project:<name>", or search across documentation and session memory. If the index is empty, first run /context-mode:ctx-index or context-mode index <path>.
What it helps with
- locate a function or variable reference in a large project without reloading files
- recall a detail from documentation while coding
- check how a similar problem was solved in previous sessions
- reduce context size when the project is too large to fit
Example prompts for the agent
- /context-mode:ctx-search authentication middleware
- /context-mode:ctx-search token refresh --source project:auth-module
- Find all WebSocket connection setup code in the index
How to install ctx-search
1Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-search -a claude-code2Manually: put the files in place
~/.claude/skills/ctx-search/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ctx-search/
1Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-search -a codex2Manually: put the files in place
.agents/skills/ctx-search/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-search -a cursor2Manually: put the files in place
.cursor/skills/ctx-search/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install mksglu/context-mode ctx-search2Manually: put the files in place
.github/skills/ctx-search/SKILL.md1Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-search -a gemini-cli2Platform CLI
gemini skills install https://github.com/mksglu/context-mode --path skills/ctx-searchManually: put the files in place
.devin/skills/ctx-search/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-search -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set7
The whole set →Similar
Questions about ctx-search
How do I install ctx-search in Claude Code?
Run npx skills add mksglu/context-mode --skill ctx-search -a claude-code. The skill will appear in ~/.claude/skills/ctx-search/SKILL.md.
What does ctx-search do?
It searches your project's indexed knowledge base—code, documentation, and session memory. Returns relevant passages without reloading source files into context.
What if the index is empty?
Run /context-mode:ctx-index or context-mode index <path> first to populate the index. Then ctx-search will have indexed content to query.