XML Sitemap Generator
by @charlie-morrison
Generate XML sitemaps by crawling a website or scanning local files. Auto-discovers pages via link extraction. Supports local HTML/MD file scanning with last...
clawhub install xml-sitemap-generatorπ About This Skill
name: sitemap-generator description: Generate XML sitemaps by crawling a website or scanning local files. Auto-discovers pages via link extraction. Supports local HTML/MD file scanning with lastmod dates. Generates robots.txt with sitemap reference. Use when asked to create a sitemap, generate sitemap.xml, crawl a site for pages, create robots.txt, or prepare a site for SEO. Triggers on "sitemap", "sitemap.xml", "crawl site", "site map", "robots.txt", "SEO sitemap".
Sitemap Generator
Generate XML sitemaps by crawling a live website or scanning local HTML files.
Crawl a Website
python3 scripts/sitemap_gen.py https://example.com
Scan Local Files
python3 scripts/sitemap_gen.py --local ./public --base-url https://example.com
Save to File
# Save sitemap.xml
python3 scripts/sitemap_gen.py https://example.com --output sitemap.xmlSave sitemap.xml + robots.txt
python3 scripts/sitemap_gen.py https://example.com --output sitemap.xml --robots
Output Formats
# XML (default β valid sitemap.xml)
python3 scripts/sitemap_gen.py https://example.comText (human-readable summary + XML)
python3 scripts/sitemap_gen.py https://example.com --format textJSON (pages list + XML string)
python3 scripts/sitemap_gen.py https://example.com --format json
Options
| Flag | Default | Description |
|------|---------|-------------|
| --max-pages | 500 | Maximum pages to crawl |
| --timeout | 10 | Request timeout in seconds |
| --output / -o | stdout | Save sitemap.xml to file |
| --robots | off | Also generate robots.txt |
| --local | off | Scan local directory instead of crawling |
| --base-url | β | Base URL for local mode (required) |
| --verbose / -v | off | Show crawl progress |
Features
Requirements
βοΈ Configuration
| Flag | Default | Description |
|------|---------|-------------|
| --max-pages | 500 | Maximum pages to crawl |
| --timeout | 10 | Request timeout in seconds |
| --output / -o | stdout | Save sitemap.xml to file |
| --robots | off | Also generate robots.txt |
| --local | off | Scan local directory instead of crawling |
| --base-url | β | Base URL for local mode (required) |
| --verbose / -v | off | Show crawl progress |