.claude/skills/component/SKILL.md
Design and test UI components using parallel ui-designer and tdd-guide agents
npx skillsauth add JubaKitiashvili/everything-react-native-expo componentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are executing the /component command. Run ui-designer and tdd-guide in parallel. One designs the component, the other writes tests.
import { View, Text, Pressable } from 'react-native';
interface CardProps {
title: string;
subtitle?: string;
onPress?: () => void;
variant?: 'default' | 'outlined' | 'elevated';
}
export function Card({ title, subtitle, onPress, variant = 'default' }: CardProps) {
return (
<Pressable
onPress={onPress}
className={cn(
'rounded-2xl p-4',
variant === 'default' && 'bg-card',
variant === 'outlined' && 'border border-border bg-transparent',
variant === 'elevated' && 'bg-card shadow-md',
)}
>
<Text className="text-lg font-semibold text-foreground">{title}</Text>
{subtitle && (
<Text className="mt-1 text-sm text-muted-foreground">{subtitle}</Text>
)}
</Pressable>
);
}
accessibilityRole, accessibilityLabel, accessibilityStatePlatform.select or NativeWind responsive for platform differencesWrite comprehensive tests alongside the component:
import { render, screen, fireEvent } from '@testing-library/react-native';
import { Card } from './Card';
describe('Card', () => {
it('renders title', () => {
render(<Card title="Test Title" />);
expect(screen.getByText('Test Title')).toBeTruthy();
});
it('renders subtitle when provided', () => {
render(<Card title="Title" subtitle="Subtitle" />);
expect(screen.getByText('Subtitle')).toBeTruthy();
});
it('hides subtitle when not provided', () => {
render(<Card title="Title" />);
expect(screen.queryByText('Subtitle')).toBeNull();
});
it('calls onPress when tapped', () => {
const onPress = jest.fn();
render(<Card title="Title" onPress={onPress} />);
fireEvent.press(screen.getByText('Title'));
expect(onPress).toHaveBeenCalledTimes(1);
});
it('applies variant styles', () => {
// Test each variant renders correctly
});
});
development
Guided version migration for React Native and Expo SDK upgrades
development
Test-driven development workflow for React Native — Jest, React Native Testing Library, and Detox
development
Mobile security audit for React Native applications
development
Step-by-step performance diagnosis and optimization for React Native apps