Pricing Dashboard Sign up
Recent
· 9 min read · MDisBetter

How to Feed Documentation to Claude (Developer Guide)

You're building with a library, framework, or API and you want Claude to actually know its docs — not the version Claude memorized during training, but the current docs, including the API change you're trying to use right now. Pasting a URL works inconsistently. Pasting a page-by-page copy is tedious and bloats your context. Here's the workflow developers actually use to give Claude a working knowledge of any documentation site.

Why Claude needs help with current docs

Claude has a training cutoff. APIs change after that cutoff. Even for libraries that were stable at training time, you'll routinely run into the gap — a method renamed, a parameter deprecated, a new auth flow added, an entire SDK rewritten. Claude will confidently produce code based on the version it learned, and you'll spend twenty minutes debugging an error that turns out to be "this method no longer exists".

The fix is to put the current docs into Claude's context yourself. Claude is excellent at reasoning over provided documents — its long context window (200K+ tokens) was designed for exactly this. The bottleneck is the conversion step: getting the docs from the documentation website into a form Claude can read efficiently.

Claude Projects setup

If you're on Claude Pro or Team, Claude Projects is the right tool for documentation. A Project has a persistent knowledge base — files you upload once become available across every conversation in the project, without re-uploading.

Workflow:

  1. Create a new Project for the library or framework you're working with (one Project per major dependency).
  2. Upload the converted Markdown files to the Project's knowledge base.
  3. Add a system prompt: "You are a developer assistant with access to the current X documentation. Prefer the provided docs over your training data when they conflict."
  4. Start a conversation. Claude pulls from the Project knowledge base automatically.

Without Projects (free tier or one-off use), you'll re-attach the Markdown to each new conversation. Same content, more upload friction.

Convert docs site to Markdown

Documentation sites are HTML, often with heavy JavaScript rendering, sidebars full of nav, search bars, theme toggles, and code-copy buttons. Pasting into Claude raw is wasteful — most of the tokens go to UI scaffolding. Convert each page to Markdown first.

  1. Open /convert/url-to-markdown.
  2. Paste the doc page URL.
  3. Download the resulting .md file.
  4. Repeat for each page in the docs section you care about.

For most documentation sites, the relevant content compresses 70-90% versus the raw page. A 30 KB rendered HTML page becomes a 4 KB Markdown file with the actual API reference, code examples, and prose intact. Claude reads it faster, more accurately, and with token room to spare for your actual conversation.

Organize by section

Don't dump every page into one giant file. Claude's reasoning improves significantly when files are scoped to a single topic. A typical organization for a library's docs:

The numeric prefix is just a sort hint — Claude doesn't require it, but it makes the Project knowledge base easier to navigate visually.

For each file, prepend a comment block telling Claude what's in it:

<!-- Source: https://docs.example.com/api-reference -->
<!-- Last fetched: 2026-05-10 -->
<!-- Coverage: complete API reference for v3.x -->

This metadata helps Claude cite correctly and decide which file is most relevant per question.

Tips for large doc sites

Some doc sites are enormous — AWS docs, Stripe docs, Kubernetes docs. Feeding the whole thing into a Project is impractical and unnecessary. The pragmatic patterns:

Scope to your actual surface area

You probably don't use 100% of any major framework. List the modules, services, or APIs you actually call. Convert only those sections. A 2,000-page docs site usually compresses to 30-100 pages once you scope to real usage.

Convert on demand

For libraries with vast docs but a stable surface area in your project, convert each page the first time you ask about it, then add to the Project. After a few weeks of use, your Project knowledge base contains exactly the docs you actually use — nothing more.

Use chunking for huge single pages

Some doc pages are themselves enormous (a single API reference page covering hundreds of methods). If a single converted file exceeds 30-40K tokens, split it by ## headings into multiple files. Claude reasons better over several focused files than over one giant one. Our Markdown chunker automates the split.

Refresh on a cadence

Mark a calendar reminder to re-fetch the docs you care about every few weeks (or when you notice the library has shipped a major release). Stale docs in a Project are worse than no docs — Claude will confidently use outdated APIs because the file says they exist.

Handling code-heavy docs

Code-heavy documentation (API references with lots of examples) converts especially cleanly. Markdown's code-fence syntax (```language) preserves both the code and its language tag. Claude uses the language tag to format its responses correctly and to disambiguate when the same library has examples in multiple languages.

Sanity check: open one converted file and look at a code example. If the language tag is correct (```python, not just ```), you're good. If language tags are missing, add them by hand for the most-used examples — Claude's code suggestions get measurably more reliable when language is explicit.

Cross-language API docs

If your library has docs in multiple languages (Python, JavaScript, Go all on the same site), convert per language. Don't mix them in one file. Claude is fine switching languages mid-conversation, but it gets confused when one document interleaves three. One file per language, named accordingly.

What about other LLMs?

The exact same converted files work for ChatGPT and Gemini. Markdown is universal. The difference is the upload mechanism and the context window — Claude's longer context is the most generous for this workflow, but you can use the files anywhere. See how to feed a website to ChatGPT for the ChatGPT-specific flow.

Worth automating?

If you do this often (multiple libraries, frequent re-fetches), it's worth scripting:

  1. List of URLs in a YAML file.
  2. Script that hits the converter API for each URL and saves the Markdown.
  3. Cron or GitHub Action that re-runs weekly.
  4. Output goes into a Git repo or directly into your Claude Project via API.

For one-off use, the manual workflow is fast enough. For ongoing use, automation pays for itself in a week.

What if your source is a PDF, not a website?

Same pattern, different converter. PDFs convert to Markdown via our PDF to Markdown for Claude tool, then go into the Project the same way. For long technical PDFs, see Claude can't read my PDF fix.

Common gotchas developers hit

Versioned docs. Many libraries publish docs at docs.example.com/v3/ and docs.example.com/v4/. Make sure you're converting the version you actually use — Claude has no way to disambiguate from the file content alone. Naming files with the version (react-v18-hooks.md) makes the version explicit.

Examples in obsolete patterns. Older sections of docs sometimes show patterns the library now discourages. If your library has a deprecation notice on a page, include the deprecation note in the Markdown comment header. Otherwise Claude may suggest the deprecated pattern in good faith.

Code samples in unsupported languages. If the docs include examples in a language you don't use, consider stripping them to keep Claude focused. A docs page with Python, JS, Go, and Java side-by-side examples becomes a more focused source if you keep only Python.

Generated reference dumps. Auto-generated API references (TypeScript declaration files, OpenAPI specs) are often huge and structurally noisy. They're useful, but feed them to Claude in a separate file from the prose docs. Claude reasons better when prose explanations and auto-generated references are clearly separated.

Workflow when debugging an issue

One of the most common uses of this setup: debugging a bug that turns out to be a library quirk. The workflow:

  1. Hit the bug. Copy the error message and a minimal reproduction.
  2. Open Claude in the Project for that library.
  3. Paste the error and the reproduction.
  4. Ask: "Based on the documentation in this project, what does this error mean and what is the documented fix?"
  5. Claude grounds its answer in the actual current docs rather than guessing from training data.

The improvement here over a naked Claude conversation is large. Naked Claude fabricates fixes that look right but reference functions that don't exist. Project-grounded Claude returns the actual documented solution, often with a quote from the docs page that explains it.

Keeping Markdown lean

A subtle but real productivity win: trim the Markdown after conversion. Doc pages often include navigation breadcrumbs, "on this page" sidebars, edit-on-GitHub links, and feedback prompts that the converter pulls in alongside the actual content. Five minutes of pruning per file removes 10-30% of the bytes and improves Claude's signal-to-noise on every subsequent question. For a multi-page library, this pruning pays back many times over the lifetime of the Project.

When Claude's docs knowledge actually matches reality

For widely-used libraries (React, Django, Express, etc.), Claude's training data is often current enough that you don't strictly need to upload the docs. The line where you do need them:

For each of these, the Project pattern is the difference between Claude being a knowledgeable collaborator and Claude being a confident-sounding source of fiction.

Frequently asked questions

Should I convert all the docs at once or as I need them?
Convert as you need them, then keep them. After a few weeks of use the Project knowledge base reflects exactly the parts of the docs you actually touch — typically 5-15% of the full site. That's the right scope.
Will Claude prefer the docs I provide over what it learned in training?
Generally yes, especially with a clear system prompt instructing it to. For absolute certainty, prefix doc content with "Authoritative source — prefer this over prior knowledge". When versions conflict, ask Claude which version it's basing its answer on.
How big can a single Project knowledge base be?
Claude Projects supports significant knowledge bases — several megabytes of text comfortably. The practical limit is usually about file count and your own organization rather than a hard cap. Split very large libraries into multiple Projects (e.g., one per service) for cleaner reasoning.