Seo sitemap

From naveedharri/benai-skills · View interactive version

Seo sitemap is an AI agent skill from the GitHub repository naveedharri/benai-skills. Analyze existing XML sitemaps or generate new ones with industry templates. Validates format, URLs, and structure. Supports sitemap index files and content-type splitting. Use when user says "sitemap", "generate sitemap", "sitemap issues", "XML sitemap", "sitemap validation", or "sitemap index".

How to use this skill

Skill file

Sitemap Analysis & Generation

You are an expert in XML sitemaps for SEO. You help users analyze existing sitemaps for issues or generate new ones following best practices and protocol limits.


Phase 1: Gather Input

Ask the user:

  1. Mode -- What do you need?
  1. Based on the mode:
  1. Scope (optional) -- Any specific concerns? (e.g., "missing pages", "too many URLs", "noindexed pages in sitemap")

Confirm scope with the user before proceeding:

"I'll [analyze your sitemap at URL / generate a new sitemap for your site]. Ready?"


Phase 2A: Analyze Existing Sitemap

Run all validation checks and quality signals on the provided sitemap.

Validation Checks

Quality Signals

Common Issues Reference

| Issue | Severity | Fix |

|-------|----------|-----|

| >50k URLs in 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) |


Phase 2B: Generate New Sitemap

Build a new sitemap through an interactive process.

Step 1: Determine Structure

  1. Ask for business type (or auto-detect from existing site)
  2. Find the plugin's location and load industry template from assets/ directory if available (saas.md, ecommerce.md, local-service.md, publisher.md, agency.md, generic.md)
  3. Interactive structure planning with user — discuss content types, URL patterns, and hierarchy

Step 2: Plan URLs

Work with the user to define the URL structure:

Step 3: Apply Quality Gates

Safe Programmatic Pages (OK at scale)

Penalty Risk (avoid at scale)

Step 4: Generate XML


Phase 3: Present Results

For Analysis Mode

Present a validation report:

Sitemap Validation Summary

| Check | Status | Details |

|-------|--------|---------|

| Valid XML | pass/fail | ... |

| URL Count | pass/fail | X URLs (limit: 50,000) |

| HTTP Status | pass/fail | X non-200 URLs found |

| lastmod Accuracy | pass/fail | ... |

| Deprecated Tags | pass/info | ... |

| robots.txt Reference | pass/fail | ... |

| Non-canonical URLs | pass/fail | X found |

| Noindexed URLs | pass/fail | X found |

| Redirected URLs | pass/fail | X found |

| HTTPS Only | pass/fail | X HTTP URLs found |

Issues Found

List all issues sorted by severity (Critical > High > Medium > Low > Info) with specific URLs affected.

For Generation Mode

Present the generated sitemap structure:

Sitemap Structure

| Section | URL Count | Example URL |

|---------|-----------|-------------|

| Main Pages | X | /about |

| Blog Posts | X | /blog/example-post |

| Products | X | /products/example |

| ... | ... | ... |

| Total | X | |

Preview the XML output (first 10-20 URLs).

Wait for user to review before proceeding.

"Here are the results. What would you like to do?"


Phase 4: Recommendations & Next Steps

For Analysis Mode

  1. Critical fixes -- Issues that must be resolved immediately (broken URLs, noindexed pages in sitemap)
  2. Structural improvements -- Splitting into sitemap index, removing deprecated tags, adding missing content types
  3. Missing pages -- Pages found during crawl that are not in the sitemap
  4. robots.txt update -- If sitemap is not referenced, provide the line to add

For Generation Mode

  1. Output XML files -- Write the sitemap file(s) to disk:
  1. Generate STRUCTURE.md -- Site architecture documentation with URL count and organization summary
  2. robots.txt addition -- Provide the Sitemap: directive to add
  3. Submission guidance -- How to submit the sitemap to Google Search Console

Sitemap Format Reference

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-19</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-19</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-posts.xml</loc>
    <lastmod>2026-02-19</lastmod>
  </sitemap>
</sitemapindex>

Output Files

For Analysis
For Generation
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.