contextos-agents 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/.agents/adapters/aider/export.js +2 -2
  2. package/.agents/adapters/claude/export.js +53 -2
  3. package/.agents/adapters/drift-detector.js +6 -3
  4. package/.agents/adapters/pure-compiler.js +18 -6
  5. package/.agents/ctx.js +13 -8
  6. package/.agents/plugins.js +347 -26
  7. package/.agents/profiles.js +32 -11
  8. package/README.md +38 -3
  9. package/bin/commands/hook.js +50 -12
  10. package/bin/commands/scan.js +10 -3
  11. package/bin/index.js +165 -53
  12. package/bin/lib/git-snapshot.js +70 -43
  13. package/bin/lib/scan.js +108 -27
  14. package/bin/lib/ui.js +140 -0
  15. package/catalog/skills/adapters/EXAMPLES.md +19 -0
  16. package/catalog/skills/adapters/SKILL.md +101 -0
  17. package/catalog/skills/adapters/TROUBLESHOOTING.md +7 -0
  18. package/catalog/skills/adapters/VALIDATION.json +12 -0
  19. package/catalog/skills/adapters/skill.yaml +13 -0
  20. package/catalog/skills/api-design/EXAMPLES.md +91 -0
  21. package/catalog/skills/api-design/SKILL.md +63 -0
  22. package/catalog/skills/api-design/TROUBLESHOOTING.md +54 -0
  23. package/catalog/skills/api-design/VALIDATION.json +11 -0
  24. package/catalog/skills/api-design/skill.yaml +14 -0
  25. package/catalog/skills/architecture-diagrams/SKILL.md +108 -0
  26. package/catalog/skills/architecture-diagrams/VALIDATION.json +12 -0
  27. package/catalog/skills/architecture-diagrams/skill.yaml +9 -0
  28. package/catalog/skills/brutalist-design/EXAMPLES.md +59 -0
  29. package/catalog/skills/brutalist-design/SKILL.md +150 -0
  30. package/catalog/skills/brutalist-design/VALIDATION.json +12 -0
  31. package/catalog/skills/brutalist-design/skill.yaml +10 -0
  32. package/catalog/skills/ci-cd/EXAMPLES.md +79 -0
  33. package/catalog/skills/ci-cd/SKILL.md +69 -0
  34. package/catalog/skills/ci-cd/TROUBLESHOOTING.md +52 -0
  35. package/catalog/skills/ci-cd/VALIDATION.json +11 -0
  36. package/catalog/skills/ci-cd/skill.yaml +13 -0
  37. package/catalog/skills/database/EXAMPLES.md +74 -0
  38. package/catalog/skills/database/SKILL.md +101 -0
  39. package/catalog/skills/database/TROUBLESHOOTING.md +18 -0
  40. package/catalog/skills/database/VALIDATION.json +11 -0
  41. package/catalog/skills/database/skill.yaml +14 -0
  42. package/catalog/skills/ddd/EXAMPLES.md +42 -0
  43. package/catalog/skills/ddd/SKILL.md +247 -0
  44. package/catalog/skills/ddd/TROUBLESHOOTING.md +19 -0
  45. package/catalog/skills/ddd/VALIDATION.json +12 -0
  46. package/catalog/skills/ddd/skill.yaml +14 -0
  47. package/catalog/skills/decisions/EXAMPLES.md +35 -0
  48. package/catalog/skills/decisions/SKILL.md +90 -0
  49. package/catalog/skills/decisions/TROUBLESHOOTING.md +13 -0
  50. package/catalog/skills/decisions/VALIDATION.json +12 -0
  51. package/catalog/skills/decisions/skill.yaml +13 -0
  52. package/catalog/skills/docker/EXAMPLES.md +56 -0
  53. package/catalog/skills/docker/SKILL.md +169 -0
  54. package/catalog/skills/docker/TROUBLESHOOTING.md +18 -0
  55. package/catalog/skills/docker/VALIDATION.json +11 -0
  56. package/catalog/skills/docker/skill.yaml +13 -0
  57. package/catalog/skills/fastapi/EXAMPLES.md +36 -0
  58. package/catalog/skills/fastapi/SKILL.md +171 -0
  59. package/catalog/skills/fastapi/TROUBLESHOOTING.md +19 -0
  60. package/catalog/skills/fastapi/VALIDATION.json +12 -0
  61. package/catalog/skills/fastapi/skill.yaml +14 -0
  62. package/catalog/skills/generators/EXAMPLES.md +19 -0
  63. package/catalog/skills/generators/SKILL.md +110 -0
  64. package/catalog/skills/generators/TROUBLESHOOTING.md +7 -0
  65. package/catalog/skills/generators/VALIDATION.json +12 -0
  66. package/catalog/skills/generators/skill.yaml +22 -0
  67. package/catalog/skills/generators/templates/API.md +77 -0
  68. package/catalog/skills/generators/templates/ARCHITECTURE.md +70 -0
  69. package/catalog/skills/generators/templates/DATABASE.md +42 -0
  70. package/catalog/skills/generators/templates/DECISION.md +46 -0
  71. package/catalog/skills/generators/templates/PRD.md +67 -0
  72. package/catalog/skills/generators/templates/PROJECT_GRAPH.md +56 -0
  73. package/catalog/skills/generators/templates/ROADMAP.md +51 -0
  74. package/catalog/skills/generators/templates/TASKS.md +43 -0
  75. package/catalog/skills/generators/templates/UI.md +73 -0
  76. package/catalog/skills/graphify/EXAMPLES.md +73 -0
  77. package/catalog/skills/graphify/SKILL.md +130 -0
  78. package/catalog/skills/graphify/VALIDATION.json +12 -0
  79. package/catalog/skills/graphify/skill.yaml +13 -0
  80. package/catalog/skills/impeccable-design/EXAMPLES.md +26 -0
  81. package/catalog/skills/impeccable-design/SKILL.md +201 -0
  82. package/catalog/skills/impeccable-design/TROUBLESHOOTING.md +19 -0
  83. package/catalog/skills/impeccable-design/VALIDATION.json +12 -0
  84. package/catalog/skills/impeccable-design/skill.yaml +15 -0
  85. package/catalog/skills/interview-me/SKILL.md +97 -0
  86. package/catalog/skills/interview-me/VALIDATION.json +12 -0
  87. package/catalog/skills/interview-me/skill.yaml +9 -0
  88. package/catalog/skills/microservices/EXAMPLES.md +38 -0
  89. package/catalog/skills/microservices/SKILL.md +164 -0
  90. package/catalog/skills/microservices/TROUBLESHOOTING.md +19 -0
  91. package/catalog/skills/microservices/VALIDATION.json +12 -0
  92. package/catalog/skills/microservices/skill.yaml +14 -0
  93. package/catalog/skills/minimalist-design/EXAMPLES.md +58 -0
  94. package/catalog/skills/minimalist-design/SKILL.md +113 -0
  95. package/catalog/skills/minimalist-design/VALIDATION.json +12 -0
  96. package/catalog/skills/minimalist-design/skill.yaml +10 -0
  97. package/catalog/skills/nestjs/EXAMPLES.md +40 -0
  98. package/catalog/skills/nestjs/SKILL.md +139 -0
  99. package/catalog/skills/nestjs/TROUBLESHOOTING.md +19 -0
  100. package/catalog/skills/nestjs/VALIDATION.json +12 -0
  101. package/catalog/skills/nestjs/skill.yaml +14 -0
  102. package/catalog/skills/nextjs/EXAMPLES.md +40 -0
  103. package/catalog/skills/nextjs/SKILL.md +163 -0
  104. package/catalog/skills/nextjs/TROUBLESHOOTING.md +19 -0
  105. package/catalog/skills/nextjs/VALIDATION.json +12 -0
  106. package/catalog/skills/nextjs/skill.yaml +14 -0
  107. package/catalog/skills/node/EXAMPLES.md +80 -0
  108. package/catalog/skills/node/SKILL.md +128 -0
  109. package/catalog/skills/node/TROUBLESHOOTING.md +19 -0
  110. package/catalog/skills/node/VALIDATION.json +12 -0
  111. package/catalog/skills/node/skill.yaml +14 -0
  112. package/catalog/skills/performance/EXAMPLES.md +30 -0
  113. package/catalog/skills/performance/SKILL.md +75 -0
  114. package/catalog/skills/performance/TROUBLESHOOTING.md +19 -0
  115. package/catalog/skills/performance/VALIDATION.json +12 -0
  116. package/catalog/skills/performance/skill.yaml +14 -0
  117. package/catalog/skills/react/EXAMPLES.md +79 -0
  118. package/catalog/skills/react/SKILL.md +132 -0
  119. package/catalog/skills/react/TROUBLESHOOTING.md +19 -0
  120. package/catalog/skills/react/VALIDATION.json +12 -0
  121. package/catalog/skills/react/skill.yaml +14 -0
  122. package/catalog/skills/react-best-practices/SKILL.md +158 -0
  123. package/catalog/skills/react-best-practices/VALIDATION.json +12 -0
  124. package/catalog/skills/react-best-practices/skill.yaml +13 -0
  125. package/catalog/skills/redesign-audit/SKILL.md +117 -0
  126. package/catalog/skills/redesign-audit/VALIDATION.json +12 -0
  127. package/catalog/skills/redesign-audit/skill.yaml +9 -0
  128. package/catalog/skills/security-audit/EXAMPLES.md +79 -0
  129. package/catalog/skills/security-audit/SKILL.md +91 -0
  130. package/catalog/skills/security-audit/TROUBLESHOOTING.md +46 -0
  131. package/catalog/skills/security-audit/VALIDATION.json +11 -0
  132. package/catalog/skills/security-audit/skill.yaml +14 -0
  133. package/catalog/skills/soft-design/EXAMPLES.md +51 -0
  134. package/catalog/skills/soft-design/SKILL.md +108 -0
  135. package/catalog/skills/soft-design/VALIDATION.json +12 -0
  136. package/catalog/skills/soft-design/skill.yaml +10 -0
  137. package/catalog/skills/state-management/EXAMPLES.md +56 -0
  138. package/catalog/skills/state-management/SKILL.md +168 -0
  139. package/catalog/skills/state-management/TROUBLESHOOTING.md +18 -0
  140. package/catalog/skills/state-management/VALIDATION.json +11 -0
  141. package/catalog/skills/state-management/skill.yaml +14 -0
  142. package/catalog/skills/subagent-orchestrator/SKILL.md +117 -0
  143. package/catalog/skills/subagent-orchestrator/VALIDATION.json +12 -0
  144. package/catalog/skills/subagent-orchestrator/skill.yaml +9 -0
  145. package/catalog/skills/system-design/EXAMPLES.md +75 -0
  146. package/catalog/skills/system-design/SKILL.md +419 -0
  147. package/catalog/skills/system-design/TROUBLESHOOTING.md +19 -0
  148. package/catalog/skills/system-design/VALIDATION.json +12 -0
  149. package/catalog/skills/system-design/skill.yaml +14 -0
  150. package/catalog/skills/terraform/EXAMPLES.md +74 -0
  151. package/catalog/skills/terraform/SKILL.md +55 -0
  152. package/catalog/skills/terraform/TROUBLESHOOTING.md +53 -0
  153. package/catalog/skills/terraform/VALIDATION.json +11 -0
  154. package/catalog/skills/terraform/skill.yaml +14 -0
  155. package/catalog/skills/testing/EXAMPLES.md +122 -0
  156. package/catalog/skills/testing/SKILL.md +70 -0
  157. package/catalog/skills/testing/TROUBLESHOOTING.md +18 -0
  158. package/catalog/skills/testing/VALIDATION.json +11 -0
  159. package/catalog/skills/testing/skill.yaml +14 -0
  160. package/catalog/skills/typescript/EXAMPLES.md +64 -0
  161. package/catalog/skills/typescript/SKILL.md +112 -0
  162. package/catalog/skills/typescript/TROUBLESHOOTING.md +19 -0
  163. package/catalog/skills/typescript/VALIDATION.json +12 -0
  164. package/catalog/skills/typescript/skill.yaml +14 -0
  165. package/catalog/skills/ui-design/EXAMPLES.md +21 -0
  166. package/catalog/skills/ui-design/SKILL.md +124 -0
  167. package/catalog/skills/ui-design/TROUBLESHOOTING.md +19 -0
  168. package/catalog/skills/ui-design/VALIDATION.json +12 -0
  169. package/catalog/skills/ui-design/skill.yaml +16 -0
  170. package/catalog/skills/ui-ux-pro/EXAMPLES.md +62 -0
  171. package/catalog/skills/ui-ux-pro/SKILL.md +418 -0
  172. package/catalog/skills/ui-ux-pro/TROUBLESHOOTING.md +19 -0
  173. package/catalog/skills/ui-ux-pro/VALIDATION.json +12 -0
  174. package/catalog/skills/ui-ux-pro/skill.yaml +14 -0
  175. package/catalog/skills/ux-design/EXAMPLES.md +36 -0
  176. package/catalog/skills/ux-design/SKILL.md +116 -0
  177. package/catalog/skills/ux-design/TROUBLESHOOTING.md +19 -0
  178. package/catalog/skills/ux-design/VALIDATION.json +12 -0
  179. package/catalog/skills/ux-design/skill.yaml +16 -0
  180. package/catalog/skills/vercel-optimize/SKILL.md +83 -0
  181. package/catalog/skills/vercel-optimize/VALIDATION.json +12 -0
  182. package/catalog/skills/vercel-optimize/scripts/collect-signals.mjs +131 -0
  183. package/catalog/skills/vercel-optimize/scripts/gate-investigations.mjs +142 -0
  184. package/catalog/skills/vercel-optimize/scripts/merge-signals.mjs +143 -0
  185. package/catalog/skills/vercel-optimize/scripts/scan-codebase.mjs +174 -0
  186. package/catalog/skills/vercel-optimize/skill.yaml +15 -0
  187. package/catalog/skills/web-accessibility/EXAMPLES.md +39 -0
  188. package/catalog/skills/web-accessibility/SKILL.md +151 -0
  189. package/catalog/skills/web-accessibility/TROUBLESHOOTING.md +19 -0
  190. package/catalog/skills/web-accessibility/VALIDATION.json +12 -0
  191. package/catalog/skills/web-accessibility/skill.yaml +14 -0
  192. package/package.json +3 -2
@@ -0,0 +1,62 @@
1
+ # UI/UX Pro Examples - Anti-patterns vs ContextOS Standard
2
+
3
+ ## Example 1: Accessible Icon Button with Visible Focus States
4
+
5
+ ### Anti-pattern: Anti-pattern (Missing accessible name and arbitrary color values)
6
+
7
+ ```tsx
8
+ // BAD: inaccessible to screen readers, missing focus ring, arbitrary hex
9
+ <button className="bg-[#5a4fcf] p-[7px] rounded-[5px]" onClick={onClose}>
10
+ <XIcon />
11
+ </button>
12
+ ```
13
+
14
+ ### Best practice: ContextOS Standard (Semantic token scales & ARIA label)
15
+
16
+ ```tsx
17
+ // GOOD: full keyboard accessibility, semantic tokens, focus-visible ring
18
+ <button
19
+ type="button"
20
+ aria-label="Close modal dialog"
21
+ onClick={onClose}
22
+ className="inline-flex items-center justify-center rounded-lg p-2 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
23
+ >
24
+ <X className="h-4 w-4" aria-hidden="true" />
25
+ </button>
26
+ ```
27
+
28
+ ---
29
+
30
+ ## Example 2: Stat Card Hierarchy
31
+
32
+ ### Anti-pattern: Anti-pattern (Flat low-contrast layout with purple-gradient cliche)
33
+
34
+ ```tsx
35
+ // BAD: cliche AI gradient, poor typographic hierarchy
36
+ <div className="bg-gradient-to-r from-purple-500 to-blue-500 p-4 rounded-xl text-white">
37
+ <div>Total Revenue</div>
38
+ <div className="text-xl">$45,231.89</div>
39
+ </div>
40
+ ```
41
+
42
+ ### Best practice: ContextOS Standard (Refined editorial typography & subtle depth)
43
+
44
+ ```tsx
45
+ // GOOD: high contrast, monospace numerical accent, subtle border
46
+ <div className="rounded-xl border border-border/50 bg-card p-6 shadow-sm transition-all hover:shadow-md">
47
+ <div className="flex items-center justify-between">
48
+ <span className="text-xs font-medium uppercase tracking-wider text-muted-foreground">
49
+ Total Revenue
50
+ </span>
51
+ <TrendingUp className="h-4 w-4 text-emerald-500" aria-hidden="true" />
52
+ </div>
53
+ <div className="mt-3 flex items-baseline gap-2">
54
+ <span className="font-mono text-3xl font-semibold tracking-tight text-foreground">
55
+ $45,231.89
56
+ </span>
57
+ <span className="font-mono text-xs font-medium text-emerald-600 dark:text-emerald-400">
58
+ +14.2%
59
+ </span>
60
+ </div>
61
+ </div>
62
+ ```
@@ -0,0 +1,418 @@
1
+ ---
2
+ name: ui-ux-pro
3
+ description: >
4
+ Professional UI/UX design skill. Enforces accessibility, semantic color palettes,
5
+ proper spacing, and bans all common AI design anti-patterns and clichés.
6
+ Adapted for Tailwind CSS v4, shadcn/ui, and Framer Motion stacks.
7
+ ---
8
+
9
+ # ui-ux-pro
10
+
11
+ ## Overview
12
+
13
+ Professional UI/UX design standard banning AI clichés (pure black #000000, purple-blue gradients, card-in-card nesting). Enforces Tailwind CSS v4 @theme, semantic HSL palettes, and refined micro-interactions.
14
+
15
+ ## When to Use
16
+
17
+ Activate during planning and implementation of modern web user interfaces, landing pages, SaaS dashboards, and consumer-facing web apps.
18
+
19
+ ## Rules & Patterns
20
+
21
+ Inspired by [nextlevelbuilder/ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill).
22
+
23
+ ## Core Principle
24
+
25
+ > Great design is invisible. Bad design is obvious. You will never produce obvious AI design.
26
+
27
+ ## Pre-flight Check & Brief Inference
28
+
29
+ Before starting a design implementation:
30
+
31
+ 1. Infer the unwritten constraints of the domain (e.g., if it's a dev tool, assume dark mode, monospaced numbers, dense layout).
32
+ 2. Propose a "Design Brief Inference" summarizing the intended aesthetic.
33
+
34
+ ---
35
+
36
+ ## [FAIL] Absolute Prohibitions (Never Do These)
37
+
38
+ ### Typography Anti-Patterns
39
+
40
+ - **NEVER** use Arial, Helvetica, or system-ui defaults as primary fonts
41
+ - **NEVER** use Inter as the ONLY font - it is the #1 "AI-generated" visual tell when used alone
42
+ - [PASS] **CORRECT**: If using Inter for primary UI text, ALWAYS pair it with a strong monospace font like `JetBrains Mono` for numbers, code blocks, and technical accents to create a premium SaaS aesthetic (see Vercel, Linear)
43
+ - [FAIL] **WRONG**: Inter for headings, body, labels, numbers, captions - everything
44
+ - **NEVER** mix more than 2 font families
45
+ - **ALWAYS** import proper fonts from Google Fonts or similar
46
+
47
+ ### Color Anti-Patterns
48
+
49
+ - **NEVER** use pure black `#000000` - always tint toward brand hue (e.g. `#0A0A0F`)
50
+ - **NEVER** use pure gray `#808080` - tint it (e.g. `#6B7280` has blue undertones)
51
+ - **NEVER** use purple-to-blue gradients - it is the #1 "AI generated" visual tell
52
+ - **NEVER** use neon colors for primary UI (only accents, sparingly)
53
+ - **ALWAYS** use HSL-based semantic palettes with clear naming
54
+
55
+ ### Layout Anti-Patterns
56
+
57
+ - **NEVER** nest cards inside cards (card-in-card = instant slop flag)
58
+ - **NEVER** put a rounded-square icon tile above every heading
59
+ - **NEVER** center-align long paragraphs (> 2 lines)
60
+ - **NEVER** use gray text on colored backgrounds (contrast failure)
61
+
62
+ ### Animation Anti-Patterns
63
+
64
+ - **NEVER** use bounce or elastic easing in raw CSS - it feels dated (circa 2014)
65
+ - **NEVER** add animations just to show they work
66
+ - **ALWAYS** use `ease-out` for enter, `ease-in` for exit, `ease-in-out` for continuous
67
+
68
+ ---
69
+
70
+ ## Component Architecture & Colocation Standards
71
+
72
+ ### Colocated File Structure
73
+ Colocate everything belonging to a component in a dedicated directory:
74
+ ```
75
+ src/components/TaskList/
76
+ TaskList.tsx # Pure presentation component
77
+ TaskList.test.tsx # Unit & interaction tests
78
+ use-task-list.ts # Custom hook for state & handlers (if complex)
79
+ types.ts # Component-specific interfaces & contracts
80
+ ```
81
+
82
+ ### Composition over Configuration
83
+ Avoid large "prop-bag" configurations. Prefer composable slots and child components:
84
+
85
+ ```tsx
86
+ // [PASS] Composable, flexible, predictable:
87
+ <Card>
88
+ <CardHeader>
89
+ <CardTitle>Tasks</CardTitle>
90
+ </CardHeader>
91
+ <CardBody>
92
+ <TaskList tasks={tasks} />
93
+ </CardBody>
94
+ </Card>
95
+
96
+ // [FAIL] Over-configured prop bag (inflexible, brittle):
97
+ <Card
98
+ title="Tasks"
99
+ headerVariant="large"
100
+ bodyPadding="md"
101
+ content={<TaskList tasks={tasks} />}
102
+ />
103
+ ```
104
+
105
+ ### Container vs Presentation Separation
106
+ Separate network side effects from UI rendering:
107
+ - **Container**: Handles `useQuery`, loading skeletons, error states, and empty states.
108
+ - **Presentation**: Pure component receiving typed data and callbacks, easy to test and render in Storybook.
109
+
110
+ ---
111
+
112
+ ## [PASS] Required Standards
113
+
114
+
115
+ ### Accessibility Checklist
116
+
117
+ Before shipping any UI, verify:
118
+
119
+ - [ ] Text contrast ratio ≥ 4.5:1 for normal text (WCAG AA)
120
+ - [ ] Text contrast ratio ≥ 3:1 for large text (≥ 18px bold or ≥ 24px)
121
+ - [ ] All interactive elements have `aria-label` or visible text
122
+ - [ ] Touch targets are minimum 44×44px (48×48px recommended)
123
+ - [ ] Focus states are visible and styled (not just browser default)
124
+ - [ ] Images have meaningful `alt` text (or `alt=""` if decorative)
125
+ - [ ] Form fields have associated `<label>` elements
126
+ - [ ] Keyboard navigation works without mouse
127
+ - [ ] No color alone conveys information (use icons + text too)
128
+
129
+ ### Semantic Color Palette - shadcn/ui & Tailwind CSS v4 Format
130
+
131
+ Generate palettes in the format compatible with shadcn/ui's `globals.css`. Always support both light and dark themes as this is the de-facto standard:
132
+
133
+ ```css
134
+ @layer base {
135
+ :root {
136
+ --background: 220 13% 98%;
137
+ --foreground: 220 13% 9%;
138
+ --card: 220 13% 100%;
139
+ --card-foreground: 220 13% 9%;
140
+ --muted: 220 13% 95%;
141
+ --muted-foreground: 220 9% 46%;
142
+ --border: 220 13% 90%;
143
+ --input: 220 13% 90%;
144
+ --primary: 258 90% 56%;
145
+ --primary-foreground: 0 0% 100%;
146
+ --secondary: 220 13% 94%;
147
+ --secondary-foreground: 220 13% 9%;
148
+ --accent: 258 90% 56%;
149
+ --accent-foreground: 0 0% 100%;
150
+ --destructive: 0 84% 60%;
151
+ --destructive-foreground: 0 0% 100%;
152
+ --ring: 258 90% 56%;
153
+ --radius: 0.5rem;
154
+ }
155
+
156
+ .dark {
157
+ --background: 220 13% 9%;
158
+ --foreground: 210 40% 98%;
159
+ --card: 220 11% 13%;
160
+ --card-foreground: 210 40% 98%;
161
+ --muted: 220 11% 16%;
162
+ --muted-foreground: 215 16% 65%;
163
+ --border: 217 19% 22%;
164
+ --input: 217 19% 22%;
165
+ --primary: 258 90% 66%;
166
+ --primary-foreground: 0 0% 100%;
167
+ --secondary: 220 11% 18%;
168
+ --secondary-foreground: 210 40% 98%;
169
+ --accent: 258 90% 66%;
170
+ --accent-foreground: 0 0% 100%;
171
+ --destructive: 0 84% 60%;
172
+ --destructive-foreground: 0 0% 100%;
173
+ --ring: 258 90% 66%;
174
+ }
175
+ }
176
+ ```
177
+
178
+ > **Rule**: NEVER define colors as raw hex/rgb. ALWAYS use HSL space values so Tailwind opacity modifiers (`text-primary/80`) work correctly.
179
+
180
+ ### Spacing System (Tailwind)
181
+
182
+ Use Tailwind spacing utilities. **Never use arbitrary values** like `gap-[17px]`:
183
+
184
+ - `gap-1` / `p-1` - 4px micro gaps
185
+ - `gap-2` / `p-2` - 8px component internal
186
+ - `gap-4` / `p-4` - 16px standard padding
187
+ - `gap-6` / `p-6` - 24px section gaps
188
+ - `gap-8` / `p-8` - 32px block separators
189
+ - `gap-12` / `py-12` - 48px section separators
190
+ - `gap-20` / `py-20` - 80px hero spacing
191
+
192
+ ### Typography Scale
193
+
194
+ Use a modular type scale (1.25 or 1.333 ratio):
195
+
196
+ ```
197
+ xs: 11px / 0.688rem (text-xs)
198
+ sm: 13px / 0.813rem (text-sm)
199
+ base: 16px / 1rem (text-base)
200
+ lg: 20px / 1.25rem (text-lg)
201
+ xl: 24px / 1.5rem (text-xl)
202
+ 2xl: 32px / 2rem (text-2xl)
203
+ 3xl: 40px / 2.5rem (text-3xl)
204
+ 4xl: 56px / 3.5rem (text-4xl)
205
+ ```
206
+
207
+ Typography utilities:
208
+
209
+ - Long headlines: use `text-balance` (prevents orphan words)
210
+ - Body paragraphs: use `text-pretty` (smart line breaks)
211
+ - Number tables: use `tabular-nums` class (not custom CSS)
212
+
213
+ ---
214
+
215
+ ## Design Parameters (Taste Equalizers)
216
+
217
+ Always set and document the following three parameters (1-10 scale) before starting any design task, to escape generic AI defaults:
218
+
219
+ - **DESIGN_VARIANCE (1-10)**: Grid and Layout structures.
220
+ - 1-3 = Clean, centered layouts, standard grids (Enterprise, Docs).
221
+ - 4-7 = Asymmetric containers, off-grid elements, sticky sidebars (SaaS, Creative tools).
222
+ - 8-10 = Broken grids, overlapping items, editorial style (Portfolios, Agencies).
223
+ - **MOTION_INTENSITY (1-10)**: Animation depth.
224
+ - 1-3 = Basic hover states and micro-interactions only.
225
+ - 4-7 = Page transitions, enter/exit animations, list staggers.
226
+ - 8-10 = Magnetic elements, complex scroll-triggered animations (GSAP territory).
227
+ - **VISUAL_DENSITY (1-10)**: Information architecture.
228
+ - 1-3 = Luxury, airy, massive whitespace (Landing pages).
229
+ - 4-7 = Standard product density (Consumer apps).
230
+ - 8-10 = Dense, compact, dashboard-style (Pro tools, IDEs, Trading platforms).
231
+
232
+ ## Adaptive Aesthetics (Project Mapping)
233
+
234
+ Select the base aesthetic based on the project domain:
235
+
236
+ - **Fintech / Enterprise**: Swiss Minimalism, Neumorphism (High trust, clean, DESIGN_VARIANCE: 2-4).
237
+ - **AI Tools / DevTools**: Dark OLED Luxury, Glassmorphism (Modern, tech-forward, DESIGN_VARIANCE: 5-7).
238
+ - **Creative / Portfolios**: Brutalism, Maximalist, Aurora (Bold, expressive, DESIGN_VARIANCE: 8-10).
239
+
240
+ ## Design Memory & Consistency
241
+
242
+ **CRITICAL**: You must preserve design decisions between sessions to avoid stylistic drift.
243
+ Whenever you establish core UI tokens (fonts, color scales, border radii, equalizers), write them to `.interface-design/system.md`. In subsequent sessions, ALWAYS read this file before generating new components.
244
+
245
+ ---
246
+
247
+ ## Design Domains
248
+
249
+ ### Product UI (SaaS / Dashboard / App)
250
+
251
+ - Functional over decorative
252
+ - Dense information where needed (use compact variants)
253
+ - Table zebra striping: use `5%` opacity, not hard borders
254
+ - Data visualization: prefer Chart.js or Recharts, label all axes
255
+ - Loading states: skeleton screens, never spinners alone
256
+ - **Empty States**: ALWAYS design the empty state for every list/table/feed. Never leave a blank screen. Include:
257
+ 1. An illustration or meaningful icon
258
+ 2. A helpful, context-aware message ("No results yet" not "No data")
259
+ 3. A clear primary action CTA ("Create your first project →")
260
+
261
+ ### Marketing / Landing Pages
262
+
263
+ - Hero: full viewport height, one clear CTA
264
+ - Social proof above the fold when possible
265
+ - CTA buttons: filled primary + ghost secondary (never two filled)
266
+ - Testimonials: real photos, full name, company
267
+
268
+ ### Forms
269
+
270
+ - Label above field (not placeholder-as-label)
271
+ - Inline validation (show errors on blur, not on submit)
272
+ - Group related fields visually
273
+ - Progress indicator for multi-step flows
274
+
275
+ ---
276
+
277
+ ## Image-First Pipeline (Design Sprints)
278
+
279
+ If you have access to image generation tools (e.g., DALL-E, Midjourney integrations) and the task involves creating a net-new UI page or component, follow the **Image-First Pipeline**:
280
+
281
+ 1. **Generate**: Create 1-3 reference images ("mockups", "brand boards") of the desired UI using image generation.
282
+ 2. **Analyze**: Review the generated images for layout, spacing, and typography choices.
283
+ 3. **Implement**: Write the code to match the aesthetic of the generated reference images.
284
+
285
+ _Do not skip straight to code for major UI overhauls without a visual reference if generation is available._
286
+
287
+ ---
288
+
289
+ ## UI Style Toolkit
290
+
291
+ ### Glassmorphism (Use Sparingly)
292
+
293
+ ```css
294
+ background: rgba(255, 255, 255, 0.05);
295
+ backdrop-filter: blur(20px);
296
+ border: 1px solid rgba(255, 255, 255, 0.1);
297
+ ```
298
+
299
+ ### Subtle Shadows (Dark UI)
300
+
301
+ ```css
302
+ /* Card elevation */
303
+ box-shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.6);
304
+ /* Floating element */
305
+ box-shadow: 0 10px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
306
+ ```
307
+
308
+ ### Micro-animations
309
+
310
+ **CSS (for simple, lightweight elements):**
311
+
312
+ ```css
313
+ /* Standard transition */
314
+ transition: all 0.15s ease-out;
315
+ /* Hover lift */
316
+ transform: translateY(-2px);
317
+ /* Button press */
318
+ transform: scale(0.97);
319
+ /* Fade in */
320
+ @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } }
321
+ ```
322
+
323
+ **Framer Motion (for complex layout transitions and orchestration):**
324
+
325
+ For complex UI like modals, popovers, layout shifts, and multi-element orchestration, prefer Framer Motion over raw CSS keyframes. Keep animations quick and purposeful:
326
+
327
+ ```tsx
328
+ // [GOOD] Modal entrance - use highly damped spring for physical feel (like Vercel/Linear)
329
+ <motion.div
330
+ initial={{ opacity: 0, scale: 0.96, y: 8 }}
331
+ animate={{ opacity: 1, scale: 1, y: 0 }}
332
+ exit={{ opacity: 0, scale: 0.96, y: 8 }}
333
+ transition={{ type: "spring", stiffness: 400, damping: 30 }}
334
+ />
335
+
336
+ // [GOOD] List item stagger
337
+ <motion.li
338
+ initial={{ opacity: 0, x: -8 }}
339
+ animate={{ opacity: 1, x: 0 }}
340
+ transition={{ duration: 0.2, ease: "easeOut" }}
341
+ />
342
+
343
+ // [BAD] Never use low damping (bouncy feel)
344
+ transition={{ type: "spring", stiffness: 200, damping: 8 }} // WRONG
345
+ ```
346
+
347
+ **Rule**: `duration` must always be `< 0.3s` for micro-interactions. Respect `prefers-reduced-motion`.
348
+
349
+ ---
350
+
351
+ ## Domain Search Guide
352
+
353
+ When choosing styles, reference these domains:
354
+
355
+ - `style` - UI style options (glassmorphism, neobrutalism, minimalism)
356
+ - `typography` - Font pairing recommendations
357
+ - `color` - Color palettes by product type
358
+ - `ux` - Best practices and anti-patterns
359
+ - `gsap` - Animation patterns by intensity (hover, scroll, transition)
360
+
361
+ ## Role Integration
362
+
363
+ ---
364
+
365
+ ## Tailwind CSS v4 (CSS-First Modern Architecture)
366
+
367
+ In Tailwind CSS v4, styling configuration is native CSS without `tailwind.config.js`:
368
+
369
+ ```css
370
+ @import "tailwindcss";
371
+
372
+ @theme {
373
+ --color-primary: #3b82f6;
374
+ --color-primary-foreground: #ffffff;
375
+ --color-surface: #0f172a;
376
+ --color-surface-muted: #1e293b;
377
+ --font-sans: "Inter", -apple-system, sans-serif;
378
+ --font-mono: "JetBrains Mono", monospace;
379
+ }
380
+ ```
381
+
382
+ - **Zero JavaScript Config**: Define theme variables directly in CSS `@theme`.
383
+ - **Native CSS Variables**: Use `var(--color-...)` for dynamic runtime theming and dark mode.
384
+ - **Dynamic Viewports**: Use `h-dvh` and `min-h-dvh` for full-height layouts that behave properly on mobile browsers.
385
+
386
+ ---
387
+
388
+ ## Core Web Vitals 2026: INP (Interaction to Next Paint)
389
+
390
+ - **Target**: INP < 200ms (replaces legacy FID).
391
+ - **Rule**: Never block the main thread for > 50ms during click, keypress, or tap event handlers.
392
+ - Wrap heavy UI updates in `startTransition`:
393
+
394
+ ```tsx
395
+ startTransition(() => {
396
+ setFilter(newFilter);
397
+ });
398
+ ```
399
+
400
+ - Use Web Workers or chunks for heavy client-side filtering and data processing.
401
+
402
+ ---
403
+
404
+ ## Code Examples
405
+
406
+ See `EXAMPLES.md` for detailed code examples.
407
+
408
+ ## Validation Checklist
409
+
410
+ What to verify during the review phase before completing the task.
411
+
412
+ ## Common Mistakes
413
+
414
+ Anti-patterns and things to explicitly avoid. See `TROUBLESHOOTING.md`.
415
+
416
+ ## Integration Notes
417
+
418
+ How this skill interacts with other skills.
@@ -0,0 +1,19 @@
1
+ # ui-ux-pro Troubleshooting & Common Mistakes
2
+
3
+ ## 1. Obvious AI Design Tells
4
+
5
+ - **Symptom**: The interface immediately looks like a generic AI prototype.
6
+ - **Root Cause**: Using Inter alone, pure black (#000000), purple-blue gradients, and rounded icon squares above every title.
7
+ - **Fix**: Use tinted backgrounds (#090A0F), pair primary font with JetBrains Mono for code/numbers, use subtle border highlights.
8
+
9
+ ## 2. Contrast Failures in Secondary Elements
10
+
11
+ - **Symptom**: Captions, timestamps, and borders are invisible or impossible to read.
12
+ - **Root Cause**: Using flat #666 or #444 grays without testing against actual background luminance.
13
+ - **Fix**: Always test contrast ratios (minimum 4.5:1 for body, 3:1 for graphical boundaries) using semantic theme tokens.
14
+
15
+ ## 3. Nesting Cards Inside Cards
16
+
17
+ - **Symptom**: Visual claustrophobia and slop aesthetic.
18
+ - **Root Cause**: Putting bordered cards inside other bordered cards.
19
+ - **Fix**: Flatten the hierarchy. Use background surface contrast and negative space instead of border-in-border nesting.
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "rules_followed": {
6
+ "type": "boolean"
7
+ }
8
+ },
9
+ "required": [
10
+ "rules_followed"
11
+ ]
12
+ }
@@ -0,0 +1,14 @@
1
+ schemaVersion: 2
2
+ name: ui-ux-pro
3
+ category: design
4
+ type: instruction-only
5
+ description: >
6
+ Professional UI/UX design skill with strict anti-pattern enforcement.
7
+ Prevents AI slop design, enforces accessibility standards, semantic
8
+ color palettes, proper spacing, and bans overused design clichés.
9
+ version: 1.0.0
10
+ resources:
11
+ - EXAMPLES.md
12
+ - SKILL.md
13
+ - TROUBLESHOOTING.md
14
+ - VALIDATION.json
@@ -0,0 +1,36 @@
1
+ # ux-design Examples - Anti-patterns vs ContextOS Standard
2
+
3
+ ## Example 1: Destructive Actions
4
+
5
+ ### Anti-pattern: Instant Deletion Without Confirmation or Recovery
6
+
7
+ ```tsx
8
+ // BAD: Immediate delete on click, no confirmation, irreversible data loss
9
+ <button onClick={() => deleteProject(project.id)}>Delete</button>
10
+ ```
11
+
12
+ ### Best practice: ContextOS Standard (Two-Step Confirmation or Undo Toast)
13
+
14
+ ```tsx
15
+ // GOOD: Clear confirmation dialog stating exact item name and non-reversible impact
16
+ <AlertDialog>
17
+ <AlertDialogTrigger asChild>
18
+ <Button variant="destructive">Delete Project</Button>
19
+ </AlertDialogTrigger>
20
+ <AlertDialogContent>
21
+ <AlertDialogHeader>
22
+ <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
23
+ <AlertDialogDescription>
24
+ This action cannot be undone. This will permanently delete <strong>{project.name}</strong>
25
+ and all associated API keys.
26
+ </AlertDialogDescription>
27
+ </AlertDialogHeader>
28
+ <AlertDialogFooter>
29
+ <AlertDialogCancel>Cancel</AlertDialogCancel>
30
+ <AlertDialogAction onClick={handleDelete} className="bg-destructive">
31
+ Delete permanently
32
+ </AlertDialogAction>
33
+ </AlertDialogFooter>
34
+ </AlertDialogContent>
35
+ </AlertDialog>
36
+ ```
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: UX Design
3
+ description: >
4
+ ContextOS skill for UX Design
5
+ ---
6
+
7
+ # UX Design
8
+
9
+ ## Overview
10
+
11
+ User experience and interaction design standard. Enforces progressive disclosure, predictable user flows, designed empty/loading/error states, form usability, and keyboard navigation ergonomics.
12
+
13
+ ## When to Use
14
+
15
+ Activate when designing complex multi-step workflows, onboarding funnels, form validation feedback, error recovery flows, and user journeys.
16
+
17
+ ## Rules & Patterns
18
+ <!-- Source: ux.md -->
19
+
20
+ ## UX Design - Best Practices
21
+
22
+ ## Information Architecture
23
+
24
+ - **Mental models** - organize content the way users think, not the way your code is structured
25
+ - **Card sorting** - group features into logical categories
26
+ - **Navigation structure** - no more than 3 clicks to any page
27
+ - **Naming** - use user's language, not internal jargon
28
+
29
+ ## User Flows
30
+
31
+ ### Design every state
32
+
33
+ Every screen has 5 states. Design ALL of them:
34
+
35
+ 1. **Empty state** - first visit, no data yet. Include CTA to get started
36
+ 2. **Loading state** - skeleton screens > spinners
37
+ 3. **Partial state** - some data, not complete
38
+ 4. **Ideal state** - normal usage with data
39
+ 5. **Error state** - what went wrong and how to fix it
40
+
41
+ ### Reduce cognitive load
42
+
43
+ - **Progressive disclosure** - show only what's needed now
44
+ - **Sensible defaults** - pre-fill what you can
45
+ - **Inline help** - tooltips and contextual guidance
46
+ - **Confirmation for destructive actions** - but NOT for every action
47
+
48
+ ## Forms UX
49
+
50
+ - Show progress for multi-step forms
51
+ - Validate inline (on blur), not on submit
52
+ - Show password requirements as the user types
53
+ - Auto-focus the first input
54
+ - Use appropriate input types (email, tel, date)
55
+ - Disable submit button only when form is submitting, never as "validation"
56
+
57
+ ## Onboarding
58
+
59
+ - **Quick win** - let users see value within 30 seconds
60
+ - **Minimal signup** - only ask for what's absolutely needed
61
+ - **Progressive onboarding** - teach features as users encounter them
62
+ - **Skip option** - always let users skip tutorials
63
+
64
+ ## Feedback
65
+
66
+ - Every action needs feedback (success, error, pending)
67
+ - Use toast notifications for non-blocking feedback
68
+ - Use inline messages for form validation
69
+ - Loading states should be < 300ms before showing (avoid flash)
70
+ - Optimistic UI for fast-perceived actions
71
+
72
+ ## Mobile UX
73
+
74
+ - Touch targets: minimum 44x44px
75
+ - Thumb zones - place primary actions within easy reach
76
+ - Bottom navigation for core actions
77
+ - Pull-to-refresh for content lists
78
+ - Haptic feedback for important actions
79
+
80
+ ## Psychology Principles
81
+
82
+ - **Fitts's Law** - make important targets large and close
83
+ - **Hick's Law** - reduce choices to reduce decision time
84
+ - **Jakob's Law** - users prefer familiar patterns
85
+ - **Peak-End Rule** - make the last interaction great
86
+ - **Aesthetic-Usability Effect** - beautiful things are perceived as easier to use
87
+
88
+ ## Usability Heuristics (Nielsen)
89
+
90
+ 1. Visibility of system status
91
+ 2. Match between system and real world
92
+ 3. User control and freedom (undo, escape)
93
+ 4. Consistency and standards
94
+ 5. Error prevention
95
+ 6. Recognition rather than recall
96
+ 7. Flexibility and efficiency of use
97
+ 8. Aesthetic and minimalist design
98
+ 9. Help users recognize and recover from errors
99
+ 10. Help and documentation
100
+
101
+
102
+ ## Code Examples
103
+
104
+ See `EXAMPLES.md` for detailed code examples.
105
+
106
+ ## Validation Checklist
107
+
108
+ What to verify during the review phase before completing the task.
109
+
110
+ ## Common Mistakes
111
+
112
+ Anti-patterns and things to explicitly avoid. See `TROUBLESHOOTING.md`.
113
+
114
+ ## Integration Notes
115
+
116
+ How this skill interacts with other skills.