klh-core-components

Enforces design tokens and core component usage when building UI layouts.

1|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/klh/skills --skill klh-core-components-klh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: klh-core-components
Source: https://github.com/klh/skills/tree/main/.well-known/agent-skills/klh-core-components
Command: npx skills add https://github.com/klh/skills --skill klh-core-components-klh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? UI code often drifts into hard-coded spacing, colors, and raw platform components, producing inconsistent styling across screens. This Skill enforces a design-token-first approach and a shared core component library so every screen follows the same design system. ## Core Features & Use Cases - Design Token Enforcement: Provides spacing, color, and typography token tables (e.g., $4, $textPrimary, $lg) and flags hard-coded values as mistakes. - Core Component Reference: Documents Box, HStack/VStack, Text, Button, Input, and Card with prop patterns and variants. - Layout Patterns: Supplies ready-made screen, form, and list-item layout templates using core components. - Use Case: When building a new profile screen, the agent composes it from Screen, VStack, Input, and Button components with token-based props instead of raw View elements and inline styles. ## Quick Start Ask the agent to build a settings screen using the core component library with design tokens for all spacing and colors.

Frequently Asked Questions about klh-core-components

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

FAQPage Schema
How do I use design tokens instead of hard-coded values in React components?

Replace numeric and hex values with token props such as padding="$4", color="$textPrimary", and fontSize="$lg". Tokens map to a central scale (e.g., $4 equals 16px), so spacing and colors stay consistent across every screen.

What components are in a core component library for UI development?

The library includes Box for layout, HStack and VStack for flex arrangements, Text for typography, Button with solid/outline/ghost/link variants, Input with validation support, and Card for content containers.

Should I use raw View and Text from react-native or wrapper components?

Use wrapper components like Box and Text from the core library instead of raw react-native primitives. Wrappers accept design token props, guaranteeing consistent styling and centralizing future design changes.

How do I build a form layout with design system components?

Compose a VStack with gap and padding tokens, place labeled Input components for each field, and finish with a Button showing a loading state. This pattern keeps spacing uniform and validation errors consistent.

When should I not use design tokens in a component?

Tokens cover standard spacing, color, and typography scales, so one-off values outside the scale may need a new token added to the theme rather than a hard-coded exception. Avoid bypassing tokens, since it breaks design consistency.