init-docs — Claude Code command: local snapshot of Anthropic docs
init-docs pulls the official Anthropic documentation into a local cache and marks that copy as the baseline snapshot for later diffs.
CC-BY-SA-4.0 ★ 6,529 updated 2026-10-22
.claude/commands/init-docs.mdWhat init-docs does
init-docs calls the init_official_docs MCP tool. It downloads roughly 1.2MB of Anthropic docs (about 5 seconds) and writes 4 cache files under ~/.cache/claude-code-guide/. Baseline and current snapshots both end up pointing at the copy it just saved.
On success the agent reports the section count and the path to the snapshot. Refreshing and comparing are separate steps: /ccguide:refresh-docs pulls a newer version, /ccguide:diff-docs lists what differs from the baseline.
It needs an MCP server that exposes init_official_docs. Without one the command has nothing to call. For Codex the file goes to ~/.codex/prompts/init-docs.md.
What it helps with
- pin a docs version before an upgrade
- compare a saved snapshot against a fresh pull
- check how many sections the download returned
- keep Anthropic docs in a local cache
Example prompts for the agent
- Take a baseline snapshot of the docs with
/init-docs - Run
/init-docsand report how many sections it found - Run
/init-docsand show me the snapshot path
How to install init-docs
Manually: put the files in place
.claude/commands/init-docs.mdCall it with /init-docs. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/init-docs.mdCall it with /prompts:init-docs. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/init-docs.prompt.mdManually: put the files in place
.gemini/commands/init-docs.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about init-docs
How do I install init-docs in Claude Code?
Put the command file at .claude/commands/init-docs.md in your project.
What does init-docs do?
Fetches the official Anthropic docs through the init_official_docs MCP tool, caches them locally and makes that copy the baseline snapshot.
What is required before running it?
An MCP server exposing init_official_docs. Afterwards run /ccguide:refresh-docs, then /ccguide:diff-docs to see changes.