Claude-skill-registry astro-setup
Astro project initialization and configuration patterns. Use when setting up new Astro projects or configuring Astro features.
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-setup" ~/.claude/skills/majiayu000-claude-skill-registry-astro-setup && rm -rf "$T"
manifest:
skills/data/astro-setup/SKILL.mdsource content
Astro Setup Skill
Project Initialization
npm create astro@latest project-name -- --template minimal --typescript strict cd project-name
Essential Integrations
npx astro add react npx astro add mdx npx astro add tailwind
Configuration Pattern
// astro.config.mjs import { defineConfig } from 'astro/config'; import react from '@astrojs/react'; import mdx from '@astrojs/mdx'; import tailwind from '@astrojs/tailwind'; export default defineConfig({ site: 'https://username.github.io', base: '/repo-name', // or '/' for user pages integrations: [react(), mdx(), tailwind()], output: 'static', // Required for GitHub Pages image: { service: { entrypoint: 'astro/assets/services/sharp' } } });
Content Collections
Content collections go in
src/content/ with a config.ts file defining schemas using Zod.
Best Practices
- Use
for GitHub Pagesoutput: 'static' - Configure
andsite
for proper asset pathsbase - Enable image optimization
- Keep integrations minimal