/code-search:helpfrom code-search
Displays the code-search plugin's capabilities — its agent, commands, tools, and engine configuration — and helps choose the right approach for code investigation.
Ships in code-search. Installing the plugin adds it to Claude Code.
Present the following to the user.
Read-only investigation of code you did not write. Ask a question, get file:line locations and the flow between them.
/code-search:analyze Where is user authentication handled?
| Tool | Present | Takes |
|---|---|---|
code_search | always | query (free-form), intent, scope |
find_dependencies, find_dependents, call_tree, find_implementations, impact | only when the configured engine genuinely supports that operation | symbol, depth / max_depth, scope |
Read, Grep, Glob | always | — |
code_search is unconditional and infers intent from the query, so ask the real question.
The structural tools appear only when the engine behind them can answer honestly — an absent
tool means the engine cannot do it at all, never that it would be approximate.
Text search is the right tool for exact literals, occurrence counts and filename patterns. That is routing, not a fallback. The only rule is that a report names the method it used.
One engine at a time, named in project settings under a code-search block, read from your
user settings, then the project's, then the project's local overrides.
Run /code-search:setup to choose an engine, install it, build its index and check that
code_search is served. It asks before every
change. It can also record "no engine" as a deliberate choice, and it undoes an earlier
"ignore for this project".
Until setup is done, Claude offers it once per session, before it first searches this
codebase by any means, Grep included. The three answers are set up now, not now, or
ignore for this project.
grep and the indexOnce an engine is configured, setup's report says:
Bash
grepappends related locations from the index, starting with your next session. To start now: reconnectcain/mcp, then run/clear. Turn it off withgrep.route: falsein settings, orCODE_SEARCH_MERGE=0on one command. It does not run inside Claude Code's Bash sandbox. The block may name files that a Read deny rule hides from the Grep tool.
grep's own output and exit code never change; the appended block comes after them, labelled.
code-search 8.1 shipped an optional rg shim at ~/.local/bin/rg. This version does not.
If that file is still there, setup reports it and offers remove-rg-shim, which deletes it
and then the USE_BUILTIN_RIPGREP: "0" that pointed the Grep tool at it.
| Agent | What it does |
|---|---|
code-search:analyze | Investigates read-only — locates implementations, traces a feature end to end, maps inbound and outbound dependencies, tracks a bug to its origin |
Reach for it when you need to understand how a feature works, where logic lives, how data flows, or why something breaks. It runs in its own context window and never edits anything.
| Command | What it does |
|---|---|
/code-search:analyze | Dispatch the analyze agent at one question |
/code-search:setup | Guided setup: engine, index and settings, then a verify |
/code-search:help | This |
/code-search:analyze How does the payment processing work?
/code-search:analyze Where are API endpoints defined?
/code-search:analyze Find every usage of the UserService class
| Skill | What it does |
|---|---|
code-search:search | The retrieval mechanics — classify the request, query, read only the returned spans |
code-search:investigate | One investigation routed to one of four modes: bug, test gap, architecture, implementation |
code-search:deep-analysis | A full audit across seven dimensions, each finding scored with evidence |
| The request | Goes to |
|---|---|
| "debug", "error", "broken", "failing", "crash" | code-search:investigate — bug mode |
| "test", "coverage", "edge case", "mock" | code-search:investigate — test gap mode |
| "architecture", "design", "structure", "layer" | code-search:investigate — architecture mode |
| "how does", "implementation", "data flow" | code-search:investigate — implementation mode |
| "comprehensive", "full review", "audit every dimension" | code-search:deep-analysis |
| about the query itself — what to ask, and what to read afterwards | code-search:search |
| Situation | What you get |
|---|---|
| New to a codebase | The shape of it, most central symbols first |
| Bug investigation | The path from symptom back to origin |
| Feature planning | The integration points, with their impact radius |
| Code review | The context around the lines that changed |
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
3 commands in this plugin
/analyzeInvestigate a codebase read-only — understand architecture, trace how a feature works, locate an implementation, or track a bug to its origin/setupSet up code-search in this project: choose, install and configure a search engine, build its index, and verify. Asks before every change, and undoes an earlier ignore-for-this-project.npx claudepluginhub madappgang/magus --plugin code-searchOther plugins' commands for the same job