- Skill ID
- jdevalk/skills/astro-seo
- Publisher
- jdevalk
- Repository
- skills
- Installs
- 0
- Files
- 3
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
jdevalk/skills/astro-seoInstalls these files- AGENTS.md
- README.md
- SKILL.md
What this skill tells the agent
Astro SEO
Audits and improves the SEO setup of an Astro site against the full stack described in Astro SEO: the definitive guide. The skill covers nine areas — technical foundation, structured data, content, site structure, performance, sitemaps and indexing, agent discovery, redirects, and analytics — and produces drop-in code for anything missing or weak.
The opinionated spine of this skill is `@jdevalk/astro-seo-graph`. Most of the fixes route through it. If the project doesn't use it yet, installing it is the first recommendation.
Code recipes live in `AGENTS.md` — read it when you need to implement a specific fix. This file has the workflow and audit checklist.
Workflow
- Detect the project — confirm this is an Astro site and understand its shape.
- Audit — score nine categories and produce actionable findings.
- Improve — generate or modify files to close the gaps. Recipes are in
AGENTS.md. - Metadata pass — invoke
metadata-checkon every short string the skill generated (titles, descriptions, schemadescriptionfields, FAQ answers, frontmatter excerpts). - Verify — run the build, check validations pass, remind the user about non-file tasks (Search Console, Bing Webmaster Tools, IndexNow key verification).
Phase 0: Detect the project
Confirm the basics before auditing:
astro.config.mjs/astro.config.tsexists.package.jsonhasastroas a dependency.- `site:` is set in `astro.config` — canonicals, sitemaps, and OG image URLs all derive from this. If it's missing, empty, or
http://localhost, flag it as a blocking issue before anything else. This is the single most common misconfiguration. - Content collections in
src/content/(or legacysrc/pages/markdown). - Deployment target — read
package.json,vercel.json,netlify.toml,wrangler.toml, orpublic/_headersto determine the host. This drives redirect and header syntax in Phase 2. - Is `@jdevalk/astro-seo-graph` already installed? If yes, record the version and which features are wired (grep for
<Seo,seoGraph(,createSchemaEndpoint,createSchemaMap,FuzzyRedirect,createIndexNowKeyRoute,createMarkdownEndpoint,createApiCatalog,gitLastmod). Check the installed version against the latest on npm withnpm view @jdevalk/astro-seo-graph version. If the project is behind, recommend an upgrade in Phase 2 before auditing feature gaps — the package ships new defaults and fixes regularly, and an outdated version is a plausible cause for any audit finding. Phase 2 branches on this. - Is the site multilingual? Check for
i18ninastro.configor multiple locale directories undersrc/content/. If yes, hreflang matters; if no, skip it.
Ask only what you can't detect. Don't ask the user what the site is about — read astro.config.mjs and the homepage content.
Phase 1: Audit
Score each category out of 10. For each, give 2–4 specific findings that quote the actual code or config. Within each category, checks are tiered:
- Must — ship blockers. A failure here causes visible SEO regression.
- Should — standard practice. Skipping costs reach.
- Nice — forward-looking or situational. Useful but not baseline for every site.
Skip Nice checks for small personal blogs unless the user asks for the full treatment.
1. <Seo> component and head metadata (/10)
- Must — single component for all head metadata (not scattered across layouts).
- Must —
site:inastro.configis set to the production origin. - Must — canonical URLs derived from
siteconfig with tracking params stripped. - Must — canonical omitted when
noindexis true (per Google's recommendation). - Must — fallback chain for missing SEO fields:
seo.title → title → siteName;seo.description → excerpt → first paragraph. Pages with blank titles or descriptions are the most common symptom of a broken fallback. - Should —
robotsmeta includesmax-snippet:-1,max-image-preview:large,max-video-preview:-1. - Should — Twitter tags suppressed when they duplicate Open Graph (Twitter falls back automatically).
- Should —
hreflangalternates present on multilingual sites. Skip if monolingual. - Nice — uses
@jdevalk/astro-seo-graph's<Seo>component rather than hand-rolled. (Hand-rolled that covers everything above is fine; this skill nudges toward the package because it handles the fallback chain and robots rules by default.)
2. Structured data / JSON-LD graph (/10)
- Single flat
Articleobject, or a linked@graphwith multiple entities? - Entities wired with
@idreferences? WebSite,Blog/WebPage,Person/Organization,BlogPosting/Article,BreadcrumbList,ImageObjectall present where relevant?- Trust signals:
publishingPrinciples,copyrightHolder,copyrightYear,knowsAbout,SearchAction? - Validates in Rich Results Test and ClassySchema?
3. Content collections and SEO schema (/10)
- Content collections defined with Zod schemas?
seoSchemafrom@jdevalk/astro-seo-graphenforcing title (5–120) and description (15–160) lengths?- Required fields (
publishDate,title,excerpt) enforced at build time? - Markdown-stripped
articleBodyexposed in schema endpoints (up to 10K chars)?
4. Open Graph images (/10)
- Every page has an OG image, or many missing?
- 1200×675 (Google Discover minimum 1200px wide, 16:9 ratio)?
- Generated at build time via satori + sharp, or manual?
- JPEG (social platforms don't reliably support WebP/AVIF)?
- Route derives OG URL from the slug automatically?
- Every
<img>in rendered HTML has analtattribute (oralt=""/role="presentation"for decorative images)?validateImageAltonseoGraph()catches this at build time in ≥ 1.1.0.
5. Sitemaps and indexing (/10)
- Must —
@astrojs/sitemapinstalled, sitemap index reachable. - Must —
robots.txtreferences the sitemap index. - Must — RSS feed exists (
@astrojs/rss), advertised via<link rel="alternate" type="application/rss+xml">, contains full post content (not truncated excerpts). - Should — split per-collection via
chunksoption (sitemap-posts-0.xml, etc.) — much easier to debug indexing in GSC. - Should —
lastmodpopulated from git commit timestamps, not frontmatter dates or CI file timestamps.@jdevalk/astro-seo-graph≥ 1.4.0 exportsgitLastmod(filePath, { excludeCommits, depth })for this — it returns the committer date of the most recent non-excluded commit that touched the file, ornullif git is unavailable. Wire it into the sitemapserializecallback. If the codebase has a hand-rolledexecSync('git log ...')helper, replace it with the package export — the export handles bulk-commit exclusion (imports, reformats) which a naïve-1lookup can't. - Should — IndexNow integrated and submitting on each build, with key verification route at
/[key].txt. ≥ 1.0.1 excludes/404from submissions by default. Gate submission on the production host (e.g.process.env.CF_PAGES === '1' && CF_PAGES_BRANCH === 'main',VERCEL_ENV === 'production',CONTEXT === 'production'). Unconditional submission pings the endpoint on every localnpm run buildand preview deploy with URLs the production host hasn't served yet, which gets the key marked invalid (403) and forces rotation.
6. Agent discovery (/10)
- Should — schema endpoints (
/schema/*.json) exposing corpus-wide JSON-LD. - Should — schema map (
/schemamap.xml) listing all endpoints, withSchemamap:directive inrobots.txt.
Use this skill in a project
Open any RiverX project, search the Skills panel for jdevalk/skills/astro-seo, and install it in one click.
