Audit websites for traditional SEO health and AI search visibility (GEO). Generate prioritized reports with actionable fixes and ready-to-use prompts for AI coding agents. Covers Google, Bing, ChatGPT, Perplexity, Claude, Gemini, Copilot, and Google AI Overviews.
Check for product marketing context first:
If .agents/product-marketing-context.md exists, read it before asking questions. Use that context and only ask for information not already covered.
Gather missing context by asking the user:
Only ask what you don't already know. If the user gives a URL, use URL mode. If the user says "audit my project" or "scan the codebase," use codebase mode. If ambiguous, ask.
URL mode fetches live pages via HTTP. This often fails because of WAFs (Cloudflare, etc.), corporate firewalls, bot-detection, or restricted shell environments. Before running any URL-mode fetch, detect your platform and use the most reliable method available.
How to detect your platform:
WebFetch tool and WebSearch tool. You may also have @Web mentions available. If you can call WebFetch, you are in Cursor.WebFetch tool natively. Similar to Cursor but runs in a terminal-based agent.curl, python3).URL fetching priority chain (try in order, fall back on failure):
PlatformPrimary Fetch MethodFallback 1Fallback 2CursorWebFetch tool (bypasses WAFs/firewalls)Python script ( scripts/seo_audit.py)curl with browser UAClaude CodeWebFetch toolPython scriptcurl with browser UACodexWebFetch / browser toolsPython script--WindsurfBuilt-in web browsingPython scriptcurl with browser UAAider / terminalPython scriptcurl with browser UA--OtherPython scriptcurl with browser UA--
Failure detection: Treat any of these as a fetch failure that should trigger the next fallback:
curl: command not found (Windows without curl)If all methods fail, do NOT silently skip the check. Inform the user that the URL could not be reached and suggest:
This skill supports two audit modes:
ModeWhen to UseHow It WorksURL modeSite is live / deployedFetches pages via HTTP, checks robots.txt, sitemap, llms.txt, load timeCodebase modeSite is local / pre-deploymentScans project files using Glob, Read, Grep -- checks HTML, layout files, config
Codebase mode is especially useful for:
Choose your mode:
Run the audit script and manual checks:
bash
python3 scripts/seo_audit.py "https://example.com"
python3 scripts/seo_audit.py "https://example.com" --full # detailed output
Manual checks -- use the fetching strategy from "Platform Detection & URL Fetching Strategy" above.
Follow the priority chain for your platform. Examples for each method:
Primary: WebFetch (Cursor, Claude Code, Codex, Windsurf)
Use WebFetch for each resource. This is the most reliable method -- it handles TLS, follows redirects, and bypasses most WAF/bot-detection blocks.
text
WebFetch("https://example.com") -- main page HTML
WebFetch("https://example.com/robots.txt") -- robots.txt
WebFetch("https://example.com/sitemap.xml") -- sitemap
WebFetch("https://example.com/llms.txt") -- llms.txt (AI discovery)
If WebFetch returns an error for a specific resource (403, 404, 500, or timeout), note the failure and try the next fallback for that resource. Do NOT skip the check silently.
Fallback 1: Python script
bash
python3 scripts/seo_audit.py "https://example.com"
python3 scripts/seo_audit.py "https://example.com" --full
The script has built-in retry logic and User-Agent rotation. If the script reports a fetch failure, it will print a diagnostic message with the status code and suggested next steps.
Fallback 2: curl with browser User-Agent
Use a realistic browser User-Agent to avoid bot detection. Add --retry 2 and --max-time 30 for resilience.
bash
UA="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
curl -sL -A "$UA" --retry 2 --max-time 30 "https://example.com/robots.txt"
curl -sL -A "$UA" --retry 2 --max-time 30 "https://example.com/sitemap.xml"
curl -sL -A "$UA" --retry 2 --max-time 30 "https://example.com/llms.txt"
curl -sL -A "$UA" --retry 2 --max-time 30 "https://example.com"
curl -sIL -A "$UA" --retry 2 --max-time 30 "https://example.com"
If all methods fail for a resource, tell the user which resource could not be fetched, the error received, and suggest they paste the content manually or switch to codebase mode.
PageSpeed check (optional, API-based):
bash
curl "https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=https://example.com&strategy=mobile"
What to check (both modes):
Scan the project files directly using Glob, Read, and Grep. No live server needed.
Step 1: Discover project structure and framework
text
Glob: **/*.{html,jsx,tsx,astro,vue,svelte,php}
Glob: **/layout.{tsx,jsx,js,ts}
Glob: **/app/layout.{tsx,jsx}
Glob: **/_app.{tsx,jsx}
Glob: **/index.{html,tsx,jsx}
Glob: **/head.{tsx,jsx}
Glob: **/_document.{tsx,jsx}
Step 2: Check meta tags in layout/page files
For Next.js (App Router):
text
Grep: "metadata|generateMetadata|title|description" in app/layout.tsx, app/page.tsx
Grep: "openGraph|twitter|metadataBase" in app/layout.tsx
For Next.js (Pages Router):
text
Grep: "<Head>|<title>|meta name=.description" in pages/_app.tsx, pages/_document.tsx
For static HTML:
text
Grep: "<title>|<meta name=.description|<meta property=.og:" in **/*.html
For Astro/Vue/Svelte:
text
Grep: "<title>|<meta|defineMetadata|useHead" in **/*.{astro,vue,svelte}
Step 3: Check for robots.txt and sitemap
text
Glob: **/robots.txt
Glob: **/public/robots.txt
Glob: **/static/robots.txt
Glob: **/sitemap*.xml
Glob: **/public/sitemap*.xml
For Next.js dynamic generation:
text
Glob: **/app/robots.{ts,js}
Glob: **/app/sitemap.{ts,js}
Step 4: Check for llms.txt
text
Glob: **/llms.txt
Glob: **/public/llms.txt
Glob: **/static/llms.txt
Step 5: Check schema markup in source
text
Grep: "application/ld\+json|@type|schema.org|jsonLd|JsonLd" in **/*.{tsx,jsx,html,astro,vue}
Step 6: Check headings structure
text
Grep: "<h1|<h2|<h3|<H1|<H2|<H3" in page/layout files
For React/JSX components:
text
Grep: "className=.*h1|<h1|<H1|heading" in **/*.{tsx,jsx}
Step 7: Check images for alt text
text
Grep: "<img[^>]*(?!alt=)" in **/*.{html,tsx,jsx,astro,vue}
Grep: "<Image[^>]*(?!alt=)" in **/*.{tsx,jsx}
Step 8: Check Open Graph and social tags
text
Grep: "og:title|og:description|og:image|twitter:card|openGraph" in layout/page files
Codebase mode limitations:
Codebase mode advantages:
AI Crawler Access -- check robots.txt for these bots (in URL mode, fetch directly; in codebase mode, read the robots.txt file from public/ or project root):
BotPlatformPurposeGPTBotOpenAIChatGPT training/knowledgeChatGPT-UserOpenAIChatGPT web browsingClaudeBotAnthropicClaude trainingClaude-WebAnthropicClaude web searchanthropic-aiAnthropicClaude training dataPerplexityBotPerplexityReal-time search answersGoogle-ExtendedGoogleGemini / AI OverviewsApplebot-ExtendedAppleApple IntelligenceBingbotMicrosoftCopilot (uses Bing index)
llms.txt File:
Check if https://example.com/llms.txt exists. This AI discovery file (introduced 2024, widely adopted 2026) provides structured context to LLMs. Sites with llms.txt saw ~35% increase in AI visibility within 60 days. If missing, recommend creating one -- see references/fix-prompt-templates.md for a ready-to-use prompt.
Schema Markup:
web_fetchandcurlcannot reliably detect JS-injected schema (Yoast, RankMath, AIOSEO). Use browser tools or Google Rich Results Test for accurate detection.
Check for: FAQPage (+40% AI visibility), Article, Organization, WebPage, BreadcrumbList, SpeakableSpecification. See references/schema-templates.md.
AI Citation Scoring: Score the page across 5 dimensions (see references/ai-citation-scoring.md):
Veto rule: If AI crawlers are blocked in robots.txt, AI visibility score = 0 regardless of content quality.
GEO Methods Check (see references/geo-methods.md):
E-E-A-T Signals:
Content Structure for AI Extraction:
AI Writing Detection: Check content for AI writing patterns that reduce credibility. See references/ai-writing-detection.md.
Generate this report after completing all three phases:
markdown
# SEO & GEO Audit Report: [domain or project name]
**Audit mode:** URL / Codebase
## Executive Summary
- **SEO Health:** X/10
- **AI Visibility Score:** X/10
- **Critical Issues (P0):** [count]
- **Important Issues (P1):** [count]
- **Quick Wins:** [count]
## SEO Findings
| Priority | Issue | Impact | Fix |
| -------- | ------- | -------- | -------------- |
| P0 | [issue] | [impact] | [specific fix] |
| P1 | [issue] | [impact] | [specific fix] |
| P2 | [issue] | [impact] | [specific fix] |
## GEO / AI Visibility Findings
### AI Citation Score: X/10
| Dimension | Score | Assessment |
| -------------- | ----- | ---------- |
| Extractability | X/10 | [details] |
| Quotability | X/10 | [details] |
| Authority | X/10 | [details] |
| Freshness | X/10 | [details] |
| Entity Clarity | X/10 | [details] |
### AI Crawler Access
| Bot | Status |
| --------------- | ---------------------------------- |
| GPTBot | Allowed / Blocked / Not configured |
| ClaudeBot | Allowed / Blocked / Not configured |
| PerplexityBot | Allowed / Blocked / Not configured |
| Google-Extended | Allowed / Blocked / Not configured |
| Bingbot | Allowed / Blocked / Not configured |
### llms.txt: Present / Missing
### Platform Readiness
| Platform | Ready | Key Gap |
| -------------------- | ------ | ------- |
| Google (traditional) | Yes/No | [gap] |
| Google AI Overviews | Yes/No | [gap] |
| ChatGPT | Yes/No | [gap] |
| Perplexity | Yes/No | [gap] |
| Claude | Yes/No | [gap] |
| Copilot | Yes/No | [gap] |
## GEO Methods Applied
| Method | Present | Expected Boost |
| ---------------------- | ------- | -------------- |
| Citations with sources | Yes/No | +27-40% |
| Statistics with data | Yes/No | +33-37% |
| Expert quotes | Yes/No | +30-43% |
| Answer capsules | Yes/No | High |
| FAQ schema | Yes/No | +40% |
| Authoritative tone | Yes/No | +25% |
## Prioritized Action Plan
### Critical (do first)
1. [action with specific instructions]
### High Impact
1. [action with specific instructions]
### Quick Wins
1. [action with specific instructions]
### Long-term
1. [action with specific instructions]
When the audit finds a small number of fixable issues, generate a ready-to-use prompt that the user can paste directly into their AI coding agent (Cursor, Claude Code, Codex, etc.).
When to generate a fix prompt:
How to build the prompt:
Read the fix prompt templates from references/fix-prompt-templates.md
Select the relevant template(s) based on audit findings
Fill in the specific issues, file paths, and current values from the audit
Combine into a single .prompt.md formatted prompt with:
Example output (URL mode):
markdown
---
description: "Fix SEO and AI visibility issues found in audit of example.com"
agent: "agent"
tools: ["editFiles", "codebase", "fetch"]
---
# Fix SEO & AI Visibility Issues
You are an SEO and GEO optimization expert. Fix the following issues found
during an audit of example.com.
## Issues to Fix
1. **Missing meta description** on /about page
- Add: `<meta name="description" content="...">`
- Must be 150-160 characters, include primary keyword
2. **AI crawlers blocked** in robots.txt
- Add Allow rules for GPTBot, ClaudeBot, PerplexityBot
3. **No FAQPage schema** on /pricing
- Add JSON-LD FAQPage schema with existing Q&A content
## Validation
- Run: `python3 scripts/seo_audit.py "https://example.com"`
- Verify all issues resolved
Example output (codebase mode):
markdown
---
description: "Fix SEO issues found in codebase audit of my-project"
agent: "agent"
tools: ["editFiles", "codebase", "search"]
---
# Fix SEO & AI Visibility Issues
You are an SEO and GEO optimization expert. Fix the following issues found
during a codebase audit.
## Issues to Fix
1. **Missing meta description** in `app/layout.tsx` (line 12)
- The `metadata` export has `title` but no `description`
- Add: `description: "Your compelling description, 150-160 chars"`
2. **No AI crawler rules** in `public/robots.txt` (line 1)
- Only has Googlebot rules. Add Allow rules for GPTBot, ClaudeBot,
PerplexityBot, Google-Extended, Applebot-Extended
3. **No llms.txt** -- file missing entirely
- Create `public/llms.txt` with company summary, contact, and services
4. **Missing OG image** in `app/layout.tsx` (line 15)
- `openGraph` object has title and description but no `images` array
- Add: `images: [{ url: "/og-image.png", width: 1200, height: 630 }]`
5. **No FAQPage schema** on `app/pricing/page.tsx`
- FAQ section exists at line 85 but has no JSON-LD markup
- Add FAQPage schema using the existing Q&A content
## Validation
- Check each file for the fixes above
- Run `npm run build` to verify no build errors
When the audit identifies content gaps -- missing pages, thin content that needs rewriting, or opportunities for new pages targeting high-value queries -- generate a ready-to-use prompt that produces SEO + GEO optimized content when pasted into an AI writing/coding agent.
When to generate a content prompt:
How to build the prompt:
.agents/product-marketing-context.md exists).prompt.md formatted promptExample output (article page):
markdown
---
description: "Create SEO + GEO optimized article: What is Retrieval-Augmented Generation?"
agent: "agent"
tools: ["editFiles", "codebase", "search", "fetch"]
---
# Create Article: What is Retrieval-Augmented Generation (RAG)?
You are a senior content strategist who specializes in search engine
optimization and generative engine optimization. You write content that
ranks on Google AND gets cited by ChatGPT, Perplexity, Claude, and
Google AI Overviews.
## Content Brief
- **Target query**: "What is RAG?" / "retrieval augmented generation explained"
- **Search intent**: informational
- **Target audience**: Software engineers evaluating RAG for production AI apps
- **Primary keyword**: retrieval augmented generation
- **Secondary keywords**: RAG architecture, RAG vs fine-tuning, RAG pipeline, vector database
- **Word count**: 2,000-2,500 words
- **Competing pages to outperform**: aws.amazon.com/what-is/retrieval-augmented-generation, cloud.google.com/...
## Pre-Writing Analysis
Before drafting:
1. Intent mapping: Engineers want to understand what RAG is, when to use it
vs fine-tuning, and how to implement it. They need architecture details.
2. SERP shape: Competing pages use definition + architecture diagram + use
cases format. Match this but add comparison tables and sourced benchmarks.
3. Gap analysis: Competing pages lack pricing comparisons for vector DBs,
real latency benchmarks, and production failure modes.
4. Citation plan: Lewis et al. (2020) original paper, LlamaIndex docs,
LangChain docs, Pinecone benchmarks, Anthropic RAG guide.
## Article Structure
H2s as questions, 40-60 word answer capsule after each H2. Include:
- 2-3 sourced statistics per section: "Claim (Source, Year)"
- At least 1 expert quote per 500 words
- Tables for all comparisons (RAG vs fine-tuning, vector DB comparison)
- FAQ section with 6 self-contained Q&A pairs
## Writing Rules
- No em dashes. No filler words. No AI-tell verbs (delve, leverage).
- Paragraphs: 2-3 sentences max.
- First 150 words must directly answer "What is RAG?"
## Schema
Include Article schema with author, datePublished, dateModified,
SpeakableSpecification. Include FAQPage schema for FAQ section.
## Validation
- [ ] Definition in first 150 words
- [ ] Answer capsule after every H2
- [ ] 2-3 sourced stats per section
- [ ] No em dashes or AI-tell words
- [ ] Article + FAQPage schema included
Example output (comparison page):
markdown
---
description: "Create SEO + GEO optimized comparison: Notion vs Confluence"
agent: "agent"
tools: ["editFiles", "codebase", "search", "fetch"]
---
# Create Comparison Page: Notion vs Confluence
You are a product analyst with SEO and GEO expertise. You write
comparison pages that AI systems cite when users ask "Which is better?"
## Content Brief
- **Target query**: "Notion vs Confluence"
- **Search intent**: commercial investigation
- **Target audience**: Engineering/product managers choosing a team wiki
- **Primary keyword**: Notion vs Confluence
- **Secondary keywords**: Notion alternative, Confluence alternative, best wiki tool
- **Word count**: 2,000 words
- **Your product**: None (neutral comparison)
## Page Structure
- H1: "Notion vs Confluence: Which Wiki Tool Is Better for Your Team in 2026?"
- TL;DR in first 150 words with a clear verdict
- Full comparison table (pricing, features, limitations, ideal user)
- 40-60 word answer capsule after each H2
- "When to Choose Notion" and "When to Choose Confluence" sections
- Alternatives table with 3-4 options
- FAQ with 6 self-contained answers
## Writing Rules
- All pricing dated "(as of March 2026)"
- No unsupported superlatives
- No em dashes or AI-tell words
- Every claim verifiable via product docs or third-party reviews
## Schema
Include Article schema with `about` entities for both products.
Include FAQPage schema. Include SpeakableSpecification for TL;DR.
## Validation
- [ ] TL;DR with clear verdict in first 150 words
- [ ] Full comparison table
- [ ] Each product defined in 40-60 word capsule
- [ ] All pricing dated
- [ ] No em dashes or AI-tell words
- [ ] Article + FAQPage schema included
Combining with programmatic SEO: When the audit suggests scale pages (integrations, locations, personas, glossary terms), use the batch pattern in Template 3 or Template 6 from references/content-prompt-templates.md. Provide the list of items (terms, cities, audiences) inside the prompt so the agent generates one page per item using the same structure.
For sites that could benefit from pages at scale, suggest opportunities from these playbooks:
If the site has...Suggest...Product with integrationsIntegration pages ( /integrations/[tool]/)Multi-segment audiencePersona pages ( /for/[audience]/)Local presenceLocation pages ( /[service]/[city]/)Competitor landscapeComparison pages ( /compare/[x]-vs-[y]/)Industry expertiseGlossary pages ( /glossary/[term]/)Design/creative productTemplate pages ( /templates/[type]/)
Only suggest if there's genuine search demand and the site has (or can create) unique data for each page. Use subfolders, not subdomains.
For detailed ranking factors per platform, see references/platform-ranking-factors.md.
Quick reference:
PlatformPrimary IndexKey FactorUnique RequirementGoogleGoogleBacklinks + E-E-A-TCore Web VitalsGoogle AI OverviewsGoogleE-E-A-T + SchemaKnowledge GraphChatGPTBing-basedDomain AuthorityContent-Answer FitPerplexityOwn + GoogleSemantic RelevanceFAQ Schema, freshnessClaudeBraveFactual DensityBrave Search indexingCopilotBingBing IndexMS Ecosystem presence
ToolURLPurposeGoogle Rich Results Testsearch.google.com/test/rich-resultsSchema validation (renders JS)Schema.org Validatorvalidator.schema.orgSchema syntax checkPageSpeed Insightspagespeed.web.devCore Web VitalsGoogle Search Consolesearch.google.com/search-consoleIndexing, errors, performanceBing Webmaster Toolsbing.com/webmastersBing indexing
scripts/seo_audit.py -- Full SEO + GEO audit (no API required). Checks meta tags, headings, robots.txt, sitemap, llms.txt, AI crawlers, schema, performance.bash
python3 scripts/seo_audit.py "https://example.com" # summary
python3 scripts/seo_audit.py "https://example.com" --full # detailed
python3 scripts/seo_audit.py "https://example.com" --ua "Custom/Agent" # custom User-Agent
URL fetching can fail for many reasons. Use this table to diagnose and recover.
SymptomLikely CauseFix403 ForbiddenWAF/bot detection (Cloudflare, etc.)Use WebFetch (Cursor/Claude Code) or curl with browser UA404 on known pagesURL path wrong OR CDN blocking non-browser agentsVerify URL in a browser, then try WebFetch429 Too Many RequestsRate limitingWait and retry, or use WebFetch500 Server ErrorServer issue or aggressive bot blockingRetry with backoff (script does this automatically), try WebFetchConnection timeoutFirewall blocking outbound requestsUse WebFetch, or ask user to paste contentEmpty responseBot trap returning empty bodyUse WebFetch, verify the URL loads in a real browserSSL/TLS errorCertificate issue or corporate MITM proxyAdd --insecure to curl (warn user), or use WebFetch``curl: command not foundWindows without curl or restricted envUse Python script ( scripts/seo_audit.py) or WebFetchScript exits with code 2Connection/timeout error (no HTTP status)Network issue; try WebFetch or check VPN/firewallScript exits with code 1HTTP error (got a status code back)Check the status code in output; likely bot detection
Platform-specific notes:
WebFetch tool. It handles TLS, follows redirects, and bypasses most WAF blocks. If fetching a URL fails with WebFetch, do NOT silently skip the check -- inform the user with the error and suggest they paste the content or switch to codebase mode.WebFetch is available and preferred.WebFetch or equivalent.