← ClaudeAtlas

astro-architecturelisted

Astro v6 architecture — rendering modes (SSG/SSR/hybrid), routing, Content Collections Loader API, Zod v4 schemas, hydration directives, API routes, and Node 22+ setup. Use when creating or modifying .astro pages and layouts, configuring astro.config.mjs, setting up or querying content collections, choosing rendering strategy, or hitting v5→v6 migration errors (`entry.slug`, `entry.render()`, `getEntryBySlug`, `src/content/config.ts` all changed in v6). Load this skill before touching any .astro file or astro config.
casoon/ai-agent-config · ★ 1 · AI & Automation · score 67
Install: claude install-skill casoon/ai-agent-config
# Astro architecture ## Goals - Server-first, static-friendly by default. - Minimize shipped client-side JavaScript. - Use islands intentionally, not by default. - Be explicit about SSG vs SSR vs hybrid per route. ## Structure - `src/pages` for route entry points — keep files slim. - `src/layouts` for page shells. - `src/components` for reusable UI. - `src/content` for structured editorial content. - `public` for static assets that skip the module graph. ## Rules - Prefer `.astro` components for presentational UI. - Use framework components (Svelte, React, Vue) only where client-side interaction is actually needed. - Move logic into utilities or domain modules — keep route files thin. - Reuse layouts and content schemas instead of duplicating page logic. - Cover SEO-critical metadata on every public page. ## Astro v6 API ### Content Collections — Loader API ```typescript // src/content.config.ts (NOT src/content/config.ts) import { defineCollection } from 'astro:content'; import { glob } from 'astro/loaders'; import { z } from 'astro/zod'; const blog = defineCollection({ loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/blog' }), schema: z.object({ title: z.string(), date: z.coerce.date(), // Zod v4 top-level validators email: z.email(), // not z.string().email() website: z.url(), // not z.string().url() }), }); export const collections = { blog }; ``` ### Rendering content ```astro --- import { getCollection, render } f