1001 SEO Media
All posts
By 1001 SEO Mediadeveloper marketingClaude Codetechnical SEO

How do AI coding agents like Claude Code decide which libraries and APIs to install? An agency view for SaaS teams

How Claude Code and Codex pick libraries and APIs, what the docs leave out, and the SEO and GEO work we do so developer-tool clients get found by coding agents.

Our SaaS and developer-tool clients have started asking a question that would have sounded odd two years ago: "Why does Claude Code keep installing our competitor?" It is a fair worry. When a developer asks a coding agent to add search, payments, or auth to a project, the agent picks the library, and the vendor often never knows a decision happened.

Here is what we can tell those clients with confidence, what nobody can tell them, and the work we do in between.

What the documentation actually says

Anthropic describes Claude Code as working in a loop: it gathers context, takes action, and checks the result. Its docs say Claude picks its tools based on the prompt and on what it learns along the way, and that this choosing is the model's own reasoning. It can search the web, fetch documentation, and run any terminal command, package managers included. It also reads a CLAUDE.md file (or AGENTS.md) for project rules.

OpenAI's Codex reads AGENTS.md before working. By default, local Codex chats search a cached index that OpenAI maintains rather than fetching pages live.

What is missing matters more. Neither company has published how its agent chooses one package over another. So when a client asks us for the "ranking factors" for Claude Code, we say there are none on record, and we do not invent any.

Why this is still an SEO problem

The parts of the decision that involve the web look a lot like search. If an agent goes looking for documentation, your docs have to be reachable, readable, and clearly the authoritative answer. That is classic technical SEO, applied to a reader that happens to be a model.

We start every engagement with the same three checks.

First, crawler access. Anthropic runs three bots: ClaudeBot for training, Claude-User for fetching pages when someone asks Claude a question, and Claude-SearchBot for building its search index. Anthropic says they honor robots.txt, and that blocking Claude-SearchBot may reduce visibility in search results. If your robots.txt blocks AI bots as a group to opt out of training, check it again. On a docs site, that shortcut can cost you.

Claude Help Center article explaining ClaudeBot, Claude-User, and Claude-SearchBot and how site owners can block them

Claude Help Center article "Does Anthropic crawl data from the web, and how can site owners block the crawler?", captured November 21, 2026.

The same split exists at OpenAI, where OAI-SearchBot handles search, GPTBot handles training, and each robots.txt setting is independent of the other.

Second, format. Docs should be server-rendered HTML with clear headings, because that is what AI search cites. Promptwatch's report "Markdown Doesn't Matter in AI Search (Yet)," from February 2026, found Markdown files at 0.05% of citations over a seven-day window. The same report recommends keeping .md versions of developer docs anyway, because coding agents fetch those directly. We do both.

Third, the classic signals. Internal links from your homepage and guides into the reference docs. Fresh pages for current versions. Search Console data that shows which docs pages get impressions and which do not. Google's AI features guide says standard SEO practices still apply to AI Overviews and AI Mode, and we treat coding agents the same way until someone proves otherwise.

How we measure it

This is where guesswork usually creeps in, so we keep it tight. We run client programs on Promptwatch, which tracks what Codex, Claude Code, and OpenCode recommend, in the same project as ChatGPT, Gemini, and Perplexity. We write prompts the way a developer would phrase a task ("add full-text search to this Rails app," "send transactional email from a Next.js API route") and watch which libraries come back over time.

Agent Analytics, from the Professional plan, gives us IP-verified logs for ClaudeBot, Claude-SearchBot, GPTBot, OAI-SearchBot, and others hitting the docs. Since November 6 it also logs Exa's crawlers, which matters because OpenCode searches through Exa. Search Insights then lays Google Search Console and Bing Webmaster data over those AI crawls page by page, which is how we connect the AI work back to classic organic results.

What we tell clients to expect

No promises about being picked. The agent's choice is opaque and the prompt belongs to the developer. What we can promise is that your docs will be reachable, well structured, and measured, and that you will see the trend instead of guessing.

If you want to see what that tracking looks like on your own product before talking to us, book a demo with Promptwatch and ask for the coding-agent view. Then bring the results to our first call.