Agent skill

Astro

by ericrisco in ericrisco/rsc-harness

A skill your agent uses when building a content-driven or marketing site with Astro 6: static-first pages, islands and partial hydration, content collections, server islands, per-route on-demand…

MITAuto-check passedFrontend & Design

Install Astro

skills CLI
$ npx skills add ericrisco/rsc-harness --skill astro -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ericrisco/rsc-harness astro --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ericrisco/rsc-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/astro .claude/skills/astro && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
astro
GitHub stars
156
Token cost
~3.3k tokens
SKILL.md length
1,166 words
Files
6 (incl. scripts, references)
Skills in repo
229
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when building a content-driven or marketing site with Astro 6: static-first pages, islands and partial hydration, content collections, server islands, per-route on-demand…

  • Building a content-driven
  • SKILL.md covers The prime directive, First: detect the project…, Decision table — what kind of… and Rendering model, plus 9 more sections
  • Runs Shell scripts from its folder; calls npx and bash
  • Marketing site with Astro 6: static-first pages

What it does

Astro is an agent skill from ericrisco/rsc-harness. Use when building a content-driven or marketing site with Astro 6: static-first pages, islands and partial hydration, content collections, server islands, per-route on-demand rendering, deploy adapters, and Astro 5→6 migration. NOT app-router React with server actions and heavy client interactivity (that is nextjs).

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `evals/README.md`, `evals/cases.yaml` and `references/content-layer.md`).

It sits in Frontend & Design, covering Static sites and blogs and Landing pages. It works with Astro, React and Next.js. The repository describes itself as: Your agent invents things because it has no memory, and can't touch your database because it has no arms. rsc is the meta-harness that gives it both, plus the trade to know the… The licence is MIT.

When your agent uses it

  • Building a content-driven
  • Marketing site with Astro 6: static-first pages
  • Islands and partial hydration
  • Content collections

Example prompts

  • “/astro”

Requirements

  • Node.js
  • A Bash shell

What it can do on your machine

Read from SKILL.md and the folder at commit 92fde8f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • npx
    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • astro.build
    • docs.astro.build

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Astro loads about 3.3k tokens when it runs, and up to ~6k if it reads all its reference files. Until then it costs about 81 tokens; SKILL.md has 1,166 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~81
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from ericrisco/rsc-harness at commit 92fde8f, republished under its MIT licence (© ericrisco). 1,166 words, ~3,322 tokens.

Download SKILL.mdSave it as .claude/skills/astro/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
astro
description
Use when building a content-driven or marketing site with Astro 6: static-first pages, islands and partial hydration, content collections, server islands, per-route on-demand rendering, deploy adapters, and Astro 5→6 migration. NOT app-router React with server actions and heavy client interactivity (that is `nextjs`).
tags
astro, ssg, islands, content-collections, partial-hydration, marketing-site, frameworks
recommends
landing-copy, seo-geo, vercel, cloudflare, netlify
origin
risco

Astro 6 — static-first sites, islands, content collections

The prime directive

Ship zero client JavaScript by default. Hydrate the smallest possible surface, as late as you can get away with. An .astro component renders to HTML at build time and ships no runtime; every island is a bundle the visitor downloads, parses, and executes. Content and marketing sites win on TTFB/LCP and Lighthouse, not on React-everywhere. If you find yourself adding client:load to make a page "work," stop — the page already works; you are adding interactivity, and interactivity is the expensive exception, not the default.

First: detect the project version

Astro 6.0 is stable (released 2026-03-10); the Astro 5 line is still production-ready. Do not mix advice across majors — read package.json → the astro version before advising. What v6 changes, per the upgrade-to-v6 guide:

  • Node 22.12.0 or higher is required (18 and 20 are dropped) — check the actual runtime.
  • Content config lives at src/content.config.ts. The legacy src/content/config.ts path is removed, not merely discouraged, and the old auto-detection (legacy.collections) is gone. The legacy.collectionsBackwardsCompat escape hatch is a migration crutch, not a supported layout.
  • Vite 7 and Zod 4 for content schemas — z is imported from astro/zod, not astro:content (see Content collections below).
  • Live Content Collections, the Fonts API and the CSP API are stable.
  • The Rust compiler succeeding the Go one is experimental — do not rely on or configure it in production advice.

Decision table — what kind of thing is this?

Pick the cheapest row that satisfies the requirement. Read top-down; stop at the first match.

NeedUseWhy
Pure content, no interactivity.astro component, staticRenders to HTML at build, ships 0 KB JS
One small interactive widgetUI-framework component + client:*Hydrate just that island; the rest stays static
Per-request personalization on a mostly-static pageserver island (server:defer)Static CDN page + one deferred fragment, no full SSR
Whole route needs request data on every loadexport const prerender = false + adapterOpt that one route into on-demand rendering
Many static routes generated from datagetStaticPaths()Build-time fan-out, still fully static

Rendering model

Default: every page is prerendered to static HTML at build time. You opt into dynamism per route — never the other way around.

astro
---
// src/pages/dashboard.astro — opt this ONE route into on-demand (SSR) rendering.
// Requires a configured adapter (Vercel/Netlify/Cloudflare/Node). Everything else stays static.
export const prerender = false;
const user = await getUser(Astro.request); // runs per request
---
<h1>Hello {user.name}</h1>
astro
---
// src/pages/blog/[slug].astro — many STATIC routes generated from data at build time.
import { getCollection } from "astro:content";

export async function getStaticPaths() {
  const posts = await getCollection("blog");
  return posts.map((post) => ({ params: { slug: post.id }, props: { post } }));
}
const { post } = Astro.props;
---
<h1>{post.data.title}</h1>

In Astro 6 the dev server runs the production runtime (Vite 7 Environment API), so dev no longer diverges from prod on Cloudflare/Bun/Deno — fewer "works in dev, breaks on deploy" surprises. Adapter choice per platform → references/deploy-and-integrations.md.

Islands & client directives

A client:* directive turns a framework component into a hydrated island. Choose the latest directive that still feels instant to the user — never default to client:load.

DirectiveHydrates whenUse for
client:loadImmediately on page loadAbove-the-fold, must-be-interactive-now controls
client:idleOn requestIdleCallbackImportant but not first-paint-critical widgets
client:visibleWhen it scrolls into view (IO)Below-the-fold carousels, comment boxes, maps
client:media={query}When a media query matchesMobile-only menu, desktop-only panel
client:only="react"Client-only, no SSR HTMLComponents that crash during SSR (browser-only deps)
astro
---
import Carousel from "../components/Carousel.tsx";
---
<!-- Bad: a below-the-fold carousel paying for JS at first paint -->
<Carousel client:load />

<!-- Good: defer its bundle until the user actually scrolls to it -->
<Carousel client:visible />

client:only gotcha: it skips SSR entirely, so the component produces no server HTML (expect a flash/layout shift) and you must name the framework (client:only="react") — Astro can't infer it without the server render. Reach for it only when SSR genuinely breaks; otherwise prefer client:visible.

Content collections (Content Layer)

Type-safe content lives in a single config file. The path is load-bearing:

typescript
// src/content.config.ts  ← v6 path. NOT src/content/config.ts (legacy path removed in v6)
import { defineCollection } from "astro:content";
import { z } from "astro/zod"; // v6: z moved OUT of astro:content into astro/zod (Zod 4)
import { glob } from "astro/loaders";

const blog = defineCollection({
  // glob() sources files from anywhere; `id` comes from the filename minus extension
  loader: glob({ pattern: "**/*.{md,mdx}", base: "./src/data/blog" }),
  schema: z.object({
    title: z.string(),
    pubDate: z.coerce.date(),
    draft: z.boolean().default(false),
    tags: z.array(z.string()).default([]),
  }),
});

export const collections = { blog };

Query and render in a page. render() is now a standalone call (not entry.render()):

astro
---
// src/pages/blog/[slug].astro
import { getCollection, getEntry, render } from "astro:content";

export async function getStaticPaths() {
  const posts = await getCollection("blog", ({ data }) => !data.draft);
  return posts.map((post) => ({ params: { slug: post.id }, props: { post } }));
}
const { post } = Astro.props;
const { Content } = await render(post);
---
<article><h1>{post.data.title}</h1><Content /></article>

Built-in loaders are glob() (many files) and file() (one JSON/YAML array). Custom and CMS loaders, Zod 4 schema patterns, collection references, Live Content Collections (real-time data with no rebuild, stable in v6), querying and MDX details → references/content-layer.md.

Server islands

When most of a page is static and CDN-cacheable but one fragment is per-visitor, use a server island instead of turning the whole route into SSR. The page ships static; the island is fetched and rendered after first paint.

astro
---
// src/components/UserGreeting.astro — rendered on demand, deferred after the static shell
const user = await getUserFromCookie(Astro.request);
---
<span>Welcome back, {user.name}</span>
astro
---
import UserGreeting from "../components/UserGreeting.astro";
---
<header>
  <!-- static page, one deferred personalized fragment with a placeholder while it loads -->
  <UserGreeting server:defer>
    <span slot="fallback">Welcome</span>
  </UserGreeting>
</header>

This beats full SSR when: the page is otherwise cacheable on a CDN, and only a small slice depends on the request. You keep static LCP and personalize without making every request hit the origin.

Show full SKILL.md (499 more words)Show less

Integrations & setup

Use astro add so it patches astro.config.mjs and installs peers in one step:

bash
npx astro add react mdx sitemap
  • Tailwind 4 wires through the official Vite plugin (@tailwindcss/vite), not the legacy @astrojs/tailwind integration (that path was for Tailwind 3).
  • Fonts API (stable in v6) self-hosts and optimizes fonts from astro.config.mjs — no manual @font-face.
  • CSP API (stable in v6) emits a Content-Security-Policy with hashes for your inline scripts/styles.

Adapter recipes per platform, hybrid rendering, env handling, SSR endpoints (src/pages/api/*.ts) and the Fonts/CSP config → references/deploy-and-integrations.md.

Performance rules

  • Images: always <Image>/<Picture> from astro:assets — automatic width/height, format, and lazy-loading kill CLS and over-sized payloads. Never a raw <img> for local assets.
  • Never global-hydrate: there is no "make the page interactive" switch; hydrate per island.
  • View transitions: add <ClientRouter /> from astro:transitions to the <head> for SPA-like navigation without an SPA. Prefetch links with the prefetch config/attribute.

Astro 5 → 6 migration checklist

Run the codemod first, then verify each item:

bash
npx @astrojs/upgrade
  • Node runtime is 22.12.0+ (CI image, local, deploy target).
  • Dependencies on Vite 7 (Vite v7.0; custom Vite plugins/config may need updates).
  • Schema z import moved: import { z } from "astro/zod" — z and astro:schema are gone from astro:content. Then review for Zod 4 breaking changes.
  • Content config renamed to src/content.config.ts (delete src/content/config.ts; the legacy path is removed, not just deprecated).
  • Full guide (dated 2026): docs.astro.build/en/guides/upgrade-to/v6.

Anti-patterns

Anti-patternReality
"Add client:load so the page works"An .astro page already works statically; you're shipping JS for nothing
"client:load everywhere, simplest"Pick client:visible/idle/media; first-paint JS is the LCP killer
"Make the whole route SSR to personalize the header"Use a server island (server:defer); keep the page static & CDN-cached
"src/content/config.ts worked before, keep it"v6 removed that path (LegacyContentConfigError) — must be src/content.config.ts
"fetch() the CMS inside the .astro frontmatter"Write a content-collection loader so content is typed, cached, and queryable
"Pull in React just to render this static markup"Static markup is an .astro component — 0 KB, no framework runtime
"Skip the Zod schema, content is just frontmatter"Untyped content = silent build-time drift; the schema is the contract
"client:only without the framework name"It can't infer the framework with no SSR — must be client:only="react"
"Use the old @astrojs/tailwind for Tailwind 4"Tailwind 4 wires through @tailwindcss/vite; the old integration is v3-era

Verify

bash scripts/verify.sh from the Astro project root — grep-based, needs no install. It FAILS if a v6 project still has src/content/config.ts instead of src/content.config.ts, WARNS on over-hydration smells (many client:load, or client:only with no framework string), CHECKS that content schemas import from astro:content, and — only if the astro binary resolves — optionally runs npx astro check. On an empty or clean tree it prints OK and exits 0; warnings are advisory and never fail the run.

See Also

  • ../nextjs/SKILL.md — when the project is really an app-router React app with server actions and heavy client interactivity, not a content/marketing site.
  • ../landing-copy/SKILL.md and ../seo-geo/SKILL.md — this skill builds the site; those write the copy and decide the SEO/structured-data strategy that fills it.
  • ../vercel/SKILL.md, ../netlify/SKILL.md, ../cloudflare/SKILL.md — platform mechanics (DNS, env, build settings) once the code and adapter are ready.

© ericrisco, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in skills/astro of ericrisco/rsc-harness.

  • SKILL.md
  • evals/README.md
  • evals/cases.yaml
  • references/content-layer.md
  • references/deploy-and-integrations.md
  • scripts/verify.sh

Open the folder on GitHubat commit 92fde8f

Compare with similar skills

Astro next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Astro compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Astro this skillericrisco/rsc-harness156—~3.3kAutomated safety check: PassMIT
Kill AI Slopyetone/kill-ai-slop1.3k—~1.4kAutomated safety check: PassApache-2.0
Motion Dev Animations199-biotechnologies/motion-dev-animations-skill1041 repos~2.8kAutomated safety check: NotesMIT
Frontend Design UltimateaAAaqwq/AGI-Super-Team1052 repos~2.7kAutomated safety check: PassMIT
Cometchat React V7 Patternscometchat/cometchat-skills129—~1.2kAutomated safety check: NotesMIT
App BuilderUndertone0809/rudder292—~2kAutomated safety check: PassApache-2.0

Similar skills

  • Kill AI Slop

    yetone/kill-ai-slop

    Find and remove AI slop — the generic, machine-default visual and copy tics of vibe-coded products — from a web project.

    1.3k GitHub stars~1.4k tokensUpdated 22 days ago
    Frontend & DesignAuto-check passed
  • Motion Dev Animations

    199-biotechnologies/motion-dev-animations-skill

    Creates 120fps GPU-accelerated animations with Motion.dev (Framer Motion successor) for React, Next.js, Svelte, and Astro projects.

    104 GitHub starsUsed in 1 repo~2.8k tokens
    Frontend & DesignAuto-check: notes
  • Frontend Design Ultimate

    aAAaqwq/AGI-Super-Team

    Create distinctive, production-grade static sites with React, Tailwind CSS, and shadcn/ui — no mockups needed.

    105 GitHub starsUsed in 2 repos~2.7k tokens
    Frontend & DesignAuto-check passed
  • Cometchat React V7 Patterns

    cometchat/cometchat-skills

    Framework wiring for the React v7 UI Kit across Vite, Create React App, Next.js, React Router (incl.

    129 GitHub stars~1.2k tokensUpdated 2 days ago
    Frontend & DesignAuto-check: notes
  • App Builder

    Undertone0809/rudder

    Create and iteratively improve local web products from natural-language requests, then prepare them to run as Rudder Apps.

    292 GitHub stars~2k tokensUpdated today
    Frontend & DesignAuto-check passed
  • UI UX Pro Max

    saoudi-h/solar-icons

    UI/UX design intelligence for web and mobile. An agent skill from saoudi-h/solar-icons.

    182 GitHub starsUsed in 18 repos~11k tokens
    Frontend & DesignAuto-check: notes

More from ericrisco/rsc-harness

All 229 skills in this repo
  • Ab Testing

    ericrisco/rsc-harness

    A skill your agent uses when designing or analyzing a controlled experiment — falsifiable hypothesis, sample size from an MDE, reading significance/CI/power, CUPED, or rescuing tests that won't go…

    156 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Accessibility

    ericrisco/rsc-harness

    A skill your agent uses when making a web UI conform to WCAG 2.2 Level AA — axe-core or Lighthouse a11y violations, keyboard operability, focus management, ARIA roles/names/live regions, contrast…

    156 GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Ads

    ericrisco/rsc-harness

    A skill your agent uses when running or fixing paid acquisition on Google or Meta — campaign structure (Performance Max, Demand Gen, Search, Advantage+), platform-fit creative, budget/scaling rules…

    156 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Agent Eval

    ericrisco/rsc-harness

    A skill your agent uses when measuring whether an LLM or agent system actually got better and gating merges on it: golden sets, fixing an inflated LLM-as-judge, scoring RAG (faithfulness, contextual…

    156 GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • AI Media

    ericrisco/rsc-harness

    A skill your agent uses when a creative goal must become a finished media file: pick and order generative-media models per modality — AI voiceover, image-to-video clips, score — then glue them with…

    156 GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Analytics

    ericrisco/rsc-harness

    A skill your agent uses when instrumenting product or web analytics — GA4/PostHog SDK wiring, event taxonomy, funnels, double-counted events, consent gating, PII scrubbing.

    156 GitHub stars~2.8k tokensUpdated today
    Auto-check passed

Questions about Astro

What does Astro do?

A skill your agent uses when building a content-driven or marketing site with Astro 6: static-first pages, islands and partial hydration, content collections, server islands, per-route on-demand…. Astro is an agent skill from ericrisco/rsc-harness. Use when building a content-driven or marketing site with Astro 6: static-first pages, islands and partial hydration, content collections, server islands, per-route on-demand rendering, deploy adapters, and Astro 5→6 migration.

When should I use Astro?

Astro fits situations like: building a content-driven; marketing site with Astro 6: static-first pages; islands and partial hydration; content collections.

How do I install Astro in Claude Code?

Run `npx skills add ericrisco/rsc-harness --skill astro -a claude-code`. Or copy the skill folder (skills/astro in ericrisco/rsc-harness) into .claude/skills/astro in your project. Claude Code loads it when a task matches its description.

How do I install Astro in Codex?

Run `npx skills add ericrisco/rsc-harness --skill astro -a codex`. Or copy the skill folder (skills/astro in ericrisco/rsc-harness) into .agents/skills/astro in your project. Codex loads it when a task matches its description.

Can I use Astro in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ericrisco/rsc-harness --skill astro -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/astro, .gemini/skills/astro, .github/skills/astro and .opencode/skills/astro in your project.

What does Astro need to run?

Going by SKILL.md and its folder, Astro needs a shell for the scripts in its folder and the command-line tools its instructions call (npx and bash). Our summary lists: Node.js; A Bash shell.

Does Astro access the network?

SKILL.md names 2 domains. As links in the text: astro.build and docs.astro.build. This is read from the text; nothing was executed.

Is Astro safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Astro use?

Astro is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Astro use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.7k tokens, read only when the agent opens those files.

What are the alternatives to Astro?

Skills that share tags, products or a category with Astro: Kill AI Slop (yetone/kill-ai-slop, 1.3k stars), Motion Dev Animations (199-biotechnologies/motion-dev-animations-skill, 104 stars), Frontend Design Ultimate (aAAaqwq/AGI-Super-Team, 105 stars) and Cometchat React V7 Patterns (cometchat/cometchat-skills, 129 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Astro?

ericrisco (a GitHub user) maintains it in ericrisco/rsc-harness, which has 156 GitHub stars. The repository holds 229 skills in this directory. The repository was last updated on October 6, 2026.

Source: ericrisco/rsc-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.