/astro:astro-seofrom astro
Implements SEO meta tags, Open Graph, Twitter cards, JSON-LD structured data, and canonical URLs in Astro projects. Provides reusable SEO components and blog post SEO patterns.
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 search engine optimization and social sharing in Astro.
---
const {
title,
description = "Default site description",
image = "/og-default.png",
canonicalUrl,
noindex = false,
} = Astro.props;
const siteUrl = Astro.site?.toString() || 'https://example.com';
const currentUrl = canonicalUrl || Astro.url.href;
const ogImage = new URL(image, siteUrl).toString();
---
<head>
<title>{title}</title>
<meta name="description" content={description} />
{noindex && <meta name="robots" content="noindex, nofollow" />}
<link rel="canonical" href={currentUrl} />
<!-- Open Graph -->
<meta property="og:type" content="website" />
<meta property="og:url" content={currentUrl} />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={ogImage} />
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content={title} />
<meta name="twitter:image" content={ogImage} />
</head>
When creating a reusable SEO component or blog post SEO page, read
references/seo-components-and-structured-data.mdfor the complete SEO.astro component with article support.
When adding JSON-LD structured data (Organization, Person, BlogPosting, Breadcrumbs), read
references/seo-components-and-structured-data.mdfor all schema.org patterns.
When implementing multilingual SEO with hreflang, read
astro-i18n'sreferences/i18n-implementation-patterns.md— it holds the hreflang and og:locale markup, and the alternate-path computation they need.
| Tag | Purpose |
|---|---|
<title> | Page title (50-60 chars) |
meta[description] | Page description (150-160 chars) |
link[canonical] | Preferred URL |
meta[robots] | Indexing instructions |
| Property | Required |
|---|---|
og:title | Yes |
og:type | Yes (website, article) |
og:image | Yes (1200x630px) |
og:url | Yes |
og:description | Recommended |
| Property | Value |
|---|---|
twitter:card | summary or summary_large_image |
twitter:title | Same as og:title |
twitter:description | Same as og:description |
twitter:image | Same as og:image |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub fabiensalles/claude-marketplace --plugin astro11 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./astro-i18nACTIVATE when implementing multilingual Astro sites, language switching, translated routes, or translation patterns. ACTIVATE for 'i18n', 'multilingual', 'language switch', 'hreflang', 'translate route', 'getLang'. Covers: prefix-based routing (fr default, /en prefix), route mapping between languages, translation dictionary without external library, multilingual content collections, hreflang SEO tags, language switcher component. DO NOT use for: Astro routing basics (see astro-routing), SEO tags (see astro-seo)./astro-partytownACTIVATE when integrating third-party scripts (Google Analytics, GTM, Facebook Pixel) in Astro via Partytown web worker. ACTIVATE for 'analytics', 'Partytown', 'GA4', 'GTM', 'tracking script', 'text/partytown'. Covers: Partytown setup, GA4/GTM/Facebook Pixel integration, forward configuration, custom events, conditional loading (prod only), cookie consent integration, debug mode. DO NOT use for: general script handling in Astro, SEO configuration./astro-reactACTIVATE when integrating React components in Astro, choosing client directives, or implementing interactive islands. ACTIVATE for 'client:load', 'client:visible', 'client:idle', 'client:only', 'React island', 'nanostores'. Covers: client directive selection (load/idle/visible/media/only), props passing, MDX integration, cross-island state sharing with nanostores. DO NOT use for: pure Astro components (see astro-basics), general React patterns.