/cf-design
Design UI with intent and consistency: $ARGUMENTS
Modes
Three modes, triggered by the first word of $ARGUMENTS:
| Invocation |
Mode |
Purpose |
/cf-design scan [path] |
Scan |
Read existing UI files → extract design patterns → save to docs/DESIGN.md |
/cf-design [description] |
Design |
Implement new UI from the user's description, using existing patterns as a base |
/cf-design modify [what] -- [how] |
Modify |
Change a specific UI element, enforcing consistency with existing patterns |
If $ARGUMENTS is empty, ask the user which mode they want and what their goal is.
Step 0: Custom Guide
bash "<plugin-root>/lib/load-custom-guide.sh" cf-design
If the block above printed anything, apply only the ## Before, ## Rules, and ## After sections; if it shows the raw command instead of output, re-run that exact load-custom-guide.sh fence now.
Step 0.5: Load Existing Design Context
Run: bash "<plugin-root>/skills/cf-design/scripts/load-design-context.sh"
- If
DESIGN.md exists: read it now and keep it in working memory for all subsequent steps. This is the project's source of truth for visual style.
- If not found: note that patterns are unknown and will either be extracted (scan mode) or defined fresh.
Step 1: Determine Mode
Parse $ARGUMENTS:
- Empty → ask the user: "What would you like to do? (a) scan existing UI patterns, (b) design something new, or (c) modify a specific element?"
- First word is
scan (case-insensitive) → Scan mode (Step 2)
- First word is
modify (case-insensitive) → Modify mode (Step 4)
- Anything else → Design mode (Step 3)
Step 2: Scan Mode
Goal: understand the project's visual DNA and write it down so every future design decision can be consistent.
Determine scope: use the path from $ARGUMENTS (after "scan") if provided. Default: look in src/, app/, components/, styles/, or wherever UI files live in this project.
Read the design styles reference to calibrate what you're looking for:
Read: <plugin-root>/skills/cf-design/scripts/design-styles.md
Scan UI files — look for and extract:
- Colors: hex/rgb/hsl values, CSS custom properties (
--color-*), Tailwind color classes, theme objects. Group into: primary, secondary/accent, neutral/surface, semantic (success/error/warning).
- Typography: font families, size scale, weight usage, line-height, letter-spacing. Note any heading/body/mono split.
- Spacing: recurring gap/padding/margin values. Identify the base unit (4px? 8px? rem-based?).
- Shape: border-radius values, shadow definitions, outline styles.
- Motion: transition durations, easing functions, animation names.
- Layout patterns: grid columns, max-widths, breakpoints, container widths.
- Component patterns: how buttons, cards, inputs, badges, navbars are styled. Note variations (primary vs ghost button, etc.).
- Dark/light mode: how it's implemented (class-based, media query, CSS vars).
- Overall style: use
design-styles.md to identify the closest matching style(s) and confidence.
Show findings summary — display the detected design system in this format:
## Detected Design System
**Style**: [e.g., "Minimalist Dark with subtle glassmorphism — high confidence"]
**Colors**
- Primary: #... (used for CTA, links)
- ...
**Typography**
- Headings: [font], weights [bold/semibold]
- Body: [font], size [base], leading [...]
- ...
**Spacing base**: [4px / 8px / 0.25rem / ...]
**Components**
- Buttons: [description]
- Cards: [description]
- ...
**Notes**: [any unique patterns, inconsistencies, or surprises]
Save immediately to {docsDir}/DESIGN.md using the format above — no confirmation needed before writing.
After saving, ask: "I've saved DESIGN.md. Anything you'd like to adjust or add?" — if the user requests changes, update the file accordingly. Otherwise, proceed to step 7.
Suggest running /cf-remember to index this file so it can be recalled in future sessions.
Step 3: Design Mode
Goal: implement intentional, project-consistent UI from a description. Avoid generic, AI-looking defaults.
Read design principles:
Read: <plugin-root>/skills/cf-design/scripts/design-principles.md
Parse the user's description — extract:
- What to build (component, page section, feature)
- Style intent (adjectives: clean, bold, playful, serious, minimal, rich)
- Color preferences (if any specified)
- Specific patterns or frameworks mentioned (Tailwind, shadcn, plain CSS, etc.)
Choose design foundation:
- If
DESIGN.md exists → use it as the design foundation. The user's description refines on top.
- If no patterns exist → ask: "No design patterns found. Should I (a) quick-scan the UI first, or (b) design fresh from your description?"
Research if needed: If the user asks for a specific style, trend, or technique you want to verify is current, Search the web:
- Query pattern:
"[style name] UI design [year] best practices"
- Example:
"glassmorphism UI 2024 best practices"
- Extract 2-3 specific, applicable techniques from the results. Summarize briefly.
Draft a design spec — before writing code, show a brief spec:
## Design Spec: [component name]
Base: [existing system / fresh]
Colors: [specific values]
Typography: [choices]
Spacing: [approach]
Shape/Shadow: [choices]
Key decisions: [1-2 intentional choices that make this non-generic]
Keep it short (5-8 lines). This isn't a full document — it's a checkpoint so the user can redirect before you code.
Implement — apply the design dials below to avoid AI-generic output:
Design dials (apply intentionally, not by default):
- Layout variance: prefer grid-based, asymmetric, or purposeful alignment over "stack everything centered"
- Spacing intentionality: use the project's spacing scale — never arbitrary px values
- Color specificity: use exact palette colors from DESIGN.md, never generic
blue-500 defaults
- Weight variation: vary font weights to create hierarchy — don't default to
font-medium everywhere
- Detail moments: add one small detail that shows intention (subtle gradient, specific shadow, slight border)
After implementation: ask "Want me to save these patterns to DESIGN.md?" If yes, update the file and suggest /cf-remember.
Step 4: Modify Mode
Goal: change a specific part of the UI without breaking the visual consistency of the rest.
Parse $ARGUMENTS:
- What to modify = text before
-- (e.g., "the navbar")
- How to change it = text after
-- (e.g., "make it sticky with blur backdrop")
- If no
-- separator: ask the user to clarify what they want changed and how.
Require design context: DESIGN.md must exist. If it doesn't:
- Run a quick scan (abbreviated Step 2) focused on the specific component/area being modified.
- Save results before proceeding.
Analyze the modification against the existing patterns:
- Does the change introduce new colors? Do they fit the palette?
- Does it use different spacing? Is it on-scale?
- Does it introduce a new pattern (animation, glassmorphism, etc.)? Does it fit the style?
- If something diverges, explain why it's intentional and worth the consistency trade-off.
Research if needed: for specific techniques (e.g., "blur backdrop", "scroll-triggered animation"), Search the web to find the current best implementation approach.
Implement — apply the same design dials from Step 3. Stay within the existing system unless the user explicitly wants to diverge.
Show a before/after summary:
Before: [describe previous state briefly]
After: [describe what changed and why it fits]
General Guidance
- Don't generate filler content — use realistic placeholder text (not "Lorem Ipsum"), real icon names, real color values.
- Match the tech stack — if the project uses Tailwind, use Tailwind classes. If it uses CSS modules, use those. Read existing files to confirm before generating.
- Progressive complexity — implement the simplest version that satisfies the description first, then offer to add complexity (animations, responsive variants, dark mode) as follow-ups.
- Prefer existing patterns — reuse component variants, spacing scale, and color tokens from DESIGN.md rather than introducing new values.
Plugin root: the PLUGIN_ROOT: path in the session bootstrap context (HOST: devin), or the parent of the skills/ folder that contains this SKILL.md. Replace <plugin-root> with it when running bundled scripts.
1---2name: cf-design-43description: >4 UI design workflow — scan patterns, design new UI, or modify UI consistently. Use to5 redesign a component/page, change colors/typography/style, or extract the design system.6 Triggers: "make it look like", "update the styling", "redesign this", "match the7 existing style", "add a dark mode", "make it more minimal".8created: 2026-04-309updated: 2026-09-0910state: beta11metadata:12 source: https://skillmd.com/skills/dinhanhthi/cf-design-413---1415# /cf-design1617Design UI with intent and consistency: **$ARGUMENTS**1819## Modes2021Three modes, triggered by the first word of `$ARGUMENTS`:2223| Invocation | Mode | Purpose |24| ----------------------------------- | ---------- | ------------------------------------------------------------------------------- |25| `/cf-design scan [path]` | **Scan** | Read existing UI files → extract design patterns → save to `docs/DESIGN.md` |26| `/cf-design [description]` | **Design** | Implement new UI from the user's description, using existing patterns as a base |27| `/cf-design modify [what] -- [how]` | **Modify** | Change a specific UI element, enforcing consistency with existing patterns |2829If `$ARGUMENTS` is empty, ask the user which mode they want and what their goal is.3031---3233## Step 0: Custom Guide3435```!36bash "<plugin-root>/lib/load-custom-guide.sh" cf-design37```3839If the block above printed anything, apply only the `## Before`, `## Rules`, and `## After` sections; if it shows the raw command instead of output, re-run that exact `load-custom-guide.sh` fence now.4041## Step 0.5: Load Existing Design Context4243Run: `bash "<plugin-root>/skills/cf-design/scripts/load-design-context.sh"`4445- If `DESIGN.md` exists: read it now and keep it in working memory for all subsequent steps. This is the project's source of truth for visual style.46- If not found: note that patterns are unknown and will either be extracted (scan mode) or defined fresh.4748## Step 1: Determine Mode4950Parse `$ARGUMENTS`:5152- Empty → ask the user: _"What would you like to do? (a) scan existing UI patterns, (b) design something new, or (c) modify a specific element?_"53- First word is `scan` (case-insensitive) → **Scan mode** (Step 2)54- First word is `modify` (case-insensitive) → **Modify mode** (Step 4)55- Anything else → **Design mode** (Step 3)5657---5859## Step 2: Scan Mode6061Goal: understand the project's visual DNA and write it down so every future design decision can be consistent.62631. **Determine scope**: use the path from `$ARGUMENTS` (after "scan") if provided. Default: look in `src/`, `app/`, `components/`, `styles/`, or wherever UI files live in this project.64652. **Read the design styles reference** to calibrate what you're looking for:6667 ```68 Read: <plugin-root>/skills/cf-design/scripts/design-styles.md69 ```70713. **Scan UI files** — look for and extract:72 - **Colors**: hex/rgb/hsl values, CSS custom properties (`--color-*`), Tailwind color classes, theme objects. Group into: primary, secondary/accent, neutral/surface, semantic (success/error/warning).73 - **Typography**: font families, size scale, weight usage, line-height, letter-spacing. Note any heading/body/mono split.74 - **Spacing**: recurring gap/padding/margin values. Identify the base unit (4px? 8px? rem-based?).75 - **Shape**: border-radius values, shadow definitions, outline styles.76 - **Motion**: transition durations, easing functions, animation names.77 - **Layout patterns**: grid columns, max-widths, breakpoints, container widths.78 - **Component patterns**: how buttons, cards, inputs, badges, navbars are styled. Note variations (primary vs ghost button, etc.).79 - **Dark/light mode**: how it's implemented (class-based, media query, CSS vars).80 - **Overall style**: use `design-styles.md` to identify the closest matching style(s) and confidence.81824. **Show findings summary** — display the detected design system in this format:8384 ```85 ## Detected Design System8687 **Style**: [e.g., "Minimalist Dark with subtle glassmorphism — high confidence"]8889 **Colors**90 - Primary: #... (used for CTA, links)91 - ...9293 **Typography**94 - Headings: [font], weights [bold/semibold]95 - Body: [font], size [base], leading [...]96 - ...9798 **Spacing base**: [4px / 8px / 0.25rem / ...]99100 **Components**101 - Buttons: [description]102 - Cards: [description]103 - ...104105 **Notes**: [any unique patterns, inconsistencies, or surprises]106 ```1071085. **Save immediately** to `{docsDir}/DESIGN.md` using the format above — no confirmation needed before writing.1091106. **After saving**, ask: _"I've saved `DESIGN.md`. Anything you'd like to adjust or add?"_ — if the user requests changes, update the file accordingly. Otherwise, proceed to step 7.1111127. Suggest running `/cf-remember` to index this file so it can be recalled in future sessions.113114---115116## Step 3: Design Mode117118Goal: implement intentional, project-consistent UI from a description. Avoid generic, AI-looking defaults.1191201. **Read design principles**:121122 ```123 Read: <plugin-root>/skills/cf-design/scripts/design-principles.md124 ```1251262. **Parse the user's description** — extract:127 - _What_ to build (component, page section, feature)128 - _Style intent_ (adjectives: clean, bold, playful, serious, minimal, rich)129 - _Color preferences_ (if any specified)130 - _Specific patterns_ or frameworks mentioned (Tailwind, shadcn, plain CSS, etc.)1311323. **Choose design foundation**:133 - If `DESIGN.md` exists → use it as the design foundation. The user's description refines on top.134 - If no patterns exist → ask: _"No design patterns found. Should I (a) quick-scan the UI first, or (b) design fresh from your description?"_1351364. **Research if needed**: If the user asks for a specific style, trend, or technique you want to verify is current, Search the web:137 - Query pattern: `"[style name] UI design [year] best practices"`138 - Example: `"glassmorphism UI 2024 best practices"`139 - Extract 2-3 specific, applicable techniques from the results. Summarize briefly.1401415. **Draft a design spec** — before writing code, show a brief spec:142143 ```144 ## Design Spec: [component name]145146 Base: [existing system / fresh]147 Colors: [specific values]148 Typography: [choices]149 Spacing: [approach]150 Shape/Shadow: [choices]151 Key decisions: [1-2 intentional choices that make this non-generic]152 ```153154 Keep it short (5-8 lines). This isn't a full document — it's a checkpoint so the user can redirect before you code.1551566. **Implement** — apply the design dials below to avoid AI-generic output:157158 **Design dials** (apply intentionally, not by default):159 - **Layout variance**: prefer grid-based, asymmetric, or purposeful alignment over "stack everything centered"160 - **Spacing intentionality**: use the project's spacing scale — never arbitrary px values161 - **Color specificity**: use exact palette colors from DESIGN.md, never generic `blue-500` defaults162 - **Weight variation**: vary font weights to create hierarchy — don't default to `font-medium` everywhere163 - **Detail moments**: add one small detail that shows intention (subtle gradient, specific shadow, slight border)1641657. **After implementation**: ask _"Want me to save these patterns to DESIGN.md?"_ If yes, update the file and suggest `/cf-remember`.166167---168169## Step 4: Modify Mode170171Goal: change a specific part of the UI without breaking the visual consistency of the rest.1721731. **Parse** `$ARGUMENTS`:174 - _What_ to modify = text before `--` (e.g., "the navbar")175 - _How_ to change it = text after `--` (e.g., "make it sticky with blur backdrop")176 - If no `--` separator: ask the user to clarify what they want changed and how.1771782. **Require design context**: DESIGN.md must exist. If it doesn't:179 - Run a quick scan (abbreviated Step 2) focused on the specific component/area being modified.180 - Save results before proceeding.1811823. **Analyze the modification** against the existing patterns:183 - Does the change introduce new colors? Do they fit the palette?184 - Does it use different spacing? Is it on-scale?185 - Does it introduce a new pattern (animation, glassmorphism, etc.)? Does it fit the style?186 - If something diverges, explain why it's intentional and worth the consistency trade-off.1871884. **Research if needed**: for specific techniques (e.g., "blur backdrop", "scroll-triggered animation"), Search the web to find the current best implementation approach.1891905. **Implement** — apply the same design dials from Step 3. Stay within the existing system unless the user explicitly wants to diverge.1911926. **Show a before/after summary**:193 ```194 Before: [describe previous state briefly]195 After: [describe what changed and why it fits]196 ```197198---199200## General Guidance201202- **Don't generate filler content** — use realistic placeholder text (not "Lorem Ipsum"), real icon names, real color values.203- **Match the tech stack** — if the project uses Tailwind, use Tailwind classes. If it uses CSS modules, use those. Read existing files to confirm before generating.204- **Progressive complexity** — implement the simplest version that satisfies the description first, then offer to add complexity (animations, responsive variants, dark mode) as follow-ups.205- **Prefer existing patterns** — reuse component variants, spacing scale, and color tokens from DESIGN.md rather than introducing new values.206207> Plugin root: the `PLUGIN_ROOT:` path in the session bootstrap context (HOST: devin), or the parent of the `skills/` folder that contains this SKILL.md. Replace `<plugin-root>` with it when running bundled scripts.