component-craft

Create and enforce reusable React component APIs with state coverage.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/olzn/system-craft --skill component-craft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-craft
Source: https://github.com/olzn/system-craft/tree/main/component-craft
Command: npx skills add https://github.com/olzn/system-craft --skill component-craft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables teams to build and maintain reusable UI components with consistent APIs and complete state coverage, reducing API drift and improving cross-project maintainability.

Core Features & Use Cases

  • Establishes consistent prop conventions, variant systems (CVA), and render delegation patterns (asChild) for scalable component APIs.
  • Guides forwardRef usage, icon system conventions, and API reviews to ensure accessibility and composability across React components.
  • Applies to tasks such as creating a new component, defining its props and variants, deciding between configuration and composition, implementing compound patterns, and evaluating API consistency.

Quick Start

Define a new component's API and variants following the component-craft guidelines, ensuring forwardRef, render delegation, and solid state coverage.

Frequently Asked Questions about component-craft

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

FAQPage Schema
How do I build reusable React UI components with consistent APIs?

To build reusable React UI components, establish consistent prop conventions, CVA-based variant systems, and render delegation patterns. This approach ensures complete state coverage and improves cross-project maintainability by enforcing configuration versus composition decisions.

What's the best way to implement a CVA variant system for a component library?

Implementing a CVA variant system requires defining variant properties and their valid states within your component props. This ensures scalable component APIs by standardizing visual states and enforcing consistent styling configurations across your design system.

How does forwardRef and render delegation work in accessible component APIs?

forwardRef and render delegation enable accessible component APIs by allowing DOM ref forwarding and custom render logic via patterns like asChild. This ensures composability and proper focus management when integrating with libraries like Radix and shadcn/ui.

Can I use compound component patterns to decide between configuration and composition?

Yes, compound component patterns help decide between configuration and composition by structuring related UI elements as nested sub-components. This enforces complete state coverage and prevents API drift while maintaining flexible layout composition.

When do I need an API consistency review for my design system components?

You need an API consistency review when creating new components or evaluating existing ones to prevent API drift. This review verifies prop naming conventions, forwardRef usage, and icon-system guidelines to ensure cross-project maintainability.

Does this approach work with Base UI and shadcn/ui component guidelines?

Yes, this approach explicitly aligns with Base UI and shadcn/ui component guidelines. It enforces icon-system conventions, forwardRef, and render delegation patterns to satisfy the accessibility and composability standards set by these libraries.