Search and access Anthropic documentation covering Claude Code CLI, API, Agent SDK, and more. Supports natural language queries, content search, and direct topic lookup. Trigger on: /docs, documentation questions about Claude Code, Claude API, Agent SDK, prompt engineering, MCP, hooks, skills, tool use, streaming, batch processing, extended thinking, or any Anthropic platform feature.
68
81%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
This skill provides AI-powered search and access to a locally mirrored copy of Anthropic's official documentation. The documentation lives at ~/.claude-code-docs and covers ~1,700 paths across four categories.
When a user asks about Anthropic documentation, use the search tools and reference files described below to find the relevant content, read it, and synthesize an answer. Do not guess — always read the actual documentation before answering.
Documentation sources: Two Anthropic domains are mirrored:
code.claude.com — Claude Code CLI documentationplatform.claude.com — Everything else: API, Agent SDK, guidesFour categories organize the paths (approximate counts as of 2026-06):
| Category | User Label | Paths | Covers |
|---|---|---|---|
claude_code | Claude Code CLI | ~43 | CLI setup, hooks, skills, MCP, memory, plugins, settings, sub-agents |
api_reference | Claude API | ~1,460 | Messages API, models, batches, files, admin, multi-language SDKs (Python/TS/Go/Java/Kotlin/Ruby), Agent SDK |
core_documentation | Claude Documentation | ~200 | Prompt engineering, tool use, vision, streaming, extended thinking, evaluation, release notes, resources |
uncategorized | Other | ~1 | Paths not yet assigned to a category |
Agent SDK paths live within api_reference but are labeled "Claude Agent SDK" for users. They cover: overview, Python/TypeScript SDKs, sessions, skills, subagents, MCP, plugins, structured outputs, and more.
File naming convention: Documentation files use double underscores for path separators:
docs__en__hooks.md — Claude Code CLI page /docs/en/hooksen__docs__claude-code__hooks.md — Alternate format for the same pageen__api__messages__create.md — API reference page /en/api/messages/createFollow this workflow when handling documentation queries:
Before searching or reading anything, pull the latest documentation. This is the first action for every docs request — it guarantees fresh content and clones the mirror on first use. There is no search index to build (search runs over the live files). Run exactly this:
DOCS="$HOME/.claude-code-docs"
if [ -d "$DOCS/.git" ]; then
git -C "$DOCS" pull --ff-only --quiet 2>/dev/null || true
else
git clone --quiet https://github.com/seanGSISG/claude-code-docs.git "$DOCS"
fi
# Refresh the runtime helper from tracked source (used for direct topic reads)
[ -f "$DOCS/scripts/claude-docs-helper.sh" ] && { cp "$DOCS/scripts/claude-docs-helper.sh" "$DOCS/claude-docs-helper.sh" 2>/dev/null; chmod +x "$DOCS/claude-docs-helper.sh" 2>/dev/null; }
# Best-effort: ensure ripgrep for the standalone helper (the Grep tool already
# bundles ripgrep, so this is optional; grep is the universal fallback).
if ! command -v rg >/dev/null 2>&1; then
if command -v winget >/dev/null 2>&1; then winget install --silent --accept-source-agreements --accept-package-agreements BurntSushi.ripgrep.MSVC >/dev/null 2>&1 || true
elif command -v brew >/dev/null 2>&1; then brew install ripgrep >/dev/null 2>&1 || true
elif command -v apt-get >/dev/null 2>&1; then sudo -n apt-get install -y ripgrep >/dev/null 2>&1 || true
fi
fi
echo "Docs ready: $(find "$DOCS/docs" -name '*.md' 2>/dev/null | wc -l | tr -d ' ') files"Proceed to the next step regardless of the sync result — if the network is down, the existing local mirror is still usable.
Extract from the user's query:
Search the live files with Claude Code's built-in tools — they use bundled ripgrep,
so they are fast and return only compact results (paths/snippets), keeping token use
low. Search the docs directory ~/.claude-code-docs/docs (use the absolute $HOME
path when calling the tools).
output_mode: "files_with_matches".output_mode: "count" and prefer files with more matches.output_mode: "content", -C: 2, small head_limit.**/*<topic>*.md over the docs directory — e.g. hooks → claude-code__hooks.md,
docs__en__hooks.md.Filenames map directly to doc paths, so a filename match is usually enough to pick the right doc. There is no index — results are always current.
Shell fallback (e.g., when driving the helper standalone, outside the agent):
~/.claude-code-docs/claude-docs-helper.sh --search-content "<keywords>" # ripgrep, grep fallback
~/.claude-code-docs/claude-docs-helper.sh --search "<topic>" # path match
~/.claude-code-docs/claude-docs-helper.sh <topic> # direct topic readSee references/search-guide.md for detailed search tool usage.
Check which product categories the results span:
See references/category-map.md for the full category-to-label mapping and disambiguation rules.
Load the reference file matching the topic before answering detailed questions about search mechanics or category routing.
| Topic | Reference File | Key Contents |
|---|---|---|
| How to use search tools, filename conventions, Python fallback, direct doc reading | references/search-guide.md | Search commands, output formats, file naming patterns, graceful degradation |
| Product categories, user-facing labels, disambiguation rules, when to ask vs synthesize | references/category-map.md | Category-to-label map, path patterns, cross-context resolution strategy |
Some queries span multiple reference files or require special handling:
| Question Pattern | Action |
|---|---|
| "How do I use X in agent sdk?" | Filter search to agent-sdk paths, read all matches, synthesize |
| "What's the difference between X and Y?" | Search for both terms, read docs for each, present comparison |
| "Show me all docs about X" | Run path search, present grouped by product category |
| "hooks" (ambiguous — CLI hooks vs Agent SDK hooks) | Search content, check categories — if split across products, ask user |
| Direct topic name (e.g., "mcp", "memory") | Try direct file read first: ~/.claude-code-docs/docs/docs__en__<topic>.md |
Freshness check (-t) | Run: ~/.claude-code-docs/claude-docs-helper.sh -t |
| "what's new" | Run: ~/.claude-code-docs/claude-docs-helper.sh "what's new" |
| "update the docs" / "pull latest docs" | Run the Step 1 sync block above (or tell the user to run the /docs-update command, which does the same thing). |
There is no background hook and no search index — syncing is explicit and always
visible. The mirror is refreshed by the mandatory Step 1 sync block at the start
of this workflow, so every docs request pulls the latest content; search then runs
over the live files, so results are always current. The /docs-update command
runs the same sync on demand without a search.
# Content search (returns JSON with product context)
~/.claude-code-docs/claude-docs-helper.sh --search-content "extended thinking"
# Path search (returns ranked path matches)
~/.claude-code-docs/claude-docs-helper.sh --search "hooks"
# Direct topic lookup
~/.claude-code-docs/claude-docs-helper.sh hooks
# List all available docs
ls ~/.claude-code-docs/docs/*.md | sed 's/.*\///' | sed 's/\.md$//'
# Check freshness and sync
~/.claude-code-docs/claude-docs-helper.sh -t
# What's new
~/.claude-code-docs/claude-docs-helper.sh "what's new"
# Installation status
~/.claude-code-docs/claude-docs-helper.sh --status
# Fallback search (no helper script)
grep -ril "keyword" ~/.claude-code-docs/docs/ | head -20code.claude.com/docs/en/<page>. Everything else is at platform.claude.com/<path>.--search-content (ripgrep, with grep as fallback). Always current; nothing to rebuild.~/.claude-code-docs/claude-docs-helper.sh --status for live numbers.48bf6a4
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.