Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Design system token management, component API design, Storybook, and visual regression testing patterns
.claude/skills/component-library-patterns/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-14 | ✗→✓ | ▲ Improved | — | — |
| case-05 | ✓→✓ | = Same ✓ | — | — |
| case-22 | ✗→✗ | = Same ✗ | — | — |
| case-21 | ✗→✗ | = Same ✗ | — | — |
| case-11 | ✗→✗ | = Same ✗ | — | — |
typescript// tokens.ts - Single source of truth export const tokens = { color: { primary: { 50: '#eff6ff', 500: '#3b82f6', 900: '#1e3a5f' }, semantic: { success: '#22c55e', error: '#ef4444', warning: '#f59e0b' } }, spacing: { xs: '4px', sm: '8px', md: '16px', lg: '24px', xl: '32px' }, font: { size: { sm: '0.875rem', base: '1rem', lg: '1.125rem', xl: '1.25rem' }, weight: { normal: 400, medium: 500, semibold: 600, bold: 700 } }, radius: { sm: '4px', md: '8px', lg: '12px', full: '9999px' }, shadow: { sm: '0 1px 2px rgba(0,0,0,0.05)', md: '0 4px 6px rgba(0,0,0,0.1)' } } as const
typescript// Composition pattern > prop explosion // YANLIS: <Button icon="check" iconPosition="left" loading loadingText="..." /> // DOGRU: <Button> <Button.Icon><CheckIcon /></Button.Icon> <Button.Text>Save</Button.Text> <Button.Spinner /> </Button> // Polymorphic component interface ButtonProps<T extends ElementType = 'button'> { as?: T variant: 'primary' | 'secondary' | 'ghost' size: 'sm' | 'md' | 'lg' }
typescript// Component.stories.tsx const meta: Meta<typeof Button> = { component: Button, argTypes: { variant: { control: 'select', options: ['primary', 'secondary'] }, size: { control: 'radio', options: ['sm', 'md', 'lg'] } } } export const Playground: Story = { args: { variant: 'primary', children: 'Click' } } export const AllVariants: Story = { render: () => ( <div style={{ display: 'flex', gap: 8 }}> {(['primary', 'secondary', 'ghost'] as const).map(v => ( <Button key={v} variant={v}>{v}</Button> ))} </div> ) }
typescript// Chromatic veya Percy ile test('Button variants match snapshot', async ({ page }) => { await page.goto('/iframe.html?id=button--all-variants') await expect(page).toHaveScreenshot('button-variants.png', { maxDiffPixelRatio: 0.01 }) })
css/* CSS Custom Properties */ :root { --color-primary: #3b82f6; --color-bg: #ffffff; --color-text: #1f2937; } [data-theme="dark"] { --color-primary: #60a5fa; --color-bg: #111827; --color-text: #f9fafb; }
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +5 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.