astro-framework

Develop Astro websites with islands architecture, content collections, hybrid rendering, SSR adapters, and schema validation.

2|Updated Jun 14, 2015
One-click install
npx skills add https://github.com/mattaningram/mattaningram.com --skill astro-framework-mattaningram
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: astro-framework
Source: https://github.com/mattaningram/mattaningram.com/tree/main/.agents/skills/astro-framework
Command: npx skills add https://github.com/mattaningram/mattaningram.com --skill astro-framework-mattaningram

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the development of modern, content-focused websites using the Astro framework, enabling developers to build fast, performant sites with efficient hydration and content management.

Core Features & Use Cases

  • Component Development: Create reusable Astro components with proper structure and props.
  • Islands Architecture: Implement selective hydration for interactive UI framework components (React, Vue, Svelte, Solid).
  • Content Collections: Define type-safe schemas for managing Markdown/MDX content and data.
  • SSR & Adapters: Configure server-side rendering and deploy to various platforms using adapters.
  • Routing & API Endpoints: Build dynamic routes and API endpoints.
  • Image Optimization: Optimize local and remote images using Astro's built-in components.
  • View Transitions: Implement smooth, SPA-like navigation between pages.
  • Use Case: Develop a blog with content collections for posts, use islands for a React-powered comment section, and deploy with a Vercel adapter for SSR.

Quick Start

Use the astro-framework skill to create a new Astro component with a defined Props interface.

Frequently Asked Questions about astro-framework

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

FAQPage Schema
How do I implement islands architecture for selective hydration in Astro?

Islands architecture in Astro allows you to selectively hydrate interactive UI framework components, like React or Svelte, by using specific client directives. This ensures JavaScript only loads where interactivity is needed, optimizing page performance.

How do I configure type-safe content collections with Markdown and MDX in Astro?

Configure type-safe content collections in Astro by defining schemas for your Markdown or MDX content. This enforces strict validation and structure for your content data, ensuring type safety and preventing data inconsistencies during development.

Can I use Astro with server-side rendering and platform adapters?

Astro supports server-side rendering through configurable adapters. You can deploy SSR applications to various platforms by applying the appropriate adapter, enabling dynamic route generation and API endpoints for your content-driven site.

What is the best way to optimize local and remote images in Astro?

The best way to optimize images in Astro is by using its built-in image components. These tools automatically process and serve optimized versions of both local and remote images, improving site loading speeds and overall performance.

How do I add SPA-like view transitions to a content-driven Astro website?

Add SPA-like view transitions to an Astro website by utilizing the framework's built-in navigation features. This provides smooth, client-side page transitions without requiring full hydration, maintaining fast performance across your content pages.

Does Astro work with multiple UI frameworks like React, Vue, and Solid?

Astro supports multiple UI frameworks including React, Vue, Svelte, and Solid. You can integrate these framework components into your site and apply client directives to control their hydration and rendering behavior.