core-components
Core component library and design system patterns. Use when building UI, using design tokens, or working with the component library.
About this skill
This skill provides AI agents with a comprehensive guide to generating user interface code that strictly follows an organization's core design system. It emphasizes the use of pre-defined UI components and a robust system of design tokens for styling, ensuring visual consistency, brand adherence, and maintainability across all generated interfaces. Agents are instructed to prioritize design tokens for spacing, colors, and other stylistic properties, explicitly forbidding hard-coded values to promote scalable and consistent UI development. This skill acts as an internal style guide for AI agents tasked with frontend development.
Best use case
Generating UI code snippets that match a corporate design system; Ensuring consistent styling and branding in AI-generated frontend code; Automating the creation of new UI features or components following established patterns and guidelines; Enforcing the use of design tokens for all stylistic properties.
Core component library and design system patterns. Use when building UI, using design tokens, or working with the component library.
Clean, consistent, and maintainable UI code that fully complies with the defined design system and utilizes established design tokens; Reduction in design inconsistencies and hard-coded values in generated UI; Faster development cycles for new UI features that are automatically compliant with design standards.
Practical example
Example input
Generate a `Box` component that has padding `$4` on all sides and a bottom margin of `$2`. Also, ensure its background color is set using the `$color-primary-500` token.
Example output
```tsx
import { Box } from '@core-components'; // Assuming 'Box' is part of the core component library
const MyStyledComponent = () => {
return (
<Box
padding="$4"
marginBottom="$2"
backgroundColor="$color-primary-500" // Assuming this token is defined within the design system
>
{/* Content for the box */}
</Box>
);
};
```When to use this skill
- When an AI agent is tasked with generating or modifying user interface code; When the UI code needs to adhere to a specific design system or component library; When styling properties (like padding, margins, colors, typography) need to be applied using pre-defined design tokens; When ensuring visual consistency and brand alignment in AI-generated code is critical.
When not to use this skill
- When generating non-UI related code or content; When the task does not involve frontend development or design system adherence; When directly manipulating raw DOM elements or applying inline styles without tokenization is explicitly required (which should be a rare exception); When the generated UI does not need to conform to any specific design system.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/core-components/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How core-components Compares
| Feature / Agent | core-components | Standard Approach |
|---|---|---|
| Platform Support | Claude | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | easy | N/A |
Frequently Asked Questions
What does this skill do?
Core component library and design system patterns. Use when building UI, using design tokens, or working with the component library.
Which AI agents support this skill?
This skill is designed for Claude.
How difficult is it to install?
The installation complexity is rated as easy. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Core Components
## Design System Overview
Use components from your core library instead of raw platform components. This ensures consistent styling and behavior.
## Design Tokens
**NEVER hard-code values. Always use design tokens.**
### Spacing Tokens
```tsx
// CORRECT - Use tokens
<Box padding="$4" marginBottom="$2" />
// WRONG - Hard-coded values
<Box padding={16} marginBottom={8} />
```
| Token | Value |
|-------|-------|
| `$1` | 4px |
| `$2` | 8px |
| `$3` | 12px |
| `$4` | 16px |
| `$6` | 24px |
| `$8` | 32px |
### Color Tokens
```tsx
// CORRECT - Semantic tokens
<Text color="$textPrimary" />
<Box backgroundColor="$backgroundSecondary" />
// WRONG - Hard-coded colors
<Text color="#333333" />
<Box backgroundColor="rgb(245, 245, 245)" />
```
| Semantic Token | Use For |
|----------------|---------|
| `$textPrimary` | Main text |
| `$textSecondary` | Supporting text |
| `$textTertiary` | Disabled/hint text |
| `$primary500` | Brand/accent color |
| `$statusError` | Error states |
| `$statusSuccess` | Success states |
### Typography Tokens
```tsx
<Text fontSize="$lg" fontWeight="$semibold" />
```
| Token | Size |
|-------|------|
| `$xs` | 12px |
| `$sm` | 14px |
| `$md` | 16px |
| `$lg` | 18px |
| `$xl` | 20px |
| `$2xl` | 24px |
## Core Components
### Box
Base layout component with token support:
```tsx
<Box
padding="$4"
backgroundColor="$backgroundPrimary"
borderRadius="$lg"
>
{children}
</Box>
```
### HStack / VStack
Horizontal and vertical flex layouts:
```tsx
<HStack gap="$3" alignItems="center">
<Icon name="user" />
<Text>Username</Text>
</HStack>
<VStack gap="$4" padding="$4">
<Heading>Title</Heading>
<Text>Content</Text>
</VStack>
```
### Text
Typography with token support:
```tsx
<Text
fontSize="$lg"
fontWeight="$semibold"
color="$textPrimary"
>
Hello World
</Text>
```
### Button
Interactive button with variants:
```tsx
<Button
onPress={handlePress}
variant="solid"
size="md"
isLoading={loading}
isDisabled={disabled}
>
Click Me
</Button>
```
| Variant | Use For |
|---------|---------|
| `solid` | Primary actions |
| `outline` | Secondary actions |
| `ghost` | Tertiary/subtle actions |
| `link` | Inline actions |
### Input
Form input with validation:
```tsx
<Input
value={value}
onChangeText={setValue}
placeholder="Enter text"
error={touched ? errors.field : undefined}
label="Field Name"
/>
```
### Card
Content container:
```tsx
<Card padding="$4" gap="$3">
<CardHeader>
<Heading size="sm">Card Title</Heading>
</CardHeader>
<CardBody>
<Text>Card content</Text>
</CardBody>
</Card>
```
## Layout Patterns
### Screen Layout
```tsx
const MyScreen = () => (
<Screen>
<ScreenHeader title="Page Title" />
<ScreenContent padding="$4">
{/* Content */}
</ScreenContent>
</Screen>
);
```
### Form Layout
```tsx
<VStack gap="$4" padding="$4">
<Input label="Name" {...nameProps} />
<Input label="Email" {...emailProps} />
<Button isLoading={loading}>Submit</Button>
</VStack>
```
### List Item Layout
```tsx
<HStack
padding="$4"
gap="$3"
alignItems="center"
borderBottomWidth={1}
borderColor="$borderLight"
>
<Avatar source={{ uri: imageUrl }} size="md" />
<VStack flex={1}>
<Text fontWeight="$semibold">{title}</Text>
<Text color="$textSecondary" fontSize="$sm">{subtitle}</Text>
</VStack>
<Icon name="chevron-right" color="$textTertiary" />
</HStack>
```
## Anti-Patterns
```tsx
// WRONG - Hard-coded values
<View style={{ padding: 16, backgroundColor: '#fff' }}>
// CORRECT - Design tokens
<Box padding="$4" backgroundColor="$backgroundPrimary">
// WRONG - Raw platform components
import { View, Text } from 'react-native';
// CORRECT - Core components
import { Box, Text } from 'components/core';
// WRONG - Inline styles
<Text style={{ fontSize: 18, fontWeight: '600' }}>
// CORRECT - Token props
<Text fontSize="$lg" fontWeight="$semibold">
```
## Component Props Pattern
When creating components, use token-based props:
```tsx
interface CardProps {
padding?: '$2' | '$4' | '$6';
variant?: 'elevated' | 'outlined' | 'filled';
children: React.ReactNode;
}
const Card = ({ padding = '$4', variant = 'elevated', children }: CardProps) => (
<Box
padding={padding}
backgroundColor="$backgroundPrimary"
borderRadius="$lg"
{...variantStyles[variant]}
>
{children}
</Box>
);
```
## Integration with Other Skills
- **react-ui-patterns**: Use core components for UI states
- **testing-patterns**: Mock core components in tests
- **storybook**: Document component variants
## When to Use
This skill is applicable to execute the workflow or actions described in the overview.Related Skills
new-rails-project
Create a new Rails project
makepad-widgets
Version: makepad-widgets (dev branch) | Last Updated: 2026-01-19 > > Check for updates: https://crates.io/crates/makepad-widgets
makepad-splash
CRITICAL: Use for Makepad Splash scripting language. Triggers on: splash language, makepad script, makepad scripting, script!, cx.eval, makepad dynamic, makepad AI, splash 语言, makepad 脚本
makepad-dsl
CRITICAL: Use for Makepad DSL syntax and inheritance. Triggers on: makepad dsl, live_design, makepad inheritance, makepad prototype, "<Widget>", "Foo = { }", makepad object, makepad property, makepad DSL 语法, makepad 继承, makepad 原型, 如何定义 makepad 组件
javascript-typescript-typescript-scaffold
You are a TypeScript project architecture expert specializing in scaffolding production-ready Node.js and frontend applications. Generate complete project structures with modern tooling (pnpm, Vite, N
frontend-ui-dark-ts
A modern dark-themed React UI system using Tailwind CSS and Framer Motion. Designed for dashboards, admin panels, and data-rich applications with glassmorphism effects and tasteful animations.
frontend-mobile-development-component-scaffold
You are a React component architecture expert specializing in scaffolding production-ready, accessible, and performant components. Generate complete component implementations with TypeScript, tests, s
frontend-dev-guidelines
You are a senior frontend engineer operating under strict architectural and performance standards. Use when creating components or pages, adding new features, or fetching or mutating data.
fp-backend
Functional programming patterns for Node.js/Deno backend development using fp-ts, ReaderTaskEither, and functional dependency injection
fastapi-templates
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
fastapi-router-py
Create FastAPI routers following established patterns with proper authentication, response models, and HTTP status codes.
dotnet-backend
Build ASP.NET Core 8+ backend services with EF Core, auth, background jobs, and production API patterns.