Skip to content
Development
Command

/validate-sitemap

Validate sitemap configuration and check for common issues

From plugin
secondsky-claude-skills
20466 skills46 agents66 commands
Install
$ npx -y skills add secondsky/claude-skills --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/validate-sitemap

Context preview

What this command does when you run it.

Validate sitemap configuration and check for common issues

Command definition

validate-sitemap.md
name: nuxt-seo:validate-sitemap
description: Validate sitemap configuration and check for common issues
allowed-tools:
  - Read
  - Grep
  - Glob
  - Bash
  - WebFetch

Validate Sitemap Command

Validate sitemap configuration and identify common issues in Nuxt applications.

What This Command Does

1. Checks sitemap configuration in nuxt.config.ts 2. Verifies site.url is set (required for sitemaps) 3. Analyzes dynamic URL sources 4. Checks i18n sitemap integration 5. Validates exclude/include patterns 6. Reviews caching configuration

Quick Actions

Check Sitemap Configuration

# Check site.url (required)
grep -E "site:|url:" nuxt.config.ts | head -10

# Check sitemap config
grep -A 30 "sitemap:" nuxt.config.ts

# Check for API sources
ls -la server/api/__sitemap__/

Verify Module Installation

# Check if sitemap module is installed
grep -E "@nuxtjs/seo|@nuxtjs/sitemap|nuxt-sitemap" package.json

Check Dynamic Sources

# Find sitemap API endpoints
find server -name "*.ts" | xargs grep -l "defineSitemapEventHandler"

# Check sources configuration
grep -A 5 "sources:" nuxt.config.ts

Validation Checklist

Required Configuration

  • [ ] `site.url` is set in nuxt.config.ts
  • [ ] Module is installed and added to modules array
  • [ ] No conflicting sitemap configurations

Dynamic URLs

  • [ ] API endpoints return valid SitemapUrl objects
  • [ ] `loc` paths are relative (not absolute URLs)
  • [ ] `lastmod` dates are valid ISO strings

Multi-Sitemap

  • [ ] Sitemaps have unique names
  • [ ] `_sitemap` key used correctly in sources
  • [ ] No overlapping include/exclude patterns

I18n

  • [ ] i18n module loaded before sitemap
  • [ ] `_i18nTransform` used for dynamic URLs
  • [ ] Locale sitemaps generating correctly

Performance

  • [ ] Caching configured for large sites
  • [ ] Chunking enabled for >1000 URLs
  • [ ] Sources are optimized

Common Issues

| Issue | Cause | Fix | |-------|-------|-----| | Empty sitemap | Missing site.url | Add `site: { url: '...' }` | | 404 on sitemap.xml | Module not installed | Install @nuxtjs/sitemap | | Duplicate URLs | Multiple sources overlap | Use include/exclude filters | | Missing dynamic URLs | Source not registered | Add to `sources: []` | | i18n not working | Module order wrong | Load i18n before sitemap |

Output Format

# Sitemap Validation Report

## Configuration Status
- site.url: [set/missing]
- Module: [installed/missing]
- Mode: [single/multi/auto-chunked]

## Validation Results
- [ ] Required: site.url configured
- [x] Required: Module installed
- [ ] Optional: Dynamic sources configured
- [x] Optional: Caching enabled

## Issues Found
1. **[Critical]** site.url not configured
   - File: nuxt.config.ts
   - Fix: Add `site: { url: 'https://example.com' }`

## Sitemap Structure
| Sitemap | URLs | Source |
|---------|------|--------|
| /sitemap.xml | ~50 | nuxt:pages |
| /posts-sitemap.xml | ~200 | API endpoint |

## Recommendations
1. Set site.url for production
2. Add dynamic sources for database content
3. Enable caching for better performance

Run Validation

Start by checking the nuxt.config.ts for site.url and sitemap configuration.

Read more
Ships withsecondsky-claude-skills

142 production-ready skills for Claude Code CLI ๐Ÿ”Œ Platform / Harness Support These plugins ship as Claude Code marketplace plugins (.claude-plugin/ manifests) and Codex CLI plugins (.codex-plugin/ manifests).

Get the whole plugin, auto-invoked