g1joshi/agent-skills/astro
Claude Code and agent skill by g1joshi/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Expert Astro framework assistance covering content collections, Islands architecture, zero-JS by default, and multi-framework integration. Use when building content-focused websites, blogs, documentation, or marketing pages.
Install
npx vskill@latest install g1joshi/agent-skills/astroSKILL.md
The same SKILL.md was published earlier as g1joshi/agent-skills/astro.
Astro
Astro is a content-driven web framework pioneering Islands Architecture, shipping zero client-side JavaScript by default and hydrating interactive components on demand.
When to Use
- Content-Driven Websites & Portals: Blogs, documentation, marketing sites, and e-commerce product catalogs.
- Zero-JS Default Architecture: Delivering maximum Lighthouse performance with Islands Architecture.
- Multi-Framework Integrations: Mixing React, Vue, Svelte, and Solid components in a single project.
- Hybrid Static & Server-Rendered Sites: Pre-rendering static pages while utilizing SSR routes for authenticated dashboards.
Quick Start
Core Concepts
Component Islands & Client Directives
Hydrating JavaScript only where interactive functionality is required:
Content Collections with Type-Safe Schemas
Validating Markdown and MDX content with Zod schemas:
Server Endpoints & Dynamic API Routes
Exposing REST endpoints for dynamic data fetching:
Common Patterns
Interactive Component Island with Client Directives
Problem: Shipping unnecessary JavaScript for largely static content pages.
Solution: Use Astro Islands architecture with client:visible or client:idle:
Best Practices
Do:
- Use Astro Server Islands (
server:defer) to defer slow, dynamic parts of static pages for instant TTFB. - Leverage Content Collections for all Markdown and MDX files to ensure compile-time schema validation.
- Use
<Image />component fromastro:assetsto automate WebP conversion and responsivesrcset. - Keep interactive islands isolated and small (
client:idleorclient:visible).
Don't:
- Use
client:loadon components below the fold; hydrate only when necessary. - Import client UI framework libraries into
.astrofrontmatter unless rendering them as islands. - Use client-side navigation (
ViewTransitions) without auditing third-party script re-execution.
Troubleshooting
| Error | Cause | Solution | |
|---|---|---|---|
Cannot find module '../components/...' | Typo in component import or missing .astro file extension. | Explicitly include .astro extension on all Astro component imports. | |
document is not defined | Accessing browser DOM during static build SSR phase. | Guard DOM access inside typeof document !== 'undefined' or client:only. | |
Content collection schema validation failed | Markdown frontmatter does not match Zod schema in src/content/config.ts. | Correct frontmatter fields to adhere to the defined collection schema. |
References
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/frameworks/astro/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/g1joshi/agent-skills/astro)