Sandbox
@thevibeworks/claude-code-docs

Anthropic docs archive for Claude Code and agents

This repo mirrors Anthropic’s markdown docs, cookbooks, skills, plugins, MCP spec, and related support material into a local archive. It is kept fresh by `scripts/fetcher.py`, which can fetch everything, fetch one section, discover new sources, and remove pages that are truly gone.

41 stars8 forksJupyter NotebookUpdated 6d ago
Who it's for

Builders who want to search Anthropic’s docs and examples from a local archive while they work with Claude Code.

What it delivers

You can ask your agent about Claude Code, MCP, or Anthropic APIs without hunting through the live sites first.

What it does

Auto-updating markdown archive

Mirrors documentation from multiple Anthropic sources into `content/` and refreshes it four times a day.

Source discovery

Probes domains for `robots.txt`, `sitemap.xml`, `llms.txt`, and markdown variants, then writes results to `discovery.json`.

Reaping and tombstones

Removes truly deleted pages, blocks mass deletions, and records confirmed dead URLs in `tombstones.json`.

Sectioned fetching

Supports fetching all content or just one source area such as `mcp` or `github` with `--section`.

Claude Code ready

Includes `CLAUDE.md` and a local archive that Claude Code can read directly for grounded answers.

How to get it

  1. 1Run
    git clone https://github.com/thevibeworks/claude-code-docs
    cd claude-code-docs
  2. 2Then ask Claude Code anything
    claude "how does the agent loop work?"
    claude "show me the MCP spec for tool annotations"
    claude "what did the 'Building Effective Agents' post recommend?"
    claude "how do I set up hooks in the Agent SDK?"

README

Claude Code Docs

Auto-updating archive of Anthropic's builder documentation: every source that publishes markdown, fetched 4x daily. 4,100 files from six live sources, plus a frozen archive of the engineering blog.

fetch review license files

Clone this repo and point Claude Code at it. Every doc, tutorial, cookbook, skill, and engineering post Anthropic publishes on a markdown surface -- searchable, version-controlled, and offline.

Install

git clone https://github.com/thevibeworks/claude-code-docs
cd claude-code-docs

Then ask Claude Code anything:

claude "how does the agent loop work?"
claude "show me the MCP spec for tool annotations"
claude "what did the 'Building Effective Agents' post recommend?"
claude "how do I set up hooks in the Agent SDK?"

Content

Counts are files on disk as of 2026-09-09; uv run scripts/fetcher.py --tree prints them live.

SourceSectionFilesWhat
code.claude.com--section claude-code198Claude Code + Agent SDK docs
platform.claude.com--section api2,228API reference, build guides
claude.com/docs--section products226Claude Tag, Cowork, office agents, connectors
modelcontextprotocol.io--section mcp347MCP spec, SDKs, governance
github.com/anthropics--section github764Cookbooks, skills, plugins, courses, SDK docs
support.claude.com--section support372Help articles
anthropic.comfrozen 2026-07-08158Engineering, research, news posts -- see below

anthropic.com has no --section flag: it is HTML-only, the jina.ai proxy the fetcher used was removed in July 2026, and content/blog/ has been a static archive since 2026-07-08. What is in it, against what anthropic.com's sitemap lists today:

content/blog/ArchivedUpstreamCoverage
engineering/2525complete
product/44complete
research/7215546%
news/5726022%

The engineering posts -- "Building Effective Agents", context engineering, tool use -- are all here. Research and news are not, and will not grow until something converts HTML to markdown.

content/
  en/docs/claude-code/   Claude Code + Agent SDK
  en/api/                API reference (1,500+ endpoints)
  en/build-with-claude/  Platform features
  en/agents-and-tools/   Tool use, agent skills
  en/manage-claude/      Admin, billing, managed agents
  claude/                Product docs (Claude Tag, Cowork, office agents)
  mcp/                   MCP protocol spec + community
  blog/                  frozen 2026-07-08, not refreshed
    engineering/         Building Effective Agents, context engineering, ...
    research/            Research papers
    news/                Model releases
    product/             Product announcements
  github/
    cookbooks/           164 recipes + notebooks
    skills/              90 official Agent Skills
    plugins-official/    266 plugin docs
    courses/             80 prompt engineering notebooks
    quickstarts/         Deployable app starters
    code-action/         GitHub Actions for Claude Code
    sdk-python/          Python SDK reference
    sdk-typescript/      TypeScript SDK reference
  support/               365 help articles

Fetching

Auto-updates four times daily via GitHub Actions. To fetch manually:

# Requires: uv (https://docs.astral.sh/uv/)
uv run scripts/fetcher.py                    # Fetch everything (~3 min)
uv run scripts/fetcher.py --section mcp      # MCP spec only
uv run scripts/fetcher.py --section github   # GitHub repos only
uv run scripts/fetcher.py --incremental      # Skip existing files
uv run scripts/fetcher.py --tree             # Show all sources + counts
uv run scripts/fetcher.py --discover         # Probe domains for new sources

GitHub repo fetching needs GITHUB_TOKEN or GH_TOKEN in the environment. Every fetched source serves a .md variant of each page, so nothing is converted from HTML. That is also why content/blog/ is frozen: anthropic.com is HTML-only and the jina.ai proxy path it used was removed in July 2026.

See sources.json for the complete machine-readable source registry.

Source Discovery

The fetcher doesn't just download from hardcoded URLs. It probes every known Anthropic domain for robots.txt, sitemap.xml, llms.txt, and — the question that decides everything — whether the domain serves .md variants at all. It also enumerates github.com/anthropics and watches the Location header on every redirect it follows.

Known domains: anthropic.com, platform.claude.com, code.claude.com, support.claude.com, modelcontextprotocol.io, claude.ai, claude.com, academy.claude.com

The result is a file, not a log line. Every full run rewrites discovery.json with what exists upstream that sources.json does not. This matters because printing it did not work: the pipeline had been logging support.claude.com -> academy.claude.com four times a day for weeks, into an Actions log nobody opens, and those 725 pages were eventually found by a human chasing a dead support article. A discovery that isn't a diff doesn't reach anyone.

So a new domain, a new anthropics repo, or a domain that starts serving markdown now shows up as a tracked change, gets classified as high-signal, and opens a PR — the same path a new doc takes. discovery.json.review is the actionable list: reachable, serves markdown, nothing fetches it. Empty is healthy. Adding a source stays a human decision.

uv run scripts/fetcher.py --discover   # manual probe; writes the same file

Sitemaps are treated as incomplete, not authoritative. Upstream de-indexes pages it still serves: in July 2026 platform.claude.com dropped every per-language SDK reference page from both its sitemap and its llms.txt while continuing to edit them, and the archive quietly stopped refreshing 1,560 files for seven weeks. So every full run also refetches what is already on disk, and pages that really died are removed by the reaper below rather than by absence from an index.

Reaping

A page removed upstream used to live here forever — the fetcher only ever added or overwrote. Full runs now delete archived files whose URL returns 404/410 or the site's HTML shell, with two guardrails:

  • Only markup is deleted automatically. A file holding real markdown whose URL has died is content Anthropic removed and we may hold the only copy; it is reported for a human instead of destroyed by a job that merges its own PRs.
  • A mass-deletion circuit breaker. More than 200 pages vanishing at once means an upstream outage, not 200 real deletions — nothing is deleted and the run fails loudly.

--no-reap reports what would go without touching anything.

Tombstones

tombstones.json records every URL confirmed gone upstream, with the date and reason. It exists so that a page which died once does not report as a fresh failure on every subsequent run — 123 standing failures would pin the success rate at 96.9% and bury the one new breakage that matters. Later runs count known deaths quietly and print only what changed: pages newly gone, and pages that came back (whose tombstone is then removed automatically). The success rate is computed over live docs, so it means something.

Automation

Two GitHub Actions workflows power this repo:

fetch-claude-docs.yml -- Scheduled every 6 hours. Runs the fetcher, then hands the diff to Claude Code (via claude-code-action) which decides: ignore noise, commit minor fixes directly, or create a PR for meaningful changes. Sends push notifications via barkme for PRs.

claude-review.yml -- Triggered on PRs and @claude mentions. Reviews changes, merges routine updates, creates tracking issues for version bumps, and alerts humans only for breaking changes.

Contributing

PRs welcome. The fetcher is a single Python file (scripts/fetcher.py) with no framework dependencies beyond aiohttp and aiofiles.

To add a new source:

  1. Add the source definition to sources.json
  2. Add the fetch logic to scripts/fetcher.py
  3. Run uv run scripts/fetcher.py --section <name> to test
  4. Update --section choices in the CLI

Disclaimer

Unofficial mirror for educational and development purposes. Documentation content is sourced from Anthropic's public sites. For official docs, visit code.claude.com and platform.claude.com. Repository code from anthropics/claude-code. Redistribution should comply with Anthropic's terms.

License

MIT

Files in the repo

Repository payload16 top-level entries
  • .claude
  • .github
  • content
  • mcp
  • prompts
  • repo
  • scripts
  • .gitignore
  • CLAUDE.md
  • discovery.json
  • LICENSE
  • README.md
  • REFACTOR.md
  • screenshot.png
  • sources.json
  • tombstones.json

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More collections

The awesome collection of OpenClaw skills. 5,400+ skills filtered and categorized from the official OpenClaw Skills Registry.🦞

52k
phuryn/
pm-skills
phuryn/pm-skillsCollections

PM Skills Marketplace: 100+ agentic skills, commands, and plugins — from discovery to strategy, execution, launch, and growth.

26k

Extracted system prompts from Anthropic - Claude Fable 5.1, Opus 5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro, Antigravity. xAI - Grok, Grok Bot, Cursor, Kimi and more! Updated regularly.

65k
1 add