Design & UI
dev-create-island
Use when adding an interactive UI component that requires client-side JavaScript - creates a framework island with hydration strategy.
herbert-julio-azion · Static checks on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add HerbertJulio/specialist-agent --skill dev-create-islandAbout this skill
name: dev-create-island description: "Use when adding an interactive UI component that requires client-side JavaScript - creates a framework island with hydration strategy." user-invocable: true argument-hint: "[IslandName]" allowed-tools: Read, Write, Edit, Bash, Glob, Grep
Create an interactive island component following docs/ARCHITECTURE.md section 5.2.
Island: $ARGUMENTS
Steps
-
Read
docs/ARCHITECTURE.mdsection 5.2. -
Confirm interactivity is required - if the component is purely presentational, use
/dev-create-componentinstead. -
Determine the framework (based on project preference):
- React ->
src/islands/IslandName.tsx - Vue ->
src/islands/IslandName.vue - Svelte ->
src/islands/IslandName.svelte
- React ->
-
Choose hydration strategy:
client:load- immediately visible + interactive (above the fold)client:idle- not urgent, hydrate when browser is idleclient:visible- below the fold, hydrate when scrolled into viewclient:media="(max-width: 768px)"- only on specific viewportsclient:only="react"- skip SSR entirely (browser-API-dependent)
-
Create the island with typed props (React example):
interface Props {
// all props must be serializable (no functions, no class instances)
}
export default function IslandName({ prop1, prop2 }: Props) {
// minimal client-side state and interactivity
return (
<div>
{/* interactive UI */}
</div>
)
}
- Usage example in .astro file:
---
import IslandName from '../islands/IslandName'
---
<IslandName client:idle prop1="value" prop2={42} />
-
Checklist:
- Props are serializable (no functions, no class instances)
- Least aggressive hydration strategy chosen
- Island scope is minimal (non-interactive parts in .astro)
- PascalCase filename matching framework convention
-
Validate:
npx astro check && npx astro build