seo-sitemap
Skill18 starsChanged 11 days agoMITView on GitHub
Build an XML sitemap that is clean for robots (valid, light, segmented, honest lastmod) and elegant for people who open it: pretty-printed raw XML, one element per line, two-space indentation, a fixed order inside every entry, no stylesheet, no script, no HTML. Input: a site or its sitemap URL. Output: an audit by sitemap_audit.py (pretty-print, leftover XSL or polyfill, size, segmentation, duplicates, lastmod honesty, priority and changefreq, hreflang weight, URLs per language), the build (a sitemap index split by section and language when the site is large, every file pretty-printed by the bundled formatter or xmllint --format), and a scripted acceptance test. Use when a sitemap looks messy or minified when opened, sits on one line, carries an XSL stylesheet or Chrome's XSLT removal warning, is one huge file, or when building or auditing any sitemap.
32 other projects use a version of this.
Adopted by
Most recently taken up by
- martinbattaglia-commits/Claude-skillstheir own version, first seen Nov 16, 2026
- yotamwiesel/claude-skillstheir own version, first seen Nov 16, 2026
- joaoguirunas/team-ostheir own version, first seen Nov 15, 2026
- seranking/seo-skillstheir own version, first seen Nov 8, 2026
- alpit-patel/seo-aeo-geo-kittheir own version, first seen Nov 8, 2026
- zhtyyx/codex-seotheir own version, first seen Nov 1, 2026
Used with
Projects with it also use seo-agentic, seo-sxo and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AgriciDanielSkillseo-agentic
Audit and fix agent readiness: the Lighthouse Agentic Browsing fraction, accessibility tree for agents, robots.txt and Content-Signal for AI agents, WAF treatment of agent traffic, llms.txt, Markdown delivery, ai-catalog.json, /.well-known discovery files, and WebMCP tools. Use when the user asks whether AI agents can use or browse the site, or about llms.txt or WebMCP. Exclude AI citability and brand signals (seo-geo) and commerce protocol depth (seo-ecommerce).
Also in 5 projects that use this
timruebenachSkillseo-sxo
Search Experience Optimization: reads Google SERPs backwards to detect page-type mismatches, derives user stories from search intent signals, and scores pages from multiple persona perspectives. Identifies why well-optimized pages fail to rank by analyzing what Google rewards for each keyword. Use when user says "SXO", "search experience", "page type mismatch", "SERP analysis", "user story", "persona scoring", "why isn't my page ranking", "intent mismatch", or "wireframe".
Also in 20 projects that use this
timruebenachSkillseo-maps
Maps intelligence for local SEO — geo-grid rank tracking, GBP profile auditing via API, review intelligence across Google/Tripadvisor/Trustpilot, cross-platform NAP verification (Google/Bing/Apple/OSM), competitor radius mapping, and LocalBusiness schema generation from API data. Three-tier capability: free (Overpass + Geoapify), DataForSEO (full intelligence), DataForSEO + Google (maximum coverage). Use when user says "maps", "geo-grid", "rank tracking", "GBP audit", "review velocity", "competitor radius", "maps analysis", "local rank tracking", "Share of Local Voice", or "SoLV".
Also in 17 projects that use this
indranilbanerjeeSkillseo-drift
Compare two SEO exports (Search Console, two dates): gainers, losers, drift classes. \"what moved after the core update\"
Also in 20 projects that use this
- +6 more from timruebenach
Other versions32 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 32
- AgriciDaniel/claude-seo★ 30ksame name
- seranking/seo-skills★ 201same name
- zhtyyx/codex-seo★ 152same name
- coopersimson96/ai-content-system★ 17same name
- ZachArticulateV/designer-pro-and-seo★ 10same name
- joaoguirunas/team-os★ 6same name
- oegeyilmaz9/seo-aeo-geo-ultimate★ 6same name
- 01clauding/claude-seo-skill★ 4same name
- avalonreset/legends-seo-dungeon★ 4same name
- megastep/codex-skills★ 4same name
22 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- geo-trackingSkill
- geo-visibilitySkill
- seo-ai-site-buildersSkill
- seo-audit-pdfSkill
- seo-backlinksSkill
- seo-competitor-analysisSkill
- seo-content-blogSkill
- seo-content-collection-pageSkill
- seo-content-comparison-hubSkill
- seo-content-comparison-pageSkill
- seo-content-data-studySkill
- seo-content-homepageSkill
- seo-content-product-pageSkill
- seo-content-service-pageSkill
- seo-geo-auditSkill
- seo-internal-linkingSkill
- seo-keyword-researchSkill
- seo-localSkill
- seo-page-sectionsSkill
- seo-schema-markupSkill
- seo-technicalSkill
- seo-traffic-dropSkill
- social-amplificationSkill
- youtube-descriptionSkill
- youtube-thumbnailSkill
- youtube-titleSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 31 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 82
Clean up an existing XSL view (SMP-11): Remove the processing instruction from every file, delete sitemap.xsl and any xslt-polyfill file, …
“Common” is measured: kept by at least 6 in 10 of the 31 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Elegant sitemaps: pretty-printed raw XML
A sitemap has two readers. Robots (Googlebot, Bingbot, the AI crawlers) need a valid, light, honest file. People open it too: the client checking that the site is complete, the developer, the agency during an audit. What they should see is the raw XML, printed elegantly: one element per line, a consistent indentation, the same order inside every entry, nothing else. No stylesheet, no CSS, no HTML layer, no script. Opened in a browser, view-source, curl or an editor, the file reads cleanly and is exactly what the robots get.
Technical crawl rules for sitemaps (robots.txt line, Search Console submission, IndexNow, the dead ping endpoint) live in seo-technical, Step 2. This skill owns the file's format and structure.
Hard rules
- Raw XML only. No
<?xml-stylesheet?>instruction, no XSL file, no xslt-polyfill or any<script>inside the sitemap, no HTML served at the sitemap address, no response that changes by user agent. The browser's own XML view ("This XML file does not appear to have any style information" followed by the tree) is the expected and correct rendering: it is not a defect to fix. - Pretty-printed, always. Every sitemap file, index and children, is formatted exactly as
xmllint --formatwould print it: XML declaration on line 1, one element per line, two spaces per nesting level, text-only elements on one line (<loc>…</loc>), no blank lines, no trailing spaces, LF line endings, a final newline. A minified or single-line sitemap is valid for robots but fails this skill. - Same order everywhere. Inside each
<url>:loc,lastmod, then thexhtml:linkalternates in a fixed language order withx-defaultlast, thenimage:image. Across the file: home first, then sections in a stable order, each page's language versions next to each other. - Remove what exists. A site that already ships an XSL view: delete the processing instruction from every file, delete the XSL and any polyfill file, and keep the pretty-printed XML. Chrome removes native XSLT on 17 November 2026 and already shows a red warning above styled sitemaps; the decoration is not worth that risk.
- One source of truth. The XML sitemap, the hreflang tags in the pages and any HTML sitemap page are generated from the same page inventory, so their counts match.
Phase 1: Spec
| ID | Requirement | Source |
| SMP-01 | Served with HTTP 200 and Content-Type application/xml, UTF-8, at the address declared on the robots.txt Sitemap: line | Official |
| SMP-02 | Max 50,000 URLs and 50 MB uncompressed per file; above that Google rejects the whole file | Official |
| SMP-03 | Multilingual site, whatever its size: /sitemap.xml is a short sitemap index listing one child per language (/sitemaps/fr-1.xml, /sitemaps/en-1.xml, numbered when a language exceeds one file), the layout used on sorank.com. Each entry carries loc, lastmod and the hreflang alternates only (no image tags). Monolingual site above about 500 URLs: same index, children split by section. Search Console then reports indexation per language or template, and each file stays short enough to read | Field rule |
| SMP-04 | Only canonical, indexable, 200 URLs on the sitemap's own host, in https, no duplicates | Official |
| SMP-05 | lastmod present on every URL and equal to the date of the last real content change. A date shared by a large share of URLs (build, import or generation date) is a lie Google learns to ignore | Official (Google ignores inaccurate lastmod) |
| SMP-06 | No priority, no changefreq: Google ignores both. They add weight and noise to the file | Official |
| SMP-07 | hreflang in the sitemap or in the page head, both allowed. When both, they must match exactly. On big multilingual sites, hreflang links often make most of the file's weight: segment by language | Official, field rule |
| SMP-08 | Multilingual: the same number of pages in every language (seo-technical, Step 2) | Field rule |
| SMP-09 | Pretty-printed: byte-identical to xmllint --format output (two-space indentation, one element per line, text-only elements inline, no blank lines, no trailing spaces, final newline) | Field rule |
| SMP-10 | Fixed element order inside each entry (loc, lastmod, alternates with x-default last, images) and a stable page order across the file | Field rule |
| SMP-11 | No xml-stylesheet instruction, no XSL, no script, no comment, no HTML anywhere in a sitemap file | Field rule |
| SMP-12 | Optional: an HTML sitemap page (/plan-du-site, /sitemap) linked from the footer, listing every indexable page by section with its title. It is a crawl hub for orphan-prone pages (seo-internal-linking), not a replacement for the XML file and never required by this skill | Field rule |
Phase 2: Audit
python3 skills/seo-sitemap/scripts/sitemap_audit.py https://example.com
python3 skills/seo-sitemap/scripts/sitemap_audit.py https://example.com/sitemap_index.xml --json sitemap.jsonGiven a domain, the script reads robots.txt to find the sitemap (fallback /sitemap.xml), follows an index into its children (--max-children, default 100) and prints, per file: URL count, size, line count, whether the file is pretty-printed (and the first offending line when it is not), leftover stylesheet or script, hreflang links and their share of the bytes, lastmod coverage and the most frequent date, priority and changefreq, URLs per language, URLs per section. Then findings ranked BLOCKER, PRIORITY, FIX, WATCH, MINOR, each mapped to a spec row. Exit code 1 on any BLOCKER or PRIORITY.
Then check by eye: open the sitemap with view-source (or curl -s URL | head -30). You should see one element per line, indented by two spaces, the same shape repeated for every entry. One long line, tabs mixed with spaces, blank lines between entries, or a stylesheet line at the top: SMP-09 or SMP-11 fails.
Field case (a 5-language agency site, November 2026): one 1.4 MB file of 1762 URLs written on a handful of lines, 10500 hreflang links making 80% of the bytes (and duplicated in the page heads), priority and changefreq on every URL, 710 generated city pages all dated on the day they were generated, 41 blog posts without lastmod. The client opened it and thought the sitemap was broken. It was valid; it was unreadable and heavier than needed.
Phase 3: Build
- Structure (SMP-01 to SMP-08). Multilingual: a sitemap index at
/sitemap.xmland one child per language,/sitemaps/fr-1.xml,/sitemaps/en-1.xml(sorank.com layout), each entry with loc, lastmod and its hreflang alternates, no image tags. Monolingual: one file for a small site, an index with one child per section above about 500 URLs. Drop priority and changefreq. Take lastmod from the content's real update date (CMS updated_at, git commit date of the content file), never the build date. Keep hreflang in one place when possible; if both the heads and the sitemap carry it, generate both from the same table. Declare the index in robots.txt and submit it in Search Console and Bing Webmaster Tools. - Order (SMP-10). Emit entries in a stable order (home, then sections, then pages; language versions of a page side by side) and the children of each entry in the fixed order. A generator that iterates over an unordered set produces a different file on every build, which makes diffs useless.
- Pretty-print (SMP-09, SMP-11). Format every file as the last build step, then check it:
python3 skills/seo-sitemap/scripts/sitemap_audit.py --format public/sitemap.xml # rewrites the file in place
xmllint --format public/sitemap.xml | diff -q - public/sitemap.xml && echo "pretty" # independent check (libxml2, built into macOS and most Linux)The bundled formatter strips any xml-stylesheet instruction, <script> element and comment, and prints the canonical layout. Expected shape:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://example.com/fr/</loc>
<lastmod>2026-11-08</lastmod>
<xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/"/>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/fr/"/>
</url>
</urlset>Platforms that do not let you edit the sitemap (Shopify, Wix, Squarespace) generate their own layout: record it as an exception, do not add a stylesheet to compensate.
- Clean up an existing XSL view (SMP-11). Remove the processing instruction from every file, delete
sitemap.xsland anyxslt-polyfillfile, and redeploy. Nothing changes for robots: they ignored the stylesheet.
Acceptance
sitemap_audit.pyexits 0: no BLOCKER, no PRIORITY; any remaining FIX is written down with its reason.xmllint --format FILE | diff -q - FILEreports no difference for the index and every child.- The live file opened with view-source shows one element per line, two-space indentation, no stylesheet line.
- In Search Console, each submitted sitemap reads "Success" and the discovered URL count equals the generated count.
- URLs per language are equal, or the gaps are written down as exceptions.
Sources
- Google, build and submit a sitemap (priority and changefreq ignored, lastmod accuracy): https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap
- Google, large sitemaps and sitemap index files: https://developers.google.com/search/docs/crawling-indexing/sitemaps/large-sitemaps
- Google, localized versions (hreflang in sitemaps): https://developers.google.com/search/docs/specialty/international/localized-versions
- Chrome, removing XSLT (why a stylesheet is now a liability): https://developer.chrome.com/docs/web-platform/deprecating-xslt
- libxml2 xmllint (the
--formatreference layout): https://gnome.pages.gitlab.gnome.org/libxml2/xmllint.html
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

