add-component

Scaffold QDS component files with compound patterns and Vitest tests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) components.

What problem does it solve?

This Skill automates the creation of new UI components for the Qwik Design System (QDS), ensuring adherence to established patterns, naming conventions, and testing setups.

Core Features & Use Cases

  • Component Scaffolding: Generates necessary files (root, trigger, label, tests) for new components.
  • Pattern Enforcement: Enforces QDS compound component patterns, API naming conventions, and state management with useBindings.
  • Testing Integration: Sets up Vitest browser tests with appropriate locators and structure.
  • Use Case: When adding a new Tooltip component to the design system, use this skill to generate the Tooltip.Root, Tooltip.Trigger, and Tooltip.Content files, along with its corresponding browser tests.

Quick Start

Use the add-component skill to scaffold a new 'Avatar' component.

Frequently Asked Questions about add-component

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

FAQPage Schema
How do I scaffold a new Qwik component following design system patterns?

Scaffolding a new Qwik component involves generating root, trigger, and label files that enforce compound component patterns and API naming conventions. It automates file creation to ensure components integrate with useBindings state management.

What is the compound component pattern in a Qwik design system?

The compound component pattern structures a UI element into sub-components like Root, Trigger, and Content. This approach manages shared state via useBindings, ensuring consistent APIs and predictable rendering across the Qwik design system.

How do I set up Vitest browser tests for a new UI component?

Setting up Vitest browser tests involves generating a test file with appropriate locators and deterministic task structures alongside the component files. This ensures new UI elements are validated correctly within the browser environment.

Can I generate multiple sub-components like Root and Trigger at the same time?

Yes, generating multiple sub-components like Root and Trigger simultaneously is supported. The scaffolding process creates all necessary compound component files and their corresponding browser tests in one operation.

Does component scaffolding integrate state management automatically?

Yes, component scaffolding integrates state management automatically by utilizing the useBindings hook. This ensures newly generated Qwik components maintain consistent state handling across their compound structure.

What are the limitations of automatically generated component files?

Automatically generated component files provide foundational structure, naming conventions, and test setup, but require manual implementation of custom UI logic, specific styling, and complex interactive behaviors beyond the initial scaffold.