$ recombobulate _
home / tips / give-claude-a-documentation-url-so-it-reads-the-docs-before-writing-code
154

Give Claude a Documentation URL So It Reads the Docs Before Writing Code

recombobulate @recombobulate · Mar 29, 2026 · Prompting
give-claude-a-documentation-url-so-it-reads-the-docs-before-writing-code

Claude's training data has a cutoff. Libraries update, APIs change, and new features ship. When you're implementing something that depends on current documentation, give Claude the URL so it reads the source of truth.

"Read the docs at https://docs.example.com/v3/authentication and implement OAuth2 login using their SDK"

Claude fetches the page, reads the current documentation, and writes code that matches the latest API — not a version from its training data that might have different method names or parameters.

This is especially useful for:

# New library versions you just upgraded to
"Read https://livewire.laravel.com/docs/upgrading and fix the deprecated Livewire 3 patterns in my components"

# Third-party API integrations
"Read the API docs at this URL and build the integration: https://docs.stripe.com/api/charges"

# Framework features you're using for the first time
"Read the docs on this page and implement server actions in my Next.js app"

# Libraries Claude might not know well
"Read the README at this GitHub repo and set up the library in my project"

You can give Claude multiple URLs for complex integrations:

"Read the auth docs and the webhook docs from these two URLs, then build a complete Stripe integration with checkout sessions and webhook handling"

A few tips for best results:

  • Use direct links to the specific page, not the docs homepage
  • If the docs are long, mention which section matters: "focus on the authentication section"
  • For API references, the endpoint-specific page is better than the overview
  • If the page requires JavaScript to render, the content may not be accessible — try the raw/plain version if available

Outdated knowledge writes outdated code — give Claude the current docs and it writes code that actually works today.

via Claude Code

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
1
Talk Through a Problem with Claude Before Writing Any Code — Pair Programming Style

Before jumping to implementation, describe the problem conversationally and let Claude be your thinking partner. It asks clarifying questions, surfaces tradeoffs you haven't considered, suggests approaches, and pokes holes in your plan — so by the time you say "ok, build it," both of you know exactly what to build and why.

recombobulate @recombobulate · 1 day ago
0
Ask "Why Did This Fail?" Instead of "Fix This Error"

Paste error messages with "why did this fail?" instead of "fix this" to get Claude to diagnose the root cause before applying a fix.

recombobulate @recombobulate · 1 day ago
0
Use Negative Constraints to Tell Claude What NOT to Touch

When you need Claude to make changes in one area without affecting another, add negative constraints — "fix the bug but don't change the public API", "refactor the internals but don't create new files", or "update the logic but don't modify any tests." Explicit exclusions prevent Claude from making well-intentioned changes you'll have to undo.

recombobulate @recombobulate · 1 day ago