/astro:astro-sitemapfrom astro
Configures XML sitemaps for Astro sites using @astrojs/sitemap. Covers page filtering, custom priority/changefreq via serialize, multi-language hreflang, and robots.txt generation.
Ships in astro. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Patterns for automatic XML sitemap generation in Astro.
npx astro add sitemap
// astro.config.mjs
import sitemap from '@astrojs/sitemap';
export default defineConfig({
site: 'https://example.com', // Required!
integrations: [sitemap()],
});
sitemap({
changefreq: 'weekly',
priority: 0.7,
lastmod: new Date(),
})
sitemap({
filter: (page) =>
!page.includes('/admin/') &&
!page.includes('/draft/') &&
!page.includes('/private/'),
})
sitemap({
customPages: [
'https://example.com/external-page',
'https://example.com/dynamic-route',
],
})
When using serialize to transform entries, implementing multi-language sitemaps, or dynamic content priority, read
references/sitemap-configuration-examples.mdfor complete configuration patterns.
When creating robots.txt (basic or with disallow rules), read
references/sitemap-configuration-examples.mdfor API route implementations.
| Property | Values | Description |
|---|---|---|
url | string | Page URL (auto-generated) |
lastmod | Date | Last modification date |
changefreq | always, hourly, daily, weekly, monthly, yearly, never | Update frequency hint |
priority | 0.0 - 1.0 | Relative importance |
links | array | Language alternates |
| File | Description |
|---|---|
sitemap-index.xml | Index of all sitemap files |
sitemap-0.xml | First sitemap (up to 10000 entries) |
sitemap-N.xml | Additional sitemaps if needed |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
11 skills in this plugin
/astro-basicsACTIVATE when creating Astro components, layouts, pages, or setting up Astro project structure. ACTIVATE for 'Astro component', 'slot', 'layout', 'Astro.props', 'class:list'. Covers: component anatomy (frontmatter/template/style/script), layout pattern with slot, props patterns, scoped vs global styles, script patterns (build-time vs client-side), path aliases. DO NOT use for: content collections (see astro-content-collections), routing (see astro-routing), React islands (see astro-react)./astro-content-collectionsACTIVATE when working with Astro content collections, markdown/MDX files, YAML frontmatter, Zod schemas for content, or content-driven pages. ACTIVATE for 'getCollection', 'getEntry', 'defineCollection', 'content collection', 'content.config.ts'. Covers: collection schema definition with Zod, loader-based collections, querying/filtering collections, dynamic routes with getStaticPaths, YAML meta files, MDX with components, collection references. DO NOT use for: routing logic (see astro-routing), general Astro components (see astro-basics)./astro-envACTIVATE when working with environment variables, feature flags, or runtime configuration in Astro. ACTIVATE for 'import.meta.env', '.env', 'PUBLIC_', 'feature flag'. Covers: server vs client variables (PUBLIC_ prefix), feature flags pattern with centralized config, TypeScript env declarations, build-time vs runtime variables, Netlify/Vercel deployment vars. DO NOT use for: general Astro setup, content configuration.npx claudepluginhub fabiensalles/claude-marketplace --plugin astroOther plugins' skills for the same job