name: astro-batavia description: specialized skill for developing and maintaining the Astro Batavia multilingual blog platform.
astro-batavia
Expert guidance for the Astro Batavia codebase, focusing on i18n, Tailwind CSS v4, and Astro-specific patterns.
When to use
Use this skill for any task involving code modifications, feature additions, or bug fixes within the Astro Batavia repository. It is particularly critical when:
- Adding or modifying paginated routes (Manual Pagination).
- Updating styles or theme configuration (CSS-only).
- Working with multilingual content or translations.
- Creating new UI components (Astro/Vanilla JS).
- Implementing loading states using the custom Skeleton system.
Instructions
1. Internationalization (i18n)
- Translations: UI strings are managed in
src/i18n/ui.ts. Always add new strings there for all supported languages (en,es,ja). - Path Generation: Use
getLocalizedPath(path, lang)from@/i18n/utilsto generate links. Avoid hardcoding/en/or/es/. - Validation: Use
isValidLanguage(lang)when handling[lang]parameters ingetStaticPaths.
2. Styling with Tailwind CSS v4
- CSS-Only Config: All configuration MUST happen in
src/styles/global.css. Never create atailwind.config.mjsfile. - Theme Extensions: Add colors, fonts, and animations to the
@themeblock inglobal.css. - Utility Layers: Use
@layer base,@layer components, and@layer utilitieswithinglobal.cssto organize custom CSS.
3. Pagination & Routing
- Filename Constraints: Astro's
paginate()helper ONLY works if the filename contains[page]or[...page]. - Manual Pagination: For
index.astroor[slug].astrofiles requiring pagination, manually slice the data and construct thePageobject. Ensureurl.prevandurl.nextare correctly localized. - First Page URLs: Always ensure the first page links to the base directory (e.g.,
/blog/) and NOT to/blog/1.
4. Component Standards
- Component Style: Keep components as
.astrofiles with Vanilla JS<script>tags for interactivity. Avoid React/Islands. - Images: Use
<Picture>component fromastro:assetsfor automatic optimization. - Typography: Prefer components in
src/components/ui/typography/for consistent text styling. - Skeleton System:
- All loading states must use the
src/components/ui/Skeleton.astroprimitive or pre-built specialized skeletons fromsrc/components/ui/skeletons/. - Use
SkeletonLoader.astrofor global page transition skeletons.
- All loading states must use the
5. Build & Validation
- Linting: Run
npm run lintbefore finalizing changes. - Formatting: Run
npm run formatto ensure code style consistency. - Build Test: Run
npm run build:onlyto verify the build pipeline.
Skills similaires
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Claude CodeCursoradvanced
890
234
3,222
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
claudeCursorWindsurfbeginner
259
72
1,128
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.
claudeCursorWindsurfintermediate
156
44
996