You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/emcn-design-review/SKILL.md
+71-51Lines changed: 71 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ import { Button } from '@/components/emcn/components/button/button'
42
42
43
43
## Design Tokens (CSS Variables)
44
44
45
-
Never use raw color values. Always use CSS variable tokens via Tailwind arbitrary values.
45
+
Never use raw color values. Always use CSS variable tokens via Tailwind arbitrary values: `text-[var(--text-primary)]`, not `text-gray-500` or `#333`. The CSS variable pattern is canonical (1,700+ uses) — do not use Tailwind semantic classes like `text-muted-foreground`.
46
46
47
47
### Text hierarchy
48
48
| Token | Use |
@@ -99,16 +99,18 @@ Use z-index tokens for layering:
9.**Font weight**: Use `font-medium` for emphasis, avoid `font-bold` unless for headings
297
-
10.**Spacing**: Use Tailwind gap/padding utilities. Common patterns: `gap-2`, `gap-3`, `px-4 py-2.5`
304
+
1.**Use `cn()` for conditional classes**: `cn('base', condition && 'conditional')` — never template literal concatenation like `` `base ${condition ? 'active' : ''}` ``
305
+
2.**Inline styles**: Avoid. Exception: dynamic values that can't be expressed as Tailwind classes (e.g., `style={{ width: dynamicVar }}` or CSS variable references). Never use inline styles for colors or static values.
306
+
3.**Never hardcode colors**: Use CSS variable tokens. Never `text-gray-500`, `bg-red-100`, `#fff`, or `rgb()`. Always `text-[var(--text-*)]`, `bg-[var(--surface-*)]`, etc.
307
+
4.**Never use Tailwind semantic color classes**: Use `text-[var(--text-muted)]` not `text-muted-foreground`. The CSS variable pattern is canonical.
308
+
5.**Never use global styles**: Keep all styling local to components
309
+
6.**Hover states**: Use `hover-hover:` pseudo-class for hover-capable devices
310
+
7.**Transitions**: Use `transition-colors` for color changes, `transition-colors duration-100` for fast hover
Copy file name to clipboardExpand all lines: .claude/commands/emcn-design-review.md
+36-57Lines changed: 36 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,88 +13,67 @@ User arguments: $ARGUMENTS
13
13
14
14
## Context
15
15
16
-
This codebase uses **emcn**, a custom component library built on Radix UI primitives with CVA (class-variance-authority) variants and CSS variable design tokens. All UI must use emcn components and tokens — never raw HTML elements or hardcoded colors.
16
+
This codebase uses **emcn**, a custom component library built on Radix UI primitives with CVA variants and CSS variable design tokens. All UI must use emcn components and tokens.
17
17
18
18
## Steps
19
19
20
20
1. Read the emcn barrel export at `apps/sim/components/emcn/components/index.ts` to know what's available
21
-
2. Read `apps/sim/app/_styles/globals.css` for the full set of CSS variable tokens
21
+
2. Read `apps/sim/app/_styles/globals.css` for CSS variable tokens
22
22
3. Analyze the specified scope against every rule below
23
23
4. If fix=true, apply the fixes. If fix=false, propose the fixes without applying.
24
24
25
25
---
26
26
27
27
## Imports
28
28
29
-
- Import components from `@/components/emcn`, never from subpaths
30
-
- Import icons from `@/components/emcn/icons` or `lucide-react`
31
-
- Import `cn` from `@/lib/core/utils/cn` for conditional class merging
32
-
- Import app-specific wrappers (Select, VerifiedBadge) from `@/components/ui`
29
+
- Import from `@/components/emcn` barrel, never subpaths
30
+
- Icons from `@/components/emcn/icons` or `lucide-react`
31
+
- Use `cn` from `@/lib/core/utils/cn` for conditional classes
33
32
34
-
---
35
-
36
-
## Design Tokens (CSS Variables)
37
-
38
-
Never use raw color values. Always use CSS variable tokens via Tailwind arbitrary values.
39
-
40
-
### Text hierarchy
41
-
-`text-[var(--text-primary)]` — Main content text
42
-
-`text-[var(--text-secondary)]` — Secondary/supporting text
43
-
-`text-[var(--text-tertiary)]` — Tertiary text
44
-
-`text-[var(--text-muted)]` — Disabled, placeholder text
- Use shadow tokens: `shadow-subtle`, `shadow-medium`, `shadow-overlay`, `shadow-card`
35
+
Use CSS variable pattern (`text-[var(--text-primary)]`), never Tailwind semantics (`text-muted-foreground`) or hardcoded colors (`text-gray-500`, `#333`).
Use imperative API: `toast.success(msg)`, `toast.error(msg)`. Never build custom notification UI.
56
+
Modal `size="sm"`, title "Delete/Remove {ItemType}", `variant="destructive"` action button, `variant="default"` cancel. Cancel left, action right (100% compliance). Use `text-[var(--text-error)]` for irreversible warnings.
79
57
80
-
### Badges
81
-
Green=success, red=error, amber=warning, blue=info, gray=neutral. Use `dot` prop for status indicators.
58
+
## Toast
82
59
83
-
### Forms
84
-
Use `FormField` + `Input`/`Textarea` from emcn. Never raw HTML form elements.
60
+
`toast.success()`, `toast.error()`, `toast()` from `@/components/emcn`. Never custom notification UI.
85
61
86
-
### Loading States
87
-
Use `Skeleton` matching the actual UI structure dimensions.
62
+
## Badges
88
63
89
-
---
64
+
`red`=error/failed, `gray-secondary`=metadata/roles, `type`=type annotations, `green`=success/active, `gray`=neutral, `amber`=processing, `orange`=paused, `blue`=info. Use `dot` prop for status indicators.
0 commit comments