Build production-grade frontend interfaces using Astro 6, React 19 islands, Tailwind CSS v4, and DaisyUI v5. Enforce strict theming (semantic tokens only, light/dark, anti-flash) and islands discipline, and apply design craft progressively via mode-based layers (Baseline, Design, Advanced) chosen by UI type. Also produces accompanying visuals: inline SVG state illustrations (empty, error, success, welcome) and JSON image-prompts for hero and marketing artwork. Default to Baseline when unsure. Use when the project runs on (or targets) this Astro + DaisyUI stack; for aesthetic-first standalone page builds with no stack constraint, prefer the hallmark skill.
Ships in frontend-design. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build production-quality web interfaces using Astro + React islands + Tailwind CSS v4 + DaisyUI v5. Every page and component must support light and dark themes.
Routing vs. hallmark: both skills can build landing pages. This skill owns work inside the Astro + DaisyUI system — repeatable, token-pure, team-maintainable UI. hallmark owns aesthetic-first, single-page editorial builds where the design direction is the deliverable and no stack constraint exists. If the user asks for a page in this repo's stack, stay here; if they ask for "a beautiful page" with no stack, hand to hallmark.
Use the existing stack constraints and patterns as the baseline. Apply design craft progressively (Baseline/Design/Advanced) so outputs avoid generic template vibes while remaining maintainable, accessible, and fast.
<head>..astro; React islands only for interactivity with the most restrictive client:*.| Layer | Tool | Version | Role |
|---|---|---|---|
| Framework | Astro | 6.x | Static pages, routing, layouts, SSG/SSR |
| Islands | React via @astrojs/react | 19.x | Interactive components only |
| Styling | Tailwind CSS | 4.x | Utility-first CSS (CSS-first config) |
| Theme | DaisyUI | 5.x | Component classes, light/dark via @plugin |
| Icons | Lucide React or Astro Icon | latest | Consistent icon system |
The versions above are defaults for this skill. Before generating code, verify the repo’s actual installed versions in package.json (and lockfile if needed). If they differ, follow the repo’s versions and adjust patterns accordingly (especially DaisyUI v5 CSS-first theming vs older approaches).
Default to Astro components (.astro). Only use React (.tsx) when the component needs:
Always apply the most restrictive client:* directive:
| Directive | Use when |
|---|---|
client:load | Immediately interactive (e.g., header nav dropdown) |
client:visible | Below the fold (carousels, accordions) |
client:idle | Non-critical (analytics widgets, chat) |
client:media | Device-conditional (mobile menu) |
The core stack + theming + islands rules in this skill are enforceable and stay mandatory. The “design craft” parts below are mode-based to avoid brittle, forced outputs.
| UI type | Default mode | Notes |
|---|---|---|
| Marketing / landing / hero sections | Design | Add 1 safe anchor; motion is allowed but sparse |
| App UI (settings, forms, workflows) | Baseline | Favor clarity; keep craft subtle and repeatable |
| Dashboards / tables / data-heavy screens | Baseline | Prioritize density, readability, states; no visual experiments |
| Visual refresh / brand moment | Advanced | Use a risk-scan + calibrated anchors; still respect constraints |
“Visual refresh / brand moment” means you’re explicitly changing the aesthetic system (theme tokens, hero identity, distinctive components). If you’re just assembling a standard marketing page with the existing system, prefer Design mode. If unsure, Baseline.
Before generating UI, you MUST:
If uncertain about UI type or the expected level of visual experimentation, default to Baseline.
Baseline mode MUST NOT:
In Design mode, do these (briefly) before coding:
If uncertain, default to Typography anchor (safest, most reusable).
tabular-nums), or headline rhythm that stays within the existing scale.lg+ that collapses cleanly on mobile (no overlap that breaks reading order).prefers-reduced-motion respected.opacity + transform only.Advanced mode is for new pages, hero redesigns, or brand refresh work. It is explicitly optional because it’s subjective.
Use this to validate a proposed direction, not to invent one. This is a checklist to avoid self-justifying “creative” decisions.
Optionally rate each 1–5, but do not sum scores and do not “optimize the number.” If anything feels forced or uncertain, fall back to Design or Baseline.
Rule of thumb: if Feasibility ≤ 3 or Performance ≤ 3 or Consistency risk ≥ 4, don’t do Advanced — reduce scope and use Baseline/Design patterns.
bg-base-*, text-base-content, border-base-300, text-primary, etc.global.css (OKLCH) rather than hardcoding colors in components..anchor-*html, body, :root, *, or unscoped element selectorsmax-w-prose (≈ 65ch) and leading-relaxed.ease-out/ease-in-out (transition-colors, transition-shadow, transition-transform).ease-out, opacity + transform only.prefers-reduced-motion (use motion-reduce:* utilities).Performance priority (highest → lowest):
When in Design or Advanced mode, output:
Baseline mode output:
A clean, professional marketing-site aesthetic: generous whitespace, card-driven structure, one strong headline per section, subtle depth over decoration.
The patterns below are default implementations that make Baseline mode reliable and consistent.
If a “layout anchor” conflicts with a default pattern, you may change the layout in Design/Advanced mode — but keep semantics, responsiveness, theming tokens, and accessibility intact.
py-16 md:py-24 between sections minimum.Headline (h1): text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight
Section (h2): text-3xl md:text-4xl font-bold
Subsection (h3): text-xl md:text-2xl font-semibold
Minor (h4): text-lg font-semibold
Micro (h5/h6): text-base font-semibold
Body: text-base md:text-lg text-base-content/80
Small/Caption: text-sm text-base-content/60
h1 per page (hero/title).h2 for major sections, h3 for subsection/card headings, h4–h6 for nested headings.max-w-prose)max-w-prose is for readable line length inside the normal max-w-7xl layout. Nest it:
<div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
<div class="mx-auto max-w-prose">
<!-- long-form content -->
</div>
</div>
Default purpose: repeatable section hierarchy (label → headline → subtitle → content) with low design risk.
Every major page section follows this pattern:
<section class="py-16 md:py-24 bg-base-100">
<div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
<p class="mb-4 text-center text-sm font-medium uppercase tracking-wider text-primary">
Section Label
</p>
<h2 class="mb-4 text-center text-3xl font-bold text-base-content md:text-4xl">
Section Headline
</h2>
<p class="mx-auto mb-12 max-w-2xl text-center text-lg text-base-content/70">
Supporting description.
</p>
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-8 lg:grid-cols-3">
<!-- cards / content -->
</div>
</div>
</section>
Alternate section backgrounds between bg-base-100 and bg-base-200 for visual rhythm.
Design/Advanced variations (pick one; keep the same hierarchy):
lg+ and keep centered on mobile if it improves scanning.lg+ (heading column + content column) while keeping the same semantic structure.<div class="card border border-base-300 bg-base-100 shadow-sm transition-shadow duration-200 hover:shadow-md">
<div class="card-body">
<div class="mb-4 flex h-12 w-12 items-center justify-center rounded-lg bg-primary/10">
<!-- icon -->
</div>
<h3 class="card-title text-xl font-semibold text-base-content">Title</h3>
<p class="text-base-content/70">Description text.</p>
<div class="card-actions mt-4 justify-start">
<a href="/learn-more" class="link link-primary font-medium">Learn more →</a>
</div>
</div>
</div>
Default purpose: scannable feature/service blocks with consistent hierarchy.
Design/Advanced variations (choose at most one):
btn btn-ghost btn-sm) when the action matters.<section class="flex min-h-[80vh] items-center bg-base-100">
<div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
<div class="max-w-5xl">
<h1 class="mb-6 text-4xl font-bold tracking-tight text-base-content md:text-5xl lg:text-6xl">
Headline with <span class="text-primary">accent</span>
</h1>
<p class="mb-8 max-w-2xl text-lg text-base-content/70 md:text-xl">
Value proposition paragraph.
</p>
<div class="flex flex-wrap gap-4">
<a href="/cta" class="btn btn-primary btn-lg">Primary Action</a>
<a href="/secondary" class="btn btn-outline btn-lg">Secondary Action</a>
</div>
</div>
</div>
</section>
Default purpose: establish hierarchy fast (headline → value prop → CTA) with minimal visual risk.
Design/Advanced variations (pick one; keep mobile stacked):
lg+ (copy + supporting media/illustration) while preserving the same hierarchy.text-left → text-center) only if it serves the direction and doesn’t reduce readability.min-h-[70vh] to min-h-[85vh]) based on content density; avoid empty “hero air.”<div class="grid grid-cols-2 gap-8 border-y border-base-300 py-12 md:grid-cols-4">
<div class="text-center">
<p class="text-3xl font-bold text-primary md:text-4xl">99.9%</p>
<p class="mt-1 text-sm text-base-content/60">Uptime SLA</p>
</div>
</div>
Default purpose: credible proof in a compact, skimmable row.
<section class="bg-primary py-16 text-primary-content md:py-24">
<div class="mx-auto max-w-7xl px-4 text-center">
<h2 class="mb-4 text-3xl font-bold md:text-4xl">Ready to get started?</h2>
<p class="mx-auto mb-8 max-w-xl text-lg opacity-90">Supporting text.</p>
<div class="flex flex-wrap justify-center gap-4">
<a href="/contact" class="btn btn-secondary btn-lg">Get in Touch</a>
<a href="/learn" class="btn btn-ghost btn-lg border border-primary-content/20">Learn More</a>
</div>
</div>
</section>
Default purpose: high-contrast close that is readable in both themes.
Empty, error, success, and welcome states usually need a visual to carry the moment. Hero and marketing surfaces sometimes need richer artwork. Two routes:
currentColor so DaisyUI semantic tokens (text-primary, text-base-content, text-error) drive the fill across both themes. Ready-made starters live in assets/ (empty-state.svg, error-state.svg, success-state.svg, welcome-state.svg).global.css theme tokens.For the full schema, rules, and worked examples, see references/graphics.md.
Mode notes: Baseline uses the bundled SVGs as-is. Design mode tailors a single on-brand SVG or generates one illustration. Advanced mode is where art-directed hero imagery belongs — confirm contrast against both themes before shipping.
Themes are declared in global.css using @plugin directives — not in tailwind.config.mjs:
@import "tailwindcss";
@plugin "daisyui" {
themes: brand-light --default, brand-dark;
}
@plugin "daisyui/theme" {
name: "brand-light";
prefersdark: false;
color-scheme: "light";
--color-base-100: oklch(98% 0.01 250);
--color-base-200: oklch(95.5% 0.015 250);
--color-base-300: oklch(90% 0.02 250);
--color-base-content: oklch(22% 0.02 250);
--color-primary: oklch(50% 0.18 250);
--color-primary-content: oklch(98% 0.008 250);
--color-secondary: oklch(55% 0.16 300);
--color-secondary-content: oklch(98% 0.01 300);
--color-accent: oklch(60% 0.14 180);
--color-accent-content: oklch(98% 0.01 180);
--color-neutral: oklch(35% 0.02 250);
--color-neutral-content: oklch(98% 0.008 250);
--color-info: oklch(60% 0.16 235);
--color-success: oklch(64% 0.15 155);
--color-warning: oklch(75% 0.16 70);
--color-error: oklch(60% 0.2 25);
--radius-selector: 1rem;
--radius-field: 0.5rem;
--radius-box: 0.25rem;
--border: 1px;
--depth: 1;
--noise: 0;
}
@plugin "daisyui/theme" {
name: "brand-dark";
prefersdark: true;
color-scheme: "dark";
--color-base-100: oklch(20% 0.02 250);
--color-base-200: oklch(25% 0.025 250);
--color-base-300: oklch(32% 0.03 250);
--color-base-content: oklch(92% 0.01 250);
--color-primary: oklch(62% 0.2 250);
--color-primary-content: oklch(98% 0.008 250);
--color-secondary: oklch(65% 0.18 300);
--color-secondary-content: oklch(98% 0.01 300);
--color-accent: oklch(68% 0.14 180);
--color-accent-content: oklch(98% 0.01 180);
--color-neutral: oklch(35% 0.02 250);
--color-neutral-content: oklch(98% 0.008 250);
--color-info: oklch(65% 0.16 235);
--color-success: oklch(68% 0.15 155);
--color-warning: oklch(78% 0.16 70);
--color-error: oklch(65% 0.2 25);
--radius-selector: 1rem;
--radius-field: 0.5rem;
--radius-box: 0.25rem;
--border: 1px;
--depth: 1;
--noise: 0;
}
Prefer an Astro component with an inline click handler so the global header stays fast and you avoid unnecessary hydration.
---
// src/components/ThemeToggle.astro
---
<button type="button" class="btn btn-ghost btn-circle" aria-label="Toggle theme" data-theme-toggle>
<span aria-hidden="true">🌓</span>
</button>
<script is:inline>
(function () {
var LIGHT = 'brand-light';
var DARK = 'brand-dark';
function getCurrentTheme() {
return document.documentElement.getAttribute('data-theme') || LIGHT;
}
function setTheme(theme) {
localStorage.setItem('theme', theme);
document.documentElement.setAttribute('data-theme', theme);
}
function toggleTheme() {
var current = getCurrentTheme();
setTheme(current === DARK ? LIGHT : DARK);
}
var buttons = document.querySelectorAll('[data-theme-toggle]');
for (var i = 0; i < buttons.length; i++) {
buttons[i].addEventListener('click', toggleTheme);
}
})();
</script>
If you must implement this as a React island (rare), only use client:load when it must be interactive immediately; otherwise prefer client:idle.
Add as the first script in <head>, before any stylesheets or other scripts, to prevent theme flash on load:
<script is:inline>
(function() {
var t = localStorage.getItem('theme');
if (!t) t = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'brand-dark' : 'brand-light';
document.documentElement.setAttribute('data-theme', t);
})();
</script>
bg-base-100 (primary), bg-base-200 (alt sections), bg-base-300 (emphasis)text-base-content (primary), /80 (body), /70 (subtitles), /60 (captions), /50 (fine print)border-base-300 alwaystext-primary, bg-primary, btn-primarytext-gray-600 or bg-white — always use DaisyUI semantic tokenssrc/
├── layouts/
│ └── BaseLayout.astro # html, head (anti-flash script), nav, footer
├── components/
│ ├── Header.astro # Static nav, includes ThemeToggle (no island)
│ ├── Footer.astro
│ ├── Hero.astro
│ ├── SectionHeading.astro # Reusable label + h2 + subtitle
│ ├── Card.astro
│ ├── ThemeToggle.astro # Inline-script theme toggle (no island)
│ └── react/ # React islands only (shared); co-locate feature-specific islands as needed
│ ├── ContactForm.tsx
│ └── MobileMenu.tsx
├── pages/
│ └── index.astro
└── styles/
└── global.css # @import "tailwindcss", @plugin themes
global.css<head> (before stylesheets/other scripts)client:* directive for each island<section>, <nav>, <main>, <footer>, <article>)max-w-7xl containers consistentlytext-white, bg-gray-900) — use semantic tokenstailwind.config.mjs (use CSS @plugin syntax)client:load when client:visible or client:idle sufficesw-[347px]) unless absolutely necessarydata-theme attributes inside each othersearch_astro_docsassets/empty-state.svg (opens in a new tab)assets/error-state.svg (opens in a new tab)assets/sample-image-prompt.json (opens in a new tab)assets/success-state.svg (opens in a new tab)assets/welcome-state.svg (opens in a new tab)references/component-patterns.md (opens in a new tab)references/graphics.md (opens in a new tab)references/theming-guide.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/frontend-design:frontend-designfrom frontend-design
npx claudepluginhub rehanhaider/aiman --plugin frontend-design