astro-conventions
Astro framework conventions and coding standards for static and content-driven sites.
Skill by ernesto2108
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ernesto2108-astro-conventions
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/astro-conventions
What's inside
- Skill name
astro-conventions- Description
- Astro framework conventions and coding standards for static and content-driven sites. Use when writing Astro components, reviewing Astro code, or user mentions "Astro patterns", "islands architecture", "content collections", "static site", ".astro files", "astro components", "client directives", or working with .astro files.
- License
- MIT
- Instructions
- 121 lines in SKILL.md · view on GitHub
Files (7)
- SKILL.md
- api-patterns.md · reference/
- components.md · reference/
- content-collections.md · reference/
- islands.md · reference/
- patterns.md · reference/
- styling.md · reference/
SKILL.md (first lines)
# Astro Conventions > **IMPORTANT:** Dispatcher only. Load reference files on demand. See routing table below. ## Philosophy - **Content-first, JS-last** — pages render as static HTML with zero JS by default. Add JS only where genuine interactivity is needed - **Islands over SPAs** — interactive components are isolated islands that hydrate independently. The page is a document with embedded widgets, not an app - **Static until proven otherwise** — start with SSG. Only add SSR for pages that truly need request-time data - **Ship what you use** — no framework runtime, no unused CSS, no speculative JS. Every byte earns its place ## Stack - Astro 5+ with TypeScript (strict mode) - Tailwind CSS v4 via `@tailwindcss/vite` plugin - Content Collections with Zod schemas - Vitest + Playwright for testing - Deploy: Vercel, Netlify, or Cloudflare Pages ## When to Use Astro (vs Next.js) | Use Astro | Use Next.js | |---|---| | Blogs, docs, portfolios, marketing | Full SPAs, heavy client routing | | Content-driven, minimal interactivity | Real-time dashboards, complex auth | | SEO and performance non-negotiable | React Server Components needed | | Static hosting, low cost at scale | Server-heavy with streaming SSR | ## Project Structure ``` src/ ├── components/ │ ├── common/ # Shared: Button, Card, Badge │ ├── features/ # Domain: BlogCard, ProjectGrid │ └── islands/ # Interactive with client:* directives ├── content/ │ ├── blog/ # Markdown/MDX collection │ ├── projects/ # Content collection │ └── config.ts # Zod schemas ├── layouts/ # BaseLayout.astro, BlogLayout.astro ├── pages/ # File-based routing (only reserved dir) ├── styles/ # global.css (@import "tailwindcss") ├── lib/ # Utilities, helpers └── env.d.ts # Global type extensions public/ # Static assets (favicon, robots.txt) ``` **Rules:** - Interactive components with `client:*` → `src/components/islands/` (makes JS boundaries explicit) - Content with Zod schemas → `src/content/` (never raw unvalidated markdown) - Path aliases: `@components/*`, `@layouts/*`, `@lib/*` - `public/` is for static assets ONLY — never CSS/JS (those go in `src/`) ## Red Flags (always stop work) - `client:load` on below-fold content → use `client:visible` - Entire layout wrapped in React/Vue → extract granular islands - Large array mapped to spawn islands → render statically, hydrate one controller - Raw `<img>` for local assets → use `<Image />` from `astro:assets` - Content without Zod schema → define schema in `config.ts` - Fetching own API via HTTP at build → import function directly - Using Astro for full SPA → wrong tool, use Next.js ## Pre-Implementation Checklist - [ ] Astro is the right choice (content-driven, not SPA) - [ ] TypeScript strict mode (`extends: "astro/tsconfigs/strict"`) - [ ] Content Collections with Zod schemas defined - [ ] Tailwind v4 via `@tailwindcss/vite` - [ ] Base layout with `<ViewTransitions />` - [ ] Interactive components isolated in `islands/` - [ ] All images use `<Image />` from `astro:assets` - [ ] Path aliases in tsconfig ## New Pattern Validation When introducing a pattern that doesn't exist yet in the project (icon system, script organization, CSS architecture, state management, i18n approach): 1. **Check if the project already has a convention** — read existing code first 2. **If no convention exists**, search the framework's official docs and community best practices before implementing. Don't assume — verify 3. **If a convention exists**, follow it. Don't introduce a competing pattern This does NOT mean search the web for every change. Only for **new architectural patterns** that will be used project-wide. ## Anti-Pattern Detection | Anti-Pattern | Severity | Fix | |---|---|---| | `client:load` on non-critical widget | warning | Use `client:idle` or `client:visible` | | Layout wrapped in framework component | error | Extract granular islands | | Array mapped to spawn islands | error | Static list + one hydrated controller | | Raw `<img>` for local asset | warning | `<Image />` from `astro:assets` | | Content without Zod schema | error | Define in `content/config.ts` | | HTTP fetch to own API at build | error | Import function directly | | `public/` used for CSS/JS | error | Move to `src/` | | No `Props` interface in .astro file | warning | Add `interface Props` | | Using Astro for full SPA | error | Wrong tool — use Next.js | | Interactive component not in `islands/` | warning | Move to `src/components/islands/` | ## Reference Files Load ONLY when needed: | Working on... | Load | |---|---| | .astro component model, Props, slots, template expressions | `reference/components.md` | | client:* directives, hydration strategy, server islands | `reference/islands.md` | | Content Collections, Zod schemas, loaders, MDX | `reference/content-collections.md` | | Scoped CSS, Tailwind v4, define:vars, preprocessors | `reference/styling.md` | | TypeScript, images, View Transitions, SSR, middleware, testing | `reference/patterns.md` | | Pods architecture, mappers, defensive fetching, API consumption | `reference/api-patterns.md` | ## Post-Implementation Gate After ANY change to `.astro` files: 1. Run `astro check` for type errors 2. Run `astro build` to verify generation succeeds 3. Invoke `/lint` skill
From ernesto2108/forge, MIT.
More from ernesto2108/forge
- 0.409score
devops-conventions
ernesto2108
DevOps/Infrastructure conventions and best practices.
SkillDFreshness: DClaude Code +9 - 0.409score
db-optimize
ernesto2108
Identify slow queries and suggest schema, index, or query optimizations.
SkillDFreshness: DClaude Code +9 - 0.409score
design-review
ernesto2108
Review existing designs for quality, visual hierarchy, and anti-AI patterns.
SkillDFreshness: DClaude Code +9 - 0.409score
document-architecture
ernesto2108
Document the architecture of a frontend or backend service.
SkillDFreshness: DClaude Code +9 - 0.409score
domain-entity-guardrails
ernesto2108
Enforce strict typing and explicit optionality in domain entities and value objects.
SkillDFreshness: DClaude Code +9 - 0.409score
cross-service-dev
ernesto2108
Orchestrate agents across multiple microservice repos in a single session.
SkillDFreshness: DClaude Code +9 - 0.409score
db-schema-scan
ernesto2108
Read-only inspection of database schema via migration files and schema SQL.
SkillDFreshness: DClaude Code +9 - 0.409score
architecture-boundary-guardrails
ernesto2108
Prevent architectural drift by enforcing bounded contexts and use-case-per-file structure.
SkillDFreshness: DClaude Code +9 - 0.409score
design-project
ernesto2108
Quick entry point for resuming or starting design projects.
SkillDFreshness: DClaude Code +9 - 0.409score
design-recipes
ernesto2108
Reusable design patterns for efficient screen building in Pencil or Figma.
SkillDFreshness: DClaude Code +9 - 0.409score
design-system
ernesto2108
Create and maintain design system foundations — variables, collections, modes, color palettes, typography, spacing, reusable components with variants, and…
SkillDFreshness: DClaude Code +9 - 0.409score
design-to-code
ernesto2108
Translate approved designs to production code.
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Apr 3, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ernesto2108/forge
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ernesto2108
- 0.409score
design-recipes
ernesto2108
Reusable design patterns for efficient screen building in Pencil or Figma.
SkillDFreshness: DClaude Code +9 - 0.409score
design-project
ernesto2108
Quick entry point for resuming or starting design projects.
SkillDFreshness: DClaude Code +9 - 0.409score
architecture-boundary-guardrails
ernesto2108
Prevent architectural drift by enforcing bounded contexts and use-case-per-file structure.
SkillDFreshness: DClaude Code +9 - 0.409score
cross-service-dev
ernesto2108
Orchestrate agents across multiple microservice repos in a single session.
SkillDFreshness: DClaude Code +9 - 0.409score
db-schema-scan
ernesto2108
Read-only inspection of database schema via migration files and schema SQL.
SkillDFreshness: DClaude Code +9 - 0.409score
design-system
ernesto2108
Create and maintain design system foundations — variables, collections, modes, color palettes, typography, spacing, reusable components with variants, and…
SkillDFreshness: DClaude Code +9
Cite this page
astro-conventions skill. Agent Mart. https://agentmart.dev/skills/ernesto2108-astro-conventions (last updated 2026-10-24)