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.

16 stars

Best use case

astro-architecture is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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.

Teams using astro-architecture should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/astro-architecture/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/astro-architecture/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/astro-architecture/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How astro-architecture Compares

Feature / Agentastro-architectureStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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

| Layer | Technology |
|-------|------------|
| Framework | Astro (latest stable) |
| Styling | Tailwind CSS (latest stable) |
| Language | TypeScript (strict) |
| Deploy | Cloudflare Pages |
| Forms | `astro-forms` skill |
| Calculator | `lead-gen-calculator` skill |
| Images | `astro-images` skill |
| SEO | `astro-seo` skill |
| UX | `astro-ux` skill |

## Performance Targets

| Metric | Target | FAIL 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

```typescript
// src/config/site.ts
export const site = {
  name: "Business Name",
  phone: "+44 XXX XXX XXXX",
  email: "info@example.com",
  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](references/pages.md) — 404, 410, Privacy Policy (MUST exist)
- [a11y.md](references/a11y.md) — Accessibility requirements
- [config.md](references/config.md) — Config file templates

### Required if Multi-Language

- [i18n.md](references/i18n.md) — Translation setup, hreflang

### Conditional

- [gtm.md](references/gtm.md) — Only if GTM/GA4 tracking enabled
- [fonts.md](references/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

Related Skills

astropy

16
from diegosouzapw/awesome-omni-skill

Comprehensive Python library for astronomy and astrophysics. This skill should be used when working with astronomical data including celestial coordinates, physical units, FITS files, cosmological calculations, time systems, tables, world coordinate systems (WCS), and astronomical data analysis. Use when tasks involve coordinate transformations, unit conversions, FITS file manipulation, cosmological distance calculations, time scale conversions, or astronomical data processing.

astro-setup

16
from diegosouzapw/awesome-omni-skill

Astro project initialization and configuration patterns. Use when setting up new Astro projects or configuring Astro features.

astro-patterns

16
from diegosouzapw/awesome-omni-skill

Astro best practices, routing patterns, component architecture, and static site generation techniques. Use when building Astro websites, setting up routing, designing component architecture, configuring static site generation, optimizing build performance, implementing content strategies, or when user mentions Astro patterns, routing, component design, SSG, static sites, or Astro best practices.

assessing-architecture-quality

16
from diegosouzapw/awesome-omni-skill

Use when assessing codebase architecture and you feel pressure to soften critique, lead with strengths, or frame problems diplomatically - provides evidence-based critical assessment resisting relationship and economic pressures

architecture

16
from diegosouzapw/awesome-omni-skill

Comprehensive system architecture design and implementation workflow that orchestrates expert analysis, technical decision-making, and architectural pattern selection using the integrated toolset. Handles everything from initial system analysis to implementation-ready technical specifications.

architecture-workshop

16
from diegosouzapw/awesome-omni-skill

Framework for designing new architectural mechanisms when existing patterns don't fit

architecture-validator

16
from diegosouzapw/awesome-omni-skill

Validate hexagonal architecture (Domain, Application, Infrastructure, Presentation). Use when creating new files in src/, reorganizing code, or when the user requests architecture validation.

architecture-validation

16
from diegosouzapw/awesome-omni-skill

Dynamically validate codebase compliance with architectural decisions and constraints

architecture-to-json

16
from diegosouzapw/awesome-omni-skill

Guide for extracting architectural diagrams, flowcharts, and sequence diagrams into a structured JSON format. Use this skill when you need to transform a visual or textual description of a system architecture or workflow into a clear, structured JSON representation.

architecture-tech-lead

16
from diegosouzapw/awesome-omni-skill

This skill should be used when the user asks to 'review my architecture', 'improve testability', 'refactor for testing', 'reduce mocking in tests', 'too many mocks', 'extract pure functions', 'functional core imperative shell', 'design a feature', 'evaluate approaches', 'make code more testable', 'domain modeling', 'DDD design', 'bounded contexts', 'too much coupling', or needs architectural validation for Java/Spring Boot or TypeScript/Next.js codebases. Use for design decisions, not implementation.

architecture-synthesis

16
from diegosouzapw/awesome-omni-skill

Generate a reference architecture specification from analyzed frameworks. Use when (1) designing a new agent framework based on prior art, (2) defining core primitives (Message, State, Tool types), (3) specifying interface protocols, (4) creating execution loop pseudocode, or (5) producing architecture diagrams and implementation roadmaps.

architecture-strategist

16
from diegosouzapw/awesome-omni-skill

Use this agent when analyzing code changes from an architectural perspective, evaluating system design decisions, or ensuring changes align with established architectural patterns. Triggers on requests like "architecture review", "design evaluation", "system architecture analysis".