seo-sitemap
Installation
SKILL.md
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.