How do I run a technical SEO and AI visibility audit with Claude Code?
Run it in three passes. First let Claude Code read the repository for metadata, sitemap, robots rules and structured data. Then have it check the published site with curl, as a browser and as an AI crawler, because the code is not what crawlers receive. Last, check AI visibility: what ChatGPT and others cite for your questions, and Search Console.
Facts
- Claude Code's WebFetch tool runs a prompt on the page in 1 separate model call and is lossy by design; the docs point to curl through Bash for the unprocessed page. (Claude Code docs: Tools reference)
- Google processes JavaScript sites in 3 phases, crawling, rendering and indexing, and says not all bots can run JavaScript. (Google Search Central: Understand JavaScript SEO basics)
- OpenAI says changes to robots.txt take about 24 hours to affect ChatGPT search, which uses the OAI-SearchBot crawler. (OpenAI: Overview of OpenAI crawlers)
- The Search Console API allows 2,000 URL inspections a day and 600 a minute per site. (Google Search Console API: Usage limits)
Why is reading the code not enough for an SEO audit?
Because crawlers get the published site, not your repository. A firewall or bot challenge, a robots.txt changed by the host, a page that renders its text only in JavaScript, or a noindex added by a plugin never shows up in the code. Claude Code audits what it reads, so it must also fetch the live pages.
What should the audit check, and where?
Split each check between the repository and the live site:
| Check | Where | What it catches |
|---|---|---|
| Titles, descriptions, headings, canonical | Repository, then served HTML | Missing or duplicated tags |
| robots.txt and sitemap | Live site | AI crawlers blocked, pages missing from the sitemap |
| Status code as a browser and as GPTBot | Live site | A firewall or bot challenge that blocks AI crawlers |
| Main text present without JavaScript | Live site | Pages that reach crawlers empty |
| noindex and JSON-LD | Served HTML | Pages hidden from search, invalid or missing structured data |
| Indexing | Search Console | Pages Google has not indexed |
How does Claude Code check the live site?
Ask it to run curl through Bash against the published URLs. WebFetch returns a model's summary of the page, so it can miss tags; curl returns the raw response. These commands cover the checks code cannot show:
# Run these against the published site, not the repo
SITE=https://example.com
# 1. Same page for a browser and for an AI crawler? (firewalls, bot challenges)
curl -s -o /dev/null -w "%{http_code}\n" -A "Mozilla/5.0" $SITE/
curl -s -o /dev/null -w "%{http_code}\n" -A "GPTBot" $SITE/
# 2. robots.txt and sitemap as served
curl -s $SITE/robots.txt
curl -s $SITE/sitemap.xml | head -20
# 3. Is the main text in the HTML before JavaScript runs?
curl -s $SITE/some-page | grep -c "a sentence from the page"
# 4. noindex, canonical and JSON-LD in the served HTML
curl -s $SITE/some-page | grep -iE 'noindex|rel="canonical"|ld\+json'How do I audit AI visibility, not only SEO?
Ask the questions your buyers ask in ChatGPT, Claude, Perplexity and Gemini, and record which sources each answer cites. Do it the same way every month, so a change means something. Add Search Console for Google indexing and searches, and your analytics for visits that come from AI assistants.
How do I turn the audit into fixes without breaking the site?
Ask Claude Code for a list of findings with the evidence for each, then fix them in small reviewed changes. After each deploy, rerun the live checks: a fix counts when the published site shows it, not when the agent says it is done.
Step by step
- Audit the repository. Ask Claude Code to list missing metadata, sitemap and robots rules, and structured data per page type.
- Audit the live site. Have it run curl against the published URLs as a browser and as GPTBot, and read robots.txt, the sitemap and the raw HTML.
- Check indexing. Open Search Console and look at which pages Google has indexed.
- Check AI answers. Ask your buyers' questions in the main assistants and note the sources cited.
- Fix and recheck. Fix in small changes, deploy, and rerun the live checks before closing each finding.
Common mistakes
- Trusting an audit that only read the repository.
- Using WebFetch summaries to judge tags that only raw HTML shows.
- Removing a robots.txt block the owner set on purpose without asking.
- Closing a finding on the agent's word instead of rechecking the live site.
How easyIndex solves it
easyIndex runs the audit from outside: your coding agent makes every change, and easyIndex checks the live site itself, so a step completes on evidence, not on the agent's report. It then shows AI-assistant visitors per page, which pages AI crawlers read and when, and Google indexing and searches from Search Console, for US$ 30 per website a month after a 7-day free trial. Connect it with claude mcp add --transport http easyindex https://easyindex.app/api/mcp.
Frequently asked questions
Is there a ready-made SEO audit skill for Claude Code?
Free open-source SEO skills exist; most read the repository, so pair them with live checks of the published site.
How often should I rerun the audit?
After every deploy that touches templates, robots.txt or the host, and once a month for AI answers.
Can Claude Code use Search Console data?
Yes, through a Search Console MCP server or an export; the API allows 2,000 URL inspections a day per site.
Does an audit get me cited by ChatGPT?
No audit guarantees citations. It removes what stops crawlers from reading your pages; the pages still have to answer the question.
Continue reading
- Claude Code SEO skill or MCP server: which do I need to show up in ChatGPT?
- Which AI crawlers exist and how do I allow them in robots.txt?
- Can ChatGPT and Claude see my JavaScript website?
- How do I add schema markup (JSON-LD) to my site with Claude Code or Codex?
- What is the GEO checklist for a website?
- How does easyIndex work, what do I need, and how long until results?
Last verified on .