One-click install
npx skills add https://github.com/jacob-balslev/skill-graph --skill component-architecture-jacob-balslev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-architecture
Source: https://github.com/jacob-balslev/skill-graph/tree/main/marketplace/skills/component-architecture
Command: npx skills add https://github.com/jacob-balslev/skill-graph --skill component-architecture-jacob-balslev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you structure a reusable UI component library so components can survive reuse across multiple products, themes, and teams without requiring rewrites.

Core Features & Use Cases

  • Component API as a contract: design stable props, slots, events, and ref/imperative surfaces so consumers can rely on them over time.
  • Layering for correct reuse boundaries: choose primitive, composite, or product-specific assembly and enforce dependency direction (downward only).
  • Evolution-friendly patterns: apply composition over configuration, headless/styled separation, controlled/uncontrolled/hybrid state contracts, polymorphism (as / asChild), and compound-component structures for shared state.

Quick Start

Use the component-architecture skill to review a component design decision and ensure its reuse contract, layering, and state/polymorphism strategy are consistent with long-term multi-product use.

Frequently Asked Questions about component-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a reusable component library API that stays stable across multiple products?

A headless component architecture separates logic from styling, allowing teams to share behavior while applying custom themes. This split prevents visual coupling and ensures components remain reusable across different product designs without forcing style overrides.

When should I use compound components versus configuration for shared state?

Use compound components for shared state when you need flexible composition and implicit context passing. Configuration is restrictive for complex assemblies, whereas compound structures allow child parts to access shared state without prop drilling or rigid configuration objects.

What is the best way to handle controlled, uncontrolled, and hybrid state contracts in UI components?

Polymorphism patterns like `as` and `asChild` allow components to render as different elements or pass props through children. This prevents DOM nesting issues and ensures composability when building primitive components that need to adapt to various parent contexts.

How do I enforce correct layering boundaries between primitive, composite, and product-specific assemblies?

Enforce correct layering by ensuring dependencies point strictly downward from product-specific assemblies to composites to primitives. This boundary isolation prevents circular dependencies and maintains clean reuse contracts across different abstraction levels in your library.