astro · davila7 — Claude Code skill: features and installation
This skill guides Astro projects with Markdown or MDX content and selectively hydrated interactive components. Use it for blogs, documentation, and portfolio sites.
npx claude-code-templates@latest --skill web-development/astroWhat astro does
The skill covers Astro pages and file-based routes, .astro components, content collections, and reusable layouts. It also explains static output and SSR for dynamic routes. UI framework components render as static HTML by default, so the browser receives no JavaScript for them unless you opt into hydration.
Use client: directives to choose when an interactive component hydrates, such as on page load or when it enters the viewport. The examples combine React and Svelte components in one project. The SSR setup shown uses a Vercel adapter; that adapter is part of the described configuration, so account for it when following that route.
What it helps with
- build pages with Astro file-based routing
- organize Markdown or MDX content into collections
- define a typed schema for blog entries
- choose when an interactive component hydrates
- configure dynamic routes for SSR
Example prompts for the agent
- Create an Astro blog with file-based routes and Markdown posts.
- Set up a content collection for posts in
src/content/config.ts. - Add a React component and hydrate it when it enters the viewport.
How to install astro
1claude-code-templates
npx claude-code-templates@latest --skill web-development/astro2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill astro -a claude-code3Manually: put the files in place
~/.claude/skills/astro/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/astro/
Manually: put the files in place
.agents/skills/astro/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/astro/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates astro2Manually: put the files in place
.github/skills/astro/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/web-development/astroManually: put the files in place
.devin/skills/astro/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about astro
How do I install astro in Claude Code?
Run npx claude-code-templates@latest --skill web-development/astro.
What does the astro skill do?
It guides Astro site work, including pages, routes, Markdown and MDX content, and interactive components with selective hydration.
How does Astro handle JavaScript for interactive components?
UI components produce static HTML by default. A client: directive specifies when a component should hydrate, such as on page load or when it becomes visible.
Similar skills
All skills for Frontend and UI →astro by other authors comes first.