Build parts, not prop soup.
This skill teaches scalable composition patterns for headless Svelte components. It is aimed at component APIs that are drifting toward boolean flags, render-mode props, or prop-drilled state, and it pushes them back toward explicit part families, typed context, snippet escape hatches, and modern Svelte 5 APIs.
Focused on reusable shape over framework ceremony.
npx skills add Oungseik/svelte-composition-pattern
Install globally instead of per-project:
npx skills add Oungseik/svelte-composition-pattern -g
Use this skill when:
Root, Trigger, Content, Item, Label style partsSKILL.md - entry point, activation guidance, and rule maprules/ - focused guidance for each patternreferences/composition-pattern-checkpoints.md - compact repo-local pattern
checkpointsreferences/svelte-5-api-checkpoints.md - Svelte 5 API checkpoints used by
the skillarchitecture-export-part-families - export namespace part familiesarchitecture-avoid-mode-props - replace boolean modes with explicit parts
or discriminated unionsstate-root-owns-context - root owns state, parts read typed contextpatterns-snippet-surfaces - use children, child, snippet props, and
{@render}patterns-merge-user-props - merge internal behavior with caller propssvelte5-modern-apis - use runes, createContext, snippets, attachments,
callback props, and current async rulesRoot,
Trigger, and Content parts."The skill is pattern-first, not tied to one exact helper stack. If a codebase
already uses helpers like runed Context or
svelte-toolbelt mergeProps, keep the house style. If not, default to the
platform Svelte 5 APIs.