search-docs — Claude Code command: what it does, how to install
search-docs searches official Anthropic Claude Code documentation by keywords via a local MCP tool.
CC-BY-SA-4.0 ★ 6,529 updated 2026-10-22
.claude/commands/search-docs.mdWhat search-docs does
This command queries Anthropic Claude Code documentation using the search_official_docs MCP tool. By default, it retrieves five matches. Each entry includes the section title, exact source URL, and an excerpt with relevant details.
When run without parameters, the assistant prompts for search terms. The command fails if documentation data is missing, so running /ccguide:init-docs beforehand is required.
What it helps with
- look up Claude Code settings in official documentation
- retrieve direct links to specific Anthropic guide sections
- extract reference excerpts without leaving the terminal
Example prompts for the agent
- /search-docs slash commands
- /search-docs memory and context
- /search-docs
How to install search-docs
Manually: put the files in place
.claude/commands/search-docs.mdCall it with /search-docs. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/search-docs.mdCall it with /prompts:search-docs. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/search-docs.prompt.mdManually: put the files in place
.gemini/commands/search-docs.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about search-docs
How to install search-docs in Claude Code?
Place the command file at .claude/commands/search-docs.md inside your project directory.
What does search-docs do?
It calls the search_official_docs MCP tool to fetch up to five matching documentation sections with direct URLs and text excerpts.
What is required before running search-docs?
You need an existing documentation snapshot; run /ccguide:init-docs first if it has not been initialized yet.