Claude-skill-registry astro-frontend-ui
Build the Astro frontend with Tailwind CSS v4 via the Vite plugin, a WPGraphQL data layer, and React islands (shadcn/ui) only where needed. Use when implementing or fixing frontend files under frontend/ for this WordPress headless repo.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/astro-frontend-ui" ~/.claude/skills/majiayu000-claude-skill-registry-astro-frontend-ui && rm -rf "$T"
manifest:
skills/data/astro-frontend-ui/SKILL.mdsource content
Astro Frontend UI
Overview
Implement a fast Astro public site that consumes WordPress via
/graphql, keeps client JS minimal, and follows the repo’s UI style requirements. Focus on file outputs under frontend/ and a small GraphQL client.
Workflow
- Inspect existing
files for Astro + Tailwind v4 setup and adjust only within that subtree.frontend/ - Ensure
,frontend/Dockerfile
, andpackage.json
align with Tailwind v4 via Vite and dev server onastro.config.mjs
.0.0.0.0:4321 - Implement
with endpoint resolution and two GraphQL queries.src/lib/cms.ts - Build pages (
,/
,/blog
) in Astro with card-based UI and graceful empty states./blog/[slug] - Use React islands only for interactive widgets, and keep everything else server-rendered.
Non-Negotiables
- Use Tailwind CSS v4 via the Vite plugin; do not use deprecated Astro Tailwind integration.
- Keep JS minimal and limit React to islands only.
- UI style: clean, card-based, generous spacing, 2xl radii, subtle shadows.
Default Stack
- Use
+react
only for islands.react-dom - Use shadcn/ui components (Button/Card/Dialog/Dropdown) when interaction is needed.
- Use
icons as needed.lucide-react - Use
for toasts if useful.sonner - Use
or an equivalent tiny GraphQL client.graphql-request
Required Outputs
- Create or update under
:frontend/Dockerfilepackage.jsonastro.config.mjssrc/lib/cms.tssrc/pages/index.astrosrc/pages/blog/index.astrosrc/pages/blog/[slug].astro
(Header, Footer, PostCard, Hero, FeatureGrid, CTA)src/components/*
Data Layer
- CMS endpoint is
.${PUBLIC_CMS_URL || ASTRO_PUBLIC_CMS_URL}/graphql - Provide queries:
- list posts:
,title
,slug
,excerptdate - post by slug:
,title
,contentdate
- list posts:
- Handle empty states for no posts.
Acceptance Checklist
renders home.http://localhost:8080/
renders list or empty state./blog
renders content when posts exist./blog/<slug>- No unnecessary client JS outside islands.