Mandu composition

From konamgil/mandu · View interactive version

Mandu composition is an AI agent skill from the GitHub repository konamgil/mandu. React composition patterns for Mandu applications. Use when designing Island components, managing shared state, or building reusable component APIs. Triggers on compound components, context providers, boolean props, or component architecture tasks.

How to use this skill

Skill file

Mandu Composition

Mandu 애플리케이션을 위한 React 컴포지션 패턴 가이드. Island 컴파운드 컴포넌트, 상태 관리 인터페이스, Provider 패턴, slot-client 분리를 다룹니다. Vercel의 Composition Patterns를 Mandu 컨텍스트로 변환하여 적용합니다.

Agent Workflow Contract

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

Use it only after mandu.agent.plan selects composition, UI, hydration, slot, or component domains.

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

Preferred MCP tools:

| Step | Tools |

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

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

| apply | mandu.agent.apply |

| verify | mandu.agent.verify, mandu.design.check, mandu.slot.validate |

| 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 | Component Architecture | HIGH | comp-arch- |

| 2 | State Management | HIGH | comp-state- |

| 3 | Island Patterns | MEDIUM | comp-island- |

| 4 | Implementation Patterns | MEDIUM | comp-pattern- |

Quick Reference

1. Component Architecture (HIGH)

2. State Management (HIGH)

3. Island Patterns (MEDIUM)

4. Implementation Patterns (MEDIUM)

Core Principle

Lift state, compose internals, make state dependency-injectable.

┌─────────────────────────────────────────┐
│  Provider (state + actions + meta)      │
│  ┌───────────────────────────────────┐  │
│  │  Composer.Frame                   │  │
│  │  ┌─────────┐ ┌─────────────────┐  │  │
│  │  │ Input   │ │ Footer          │  │  │
│  │  └─────────┘ │ ┌─────┐ ┌─────┐ │  │  │
│  │              │ │Emoji│ │Send │ │  │  │
│  │              │ └─────┘ └─────┘ │  │  │
│  │              └─────────────────┘  │  │
│  └───────────────────────────────────┘  │
│  ┌───────────────┐  ← Outside Frame     │
│  │ Preview       │     but inside       │
│  └───────────────┘     Provider!        │
└─────────────────────────────────────────┘

How to Use

Read individual rule files for detailed explanations:

rules/comp-arch-compound-components.md
rules/comp-state-context-interface.md
rules/comp-island-event.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.