Skip to main content
skill CX Codex

generic-design-system — Claude Code skill: setup and features

generic-design-system provides standard design system guidelines for AI coding agents, covering color tokens, typography, spacing scales, and component states.

MIT 143 installs ★ 114 updated 2026-10-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add travisjneuman/.claude --skill generic-design-system -a claude-code
Open on GitHub

What generic-design-system does

This skill injects consistent interface guidelines into the agent's workflow. It establishes a three-tier token hierarchy, separating raw primitive values from semantic variables used in application code. The reference includes typographic scales from 14px to 24px, a 4px or 8px spacing base, WCAG AA contrast targets, and responsive breakpoints from 640px to 1280px.

For motion, the skill limits transitions to GPU-accelerated properties (transform and opacity), ruling out layout shifts through width or margin. For UX flow design or feature scaffolding, the reference delegates to dedicated companion skills like generic-ux-designer.

What it helps with

  • Set up semantic tokens for light and dark modes
  • Enforce minimum 44x44px touch targets on interactive controls
  • Standardize typography scales and spacing units
  • Implement modal overlays and button interaction states

Example prompts for the agent

  • Define a semantic color palette meeting 4.5:1 contrast for body text
  • Build a button component with hover, active, focus, and loading states
  • Create a card transition using transform and opacity at 200ms

How to install generic-design-system

1Skills CLI (Vercel)

npx skills add travisjneuman/.claude --skill generic-design-system -a claude-code

2Manually: put the files in place

~/.claude/skills/generic-design-system/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/generic-design-system/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about generic-design-system

How do I install generic-design-system in Claude Code?

Run npx skills add travisjneuman/.claude --skill generic-design-system -a claude-code.

What does generic-design-system do?

It provides design tokens, spacing rules, typography scales, accessibility guidelines, and component states for your user interface.

Which animation properties does the skill allow?

It restricts animations to transform and opacity to maintain GPU acceleration, avoiding layout properties like width, height, and margin.

Source text

SKILL.md · MIT
---
name: generic-design-system
description: Complete design system reference for any project - colors, typography, spacing, components, animations. Adapts to project theme and tech stack. Use when implementing UI, choosing colors, creating animations, or ensuring brand consistency. For new design systems, use ui-research skill first.
---

# Generic Design System

Design system reference adapting to any project's visual language.

## Research First for New Systems

When creating a NEW design system (not following an existing one):

```
Skill(ui-research)  # Research modern patterns first
```

**References:**

- [UI Inspiration Sources](../_shared/UI_INSPIRATION_SOURCES.md) - Research sources
- [Design Patterns](../_shared/DESIGN_PATTERNS.md) - Visual tokens

## When to Use This Skill

**Use for:**

- Implementing UI components
- Choosing colors or typography
- Creating animations or transitions
- Ensuring visual consistency
- Setting up design tokens
- Reviewing design system compliance

**Don't use when:**

- UX flow design → use `generic-ux-designer`
- Feature architecture → use `generic-feature-developer`
- Code quality review → use `generic-code-reviewer`

## Design System Architecture

### When to Build vs Reference

| Situation              | Action                                  |
| ---------------------- | --------------------------------------- |
| Existing design system | Follow it strictly                      |
| No design system       | Use this skill to establish foundations |
| Partial system         | Identify gaps, extend consistently      |

### Token Organization

| Layer     | Example               | Purpose    |
| --------- | --------------------- | ---------- |
| Primitive | `--color-blue-500`    | Raw values |
| Semantic  | `--color-primary`     | Meaning    |
| Component | `--button-background` | Context    |

**Decision:** Use semantic tokens in code, primitive tokens as foundation only.

### Consistency Decision Tree

1. **Component exists?** → Use existing pattern
2. **Similar exists?** → Adapt existing (don't create competing pattern)
3. **New category?** → Propose to user, document reasoning

## Color System

**Every project should define:**

- Primary, Secondary, Accent
- Background, Foreground, Muted
- Destructive, Success, Warning

### Contrast Requirements

| Use Case      | Minimum    |
| ------------- | ---------- |
| Body text     | 4.5:1 (AA) |
| Large text    | 3:1 (AA)   |
| UI components | 3:1 (AA)   |

## Typography

### Font Stack

```css
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
--font-mono: "SF Mono", Monaco, "Courier New", monospace;
```

### Type Scale

| Name | Size | Use             |
| ---- | ---- | --------------- |
| sm   | 14px | Secondary text  |
| base | 16px | Body text       |
| lg   | 18px | Lead paragraphs |
| xl   | 20px | Section headers |
| 2xl  | 24px | Page headers    |

## Spacing System

**Base unit:** 4px or 8px

| Token | 4px Base | Use           |
| ----- | -------- | ------------- |
| 1     | 4px      | Tight spacing |
| 2     | 8px      | Default gap   |
| 4     | 16px     | Card padding  |
| 6     | 24px     | Page margins  |

## Animation

### GPU-Accelerated Only

**DO animate:** `transform`, `opacity`
**AVOID:** `width`, `height`, `top`, `left`, `margin`, `padding`

### Duration

| Token   | Duration | Use                |
| ------- | -------- | ------------------ |
| fast    | 100ms    | Micro-interactions |
| DEFAULT | 200ms    | Most transitions   |
| slow    | 300ms    | Complex animations |

### Timing

```css
--ease-default: cubic-bezier(0.4, 0, 0.2, 1);
--ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
```

## Components

### Component States

| State    | Visual Treatment  | Example                 |
| -------- | ----------------- | ----------------------- |
| Default  | Base styling      | Normal button           |
| Hover    | Subtle feedback   | Lighter/darker bg       |
| Active   | Pressed state     | Scaled down slightly    |
| Focus    | Visible outline   | 2px ring, offset        |
| Disabled | Reduced opacity   | 50% opacity, no pointer |
| Loading  | Spinner/skeleton  | Button with spinner     |
| Error    | Destructive color | Red border/text         |

### Touch Targets

- **Minimum:** 44x44px (WCAG 2.1 AAA)
- **Spacing:** 8px between adjacent targets
- **Mobile:** Consider 48x48px for primary actions

### Buttons

| Variant     | Use                 | Min Size |
| ----------- | ------------------- | -------- |
| Primary     | Main actions        | 44x44px  |
| Secondary   | Alternative actions | 44x44px  |
| Ghost       | Subtle actions      | 44x44px  |
| Destructive | Delete actions      | 44x44px  |

### Form Inputs

- Clear focus states (2px visible ring)
- Error states with messages
- Label always visible
- Required indicator

### Modals

- Focus trapped inside
- Escape to close
- Dark overlay (50-70% opacity)

## Responsive Breakpoints

| Token | Min Width |
| ----- | --------- |
| sm    | 640px     |
| md    | 768px     |
| lg    | 1024px    |
| xl    | 1280px    |

## Dark Mode

```css
:root {
  --background: #ffffff;
  --foreground: #000000;
}
[data-theme="dark"] {
  --background: #000000;
  --foreground: #ffffff;
}
```

## See Also

- [Design Patterns](./../_shared/DESIGN_PATTERNS.md) - Atomic Design, tokens, component docs
- [Code Review Standards](./../_shared/CODE_REVIEW_STANDARDS.md) - Accessibility checks
- `generic-ux-designer` - For UX flow and research decisions
- Project `CLAUDE.md` - Project-specific design constraints

**READ references when:**

- Setting up new design system → DESIGN_PATTERNS.md (full structure)
- Complex component patterns → DESIGN_PATTERNS.md (Atomic Design section)

© travisjneuman · MIT · travisjneuman/.claude

Similar skills

All skills for Design →

From the same set117

The whole set →
performance-engineering performance-engineering — a skill for Claude Code designed for full-stack web application performance optimization. Activates when Core Web Vitals drop, bundle sizes increase, or page response times degrade. CX Codex +1 144installs authentication-patterns authentication-patterns — a Claude Code skill for authentication and authorization patterns. It comes into play when building login flows, MFA, SSO, or access-control models. CX Codex +1 144installs i18n-localization The i18n-localization Claude Code skill guides internationalization and localization work. It activates for translation setup, locale-specific formatting, and adapting an app for multiple regions. CX Codex +1 143installs vue-development vue-development — a Claude Code skill for building Vue 3 applications with the Composition API and Script Setup. Guides state setup in Pinia, custom composables, and Nuxt 3 full-stack tasks. CX Codex +1 143installs event-driven-architecture The event-driven-architecture skill guides asynchronous system design around brokers, event flows, and distributed work. Use it when services must communicate through messages. CX Codex +1 143installs content-repurposer content-repurposer turns one piece of writing into a thread, a LinkedIn post, a carousel or a newsletter, and shifts the tone to match the channel. CX Codex +1 142installs generic-feature-developer generic-feature-developer walks a feature from reading the codebase to picking patterns, shipping small commits and checking edge cases before you close it. CX Codex +1 142installs generic-fullstack-design-system generic-fullstack-design-system is a Claude Code skill that helps configure design systems for Next.js and NestJS full-stack projects, including Tailwind tokens, shadcn/ui components, and dark mode. CX Codex +1 142installs

Project sponsors

Companies that keep this analytics open