Sitemap Analysis & Generation
Analyze existing XML sitemaps or generate new ones with industry templates.
How to use it
- Hit Copy SKILL.md — or use the Claude Code line below to get every file.
- Claude: ⋯ → Download .md, then Customize → Skills → Add → Upload skill.
ChatGPT: make a Project and paste it into Instructions.
Neither? Paste it at the top of a new chat — it works for that chat. - Describe your job in plain words. The AI follows the skill from there.
npx degit AgriciDaniel/claude-seo/skills/seo-sitemap#main ~/.claude/skills/seo-sitemapFor one project only, change the path to .claude/skills/seo-sitemap. This skill also uses sitemap_discovery.py, robots.txt, STRUCTURE.md, VALIDATION-REPORT.md — copying SKILL.md alone won't be enough. See the folder on GitHub.
Not working?
- Check which app you pasted it into — the steps above name the right one.
- Some skills need the paid tier of Claude or ChatGPT.
Paste into Claude, ChatGPT or Cursor.
Show the full text156 lines
Sitemap Analysis & Generation
Mode 1: Analyze Existing Sitemap
Discover candidates before reporting a sitemap missing:
"${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo" run sitemap_discovery.py <url> --json
The helper reads every bounded Sitemap: declaration in robots.txt, validates
cross-host targets through the shared SSRF-safe fetch layer, and still probes
common paths when a declared sitemap is stale or invalid. Use only entries in
found; preserve declared failures as findings instead of treating a robots.txt
line alone as proof that a sitemap works.
Validation Checks
- Valid XML format
- Per-file limit: ≤50,000 URLs AND ≤50MB uncompressed (whichever is hit first)
- All URLs return HTTP 200
<lastmod>accurate: must be a valid W3C Datetime and reflect the last significant content change (main content, structured data, links, not copyright/boilerplate edits). Google only honours<lastmod>when consistently and verifiably accurate, so warn when values are suspiciously uniform or newer than the page's real content.- No deprecated tags:
<priority>and<changefreq>are ignored by Google - Sitemap referenced in robots.txt
- Compare crawled pages vs sitemap; flag missing pages
Quality Signals
- Sitemap index file if >50k URLs
- Split by content type (pages, posts, images, videos)
- No non-canonical URLs in sitemap
- No noindexed URLs in sitemap
- No redirected URLs in sitemap
- HTTPS URLs only (no HTTP)
Common Issues
| Issue | Severity | Fix |
|---|---|---|
| >50k URLs in single file | Critical | Split with sitemap index |
| >50MB uncompressed single file | Critical | Split with sitemap index |
| Non-200 URLs | High | Remove or fix broken URLs |
| Noindexed URLs included | High | Remove from sitemap |
| Redirected URLs included | Medium | Update to final URLs |
| All identical lastmod | Low | Use actual modification dates |
| Priority/changefreq used | Info | Can remove (ignored by Google) |
Extension sitemaps (image / video / news)
Google documents three subtypes with their own rules, validate per-subtype:
- Image (
http://www.google.com/schemas/sitemap-image/1.1): only two valid tags remain,<image:image>and<image:loc>(max 1,000<image:image>per<url>).<image:caption>/<image:geo_location>/<image:title>/<image:license>were deprecated (2022), flag as info-level removable. - Video: required
with,,, plusor; mRSS also supported. Flag deprecated/removed tags (,,,, player autoplay/allow_embed) as info-level removable; recheck Google docs before citing a removal date. - News: max 1,000
<news:news>per file (not 50,000); include only articles from the last 2 days; required<news:publication>/<news:name>/<news:language>/<news:publication_date>/<news:title>; submit/discover through Search Console or robots.txt/sitemap index; use Publisher Center only for publication management where relevant. When thenews:namespace is detected, override the generic 50k check with the 1,000 cap.
Mode 2: Generate New Sitemap
Process
- Ask for business type (or auto-detect from existing site)
- Load industry template from
../seo-plan/assets/directory - Interactive structure planning with user
- Apply quality gates:
- ⚠️ WARNING at 30+ location pages (require 60%+ unique content)
- 🛑 HARD STOP at 50+ location pages (require justification)
- Generate valid XML output
- Split at whichever comes first: 50,000 URLs or 50MB uncompressed, with sitemap index
- Generate STRUCTURE.md documentation
Safe Programmatic Pages (OK at scale)
✅ Integration pages (with real setup docs) ✅ Template/tool pages (with downloadable content) ✅ Glossary pages (200+ word definitions) ✅ Product pages (unique specs, reviews) ✅ User profile pages (user-generated content)
Penalty Risk (avoid at scale)
❌ Location pages with only city name swapped ❌ "Best [tool] for [industry]" without industry-specific value ❌ "[Competitor] alternative" without real comparison data ❌ AI-generated pages without human review and unique value
Sitemap Format
Standard Sitemap
<?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-02-07</lastmod>
</url>
</urlset>
Sitemap Index (for >50k URLs)
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemap-pages.xml</loc>
<lastmod>2026-02-07</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-posts.xml</loc>
<lastmod>2026-02-07</lastmod>
</sitemap>
</sitemapindex>
Error Handling
- URL unreachable: Report the HTTP status code and suggest checking if the site is live
- No sitemap found: Run
sitemap_discovery.pyand report "not found" only when itsfoundlist is empty after declared and common candidates are checked - Invalid XML format: Report specific parsing errors with line numbers
- Rate limiting detected: Back off and report partial results with a note about retry timing
Output
For Analysis
VALIDATION-REPORT.md: analysis results- Issues list with severity
- Recommendations
For Generation
sitemap.xml(or split files with index)STRUCTURE.md: site architecture documentation- URL count and organization summary
| 1 | |
| 2 | name seo-sitemap |
| 3 | description > |
| 4 | Analyze existing XML sitemaps or generate new ones with industry templates. |
| 5 | Validates format, URLs, and structure. Use when user says "sitemap", |
| 6 | "generate sitemap", "sitemap issues", or "XML sitemap". |
| 7 | user-invocable true |
| 8 | argument-hint "[url or generate]" |
| 9 | license MIT |
| 10 | metadata |
| 11 | author AgriciDaniel |
| 12 | version "2.3.1" |
| 13 | category seo |
| 14 | |
| 15 | |
| 16 | # Sitemap Analysis & Generation |
| 17 | |
| 18 | ## Mode 1: Analyze Existing Sitemap |
| 19 | |
| 20 | Discover candidates before reporting a sitemap missing: |
| 21 | |
| 22 | |
| 23 | "${CLAUDE_PLUGIN_ROOT}/scripts/claude-seo" run sitemap_discovery.py <url> --json |
| 24 | |
| 25 | |
| 26 | The helper reads every bounded `Sitemap:` declaration in robots.txt, validates |
| 27 | cross-host targets through the shared SSRF-safe fetch layer, and still probes |
| 28 | common paths when a declared sitemap is stale or invalid. Use only entries in |
| 29 | `found`; preserve declared failures as findings instead of treating a robots.txt |
| 30 | line alone as proof that a sitemap works. |
| 31 | |
| 32 | ### Validation Checks |
| 33 | Valid XML format |
| 34 | Per-file limit: **≤50,000 URLs AND ≤50MB uncompressed** (whichever is hit first) |
| 35 | All URLs return HTTP 200 |
| 36 | `<lastmod>` accurate: must be a valid **W3C Datetime** and reflect the **last |
| 37 | significant content change** (main content, structured data, links, not |
| 38 | copyright/boilerplate edits). Google only honours `<lastmod>` when consistently |
| 39 | and verifiably accurate, so warn when values are suspiciously uniform or newer |
| 40 | than the page's real content. |
| 41 | No deprecated tags: `<priority>` and `<changefreq>` are ignored by Google |
| 42 | Sitemap referenced in robots.txt |
| 43 | Compare crawled pages vs sitemap; flag missing pages |
| 44 | |
| 45 | ### Quality Signals |
| 46 | Sitemap index file if >50k URLs |
| 47 | Split by content type (pages, posts, images, videos) |
| 48 | No non-canonical URLs in sitemap |
| 49 | No noindexed URLs in sitemap |
| 50 | No redirected URLs in sitemap |
| 51 | HTTPS URLs only (no HTTP) |
| 52 | |
| 53 | ### Common Issues |
| 54 | | Issue | Severity | Fix | |
| 55 | |-------|----------|-----| |
| 56 | | >50k URLs in single file | Critical | Split with sitemap index | |
| 57 | | >50MB uncompressed single file | Critical | Split with sitemap index | |
| 58 | | Non-200 URLs | High | Remove or fix broken URLs | |
| 59 | | Noindexed URLs included | High | Remove from sitemap | |
| 60 | | Redirected URLs included | Medium | Update to final URLs | |
| 61 | | All identical lastmod | Low | Use actual modification dates | |
| 62 | | Priority/changefreq used | Info | Can remove (ignored by Google) | |
| 63 | |
| 64 | ### Extension sitemaps (image / video / news) |
| 65 | |
| 66 | Google documents three subtypes with their own rules, validate per-subtype: |
| 67 | **Image** (`http://www.google.com/schemas/sitemap-image/1.1`): only two valid |
| 68 | tags remain, `<image:image>` and `<image:loc>` (max **1,000** `<image:image>` |
| 69 | per `<url>`). `<image:caption>`/`<image:geo_location>`/`<image:title>`/ |
| 70 | `<image:license>` were deprecated (2022), flag as info-level removable. |
| 71 | **Video**: required `<video:video>` with `<video:thumbnail_loc>`, |
| 72 | `<video:title>`, `<video:description>`, plus `<video:content_loc>` or |
| 73 | `<video:player_loc>`; mRSS also supported. Flag deprecated/removed tags |
| 74 | (`<video:category>`, `<video:gallery_loc>`, `<video:price>`, `<video:tvshow>`, |
| 75 | player autoplay/allow_embed) as info-level removable; recheck Google docs before citing a removal date. |
| 76 | **News**: max **1,000** `<news:news>` per file (not 50,000); include only |
| 77 | articles from the **last 2 days**; required `<news:publication>`/`<news:name>`/ |
| 78 | `<news:language>`/`<news:publication_date>`/`<news:title>`; submit/discover through |
| 79 | Search Console or robots.txt/sitemap index; use Publisher Center only for |
| 80 | publication management where relevant. When the `news:` namespace is detected, override the generic |
| 81 | 50k check with the 1,000 cap. |
| 82 | |
| 83 | ## Mode 2: Generate New Sitemap |
| 84 | |
| 85 | ### Process |
| 86 | Ask for business type (or auto-detect from existing site) |
| 87 | Load industry template from `../seo-plan/assets/` directory |
| 88 | Interactive structure planning with user |
| 89 | Apply quality gates: |
| 90 | ⚠️ WARNING at 30+ location pages (require 60%+ unique content) |
| 91 | 🛑 HARD STOP at 50+ location pages (require justification) |
| 92 | Generate valid XML output |
| 93 | Split at whichever comes first: 50,000 URLs or 50MB uncompressed, with sitemap index |
| 94 | Generate STRUCTURE.md documentation |
| 95 | |
| 96 | ### Safe Programmatic Pages (OK at scale) |
| 97 | ✅ Integration pages (with real setup docs) |
| 98 | ✅ Template/tool pages (with downloadable content) |
| 99 | ✅ Glossary pages (200+ word definitions) |
| 100 | ✅ Product pages (unique specs, reviews) |
| 101 | ✅ User profile pages (user-generated content) |
| 102 | |
| 103 | ### Penalty Risk (avoid at scale) |
| 104 | ❌ Location pages with only city name swapped |
| 105 | ❌ "Best [tool] for [industry]" without industry-specific value |
| 106 | ❌ "[Competitor] alternative" without real comparison data |
| 107 | ❌ AI-generated pages without human review and unique value |
| 108 | |
| 109 | ## Sitemap Format |
| 110 | |
| 111 | ### Standard Sitemap |
| 112 | |
| 113 | <?xml version="1.0" encoding="UTF-8"?> |
| 114 | <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> |
| 115 | <url> |
| 116 | <loc>https://example.com/page</loc> |
| 117 | <lastmod>2026-02-07</lastmod> |
| 118 | </url> |
| 119 | </urlset> |
| 120 | |
| 121 | |
| 122 | ### Sitemap Index (for >50k URLs) |
| 123 | |
| 124 | <?xml version="1.0" encoding="UTF-8"?> |
| 125 | <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> |
| 126 | <sitemap> |
| 127 | <loc>https://example.com/sitemap-pages.xml</loc> |
| 128 | <lastmod>2026-02-07</lastmod> |
| 129 | </sitemap> |
| 130 | <sitemap> |
| 131 | <loc>https://example.com/sitemap-posts.xml</loc> |
| 132 | <lastmod>2026-02-07</lastmod> |
| 133 | </sitemap> |
| 134 | </sitemapindex> |
| 135 | |
| 136 | |
| 137 | ## Error Handling |
| 138 | |
| 139 | **URL unreachable**: Report the HTTP status code and suggest checking if the site is live |
| 140 | **No sitemap found**: Run `sitemap_discovery.py` and report "not found" only |
| 141 | when its `found` list is empty after declared and common candidates are checked |
| 142 | **Invalid XML format**: Report specific parsing errors with line numbers |
| 143 | **Rate limiting detected**: Back off and report partial results with a note about retry timing |
| 144 | |
| 145 | ## Output |
| 146 | |
| 147 | ### For Analysis |
| 148 | `VALIDATION-REPORT.md`: analysis results |
| 149 | Issues list with severity |
| 150 | Recommendations |
| 151 | |
| 152 | ### For Generation |
| 153 | `sitemap.xml` (or split files with index) |
| 154 | `STRUCTURE.md`: site architecture documentation |
| 155 | URL count and organization summary |
| 156 |