Get the FREE Ultimate OpenClaw Setup Guide →

docs

npx machina-cli add skill seanGSISG/claude-depot/docs --openclaw
Files (1)
SKILL.md
7.3 KB

Overview

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:

CategoryUser LabelPathsCovers
claude_codeClaude Code CLI46CLI setup, hooks, skills, MCP, memory, plugins, settings, sub-agents
api_referenceClaude API377Messages API, models, batches, files, admin, multi-language SDKs (Python/TS/Go/Java/Kotlin/Ruby)
core_documentationClaude Documentation82Prompt engineering, tool use, vision, streaming, extended thinking, evaluation
prompt_libraryPrompt Library65Ready-to-use prompt templates
release_notesRelease Notes2Version history and system prompts
resourcesResources1Additional 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/hooks
  • en__docs__claude-code__hooks.md — Alternate format for the same page
  • en__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

  1. Read the matching documentation files using their file paths from the search results
  2. Extract sections relevant to the user's question
  3. Synthesize a unified answer combining insights from all sources
  4. 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.

TopicReference FileKey Contents
How to use search tools, filename conventions, Python fallback, direct doc readingreferences/search-guide.mdSearch commands, output formats, file naming patterns, graceful degradation
Product categories, user-facing labels, disambiguation rules, when to ask vs synthesizereferences/category-map.mdCategory-to-label map, path patterns, cross-context resolution strategy

Cross-Reference Guide

Some queries span multiple reference files or require special handling:

Question PatternAction
"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 at platform.claude.com/<path>.
  • Search index required for content search. If ~/.claude-code-docs/docs/.search_index.json is 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

  1. Step 1: Trigger with /docs or ask a documentation question about Claude Code, API, or SDK.
  2. Step 2: Run the search using the provided commands to locate content or paths.
  3. 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.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers