HOME SKILLS BLOG GITHUB
// SKILL

XML SITEMAP
ANALYSIS AND GENERATION

An XML sitemap is a file that lists preferred site URLs and optional metadata for search engines. Claude SEO analyzes existing sitemaps for format, status, canonical, indexability, and freshness issues, or generates new sitemaps with industry templates and quality gates.

By Daniel Agrici · Last updated: · Source: Google sitemap guidance

$
/seo sitemap https://your-site.com

REQUIRES CLAUDE SEO INSTALLED IN CLAUDE CODE

Claude SEO XML sitemap analysis and generation
// HOW IT WORKS

What can sitemap analysis and generation do?

The sitemap skill operates in two modes. Analysis mode validates an existing sitemap against the protocol specification and SEO best practices. Generation mode creates a new sitemap with industry-specific planning templates and review gates for large, repetitive page sets.

In analysis mode, it checks every URL for HTTP status, validates XML format, flags deprecated tags, and compares crawled pages against the sitemap to find missing pages. In generation mode, it asks for your business type, plans the structure interactively, and applies safeguards at 30+ and 50+ location pages.

/seo sitemap <url | generate> MODE 1: ANALYZE XML VALIDATION Format + limits URL STATUS HTTP 200 check QUALITY SIGNALS lastmod, noindex COVERAGE GAP Crawled vs listed MODE 2: GENERATE DETECT TYPE Industry template QUALITY GATES 30/50 page limits GENERATE XML Split at 50K STRUCTURE.MD Documentation VALIDATION-REPORT.md Issues + recommendations sitemap.xml + STRUCTURE.md Ready to deploy

What it validates

The analysis mode checks your sitemap against the protocol specification and Google's documented best practices. Every URL is verified for accessibility, and the sitemap is compared against your actual crawlable pages to find gaps.

50K
URL LIMIT VALIDATION
Verifies the sitemap stays under the 50,000 URL protocol limit per file. Recommends sitemap index files for larger sites, split by content type: pages, posts, images, and videos.
200
HTTP STATUS CHECK
Verifies every URL in the sitemap returns HTTP 200. Flags non-200 URLs (broken links), redirected URLs that should be updated to final destinations, and noindexed URLs that should not be in the sitemap.
XML
FORMAT VALIDATION
Validates XML structure, encoding, namespace declarations, and proper element nesting. Reports specific parsing errors with line numbers. Checks for HTTPS-only URLs and no non-canonical entries.
6
COMMON ISSUES
Detects 6 common sitemap issues by severity: exceeding 50K URLs (Critical), non-200 URLs (High), noindexed URLs included (High), redirected URLs (Medium), identical lastmod dates (Low), and deprecated priority/changefreq tags (Info).
5
QUALITY GATES
In generation mode, applies quality gates for programmatic pages. Safe at scale: integration pages, template pages, glossary (200+ word definitions), product pages, user profiles. Warning at 30+ location pages, hard stop at 50+.
GAP
COVERAGE ANALYSIS
Compares crawled pages against sitemap entries to find pages missing from the sitemap. Also checks that the sitemap is referenced in robots.txt for search engine discovery.
// OUTPUT

What does the sitemap report include?

The output depends on the mode. Analysis produces a validation report with prioritized issues. Generation produces a ready-to-deploy sitemap.xml (or split files with index) and a STRUCTURE.md documentation file.

Analysis mode output

  • VALIDATION-REPORT.md - complete analysis results
  • Issues list - organized by severity (Critical, High, Medium, Low, Info)
  • Coverage gap - pages found by crawling but missing from sitemap
  • Recommendations - specific fixes for each issue

Generation mode output

  • sitemap.xml - valid XML sitemap (or split files with sitemap index)
  • STRUCTURE.md - site architecture documentation
  • URL count - total URLs and organization summary

Correct sitemap format

Google only uses loc and lastmod tags. The deprecated priority and changefreq tags are ignored:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/page</loc>
    <lastmod>2026-03-25</lastmod>
  </url>
</urlset>
// USAGE

How do you audit or generate a sitemap?

Analyze an existing sitemap

/seo sitemap https://your-site.com

Fetches the sitemap from common locations (/sitemap.xml, /sitemap_index.xml, robots.txt reference), validates it, and checks every URL. Produces a validation report with prioritized issues.

Generate a new sitemap

/seo sitemap generate

Interactive mode. Detects or asks for your business type, loads an industry template, plans the structure with you, applies quality gates, and generates valid XML ready for deployment.

Large-scale content review

The generation mode flags patterns that deserve human review before publication. It cannot predict or prevent a Google action:

  • Location pages with only city name swapped
  • "Best [tool] for [industry]" pages without industry-specific value
  • "[Competitor] alternative" pages without real comparison data
  • AI-generated pages without human review and unique value
// FAQ

QUESTIONS ABOUT SITEMAP ANALYSIS

The validator checks valid XML format, URL count under the 50,000 protocol limit, all URLs returning HTTP 200, accurate lastmod dates (not all identical), no deprecated tags (priority and changefreq are ignored by Google), sitemap referenced in robots.txt, no non-canonical URLs, no noindexed URLs, no redirected URLs, and HTTPS-only URLs.
// RELATED SKILLS

EXPLORE MORE

VIEW ALL 25 SKILLS →

AUDIT YOUR SITEMAP
IN SECONDS.

$
git clone --depth 1 https://github.com/AgriciDaniel/claude-seo.git && bash claude-seo/install.sh
VIEW ON GITHUB ALL SKILLS >