docs
npx machina-cli add skill seanGSISG/claude-depot/docs --openclawOverview
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 573 paths across 6 categories, totaling 571 markdown files.
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.
Domain Concept Map
Documentation sources: Two Anthropic domains are mirrored:
code.claude.com— Claude Code CLI documentation (46 pages)platform.claude.com— Everything else: API, Agent SDK, guides, prompt library (527 pages)
Six categories organize all 573 paths:
| Category | User Label | Paths | Covers |
|---|---|---|---|
claude_code | Claude Code CLI | 46 | CLI setup, hooks, skills, MCP, memory, plugins, settings, sub-agents |
api_reference | Claude API | 377 | Messages API, models, batches, files, admin, multi-language SDKs (Python/TS/Go/Java/Kotlin/Ruby) |
core_documentation | Claude Documentation | 82 | Prompt engineering, tool use, vision, streaming, extended thinking, evaluation |
prompt_library | Prompt Library | 65 | Ready-to-use prompt templates |
release_notes | Release Notes | 2 | Version history and system prompts |
resources | Resources | 1 | Additional resources |
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/create
How to Search
Follow this workflow when handling documentation queries:
Step 1: Analyze Intent
Extract from the user's query:
- Keywords — the specific concepts they want (e.g., "hooks", "extended thinking", "batch API")
- Product context — if they specify one (e.g., "in the agent sdk", "cli hooks", "api rate limits")
- Query type — how-to, reference lookup, comparison, discovery
Step 2: Run Search
Use the search script at ${CLAUDE_PLUGIN_ROOT}/scripts/search-docs.py:
# Content search (best for questions and concepts)
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/search-docs.py --search-content "<keywords>"
# Path search (best for finding specific docs)
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/search-docs.py --search "<keywords>"
If Python 3.9+ is unavailable, fall back to Grep:
grep -ril "<keyword>" ~/.claude-code-docs/docs/ | head -20
See references/search-guide.md for detailed search tool usage.
Step 3: Decide — Synthesize or Ask
Check which product categories the results span:
- Same category (e.g., all Claude Code CLI) → Read all matching docs silently, synthesize a unified answer. Never ask "which doc do you want?" when results are in the same product context.
- Multiple categories (e.g., CLI + API + Agent SDK) → Ask the user which product context using AskUserQuestion with user-friendly product labels.
See references/category-map.md for the full category-to-label mapping and disambiguation rules.
Step 4: Read and Present
- Read the matching documentation files using their file paths from the search results
- Extract sections relevant to the user's question
- Synthesize a unified answer combining insights from all sources
- Cite all sources at the end with official documentation URLs
Reference Navigation
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 |
Cross-Reference Guide
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: cd ~/.claude-code-docs && git fetch --quiet origin main && git rev-list HEAD..origin/main --count |
| "what's new" | Run: cd ~/.claude-code-docs && git log --oneline -10 -- docs/*.md |
Key Commands Quick Reference
# Content search (returns JSON with product context)
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/search-docs.py --search-content "extended thinking"
# Path search (returns ranked path matches)
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/search-docs.py --search "hooks"
# Direct doc read (fastest for known topics)
cat ~/.claude-code-docs/docs/docs__en__hooks.md
# List all available docs
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/search-docs.py --list
# Installation status
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/search-docs.py --status
# Check for updates
cd ~/.claude-code-docs && git fetch --quiet origin main && git rev-list HEAD..origin/main --count
# Pull updates
cd ~/.claude-code-docs && git pull --quiet origin main
# Fallback search (no Python)
grep -ril "keyword" ~/.claude-code-docs/docs/ | head -20
Important Caveats
- Documentation is a mirror, not the source. Always note that content comes from Anthropic's official documentation. Include official URLs when citing.
- Two base URLs: Claude Code CLI pages are at
code.claude.com/docs/en/<page>. Everything else is atplatform.claude.com/<path>. - Search index required for content search. If
~/.claude-code-docs/docs/.search_index.jsonis missing, content search won't work. Rebuild with:cd ~/.claude-code-docs && python3 scripts/build_search_index.py - Python 3.9+ is optional. The search script requires it, but documentation can still be read directly or searched with grep.
- 571 files, 573 manifest paths. Two paths in the manifest may not have corresponding files (expected — they are tracked but not downloadable).
Source
git clone https://github.com/seanGSISG/claude-depot/blob/main/plugins/claude-docs/skills/docs/SKILL.mdView on GitHub Overview
This skill provides AI-powered search over a locally mirrored Anthropic documentation set, including Claude Code CLI, API, and Agent SDK. It covers 573 paths across six categories and 571 markdown files, helping you answer questions by reading the actual docs instead of guessing.
How This Skill Works
When you ask about documentation, the system analyzes intent, then uses the search scripts at CLAUDE_PLUGIN_ROOT/scripts/search-docs.py to perform content or path searches, reads the relevant docs, and synthesizes an evidence-based answer. If Python is unavailable, it falls back to grep on the local docs.
When to Use It
- You need Claude Code CLI documentation such as hooks, MCP, memory, plugins, or settings.
- You need API reference pages for Messages, models, batches, files, or SDKs.
- You want information on the Agent SDK or the prompt library.
- You require direct topic lookup or a specific doc page lookup.
- You want release notes or additional resources for Anthropic platforms.
Quick Start
- Step 1: Trigger with /docs or ask a documentation question about Claude Code, API, or SDK.
- Step 2: Run the search using the provided commands to locate content or paths.
- Step 3: Read the relevant docs, synthesize a precise answer, and present it or ask a clarifying question.
Best Practices
- State the product context (CLI, API, or SDK) in your query to narrow results.
- Use content search for concepts and path search for exact docs.
- Do not guess the answer; read the actual documentation first.
- If results span multiple categories, ask the user to specify the product context.
- Reference the doc page titles from results to verify relevance.
Example Use Cases
- Ask for Claude API messages create page and receive the exact path and content.
- Look up Claude Code CLI hooks and MCP documentation for a project setup.
- Find Agent SDK overview and sessions documentation.
- Retrieve ready to use prompts from the prompt library.
- Check release notes for a specific version or system prompts.