astro
Skill0 starsChanged 27 days agoMITView on GitHub
Provides expert knowledge for building Astro 5+ sites with Islands Architecture, Content Collections, TypeScript, and performance-first rendering strategies.
17 other projects use a version of this.
Adopted by
Most recently taken up by
- devantler-tech/ksailtheir own version, first seen Nov 7, 2026
- davidanthonyn/claude-skillstheir own version, first seen Oct 20, 2026
- Marvellbrazil/my-agentic-skillstheir own version, first seen Oct 17, 2026
- iberi22/skillstheir own version, first seen Oct 15, 2026
- G1Joshi/Agent-Skillstheir own version, first seen Oct 13, 2026
- dennisgr7/snob-clitheir own version, first seen Oct 11, 2026
Used with
Projects with it also use react, accessibility and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
VercelSkillreact
React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.
Also in 4 projects that use this
ElasticSkillaccessibility
Accessibility guidance for Kibana. Use this skill when working with or reviewing EUI components, resolving a11y-related (@elastic/eui) ESLint issues, and ensuring proper use of ARIA attributes, focus management, keyboard interactions, and accessible naming conventions.
Also in 3 projects that use this
nilssonrSkillseo
Full SEO workflow for auditing pages and creating SEO-optimized content. Provides checklists with educational explanations aligned with Google Search Central documentation.
Also in 3 projects that use this
BlockSkillfrontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Also in 3 projects that use this
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- midudev/la-velada-web-oficial★ 1.9ksame name
- Mindrally/skills★ 275same name
- devantler-tech/ksail★ 164same name
- one-ie/one★ 132same name
- G1Joshi/Agent-Skills★ 15same name
- astrolicious/agent-skills★ 14same name
- ianshk/astro-skills★ 4same name
- Marvellbrazil/my-agentic-skills★ 4same name
- wrsmith108/astro-claude-skill★ 4same name
- dennisgr7/snob-cli★ 2same name
7 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository219 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/behavioral-discipline.mdcCursor rule
- .cursor/rules/context-budget.mdcCursor rule
- .cursor/rules/orchestration.mdcCursor rule
- .cursor/rules/yagni-stdlib.mdcCursor rule
- androidSkill
- android-ui-designSkill
- api-versioningSkill
- auth-token-inspectorSkill
- backlogSkill
- cc-api-contractSkill
- cc-db-migrationSkill
- cc-featureSkill
- cc-fixSkill
- cc-pagespeedSkill
- cc-refactorSkill
- cc-reviewSkill
- cc-spec-mutationSkill
- cc-tdd-cycleSkill
- cc-test-planSkill
- code-reviewSkill
- commitSkill
- conductor-setupSkill
- councilSkill
- database-migrationsSkill
- django-ormSkill
- django-testingSkill
- django-uvSkill
- drizzle-schema-architectSkill
- evaluationSkill
- fastapi-pydantic-strictSkill
- find-skillsSkill
- jpa-nplusone-detectorSkill
- jpa-postgresSkill
- laravel-specialistSkill
- livewire-alpine-bridgeSkill
- multi-agent-orchestrationSkill
- nextjs-typescriptSkill
- openspecSkill
- pagespeed-insightsSkill
- pagespeed-perfSkill
- php-proSkill
- python-django-stackSkill
- python-fastapi-stackSkill
- pythonSkill
- rust-asyncSkill
- rust-engineeringSkill
- rust-sqlxSkill
- security-ai-llmSkill
- security-blue-teamSkill
- security-cloudSkill
- security-cryptoSkill
- security-exploit-devSkill
- security-grcSkill
- security-incident-responseSkill
- security-log-analysisSkill
- security-malware-analysisSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 2 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 16 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 72
Default to no hydration directive — most UI does not need JavaScript
- Very specific: line 76
Do not use client:load for components that could use client:visible
- Distinctive: line 186
Every page is pre-rendered at build time.
- Very specific: line 234
Use hybrid mode when: most content is static but a few routes need auth or live data.
- Very specific: line 240
Use the built-in <Image> and <Picture> components.
- Very specific: line 271
Always provide alt — empty string is acceptable only for decorative images
- Very specific: line 272
Prefer avif + webp fallback for best compression
- Very specific: line 273
Use widths + sizes on above-the-fold images to serve the right size per viewport
“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Astro
Islands Architecture
Astro renders everything to static HTML by default. JavaScript ships only for components that explicitly opt in — these are called Islands.
Hydration Directives
| Directive | When JS loads | Use case |
client:load | On page load | Interactive above-the-fold UI |
client:idle | When browser is idle | Non-critical interactive widgets |
client:visible | When element enters viewport | Below-the-fold islands |
client:media | When CSS media query matches | Responsive interactive components |
client:only | Client-only, no SSR | Components that require the DOM (e.g., charting libs) |
---
import Counter from '../components/Counter.tsx';
import HeavyChart from '../components/HeavyChart.tsx';
import MobileNav from '../components/MobileNav.tsx';
---
<!-- Hydrates immediately — user interacts right away -->
<Counter client:load />
<!-- Hydrates when scrolled into view — saves initial JS -->
<HeavyChart client:visible />
<!-- Only on mobile, only when query matches -->
<MobileNav client:media="(max-width: 768px)" />Rules:
- Default to no hydration directive — most UI does not need JavaScript
client:loadis the most expensive directive; use it sparinglyclient:onlyskips server rendering entirely — the component receives no props from the server; pass all data via props or fetch inside the component- Do not use
client:loadfor components that could useclient:visible
Framework Components Inside Astro
---
import ReactButton from './Button.tsx'; // React island
import VueWidget from './Widget.vue'; // Vue island
---
<!-- Both can coexist on the same page -->
<ReactButton client:idle label="Click me" />
<VueWidget client:visible />Each framework ships its own runtime only when at least one island of that framework is on the page.
Content Collections
Content Collections provide type-safe access to Markdown, MDX, and data files.
Define schemas in src/content/config.ts.
Schema Definition
// src/content/config.ts
import { defineCollection, z } from 'astro:content';
const blog = defineCollection({
type: 'content', // .md or .mdx files
schema: z.object({
title: z.string(),
description: z.string(),
pubDate: z.coerce.date(),
updatedDate: z.coerce.date().optional(),
author: z.string().default('Anonymous'),
tags: z.array(z.string()).default([]),
draft: z.boolean().default(false),
image: z.object({
src: z.string(),
alt: z.string(),
}).optional(),
}),
});
const docs = defineCollection({
type: 'content',
schema: z.object({
title: z.string(),
order: z.number(),
section: z.enum(['guide', 'reference', 'tutorial']),
}),
});
export const collections = { blog, docs };Querying Collections
---
import { getCollection, getEntry } from 'astro:content';
// All published posts, sorted by date
const posts = (await getCollection('blog', ({ data }) => !data.draft))
.sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf());
// Single entry by slug
const post = await getEntry('blog', 'my-first-post');
const { Content } = await post.render();
---
{posts.map(post => (
<article>
<h2><a href={`/blog/${post.slug}`}>{post.data.title}</a></h2>
<time>{post.data.pubDate.toLocaleDateString()}</time>
</article>
))}Dynamic Routes from Collections
---
// src/pages/blog/[slug].astro
import { getCollection } from 'astro:content';
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, headings } = await post.render();
---
<article>
<h1>{post.data.title}</h1>
<Content />
</article>Rendering Strategies
SSG (Static Site Generation) — default
Every page is pre-rendered at build time. Best for content that does not change per request.
// astro.config.mjs — no output config needed; SSG is the default
export default defineConfig({
site: 'https://example.com',
});SSR (Server-Side Rendering)
Renders pages on each request. Required for: authenticated routes, personalized content, live data.
// astro.config.mjs
import node from '@astrojs/node';
export default defineConfig({
output: 'server',
adapter: node({ mode: 'standalone' }),
});Hybrid Mode
Mix SSG and SSR on a per-page basis. Most pages are static; specific routes opt into server rendering.
// astro.config.mjs
export default defineConfig({
output: 'hybrid',
adapter: node({ mode: 'standalone' }),
});---
// src/pages/dashboard.astro — this page is server-rendered
export const prerender = false;
// src/pages/about.astro — this page is statically generated (hybrid default)
export const prerender = true;
---Use hybrid mode when: most content is static but a few routes need auth or
live data. Do not make everything output: 'server' — you lose the performance
benefits of static generation.
Image Optimization
Use the built-in <Image> and <Picture> components. Never use raw <img>
for local assets — you lose automatic optimization.
---
import { Image, Picture } from 'astro:assets';
import heroImage from '../assets/hero.png';
---
<!-- Optimized single image -->
<Image
src={heroImage}
alt="Hero illustration"
width={800}
height={600}
format="webp"
quality={80}
/>
<!-- Responsive with multiple formats -->
<Picture
src={heroImage}
formats={['avif', 'webp']}
alt="Hero illustration"
widths={[400, 800, 1200]}
sizes="(max-width: 800px) 100vw, 800px"
/>Rules:
- Always provide
alt— empty string is acceptable only for decorative images - Prefer
avif+webpfallback for best compression - Use
widths+sizeson above-the-fold images to serve the right size per viewport - Remote images require explicit
widthandheightto prevent layout shift
Project Structure
src/
assets/ — images and static assets processed by Astro
components/ — .astro components (and framework islands)
content/
blog/ — .md and .mdx files
config.ts — collection schemas
layouts/ — page shell layouts
pages/ — file-based routing; every file is a route
styles/ — global CSS
astro.config.mjs
tsconfig.jsonColocation rule: put framework island components (.tsx, .vue) in
src/components/. Do not scatter them in src/pages/.
TypeScript Conventions
// tsconfig.json — use the strict Astro preset
{
"extends": "astro/tsconfigs/strict"
}---
// Type props explicitly in the frontmatter
interface Props {
title: string;
description?: string;
tags: string[];
}
const { title, description = '', tags } = Astro.props;
---Astro infers prop types from interface Props automatically. Do not use any.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

