Integrations/AstroWeb framework

Astro SEO for AI agents

Astro ships zero client JavaScript by default, making it naturally readable to search and AI crawlers when configured well. Pairing Astro with clickd lets your agent enforce strict Content Collection frontmatter rules, canonical URLs, JSON-LD and /llms.txt endpoints.

1. Add all 16 skills to your repositorynpx skills add subinternal/clickd
2. Ask your agentAudit our Astro site with clickd_brief, enforce title and description lengths in src/content.config.ts, wire JSON-LD in BaseHead.astro, and rescan.

For teams running marketing sites, docs and content hubs on Astro.Connect MCPRead as .md

What breaks most often on Astro

What clickd catches when it fetches the live URL the way Googlebot and AI crawlers do.

See the rulebook
  • Unchecked Content Collection frontmatterMarkdown and MDX entries drift outside 15 to 65 character titles and 70 to 160 character descriptions unless validated in Zod schemas.description
  • Missing site URL for canonicals and sitemapsWhen site is unset or mismatched in astro.config.mjs, Astro.url canonicals and @astrojs/sitemap point to localhost or staging domains.canonical
  • Guides opening with throat-clearing introsLong MDX posts bury the answer four paragraphs below the heading instead of opening with a 40 to 60 word direct answer.answer-first

The Astro agentic SEO loop

Four steps your agent runs between your codebase and clickd’s live crawler.

  1. 01Audit live output

    Check the deployed Astro site with clickd_brief to catch broken links, duplicate titles, missing schema and answer-first misses.

    clickd_brief
  2. 02Lock Zod schemas

    Enforce title, description, publishDate and updatedDate constraints inside src/content.config.ts so bad metadata fails the build.

    on-page-seo
  3. 03Shared BaseHead & endpoints

    Emit canonical tags, Open Graph tags and escaped JSON-LD in BaseHead.astro, plus /llms.txt.ts from collection entries.

    schema-markup
  4. 04Build & rescan

    Run astro check && astro build, deploy, and run clickd_rescan to confirm every collection page passes.

    clickd_rescan

Worked pattern

Zod frontmatter validation keeps every Astro guide inside clickd’s title and description rules at build time.

src/content.config.ts

Sample
import { defineCollection, z } from 'astro:content';

const guides = defineCollection({
  schema: z.object({
    title: z.string().min(15).max(52), // leaves room for " · Brand" under 65 chars
    description: z.string().min(70).max(160),
    pubDate: z.coerce.date(),
    updatedDate: z.coerce.date().optional(),
  }),
});

export const collections = { guides };

Prompts to run on Astro

Copy any prompt into Claude Code, OpenAI Codex, Cursor or Windsurf.

  • Enforce SEO in Astro collectionsAdd Zod length checks for title and description in src/content.config.ts and fix every Markdown/MDX entry that fails.
  • Add BaseHead JSON-LD & breadcrumbsWire Article, BreadcrumbList and Organization JSON-LD into our shared Astro layout and check the live pages with clickd.
  • Build src/pages/llms.txt.tsCreate an Astro endpoint at src/pages/llms.txt.ts generated from getCollection() so /llms.txt stays in sync with our sitemap.

Skills to pair with Astro

Included when you run npx skills add subinternal/clickd.

All 16 skills
  • Page systemBuilds a site’s page templates and shared components so crawlers and assistants read every page well, and proves each pattern with clickd. About structure and spacing, not color, type or brand.See skill
  • On-page SEORewrites title tags, meta descriptions, single H1s, question headings, answer-first openings, image alt text and AI writing tells in your site’s templates and content files, checked live with clickd.See skill
  • Schema markupGenerates, wires and validates JSON-LD structured data (Organization, LocalBusiness, Product, Service, Article, FAQPage and BreadcrumbList) from the visible facts on your pages, checked live with clickd.See skill
  • llms.txtAdds a /llms.txt to a site, a plain text outline for AI assistants built from the site’s own pages and facts, with tests that catch a missing page, and checks it with clickd.See skill

Questions about Astro & clickd

Why run clickd on an Astro site if Astro already outputs static HTML?
Static HTML solves JavaScript rendering, not metadata quality, orphan pages, broken links, missing JSON-LD or buried answers. clickd grades all 45 rules across Access, Understand, Trust and Act on your live build.
Can an Astro endpoint generate `/llms.txt` automatically at build time?
Yes. Adding src/pages/llms.txt.ts reading from getCollection() compiles /llms.txt statically on every build so a new guide can never be missing from the file.

Other integrations & stacks

All integrations
  • Google Search ConsoleTeams who want their coding agent driven by real Search Console impressions instead of guessed keyword volume.Data source
  • Next.jsTeams shipping on Next.js App Router or Pages Router with Claude Code, Codex or Cursor.Web framework
  • ShopifyShopify and Shopify Plus stores on Liquid themes or Hydrogen headless storefronts.Storefront & CMS
  • WordPressTeams managing custom WordPress block/classic themes, WooCommerce stores or headless WordPress.Storefront & CMS
  • WebflowMarketing and design teams running Webflow CMS sites alongside an AI assistant.Storefront & CMS
  • SvelteKitEngineering teams building web apps and marketing sites on SvelteKit and Svelte 5.Web framework
  • Lovable, Bolt, v0 & React SPAsFounders and developers shipping Vite, React SPA, Lovable, Bolt, v0 or Replit apps.App builder