Help us improve
Share bugs, ideas, or general feedback.
From astro-builder
Initialize an Astro 6 project with Claude. Scans the repo for existing assets, interviews the user to define purpose, content types, i18n, and design system, then generates CLAUDE.md and a .astro-builder/ configuration folder.
npx claudepluginhub pcamarajr/content-stack --plugin astro-builderHow this skill is triggered — by the user, by Claude, or both
Slash command
/astro-builder:initThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are initializing an Astro 6 project for Claude Code. Your job is to deeply understand the user's project, then generate a `CLAUDE.md` and `.astro-builder/` folder that will guide all future development sessions.
Provides installation, prerequisite checking, and project initialization for Astro websites with AI Tech Stack 1 integration
Builds content-focused websites with Astro's zero-JS islands architecture, multi-framework components (React/Vue/Svelte), and Markdown/MDX support. Triggers on .astro files, Astro.props, content collections.
Expert Astro 6 framework — routing, output modes, middleware, Vite Environment API, Rust compiler, Content Security Policy, Live Collections, Fonts API. Use when building Astro sites, configuring output, or upgrading from Astro 5.
Share bugs, ideas, or general feedback.
You are initializing an Astro 6 project for Claude Code. Your job is to deeply understand the user's project, then generate a CLAUDE.md and .astro-builder/ folder that will guide all future development sessions.
Before asking the user anything, silently scan the project for existing context:
package.json — check Astro version, installed integrations, and scripts.astro.config.ts or astro.config.mjs if present.src/content.config.ts or src/content/config.ts if present.README.md, CLAUDE.md, docs/, or .astro-builder/ folder.src/styles/ for CSS variables, color tokens, or design tokens.src/i18n/ or any locale JSON files.src/content/ or src/pages/.Summarize what you found to the user in 3-5 bullet points, then begin the interview.
Ask questions one at a time using the AskUserQuestion tool. Let each answer guide the next question. Do not ask more than one question per turn.
Follow this interview sequence, skipping questions where you already have the answer from Phase 1:
Ask what this site is for: personal blog, product docs, education platform, news site, portfolio, etc. Ask for a one-sentence description of the site and its target audience.
Ask which languages the site will support. If multilingual, ask which is the default locale. Confirm the URL pattern preference (all locales prefixed, e.g. /en/, /it/).
Ask what types of content the site will publish. Examples: articles, tutorials, glossary entries, case studies, changelogs, documentation pages. For each type, ask:
Ask the user if they have a design reference (Figma, existing CSS, a brand guide URL, or a screenshot folder). If yes, read or fetch it. If no, ask:
Ask whether they want to use a UI component library (Tailwind CSS, shadcn, DaisyUI, Panda CSS) or write custom CSS. Warn them that this plugin enforces Astro 6 + minimal JS — heavy JS-first libraries (Next UI, Chakra) are not recommended.
Ask what quality gates they want enforced on every commit:
pnpm build (zero build errors) — recommendedtsc --noEmit (zero TypeScript errors) — recommendedbiome check . (zero lint/format errors) — recommendedAsk where the site will be deployed: Vercel, Netlify, Cloudflare Pages, GitHub Pages, or self-hosted. This determines the Astro adapter.
After completing the interview, generate the following files. Confirm with the user before writing: "I'm ready to generate your configuration. This will create CLAUDE.md and a .astro-builder/ folder. Proceed?"
CLAUDE.md — Project instructions for Claude Code. Use the template at docs/init-templates/CLAUDE.md.template as the base, substituting all {{PLACEHOLDER}} values with the user's answers.
.astro-builder/style-guide.md — Voice, tone, writing rules, and content conventions. Use docs/init-templates/style-guide.md.template.
.astro-builder/content-schema.md — All content types, their fields, relationships, and i18n strategy. Use docs/init-templates/content-schema.md.template.
.astro-builder/design-system.md — Colors, typography, spacing, component patterns. Use docs/init-templates/design-system.md.template.
.astro-builder/anti-patterns.md — Project-specific anti-patterns derived from the Astro 6 canonical list plus any project-specific rules the user defined.
After writing the files:
package.json exists. If not, offer to scaffold a new Astro 6 project by running:
pnpm create astro@latest . -- --template minimal --no-install
astro.config.ts (not .mjs) exists. If not, offer to create it.src/content.config.ts exists. If not, offer to create it based on the content schema.pnpm install if dependencies need updating.pnpm build and report any errors. Fix them autonomously if possible.src/content/config.ts — always src/content.config.ts.astro.config.mjs — always astro.config.ts.Astro.currentLocale.redirectToDefaultLocale: true — use explicit redirects config.prefixDefaultLocale: true.lang or tl as props — each component resolves its own locale.