Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 Design System Generator

One color in β†’ Full design system out

An AI agent skill that generates a complete, production-ready design system from a single brand color. Works with Antigravity Β· Claude Code Β· Cursor Β· Codex Β· Trae and any agent supporting the Agent Skills standard.

License: Apache 2.0 Agent Skills PRs Welcome

English Β· δΈ­ζ–‡


✨ Features

Feature Description
🎯 One Color Input Just provide a hex color β€” everything else is derived algorithmically
🌈 OKLCH Color System Perceptually uniform palettes with 10-step scales + semantic colors
πŸ“ W3C Design Tokens Output follows the W3C Design Tokens spec ($value/$type format)
πŸŒ— Light & Dark Themes Automatic dual-theme support via light-dark() + [data-theme]
🧩 11 Components Button, Card, Input, Badge, Alert, Avatar, Skeleton, Tooltip, Modal, Navbar, Divider
β™Ώ WCAG 2.2 AA All color combinations validated for accessibility contrast ratios
πŸ–₯️ Live Preview Self-contained HTML page to visualize your entire design system
πŸ”Œ Multi-Agent Works with Antigravity, Claude Code, Cursor, Codex, Trae, and more
0️⃣ Zero Dependencies Pure CSS custom properties β€” no preprocessors, no frameworks

πŸš€ Quick Start

1. Install

Antigravity / Gemini CLI

Copy this repository to your plugins directory:

macOS / Linux:

git clone https://github.com/XINGANLIU/design-system-generator-skill.git
cp -r design-system-generator-skill ~/.gemini/config/plugins/design-system-generator

Windows (PowerShell):

git clone https://github.com/XINGANLIU/design-system-generator-skill.git
Copy-Item -Recurse design-system-generator-skill "$env:USERPROFILE\.gemini\config\plugins\design-system-generator"
Claude Code

Clone into your project, then use the /design-system command:

git clone https://github.com/XINGANLIU/design-system-generator-skill.git .design-system-generator

The .claude/commands/design-system.md file enables the /design-system slash command.

Cursor

Clone into your project root. The .cursorrules file is automatically detected:

git clone https://github.com/XINGANLIU/design-system-generator-skill.git .
Codex / Other Agents

Clone and reference the AGENTS.md file or skills/design-system-generator/SKILL.md:

git clone https://github.com/XINGANLIU/design-system-generator-skill.git

2. Use

Just ask your AI agent:

Generate a design system with brand color #6366f1

Or be more specific:

Create a design system using coral (#f97316) with Outfit font and pill-shaped buttons

3. Get Your Design System

The agent will generate these files in your project:

design-system/
β”œβ”€β”€ tokens.json       # W3C Design Tokens (machine-readable)
β”œβ”€β”€ tokens.css        # CSS Custom Properties (import this!)
β”œβ”€β”€ components.css    # Ready-to-use component styles
└── preview.html      # Open in browser to preview

4. Use in Your Project

<head>
  <link rel="stylesheet" href="design-system/tokens.css">
  <link rel="stylesheet" href="design-system/components.css">
</head>
<body>
  <button class="btn btn--primary">Get Started</button>
</body>

πŸ—οΈ How It Works

The skill follows a structured 5-phase workflow:

graph LR
    A["🎨 Brand Input"] --> B["🌈 Color System"]
    B --> C["πŸ“ Token Architecture"]
    C --> D["🧩 Component Styles"]
    D --> E["πŸ–₯️ Preview & Deliver"]

    style A fill:#6366f1,color:#fff
    style B fill:#8b5cf6,color:#fff
    style C fill:#a78bfa,color:#fff
    style D fill:#c4b5fd,color:#1a1a2e
    style E fill:#e9d5ff,color:#1a1a2e
Loading
Phase What Happens
1. Brand Input Collect brand color, font, border-radius style, density preference
2. Color System Generate OKLCH palettes: primary (10 steps), neutral (10 steps), semantic (4 colors Γ— 5 variants)
3. Token Architecture Output W3C Design Tokens JSON + CSS custom properties with light/dark semantic mappings
4. Component Styles Generate 11 components with variants, states, hover/focus animations, accessibility
5. Preview & Deliver Create a visual preview HTML page with theme toggle

πŸ“ Project Structure

design-system-generator/
β”œβ”€β”€ plugin.json                              # Antigravity plugin metadata
β”œβ”€β”€ .cursorrules                             # Cursor adapter
β”œβ”€β”€ AGENTS.md                                # Codex adapter
β”œβ”€β”€ .claude/commands/design-system.md        # Claude Code adapter
β”œβ”€β”€ .trae/rules/design-system.md             # Trae adapter
β”œβ”€β”€ skills/
β”‚   └── design-system-generator/
β”‚       β”œβ”€β”€ SKILL.md                         # 🧠 Core instructions
β”‚       β”œβ”€β”€ references/
β”‚       β”‚   β”œβ”€β”€ color-system.md              # OKLCH algorithm
β”‚       β”‚   β”œβ”€β”€ typography-scale.md          # Font scales
β”‚       β”‚   β”œβ”€β”€ spacing-system.md            # Spacing & layout
β”‚       β”‚   β”œβ”€β”€ component-patterns.md        # Component CSS patterns
β”‚       β”‚   └── dark-mode-guide.md           # Theme implementation
β”‚       └── templates/
β”‚           β”œβ”€β”€ tokens.json.tmpl             # Token template
β”‚           β”œβ”€β”€ tokens.css.tmpl              # CSS template
β”‚           β”œβ”€β”€ components.css.tmpl          # Component template
β”‚           └── preview.html.tmpl            # Preview template
β”œβ”€β”€ examples/
β”‚   β”œβ”€β”€ ocean-blue/                          # Example: #3b82f6
β”‚   └── sunset-coral/                        # Example: #f97316
β”œβ”€β”€ README.md
β”œβ”€β”€ README_CN.md
└── LICENSE

🎨 Examples

Ocean Blue (#3b82f6)

Preview the generated color palette

The Ocean Blue theme uses OKLCH hue 265Β° to generate a cool, professional palette:

Step Value Usage
50 oklch(97% 0.022 265) Subtle background
500 oklch(62% 0.220 265) Brand color
950 oklch(18% 0.088 265) Near-black tinted

Open examples/ocean-blue/preview.html in your browser to see the full design system.

Sunset Coral (#f97316)

Preview the generated color palette

The Sunset Coral theme uses OKLCH hue 55Β° for a warm, vibrant palette:

Step Value Usage
50 oklch(97% 0.020 55) Subtle background
500 oklch(72% 0.200 55) Brand color
950 oklch(22% 0.080 55) Near-black tinted

Open examples/sunset-coral/preview.html in your browser to see the full design system.


🧩 Generated Components

All components are production-ready with:

  • βœ… Multiple variants and sizes
  • βœ… Hover, focus, active, and disabled states
  • βœ… Micro-animations and transitions
  • βœ… Keyboard accessibility (focus-visible)
  • βœ… Automatic Light/Dark theme support
  • βœ… Zero hardcoded values β€” 100% token-based
Component Variants Interactive States
.btn primary, secondary, ghost, danger + sizes hover, focus, active, disabled
.card elevated, outlined, filled hover lift/border
.input default, error, disabled focus ring, validation
.badge primary, success, warning, danger, neutral β€”
.alert info, success, warning, danger dismissible
.avatar sm, md, lg β€”
.skeleton text, circle, rect shimmer animation
.tooltip β€” hover reveal
.modal β€” open/close animation
.navbar β€” sticky, blur backdrop
.divider horizontal, vertical β€”

πŸ”Œ Multi-Agent Compatibility

This skill is designed to work across all major AI coding agents:

Agent Adapter File How It Works
Antigravity plugin.json + skills/ Native plugin β€” auto-detected
Claude Code .claude/commands/design-system.md Use /design-system command
Cursor .cursorrules Auto-loaded as project rules
Codex AGENTS.md Auto-loaded as agent instructions
Trae .trae/rules/design-system.md Auto-loaded as project rules
Others skills/.../SKILL.md Reference SKILL.md directly

🀝 Contributing

Contributions are welcome! You can help by:

  • 🎨 Adding new component patterns to references/component-patterns.md
  • 🌍 Adding new example themes to examples/
  • πŸ”§ Improving the OKLCH color generation algorithm
  • πŸ“ Enhancing documentation and translations
  • πŸ› Reporting issues or suggesting features

See CONTRIBUTING.md for detailed guidelines.


πŸ“„ License

Apache 2.0 β€” Created by XINGANLIU


One color in β†’ Full design system out 🎨

If this skill helps you, give it a ⭐ on GitHub!

About

🎨 One color in β†’ Full design system out. AI agent skill for generating production-ready design systems.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages