Mandu hydration

From konamgil/mandu · View interactive version

Mandu hydration is an AI agent skill from the GitHub repository konamgil/mandu. Island Hydration pattern for Mandu. Use when creating interactive components, client-side state, or partial hydration. Triggers on tasks involving "use client", client.tsx, useState, useEffect, Island, or hydration.

How to use this skill

Skill file

Mandu Island Hydration

Island Hydration은 페이지의 일부분만 클라이언트에서 인터랙티브하게 만드는 기술입니다.

대부분의 페이지는 정적 HTML로 유지하고, 필요한 부분만 JavaScript를 로드합니다.

Agent Workflow Contract

This skill is a Domain addendum. It must not replace mandu-agent-workflow.

Use it only after mandu.agent.plan selects the hydration, island, partial, or route domain.

Canonical workflow step: plan -> apply -> verify -> repair.

Preferred MCP tools:

| Step | Tools |

|------|-------|

| plan | mandu.agent.plan, mandu.island.list |

| apply | mandu.agent.apply, mandu.hydration.set, mandu.hydration.addClientSlot |

| verify | mandu.agent.verify, mandu.build, mandu.build.status |

| repair | mandu.agent.repair |

Allowed file edits:

Verification command:

mandu agent verify --changed --json --write

Common failures:

Repair path:

mandu agent repair --from .mandu/agent-verify.json --json

When to Apply

Reference these guidelines when:

Rule Categories by Priority

| Priority | Category | Impact | Prefix |

|----------|----------|--------|--------|

| 1 | Client Directive | CRITICAL | hydration-directive- |

| 2 | Island Structure | HIGH | hydration-island- |

| 3 | Hydration Priority | MEDIUM | hydration-priority- |

| 4 | Data Flow | MEDIUM | hydration-data- |

Quick Reference

1. Client Directive (CRITICAL)

2. Island Structure (HIGH)

3. Hydration Priority (MEDIUM)

4. Data Flow (MEDIUM)

Hydration Strategies

| Strategy | Description | Use Case |

|----------|-------------|----------|

| none | No JavaScript | Pure static pages |

| island | Partial hydration (default) | Static + interactive mix |

| full | Full hydration | SPA-style pages |

Runtime API Constraints

Client Hooks

import {
  useServerData,
  useHydrated,
  useIslandEvent,
} from "@mandujs/core/client";

// Access SSR data
const data = useServerData<UserData>("user", defaultValue);

// Check hydration status
const isHydrated = useHydrated();

How to Use

Read individual rule files for detailed explanations:

rules/hydration-directive-use-client.md
rules/hydration-island-setup.md
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.