$npx -y skills add AgriciDaniel/claude-seo --skill seo-sitemapAnalyze existing XML sitemaps or generate new ones with industry templates. Validates format, URLs, and structure. Use when user says "sitemap", "generate sitemap", "sitemap issues", or "XML sitemap".
| 1 | # Sitemap Analysis & Generation |
| 2 | |
| 3 | ## Mode 1: Analyze Existing Sitemap |
| 4 | |
| 5 | Discover candidates before reporting a sitemap missing: |
| 6 | |
| 7 | ```bash |
| 8 | claude-seo run sitemap_discovery.py <url> --json |
| 9 | ``` |
| 10 | |
| 11 | The helper reads every bounded `Sitemap:` declaration in robots.txt, validates |
| 12 | cross-host targets through the shared SSRF-safe fetch layer, and still probes |
| 13 | common paths when a declared sitemap is stale or invalid. Use only entries in |
| 14 | `found`; preserve declared failures as findings instead of treating a robots.txt |
| 15 | line alone as proof that a sitemap works. |
| 16 | |
| 17 | ### Validation Checks |
| 18 | - Valid XML format |
| 19 | - Per-file limit: **≤50,000 URLs AND ≤50MB uncompressed** (whichever is hit first) |
| 20 | - All URLs return HTTP 200 |
| 21 | - `<lastmod>` accurate: must be a valid **W3C Datetime** and reflect the **last |
| 22 | significant content change** (main content, structured data, links, not |
| 23 | copyright/boilerplate edits). Google only honours `<lastmod>` when consistently |
| 24 | and verifiably accurate, so warn when values are suspiciously uniform or newer |
| 25 | than the page's real content. |
| 26 | - No deprecated tags: `<priority>` and `<changefreq>` are ignored by Google |
| 27 | - Sitemap referenced in robots.txt |
| 28 | - Compare crawled pages vs sitemap; flag missing pages |
| 29 | |
| 30 | ### Quality Signals |
| 31 | - Sitemap index file if >50k URLs |
| 32 | - Split by content type (pages, posts, images, videos) |
| 33 | - No non-canonical URLs in sitemap |
| 34 | - No noindexed URLs in sitemap |
| 35 | - No redirected URLs in sitemap |
| 36 | - HTTPS URLs only (no HTTP) |
| 37 | |
| 38 | ### Common Issues |
| 39 | | Issue | Severity | Fix | |
| 40 | |-------|----------|-----| |
| 41 | | >50k URLs in single file | Critical | Split with sitemap index | |
| 42 | | >50MB uncompressed single file | Critical | Split with sitemap index | |
| 43 | | Non-200 URLs | High | Remove or fix broken URLs | |
| 44 | | Noindexed URLs included | High | Remove from sitemap | |
| 45 | | Redirected URLs included | Medium | Update to final URLs | |
| 46 | | All identical lastmod | Low | Use actual modification dates | |
| 47 | | Priority/changefreq used | Info | Can remove (ignored by Google) | |
| 48 | |
| 49 | ### Extension sitemaps (image / video / news) |
| 50 | |
| 51 | Google documents three subtypes with their own rules, validate per-subtype: |
| 52 | - **Image** (`http://www.google.com/schemas/sitemap-image/1.1`): only two valid |
| 53 | tags remain, `<image:image>` and `<image:loc>` (max **1,000** `<image:image>` |
| 54 | per `<url>`). `<image:caption>`/`<image:geo_location>`/`<image:title>`/ |
| 55 | `<image:license>` were deprecated (2022), flag as info-level removable. |
| 56 | - **Video**: required `<video:video>` with `<video:thumbnail_loc>`, |
| 57 | `<video:title>`, `<video:description>`, plus `<video:content_loc>` or |
| 58 | `<video:player_loc>`; mRSS also supported. Flag deprecated/removed tags |
| 59 | (`<video:category>`, `<video:gallery_loc>`, `<video:price>`, `<video:tvshow>`, |
| 60 | player autoplay/allow_embed) as info-level removable; recheck Google docs before citing a removal date. |
| 61 | - **News**: max **1,000** `<news:news>` per file (not 50,000); include only |
| 62 | articles from the **last 2 days**; required `<news:publication>`/`<news:name>`/ |
| 63 | `<news:language>`/`<news:publication_date>`/`<news:title>`; submit/discover through |
| 64 | Search Console or robots.txt/sitemap index; use Publisher Center only for |
| 65 | publication management where relevant. When the `news:` namespace is detected, override the generic |
| 66 | 50k check with the 1,000 cap. |
| 67 | |
| 68 | ## Mode 2: Generate New Sitemap |
| 69 | |
| 70 | ### Process |
| 71 | 1. Ask for business type (or auto-detect from existing site) |
| 72 | 2. Load industry template from `../seo-plan/assets/` directory |
| 73 | 3. Interactive structure planning with user |
| 74 | 4. Apply quality gates: |
| 75 | - ⚠️ WARNING at 30+ location pages (require 60%+ unique content) |
| 76 | - 🛑 HARD STOP at 50+ location pages (require justification) |
| 77 | 5. Generate valid XML output |
| 78 | 6. Split at whichever comes first: 50,000 URLs or 50MB uncompressed, with sitemap index |
| 79 | 7. Generate STRUCTURE.md documentation |
| 80 | |
| 81 | ### Safe Programmatic Pages (OK at scale) |
| 82 | ✅ Integration pages (with real setup docs) |
| 83 | ✅ Template/tool pages (with downloadable content) |
| 84 | ✅ Glossary pages (200+ word definitions) |
| 85 | ✅ Product pages (unique specs, reviews) |
| 86 | ✅ User profile pages (user-generated content) |
| 87 | |
| 88 | ### Penalty Risk (avoid at scale) |
| 89 | ❌ Location pages with only city name swapped |
| 90 | ❌ "Best [tool] for [industry]" without industry-specific value |
| 91 | ❌ "[Competitor] alternative" without real comparison data |
| 92 | ❌ AI-generated pages without human review and unique value |
| 93 | |
| 94 | ## Sitemap Format |
| 95 | |
| 96 | ### Standard Sitemap |
| 97 | ```xml |
| 98 | <?xml version="1.0" encoding="UTF-8"?> |
| 99 | <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> |
| 100 | <url> |
| 101 | <loc>https://example.com/page</loc> |
| 102 | <lastmod>2026-02-07</lastmod> |
| 103 | </url> |
| 104 | </urlset> |
| 105 | ``` |
| 106 | |
| 107 | ### Sitemap Index (for >50k URLs) |
| 108 | ```xml |
| 109 | <?xml version="1.0 |