00-andruia-consultant
Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.
Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.
$ npx -y skills add sickn33/antigravity-awesome-skills --skill astro --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/astroContext preview
The summary Claude sees to decide when to auto-load this skill.
Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.
name: astro description: "Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support." category: frontend risk: safe source: community date_added: "2026-03-18" author: suhaibjanjua tags: [astro, ssg, ssr, islands, content, markdown, mdx, performance] tools: [claude, cursor, gemini]
Astro is a web framework designed for content-rich websites — blogs, docs, portfolios, marketing sites, and e-commerce. Its core innovation is the **Islands Architecture**: by default, Astro ships zero JavaScript to the browser. Interactive components are selectively hydrated as isolated "islands." Astro supports React, Vue, Svelte, Solid, and other UI frameworks simultaneously in the same project, letting you pick the right tool per component.
npm create astro@latest my-site cd my-site npm install npm run dev
Add integrations as needed:
npx astro add tailwind # Tailwind CSS npx astro add react # React component support npx astro add mdx # MDX support npx astro add sitemap # Auto sitemap.xml npx astro add vercel # Vercel SSR adapter
Project structure:
src/ pages/ ← File-based routing (.astro, .md, .mdx) layouts/ ← Reusable page shells components/ ← UI components (.astro, .tsx, .vue, etc.) content/ ← Type-safe content collections (Markdown/MDX) styles/ ← Global CSS public/ ← Static assets (copied as-is) astro.config.mjs ← Framework config
`.astro` files have a code fence at the top (server-only) and a template below:
---
// src/components/Card.astro
// This block runs on the server ONLY — never in the browser
interface Props {
title: string;
href: string;
description: string;
}
const { title, href, description } = Astro.props;
---
<article class="card">
<h2><a href={href}>{title}</a></h2>
<p>{description}</p>
</article>
<style>
/* Scoped to this component automatically */
.card { border: 1px solid #eee; padding: 1rem; }
</style>src/pages/index.astro → / src/pages/about.astro → /about src/pages/blog/[slug].astro → /blog/:slug (dynamic) src/pages/blog/[...path].astro → /blog/* (catch-all)
Dynamic route with `getStaticPaths`:
---
// src/pages/blog/[slug].astro
export async function getStaticPaths() {
const posts = await getCollection('blog');
return posts.map(post => ({
params: { slug: post.slug },
props: { post },
}));
}
const { post } = Astro.props;
const { Content } = await post.render();
---
<h1>{post.data.title}</h1>
<Content />Content collections give you type-safe access to Markdown and MDX files:
// src/content/config.ts
import { z, defineCollection } from 'astro:content';
const blog = defineCollection({
type: 'content',
schema: z.object({
title: z.string(),
date: z.coerce.date(),
tags: z.array(z.string()).default([]),
draft: z.boolean().default(false),
}),
});
export const collections = { blog };---
// src/pages/blog/index.astro
import { getCollection } from 'astro:content';
const posts = (await getCollection('blog'))
.filter(p => !p.data.draft)
.sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf());
---
<ul>
{posts.map(post => (
<li>
<a href={`/blog/${post.slug}`}>{post.data.title}</a>
<time>{post.data.date.toLocaleDateString()}</time>
</li>
))}
</ul>By default, UI framework components render to static HTML with no JS. Use `client:` directives to hydrate:
---
import Counter from '../components/Counter.tsx'; // React component
import VideoPlayer from '../components/VideoPlayer.svelte';
---
<!-- Static HTML — no JavaScript sent to browser -->
<Counter initialCount={0} />
<!-- Hydrate immediately on page load -->
<Counter initialCount={0} client:load />
<!-- Hydrate when the component scrolls into view -->
<VideoPlayer src="/demo.mp4" client:visible />
<!-- Hydrate only when browser is idle -->
<Analytics client:idle />
<!-- Hydrate only on a specific media query -->
<MobileMenu client:media="(max-width: 768px)" />---
// src/layouts/BaseLayout.astro
interface Props {
title: string;
description?: string;
}
const { title, description = 'My Astro Site' } = Astro.props;
---
<html lang="en">
<head>
<meta charset="utf-8" />
<title>{title}</title>
<meta name="description" content={description} />
</head>
<body>
<nav>...</nav>
<main>
<slot /> <!-- page content renders here -->
</main>
<footer>...</footer>
</body>
</html>--- // src/pages/about.astro import BaseLayout from '../layouts/BaseLayout.astro'; --- <BaseLayout title="About Us"> <h1>About Us</h1> <p>Welcome to our company...</p> </BaseLayout>
Enable SSR for dynamic pages by setting an adapter:
// astro.config.mjs
import { defineConfig } from 'astro/config';
import vercel from '@astrojs/vercel/serverless';
export default defineConfig({
output: 'hybrid', // 'static' | 'server' | 'hybrid'
adapter: vercel(),
});Opt individual pages into SSR with `export const prerender = false`.
Find reusable instructions for your project, inspect their complete files, and keep an exact skill set you can review and reuse. Codex or Claude inspects your project and chooses exact skills from the complete local AAS catalog.
Repo: sickn33/antigravity-awesome-skills
Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.
Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any…
Ingeniero de Sistemas de Andru.ia. Diseña, redacta y despliega nuevas habilidades (skills) dentro del repositorio siguiendo el Estándar de Diamante.
Estratega de Inteligencia de Dominio de Andru.ia. Analiza el nicho específico de un proyecto para inyectar conocimientos, regulaciones y estándares únicos del…
AI-powered presentation generation via the 2slides API — create slides from text, match a reference image style, summarize documents into decks, add AI voice…