Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Astro Sites?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/adityaaatiwari-astro-sites)
---
description: Build fast Astro sites: zero-JS defaults, selective islands, content collections schemas and SSR adapters
profile: standard
tags: astro, frontend, performance, content
---
# Astro sites
Use when building content sites, docs, or hybrid web apps with Astro.
## Islands and hydration
- Ship static HTML by default; attach framework components only where interactivity is required.
- Pick the narrowest hydration directive: `client:visible` for below-the-fold widgets, `client:idle` for non-critical UI, and `client:load` only for above-the-fold immediate controls.
- Keep server data fetching in `.astro` frontmatter or server endpoints rather than bundling API clients into hydrated islands.
## Content collections
- Define Zod schemas in `src/content.config.ts` (Astro 5+) to catch missing frontmatter fields, invalid dates, or broken references at build time.
- Query collections with `getCollection` and render Markdown entries cleanly via `render(entry)`. Never trust raw unvalidated frontmatter in templates.
## Routing, assets, and adapters
- Optimize local images via `astro:assets` (`<Image />`) with explicit dimensions to prevent layout shift (`CLS`).
- Use `export const prerender = false` selectively with a configured adapter for dynamic SSR routes while keeping marketing/docs routes static.
- When enabling `<ClientRouter />` view transitions, re-initialize third-party DOM scripts on `astro:page-load`.
## Verify
Run `astro check` (type and content-schema validation) and `astro build`, then verify client JS bundle size and image dimensions in built `dist/`.