Skip to content
astro-architecture logo

Astro Architecture Skill

astro-architecture

Technical architecture for Astro lead generation websites. Use when setting up new projects, configuring build tools, or establishing project foundations. For images use astro-images skill. For SEO use astro-seo skill.

SKILL.md

Full skill instructions

Astro Architecture Skill

Technical foundation for high-performance, accessible, translation-ready lead gen sites.

Core Rules (Non-Negotiable)

  1. Astro static or hybrid only — No SPA routing, no client-side frameworks
  2. TypeScript strict mode — Always enabled, no any
  3. All text from i18n — No hardcoded strings in components
  4. Mobile-first CSS — Base styles for mobile, md: and up for larger
  5. Performance is build-time — No runtime optimization hacks
  6. One source of truth — All site data in site.ts
  7. Skill boundaries — Images via astro-images, SEO via astro-seo, forms via astro-forms

Forbidden (STOP)

STOP and reassess if any of these occur:

  • ❌ Client-side routing framework (React Router, etc.)
  • ❌ UI component library (shadcn, DaisyUI, Chakra)
  • ❌ Inline business logic in <script> tags
  • ❌ Hardcoded translations in components
  • ❌ Images not using astro-images skill
  • ❌ SEO markup not using astro-seo skill
  • ❌ Missing required pages (404, Privacy Policy)
  • ❌ client:load without explicit justification
  • ❌ External fonts via Google Fonts API (self-host instead)
  • ❌ PageSpeed score below 90

Tech Stack

LayerTechnology
FrameworkAstro (latest stable)
StylingTailwind CSS (latest stable)
LanguageTypeScript (strict)
DeployCloudflare Pages
Formsastro-forms skill
Calculatorlead-gen-calculator skill
Imagesastro-images skill
SEOastro-seo skill
UXastro-ux skill

Performance Targets

MetricTargetFAIL if
PageSpeed (mobile)≥ 95< 90
PageSpeed (desktop)≥ 95< 90
Load time (desktop)< 0.8s> 1.5s
Load time (mobile)< 1.4s> 1.9s
LCP< 1.5s> 3s
CLS< 0.1> 0.25
Total JS< 50KB> 100KB

Browser Compatibility

Must work on:

  • Chrome, Firefox, Safari, Edge, Opera, Brave
  • iOS Safari (all versions), Android Chrome, Samsung Internet
  • Old devices: iOS 12+, Android 7+

FAIL if site breaks on any of these.

File Structure

src/
├── config/
│   └── site.ts              # ALL site data
├── i18n/
│   ├── ui.ts                # UI strings
│   ├── en.json              # English
│   └── [lang].json          # Other languages
├── layouts/
│   ├── BaseLayout.astro     # HTML shell
│   └── LandingLayout.astro
├── pages/
│   ├── index.astro
│   ├── thank-you.astro
│   ├── privacy-policy.astro # REQUIRED
│   ├── 404.astro            # REQUIRED
│   ├── 410.astro            # REQUIRED
│   └── [lang]/              # Translated pages
│       └── index.astro
├── components/
│   ├── sections/            # From astro-ux
│   ├── ui/
│   ├── layout/
│   │   ├── Header.astro
│   │   ├── Footer.astro     # Must have business data
│   │   └── MobileMenu.astro
│   └── common/
│       └── LanguageSwitcher.astro
├── actions/                 # From astro-forms
├── lib/
│   ├── i18n.ts              # Translation helpers
│   └── gtm.ts               # GTM/​GA4 helpers
├── styles/
│   └── global.css
└── assets/
    ├── fonts/               # Self-hosted fonts
    └── images/

Central Config

// src/​config/​site.ts
export const site = {
  name: "Business Name",
  phone: "+44 XXX XXX XXXX",
  email: "[email protected]",
  address: "123 Street, City, Postcode",
  
  colors: {
    primary: "#1C202F",
    secondary: "#E5F2FF",
    accent: "#FF6B35",
  },
  
  defaultLocale: 'en',
  locales: ['en', 'hu', 'es'] as const,
  
  gtm: {
    id: "GTM-XXXXXXX",
    cookieYesId: "XXXXXXXX",
  },
  
  social: {
    google: { rating: 4.9, count: 270 },
  },
};

References

Required (Always Read)

  • pages.md — 404, 410, Privacy Policy (MUST exist)
  • a11y.md — Accessibility requirements
  • config.md — Config file templates

Required if Multi-Language

  • i18n.md — Translation setup, hreflang

Conditional

  • gtm.md — Only if GTM/​GA4 tracking enabled
  • fonts.md — Only if custom fonts used

Definition of Done

Architecture is complete when ALL are true:

  • All pages render without JavaScript enabled
  • PageSpeed ≥ 90 on both mobile and desktop
  • No CLS on page load (test with throttled connection)
  • All visible text comes from i18n dictionaries
  • Required pages exist: 404, Privacy Policy
  • Footer contains business data (name, address, phone, email)
  • hreflang tags present if multi-language
  • GTM fires correctly (test in GTM Preview)
  • Cookie consent blocks tracking until accepted
  • Site works on iOS Safari and Android Chrome
  • Keyboard navigation works throughout
  • Skip link present and functional

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View