From harness-claude
Helps implement the React Islands pattern to hydrate only interactive UI regions, improving performance on content-heavy pages with frameworks like Astro or Next.js.
How this skill is triggered — by the user, by Claude, or both
Slash command
/harness-claude:react-islands-patternThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Hydrate only interactive UI islands, leaving static content as HTML
Hydrate only interactive UI islands, leaving static content as HTML
'use client' directivesclient:load, client:idle, client:visible on components'use client' at the top of the component fileclient:visible (Astro) or lazy hydration for below-fold islands.// Astro example: only the interactive widget is hydrated
---
import StaticHeader from './StaticHeader.astro'; // no JS
import InteractiveSearch from './InteractiveSearch'; // React island
---
<StaticHeader />
<InteractiveSearch client:load />
<article>...static content...</article>
The islands pattern was popularized by Jason Miller (Preact creator) and Ethan Marcotte. The core insight: most web pages are "mostly static" — only specific regions need event handlers and state. Hydrating the entire page as a React app is wasteful.
Trade-offs:
React Server Components (RSC) vs islands:
https://patterns.dev/react/islands-architecture
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeGuides use of Astro's islands architecture: choosing client:* directives, minimizing JS, and auditing hydration for mixed static/interactive pages.
Expert Astro Islands Architecture — client:load, client:idle, client:visible, client:media, client:only, server:defer (Server Islands), fallback slots, transition:persist, prop serialization. Use when adding interactivity to Astro pages or rendering dynamic server content.
Guides implementation of modern React patterns: hooks, component composition, state management, performance optimizations, concurrent features. Use for building or refactoring components.