XML 网站地图生成与校验
seo-sitemap
分析现有 XML 网站地图(sitemap)或使用行业模板生成新的网站地图,并校验其格式、URL 和结构。当用户提到 "sitemap"、"generate sitemap"(生成网站地图)、"sitemap issues"(网站地图问题)或 "XML sitemap" 时使用。
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- seo-sitemap
- license
- MIT
- metadata
- { "author": "AgriciDaniel", "version": "2.2.4", "category": "seo" }
- description
- Analyze 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".
- argument-hint
- [url or generate]
- user-invocable
- true
02 资源文件 1
- 许可证LICENSE.txt143 B
03 SKILL.md 正文
Sitemap Analysis & Generation
Mode 1: Analyze Existing Sitemap
Discover candidates before reporting a sitemap missing:
/home/noirelab/.config/opencode/skills/seo/bin/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
<video:video>with<video:thumbnail_loc>,<video:title>,<video:description>, plus<video:content_loc>or<video:player_loc>; mRSS also supported. Flag deprecated/removed tags (<video:category>,<video:gallery_loc>,<video:price>,<video:tvshow>, 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
04 同仓库更多 Skills
技能创建与优化
skill-creator
创建新技能、修改并改进现有技能,以及衡量技能性能。当用户想要从零开始创建技能、编辑或优化现有技能、运行评测(evals)测试技能、通过方差分析对技能性能进行基准测试,或优化技能描述以提升触发准确率时使用。
退货与逆向物流处理
returns-reverse-logistics
涵盖退货授权、收货与检验、处置决策、退款处理、欺诈检测和保修索赔管理的成套专业知识。基于具备 15 年以上经验的退货运营经理的实践经验。包含分级框架、处置经济性分析、欺诈模式识别和供应商追偿流程。适用于处理产品退货、逆向物流、退款决策、退货欺诈检测或保修索赔。
质量不合格项调查与 CAPA 管理
quality-nonconformance
面向受监管制造业的质量控制、不合格项调查、根本原因分析、纠正措施与供应商质量管理的系统化专业知识。由在 FDA、IATF 16949 和 AS9100 环境下拥有 15 年以上经验的质量工程师总结而成。涵盖 NCR 生命周期管理、CAPA 系统、SPC 解读与审核方法。适用于调查不合格项、开展根本原因分析、管理 CAPA、解读 SPC 数据或处理供应商质量问题等场景。
生产排程与产线平衡优化
production-scheduling
面向离散制造和批量生产的生产排程、作业排序、产线平衡、换型优化与瓶颈解决的系统化专业知识。由拥有 15 年以上经验的生产计划员总结而成。涵盖 TOC/鼓-缓冲-绳(drum-buffer-rope)、SMED、OEE 分析、中断响应框架以及 ERP/MES 交互模式。适用于生产排程、瓶颈解决、换型优化、中断响应或产线平衡等场景。
物流异常与理赔处理
logistics-exception-management
用于处理货运异常、货物延误、损坏、丢失及承运商争议的规范化专业知识。源自拥有 15 年以上运营经验的物流专业人士。包含升级处理流程、承运商特定行为、索赔程序及判断框架。在处理运输异常、货运索赔、交付问题或承运商争议时使用。
库存需求预测与补货计划
inventory-demand-planning
面向多门店零售商的需求预测、安全库存优化、补货计划和促销增量估算的规范化专业知识。由拥有 15 年以上经验、管理数百个 SKU 的需求规划师提炼而成。包含预测方法选择、ABC/XYZ 分析、季节转换管理和供应商谈判框架。适用于需求预测、设定安全库存、规划补货、管理促销或优化库存水平等场景。