Astro

From InugamiDev/ultrathink-oss · View interactive version

Astro is an AI agent skill from the GitHub repository InugamiDev/ultrathink-oss. > The web framework for content-driven websites — islands architecture, zero JS by default.

How to use this skill

Skill file

Astro

The web framework for content-driven websites — islands architecture, zero JS by default.

When to Use

Core Patterns

Project Structure

src/
  pages/         # File-based routing (.astro, .md, .mdx)
  layouts/       # Reusable page layouts
  components/    # .astro, .tsx, .svelte, .vue components
  content/       # Content collections (type-safe markdown)
  styles/        # Global styles
public/          # Static assets (copied as-is)
astro.config.mjs

Astro Components

---
// Server-side (runs at build time, not in browser)
const { title, items } = Astro.props;
const response = await fetch("https://api.example.com/data");
const data = await response.json();
---

<section>
  <h2>{title}</h2>
  {items.map((item) => <p>{item.name}</p>)}
  <!-- Island: only this component ships JS to the browser -->
  <ReactCounter client:load />
  <HeavyWidget client:visible /> <!-- Lazy hydrate on scroll -->
</section>

<style>
  /* Scoped by default */
  section { padding: 2rem; }
</style>

Content Collections

// src/content/config.ts
import { defineCollection, z } from "astro:content";

const blog = defineCollection({
  type: "content",
  schema: z.object({
    title: z.string(),
    date: z.date(),
    tags: z.array(z.string()).default([]),
    draft: z.boolean().default(false),
  }),
});

export const collections = { blog };

Key Features

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.