From qe-framework
Creates DESIGN.md — the upstream design system specification (tokens, typography, spacing, component guidelines) for frontend projects. Supports scanning tailwind config to bootstrap from existing code.
How this skill is triggered — by the user, by Claude, or both
Slash command
/qe-framework:QdesignThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Creates `DESIGN.md` — the single source of truth for all frontend implementation in the project.
Creates DESIGN.md — the single source of truth for all frontend implementation in the project.
/Qfrontend-design for the first time.impeccable.md or existing design documentation/Qfrontend-design)/Qdesign-audit)/Qfrontend-design Step 0-S)Example 1: New project without existing codebase
/Qdesign
Starts from scratch with Step 0-2 (Ask the User) and Step 0-3 (Browse designmd.ai).
Example 2: Existing codebase with tailwind config
/Qdesign --scan
Auto-detects colors, spacing, and typography from tailwind.config.js, then uses as pre-filled defaults for Step 1.
Before defining any design decisions, understand the project.
DESIGN.md, .impeccable.md, tailwind.config.*, theme.*package.json for UI framework (React, Vue, Svelte, etc.) and CSS approach (Tailwind, CSS Modules, styled-components)If DESIGN.md already exists: Do NOT proceed to Step 1. Instead:
If .impeccable.md exists but no DESIGN.md: Suggest migrating to DESIGN.md format — .impeccable.md contains useful tokens but DESIGN.md is the canonical format used by all QE frontend skills.
Triggered when user invokes /Qdesign --scan (or argument --scan is present).
Behavior:
scan(projectRoot) from hooks/scripts/lib/design-scanner.mjstokens.colors, tokens.spacing, tokens.typography as pre-filled answers for Step 1 (Primary Colors, Spacing Scale, Typography)implicit array as hints for common utility classes already establishedWhen scan returns empty tokens (no tailwind, no theme):
Printed summary before asking:
Detected N color tokens, M spacing tokens, K font families, I implicit classes. Using as defaults — modify below.
Ask these questions — skip any already answered by existing assets:
Before defining tokens from scratch, check if a community design system fits the project:
https://designmd.ai — a community library of 100+ curated DESIGN.md filesSaaS, dashboard, clean, dark, landing, portfolio, e-commerce)Rules:
When the user provides reference URLs in Step 0-2 question #3, automatically extract design tokens from those live pages.
Prerequisites: Chrome MCP connection active (mcp__claude-in-chrome__* tools available). If Chrome MCP is not connected, skip this step and proceed to Step 1 with manual token definition.
Procedure:
mcp__claude-in-chrome__navigateskills/Qdesign/lib/extract-styles.js via mcp__claude-in-chrome__javascript_toolskills/Qdesign/lib/normalize-tokens.mjs's normalizeAll() functionExtracted from [URL]:
Colors:
Primary: [color] (oklch) — used [N] times
Secondary: [color] (oklch)
Accent: [color] (oklch)
Neutrals: [50..950 scale preview]
Typography:
Headings: [font-family]
Body: [font-family]
[Blacklist warnings if any]
Spacing: [base unit] with [N] scale steps detected
Border Radius: [dominant style]
Motion: [fast/normal/slow durations]
Site Profile: [surface type] for [audience type] (confidence: [N]%)
Multi-reference support: If multiple URLs provided, extract from each and merge:
Fallback: If Chrome MCP is unavailable or extraction fails, log a warning and continue with manual flow. Never block Qdesign on extraction failure.
Define the complete color palette:
## Colors
### Brand Colors
- Primary: [color] — used for CTAs, key actions, brand identity
- Secondary: [color] — used for supporting elements
- Accent: [color] — used for highlights, notifications, badges
### Neutral Scale
- 50 through 950 — background, surface, border, text hierarchy
### Semantic Colors
- Success / Warning / Error / Info — with light and dark variants
### Dark Mode (if applicable)
- Surface mapping: which neutrals invert, which stay
- Brand color adjustments for dark backgrounds
Rules:
Define the type system:
## Typography
### Font Stack
- Headings: [font-family] — [why this font]
- Body: [font-family] — [why this font]
- Mono: [font-family] — for code blocks
### Type Scale
- xs / sm / base / lg / xl / 2xl / 3xl / 4xl / 5xl
- Line heights per scale step
- Letter spacing adjustments
### Multi-script Support (if needed)
- CJK font: [font] with word-break: keep-all
- RTL considerations
Rules:
## Spacing
### Base Unit
- 4px (0.25rem) base unit
### Scale
- 0 / 1 / 2 / 3 / 4 / 5 / 6 / 8 / 10 / 12 / 16 / 20 / 24
### Layout
- Max content width: [value]
- Grid: [columns] columns with [gap] gap
- Container padding: [mobile] / [tablet] / [desktop]
### Breakpoints
- sm: 640px / md: 768px / lg: 1024px / xl: 1280px / 2xl: 1536px
- (or custom values matching the project's needs)
## Motion
### Duration Scale
- fast: 100ms — micro-interactions (hover, focus)
- normal: 200-300ms — transitions (expand, slide)
- slow: 400-500ms — entrance animations
### Easing
- default: cubic-bezier(0.4, 0, 0.2, 1)
- enter: cubic-bezier(0, 0, 0.2, 1)
- exit: cubic-bezier(0.4, 0, 1, 1)
### Rules
- Only animate transform and opacity (GPU-composited)
- Respect prefers-reduced-motion
## Components
### Border Radius
- none / sm / md / lg / xl / full
- Default for cards: [value]
- Default for buttons: [value]
- Default for inputs: [value]
### Shadows
- sm / md / lg / xl — defined per elevation level
- Dark mode shadow strategy
### States
- Hover: [approach — opacity, color shift, scale]
- Active/Pressed: [approach]
- Focus: [ring style, color, offset]
- Disabled: [opacity, cursor]
For each core component, define visual specifications:
| Component | Variants | Default Size | Notes |
|---|---|---|---|
| Button | primary, secondary, ghost, danger | md (h-10 px-4) | Icon-only variant available |
| Input | text, select, textarea, checkbox | md (h-10) | Error state with red border |
| Card | default, elevated, outlined | — | Consistent padding and radius |
| Badge | status, count, label | sm | Color matches semantic colors |
| Modal | sm, md, lg | md (max-w-lg) | Backdrop blur optional |
| Toast | success, error, warning, info | — | Auto-dismiss timing |
Define page-level structures:
Compile all decisions into a single DESIGN.md at the project root.
Structure:
# Design System — [Project Name]
> [One-line design philosophy]
## 1. Brand Identity
[Product description, personality, tone]
## 2. Colors
[Full palette from Step 1-1]
## 3. Typography
[Font stack and type scale from Step 1-2]
## 4. Spacing & Layout
[Spacing scale and layout rules from Step 1-3]
## 5. Motion
[Animation rules from Step 1-4]
## 6. Component Tokens
[Border radius, shadows, states from Step 1-5]
## 7. Component Guidelines
[Core and layout components from Step 2]
## 8. Accessibility
[WCAG level, contrast requirements, focus management]
## 9. Do / Don't
[Project-specific rules — what to always do, what to never do]
Validation before writing:
skills/Qdesign/lib/validate-design-md.mjs's validateContent() on the generated markdownValidation output format:
DESIGN.md Validation: [PASS/WARN/FAIL] (score: [N]/100)
Passed: [N] | Warned: [N] | Failed: [N]
[List of WARN/FAIL items with details]
After creating DESIGN.md, verify it works with the ecosystem:
tailwind.config.* exists, verify tokens match. If not, note that /Qfrontend-design Step 1-2 should generate config from DESIGN.mdAfter DESIGN.md is created, output:
DESIGN.md created at [path].
All frontend skills will now reference this file:
- /Qfrontend-design — reads DESIGN.md for tokens and guidelines
- Coding experts — follow component patterns defined here
- /Qdesign-audit — validates implementation against this spec
Next steps:
- Run /Qfrontend-design to start implementing components
- Run /Qdesign-audit after implementation to verify compliance
| Token | Where Defined | Used By |
|---|---|---|
| Colors | DESIGN.md > Colors | tailwind.config, component styles |
| Fonts | DESIGN.md > Typography | tailwind.config, global CSS |
| Spacing | DESIGN.md > Spacing | tailwind.config, layout components |
| Motion | DESIGN.md > Motion | tailwind.config, transition utilities |
| Components | DESIGN.md > Components | all UI implementation |
npx claudepluginhub inho-team/qe-framework --plugin qe-frameworkCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.