astro-expert
Skill3 starsChanged 14 days agoMITView on GitHub
Astro project structure and component conventions — public/images vs src/assets, layouts, kebab-case pages, typed props, components < 150 lines. Load when the project uses Astro (astro.config.* or *.astro files present).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- joncutrer/astrojs-expert-skilltheir own version, first seen Mar 28, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- joncutrer/astrojs-expert-skill★ 1same name
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 repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- bulma-expertSkill
- code-reviewSkill
- frontend-accessibilitySkill
- nuxt-expertSkill
- performance-optimizerSkill
- security-auditSkill
- seo-auditSkill
- systematic-debuggingSkill
- update-documentationSkill
- vue-expertSkill
- web-designSkill
- website-analyzerSkill
The file
Files
Astro
Overview
Global rules + conventions Astro projects. Styling-agnostic: pair with skill bulma-expert when project uses Bulma, no duplication.
Project Structure
project-root/
├── public/
│ └── images/ /* Statically served images */
├── src/
│ ├── assets/ /* Fonts, SVGs, images imported via bundle */
│ ├── components/ /* Reusable Astro components */
│ ├── data/ /* JSON/TS files with static data or mocks */
│ ├── layouts/ /* Base layouts and page templates */
│ └── pages/ /* Site pages and routes */
├── package.json
├── astro.config.mjs
└── README.mdStructure Rules
public/images/ — Only assets not going through bundler: images referenced directly by URL in markup/meta (og:image, favicon, etc.). Images inside Astro components go in src/assets/.
src/assets/ — Everything Vite must process: images imported in components, inline SVGs, local fonts. Astro optimizes images imported here.
src/components/ — Reusable .astro components. Page-specific components next to page or dedicated subfolder. As project grows, organize by domain (e.g. components/nav/, components/cards/).
src/data/ — Static data, content config, mocks: .json/.ts export arrays/objects for pages. No logic, just data.
src/layouts/ — Layouts wrap pages. At minimum BaseLayout.astro with <head>, metadata, base HTML. One layout per site section when needed (e.g. BlogLayout.astro, LandingLayout.astro).
src/pages/ — Site pages; folder structure maps to routes. No complex presentation logic: pages assemble layouts + components, don't define them.
Conventions
Naming
- Component files PascalCase:
HeroSection.astro,NavBar.astro,CardGrid.astro - Page files kebab-case:
about-us.astro,contact.astro - Layouts PascalCase with
Layoutsuffix:BaseLayout.astro,ArticleLayout.astro - Files in
src/data/kebab-case:team-members.json,services.ts
Components
Each component one job. .astro over 150 lines = split.
Props always typed TypeScript in frontmatter:
---
interface Props {
title: string;
description?: string;
variant?: 'primary' | 'secondary';
}
const { title, description, variant = 'primary' } = Astro.props;
---No any. Type unclear → unknown almost always right.
Frontmatter
Imports first, then props, then logic. No large logic blocks — complex logic → .ts file in src/data/ or utility module.
Slots
<slot /> main content; named slots for specific areas (header, footer, etc.). Document non-obvious slots with comment inside component.
PR Checklist
- Project structure matches this file
- No leftover
console.log - Component props typed, no
any - Components under 150 lines, or split
- Images in components
src/assets/; staticpublic/images/ - README updated when features/structure change
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.

