Astro Page vs Island Decision
This skill enforces correct separation between Astro and React, preventing overuse of client-side hydration.
When to use this skill
Use this skill when:
- •Creating or refactoring pages in an AstroJS project
- •Mixing
.astrofiles with React components - •Deciding whether a feature needs interactivity
Do NOT use this skill when:
- •The project is not using AstroJS
- •The component is already clearly interactive or static
How to use it
- •Analyze the feature requirements
- •Classify the component as:
- •Static (Astro page/component)
- •Interactive (React island)
- •Use React only when interactivity is required
- •Apply the minimum necessary
client:*directive
Decision Rules
- •Static content →
.astro - •Forms, state, events → React
- •Avoid
client:loadby default - •Prefer
client:visibleorclient:idle
Expected Output
- •Clear justification for Astro vs React usage
- •Reduced client-side JavaScript
- •Better performance and maintainability