agentsclimarketplace

Astro

Skill G1Joshi/Agent-Skills/skills/frameworks/astro

Astro static site builder with islands architecture and content collections. Use for content sites.From its SKILL.md

Install
npx -y skills add G1Joshi/Agent-Skills --skill astro

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 12 stars12 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.1 KB, 468 tokens by cl100k_base, as published. Nobody here has run it

Astro

Astro is a web framework popularized for "Islands Architecture". It ships zero JavaScript to the client by default, hydrating only the interactive parts. Astro 5 (2025) introduces Server Islands.

When to Use

  • Content Sites: Blogs, Documentation, Marketing sites.
  • Multi-Framework: Use React, Vue, and Svelte components on the same page.
  • Performance: Hard to beat for static content.

Quick Start

---
// Server-side code (Frontmatter) runs at build/request time
const data = await fetch('https://api.myjson.com').then(r => r.json());
---

<html>
  <body>
    <h1>{data.title}</h1>
    <!-- Client Directive: This React component hydrates on load -->
    <MyReactComponent client:load />

    <!-- This Svelte component hydrates only when visible -->
    <MySvelteComponent client:visible />
  </body>
</html>

Core Concepts

Islands Architecture

The page is static HTML. Interactive widgets are "islands" floating in it. They hydrate independently.

Server Islands (Astro 5)

Async islands. The page loads instantly (static), and a specific island (e.g., "User Profile") loads asynchronously from the server and fades in.

Content Collections

Type-safe way to manage Markdown/MDX content.

const blogCollection = defineCollection({
  schema: z.object({ title: z.string(), date: z.date() }),
});

Best Practices (2025)

Do:

  • Use Server Islands: For dynamic personalization (e.g., "Logged in as Jeevan") without forcing the whole page to be dynamic (SSR).
  • Use <Image />: Astro's optimized image component is essential for LCP.
  • Mix Frameworks: Don't be afraid to use React for a complex search bar and Svelte for a simple toggle on the same site.

Don't:

  • Don't use for complex dashboards: While possible (Hybrid Rendering), Next.js or Remix are often better suited for highly dynamic, authenticated apps.

References

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.