Skip to content
Back to skills

Astro Sites

ASecurity

Build fast Astro sites: zero-JS defaults, selective islands, content collections schemas and SSR adapters

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
developmentrustapifrontendperformance

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add AdityaaaTiwari/ANVIL --skill astro-sites --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Astro Sites?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Astro Sites
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adityaaatiwari-astro-sites/badge)](https://www.skillsdirectory.com/skills/adityaaatiwari-astro-sites)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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/`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.