astro.js

Structure Astro.js projects with typed components and CSS Modules.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/ajelinek/skills-stash --skill astro-js
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: astro.js
Source: https://github.com/ajelinek/skills-stash/tree/main/astro.js
Command: npx skills add https://github.com/ajelinek/skills-stash --skill astro-js

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams structure and standardize Astro.js projects, balancing static rendering with interactive islands and CSS Modules to produce scalable, maintainable web apps.

Core Features & Use Cases

  • Clear separation of concerns between Astro components, island code (SolidJS/React), and styling with CSS Modules.
  • Guidance on hydration strategies, content collections, and server actions to optimize performance and UX.
  • Real-world scenario: starting a new Astro site with pages, layouts, islands, and a migration plan for an established project.

Quick Start

Create a coherent project layout for a new Astro.js site with typed components, separate CSS Modules, and minimal client hydration.

Frequently Asked Questions about astro.js

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure an Astro.js project to balance static HTML with interactive islands?

Structure an Astro.js project by separating static Astro components from interactive island code using SolidJS or React, and styling with CSS Modules. This approach enforces a well-defined project layout with typed components and modular CSS to produce scalable, maintainable web apps.

What is the best way to manage hydration directives in Astro for optimal performance?

Manage hydration directives in Astro by applying minimal client hydration strategies to interactive islands. This balances static rendering with selective client-side JavaScript, optimizing performance and UX by only hydrating components when needed.

Can I use CSS Modules with Astro components for scalable web development?

Yes, you can use CSS Modules with Astro components to ensure clear separation of concerns between static rendering and styling. This approach enforces modular CSS and typed components to produce maintainable web apps.

How do I migrate an established project to Astro.js using islands architecture?

Migrate an established project to Astro.js by following a defined migration plan that introduces interactive islands progressively. This guidance applies to architectural decisions around hydration directives, content collections, and server actions.

When do I need content collections and server actions in an Astro site?

You need content collections and server actions in an Astro site when handling structured content and backend interactions. This guidance optimizes performance and UX by integrating them with hydration strategies and typed components.