contextos-agents 2.0.0 → 2.1.1

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 (223) hide show
  1. package/.agents/AGENTS.md +53 -33
  2. package/.agents/adapters/aider/export.js +41 -14
  3. package/.agents/adapters/claude/export.js +54 -3
  4. package/.agents/adapters/copilot/export.js +1 -1
  5. package/.agents/adapters/cursor/export.js +1 -1
  6. package/.agents/adapters/drift-detector.js +86 -10
  7. package/.agents/adapters/gemini/export.js +1 -1
  8. package/.agents/adapters/pure-compiler.js +28 -6
  9. package/.agents/adapters/shared.js +13 -4
  10. package/.agents/adapters/zed/export.js +1 -1
  11. package/.agents/compiled/registry.v2.json +29 -25
  12. package/.agents/compiled/registry.v2.sha256 +1 -1
  13. package/.agents/core/skills/context-os/SKILL.md +34 -37
  14. package/.agents/core/skills/engineering-workflow/SKILL.md +24 -24
  15. package/.agents/core/skills/gemini-precision/EXAMPLES.md +72 -0
  16. package/.agents/core/skills/gemini-precision/SKILL.md +2 -1
  17. package/.agents/core/skills/gemini-precision/TROUBLESHOOTING.md +25 -0
  18. package/.agents/core/skills/gemini-precision/skill.yaml +2 -0
  19. package/.agents/core/skills/gstack-roles/SKILL.md +7 -6
  20. package/.agents/core/skills/security/SKILL.md +44 -16
  21. package/.agents/core/skills/security/skill.yaml +0 -1
  22. package/.agents/ctx.js +20 -14
  23. package/.agents/generated/claude/skills/context-os/SKILL.md +34 -37
  24. package/.agents/generated/claude/skills/engineering-workflow/SKILL.md +24 -24
  25. package/.agents/generated/claude/skills/gemini-precision/SKILL.md +102 -1
  26. package/.agents/generated/claude/skills/gstack-roles/SKILL.md +7 -6
  27. package/.agents/generated/claude/skills/security/SKILL.md +44 -16
  28. package/.agents/generated/gemini/skills/context-os/SKILL.md +34 -37
  29. package/.agents/generated/gemini/skills/engineering-workflow/SKILL.md +24 -24
  30. package/.agents/generated/gemini/skills/gemini-precision/SKILL.md +105 -1
  31. package/.agents/generated/gemini/skills/gstack-roles/SKILL.md +7 -6
  32. package/.agents/generated/gemini/skills/security/SKILL.md +44 -125
  33. package/.agents/plugins.js +105 -8
  34. package/.agents/profiles.js +32 -11
  35. package/.agents/resolver/canonical-resolver.js +7 -7
  36. package/.agents/validate.js +69 -1
  37. package/README.md +81 -24
  38. package/bin/commands/hook.js +167 -0
  39. package/bin/commands/scan.js +77 -0
  40. package/bin/commands.js +39 -1
  41. package/bin/index.js +151 -34
  42. package/bin/lib/gate.js +171 -0
  43. package/bin/lib/git-snapshot.js +214 -0
  44. package/bin/lib/scan.js +461 -0
  45. package/catalog/skills/adapters/EXAMPLES.md +19 -0
  46. package/catalog/skills/adapters/SKILL.md +101 -0
  47. package/catalog/skills/adapters/TROUBLESHOOTING.md +7 -0
  48. package/catalog/skills/adapters/VALIDATION.json +12 -0
  49. package/catalog/skills/adapters/skill.yaml +13 -0
  50. package/catalog/skills/api-design/EXAMPLES.md +91 -0
  51. package/catalog/skills/api-design/SKILL.md +63 -0
  52. package/catalog/skills/api-design/TROUBLESHOOTING.md +54 -0
  53. package/catalog/skills/api-design/VALIDATION.json +11 -0
  54. package/catalog/skills/api-design/skill.yaml +14 -0
  55. package/catalog/skills/architecture-diagrams/SKILL.md +108 -0
  56. package/catalog/skills/architecture-diagrams/VALIDATION.json +12 -0
  57. package/catalog/skills/architecture-diagrams/skill.yaml +9 -0
  58. package/catalog/skills/brutalist-design/EXAMPLES.md +59 -0
  59. package/catalog/skills/brutalist-design/SKILL.md +150 -0
  60. package/catalog/skills/brutalist-design/VALIDATION.json +12 -0
  61. package/catalog/skills/brutalist-design/skill.yaml +10 -0
  62. package/catalog/skills/ci-cd/EXAMPLES.md +79 -0
  63. package/catalog/skills/ci-cd/SKILL.md +69 -0
  64. package/catalog/skills/ci-cd/TROUBLESHOOTING.md +52 -0
  65. package/catalog/skills/ci-cd/VALIDATION.json +11 -0
  66. package/catalog/skills/ci-cd/skill.yaml +13 -0
  67. package/catalog/skills/database/EXAMPLES.md +74 -0
  68. package/catalog/skills/database/SKILL.md +101 -0
  69. package/catalog/skills/database/TROUBLESHOOTING.md +18 -0
  70. package/catalog/skills/database/VALIDATION.json +11 -0
  71. package/catalog/skills/database/skill.yaml +14 -0
  72. package/catalog/skills/ddd/EXAMPLES.md +42 -0
  73. package/catalog/skills/ddd/SKILL.md +247 -0
  74. package/catalog/skills/ddd/TROUBLESHOOTING.md +19 -0
  75. package/catalog/skills/ddd/VALIDATION.json +12 -0
  76. package/catalog/skills/ddd/skill.yaml +14 -0
  77. package/catalog/skills/decisions/EXAMPLES.md +35 -0
  78. package/catalog/skills/decisions/SKILL.md +90 -0
  79. package/catalog/skills/decisions/TROUBLESHOOTING.md +13 -0
  80. package/catalog/skills/decisions/VALIDATION.json +12 -0
  81. package/catalog/skills/decisions/skill.yaml +13 -0
  82. package/catalog/skills/docker/EXAMPLES.md +56 -0
  83. package/catalog/skills/docker/SKILL.md +169 -0
  84. package/catalog/skills/docker/TROUBLESHOOTING.md +18 -0
  85. package/catalog/skills/docker/VALIDATION.json +11 -0
  86. package/catalog/skills/docker/skill.yaml +13 -0
  87. package/catalog/skills/fastapi/EXAMPLES.md +36 -0
  88. package/catalog/skills/fastapi/SKILL.md +171 -0
  89. package/catalog/skills/fastapi/TROUBLESHOOTING.md +19 -0
  90. package/catalog/skills/fastapi/VALIDATION.json +12 -0
  91. package/catalog/skills/fastapi/skill.yaml +14 -0
  92. package/catalog/skills/generators/EXAMPLES.md +19 -0
  93. package/catalog/skills/generators/SKILL.md +110 -0
  94. package/catalog/skills/generators/TROUBLESHOOTING.md +7 -0
  95. package/catalog/skills/generators/VALIDATION.json +12 -0
  96. package/catalog/skills/generators/skill.yaml +22 -0
  97. package/catalog/skills/generators/templates/API.md +77 -0
  98. package/catalog/skills/generators/templates/ARCHITECTURE.md +70 -0
  99. package/catalog/skills/generators/templates/DATABASE.md +42 -0
  100. package/catalog/skills/generators/templates/DECISION.md +46 -0
  101. package/catalog/skills/generators/templates/PRD.md +67 -0
  102. package/catalog/skills/generators/templates/PROJECT_GRAPH.md +56 -0
  103. package/catalog/skills/generators/templates/ROADMAP.md +51 -0
  104. package/catalog/skills/generators/templates/TASKS.md +43 -0
  105. package/catalog/skills/generators/templates/UI.md +73 -0
  106. package/catalog/skills/graphify/EXAMPLES.md +73 -0
  107. package/catalog/skills/graphify/SKILL.md +130 -0
  108. package/catalog/skills/graphify/VALIDATION.json +12 -0
  109. package/catalog/skills/graphify/skill.yaml +13 -0
  110. package/catalog/skills/impeccable-design/EXAMPLES.md +26 -0
  111. package/catalog/skills/impeccable-design/SKILL.md +201 -0
  112. package/catalog/skills/impeccable-design/TROUBLESHOOTING.md +19 -0
  113. package/catalog/skills/impeccable-design/VALIDATION.json +12 -0
  114. package/catalog/skills/impeccable-design/skill.yaml +15 -0
  115. package/catalog/skills/interview-me/SKILL.md +97 -0
  116. package/catalog/skills/interview-me/VALIDATION.json +12 -0
  117. package/catalog/skills/interview-me/skill.yaml +9 -0
  118. package/catalog/skills/microservices/EXAMPLES.md +38 -0
  119. package/catalog/skills/microservices/SKILL.md +164 -0
  120. package/catalog/skills/microservices/TROUBLESHOOTING.md +19 -0
  121. package/catalog/skills/microservices/VALIDATION.json +12 -0
  122. package/catalog/skills/microservices/skill.yaml +14 -0
  123. package/catalog/skills/minimalist-design/EXAMPLES.md +58 -0
  124. package/catalog/skills/minimalist-design/SKILL.md +113 -0
  125. package/catalog/skills/minimalist-design/VALIDATION.json +12 -0
  126. package/catalog/skills/minimalist-design/skill.yaml +10 -0
  127. package/catalog/skills/nestjs/EXAMPLES.md +40 -0
  128. package/catalog/skills/nestjs/SKILL.md +139 -0
  129. package/catalog/skills/nestjs/TROUBLESHOOTING.md +19 -0
  130. package/catalog/skills/nestjs/VALIDATION.json +12 -0
  131. package/catalog/skills/nestjs/skill.yaml +14 -0
  132. package/catalog/skills/nextjs/EXAMPLES.md +40 -0
  133. package/catalog/skills/nextjs/SKILL.md +163 -0
  134. package/catalog/skills/nextjs/TROUBLESHOOTING.md +19 -0
  135. package/catalog/skills/nextjs/VALIDATION.json +12 -0
  136. package/catalog/skills/nextjs/skill.yaml +14 -0
  137. package/catalog/skills/node/EXAMPLES.md +80 -0
  138. package/catalog/skills/node/SKILL.md +128 -0
  139. package/catalog/skills/node/TROUBLESHOOTING.md +19 -0
  140. package/catalog/skills/node/VALIDATION.json +12 -0
  141. package/catalog/skills/node/skill.yaml +14 -0
  142. package/catalog/skills/performance/EXAMPLES.md +30 -0
  143. package/catalog/skills/performance/SKILL.md +75 -0
  144. package/catalog/skills/performance/TROUBLESHOOTING.md +19 -0
  145. package/catalog/skills/performance/VALIDATION.json +12 -0
  146. package/catalog/skills/performance/skill.yaml +14 -0
  147. package/catalog/skills/react/EXAMPLES.md +79 -0
  148. package/catalog/skills/react/SKILL.md +132 -0
  149. package/catalog/skills/react/TROUBLESHOOTING.md +19 -0
  150. package/catalog/skills/react/VALIDATION.json +12 -0
  151. package/catalog/skills/react/skill.yaml +14 -0
  152. package/catalog/skills/react-best-practices/SKILL.md +158 -0
  153. package/catalog/skills/react-best-practices/VALIDATION.json +12 -0
  154. package/catalog/skills/react-best-practices/skill.yaml +13 -0
  155. package/catalog/skills/redesign-audit/SKILL.md +117 -0
  156. package/catalog/skills/redesign-audit/VALIDATION.json +12 -0
  157. package/catalog/skills/redesign-audit/skill.yaml +9 -0
  158. package/catalog/skills/security-audit/EXAMPLES.md +79 -0
  159. package/catalog/skills/security-audit/SKILL.md +91 -0
  160. package/catalog/skills/security-audit/TROUBLESHOOTING.md +46 -0
  161. package/catalog/skills/security-audit/VALIDATION.json +11 -0
  162. package/catalog/skills/security-audit/skill.yaml +14 -0
  163. package/catalog/skills/soft-design/EXAMPLES.md +51 -0
  164. package/catalog/skills/soft-design/SKILL.md +108 -0
  165. package/catalog/skills/soft-design/VALIDATION.json +12 -0
  166. package/catalog/skills/soft-design/skill.yaml +10 -0
  167. package/catalog/skills/state-management/EXAMPLES.md +56 -0
  168. package/catalog/skills/state-management/SKILL.md +168 -0
  169. package/catalog/skills/state-management/TROUBLESHOOTING.md +18 -0
  170. package/catalog/skills/state-management/VALIDATION.json +11 -0
  171. package/catalog/skills/state-management/skill.yaml +14 -0
  172. package/catalog/skills/subagent-orchestrator/SKILL.md +117 -0
  173. package/catalog/skills/subagent-orchestrator/VALIDATION.json +12 -0
  174. package/catalog/skills/subagent-orchestrator/skill.yaml +9 -0
  175. package/catalog/skills/system-design/EXAMPLES.md +75 -0
  176. package/catalog/skills/system-design/SKILL.md +419 -0
  177. package/catalog/skills/system-design/TROUBLESHOOTING.md +19 -0
  178. package/catalog/skills/system-design/VALIDATION.json +12 -0
  179. package/catalog/skills/system-design/skill.yaml +14 -0
  180. package/catalog/skills/terraform/EXAMPLES.md +74 -0
  181. package/catalog/skills/terraform/SKILL.md +55 -0
  182. package/catalog/skills/terraform/TROUBLESHOOTING.md +53 -0
  183. package/catalog/skills/terraform/VALIDATION.json +11 -0
  184. package/catalog/skills/terraform/skill.yaml +14 -0
  185. package/catalog/skills/testing/EXAMPLES.md +122 -0
  186. package/catalog/skills/testing/SKILL.md +70 -0
  187. package/catalog/skills/testing/TROUBLESHOOTING.md +18 -0
  188. package/catalog/skills/testing/VALIDATION.json +11 -0
  189. package/catalog/skills/testing/skill.yaml +14 -0
  190. package/catalog/skills/typescript/EXAMPLES.md +64 -0
  191. package/catalog/skills/typescript/SKILL.md +112 -0
  192. package/catalog/skills/typescript/TROUBLESHOOTING.md +19 -0
  193. package/catalog/skills/typescript/VALIDATION.json +12 -0
  194. package/catalog/skills/typescript/skill.yaml +14 -0
  195. package/catalog/skills/ui-design/EXAMPLES.md +21 -0
  196. package/catalog/skills/ui-design/SKILL.md +124 -0
  197. package/catalog/skills/ui-design/TROUBLESHOOTING.md +19 -0
  198. package/catalog/skills/ui-design/VALIDATION.json +12 -0
  199. package/catalog/skills/ui-design/skill.yaml +16 -0
  200. package/catalog/skills/ui-ux-pro/EXAMPLES.md +62 -0
  201. package/catalog/skills/ui-ux-pro/SKILL.md +418 -0
  202. package/catalog/skills/ui-ux-pro/TROUBLESHOOTING.md +19 -0
  203. package/catalog/skills/ui-ux-pro/VALIDATION.json +12 -0
  204. package/catalog/skills/ui-ux-pro/skill.yaml +14 -0
  205. package/catalog/skills/ux-design/EXAMPLES.md +36 -0
  206. package/catalog/skills/ux-design/SKILL.md +116 -0
  207. package/catalog/skills/ux-design/TROUBLESHOOTING.md +19 -0
  208. package/catalog/skills/ux-design/VALIDATION.json +12 -0
  209. package/catalog/skills/ux-design/skill.yaml +16 -0
  210. package/catalog/skills/vercel-optimize/SKILL.md +83 -0
  211. package/catalog/skills/vercel-optimize/VALIDATION.json +12 -0
  212. package/catalog/skills/vercel-optimize/scripts/collect-signals.mjs +131 -0
  213. package/catalog/skills/vercel-optimize/scripts/gate-investigations.mjs +142 -0
  214. package/catalog/skills/vercel-optimize/scripts/merge-signals.mjs +143 -0
  215. package/catalog/skills/vercel-optimize/scripts/scan-codebase.mjs +174 -0
  216. package/catalog/skills/vercel-optimize/skill.yaml +15 -0
  217. package/catalog/skills/web-accessibility/EXAMPLES.md +39 -0
  218. package/catalog/skills/web-accessibility/SKILL.md +151 -0
  219. package/catalog/skills/web-accessibility/TROUBLESHOOTING.md +19 -0
  220. package/catalog/skills/web-accessibility/VALIDATION.json +12 -0
  221. package/catalog/skills/web-accessibility/skill.yaml +14 -0
  222. package/package.json +5 -2
  223. package/.agents/core/skills/security/security.md +0 -106
@@ -0,0 +1,21 @@
1
+ # ui-design Examples - Anti-patterns vs ContextOS Standard
2
+
3
+ ## Example 1: Component Token Consistency
4
+
5
+ ### Anti-pattern: Hardcoded Arbitrary Tailwind Utilities
6
+
7
+ ```tsx
8
+ // BAD: Inconsistent spacing, arbitrary colors, unmaintainable styling
9
+ <div className="p-[13px] bg-[#1a1b2e] rounded-[7px] text-[#99aab5] border border-[#2b2d42]">
10
+ <button className="px-[15px] py-[7px] bg-[#5865f2] hover:bg-[#4752c4]">Action</button>
11
+ </div>
12
+ ```
13
+
14
+ ### Best practice: ContextOS Standard (Semantic Theme Tokens)
15
+
16
+ ```tsx
17
+ // GOOD: Consistent scale utilities driven by Tailwind v4 @theme design tokens
18
+ <div className="p-4 bg-card rounded-lg text-muted-foreground border border-border">
19
+ <Button variant="primary" size="md">Action</Button>
20
+ </div>
21
+ ```
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: UI Design
3
+ description: >
4
+ ContextOS skill for UI Design
5
+ ---
6
+
7
+ # UI Design
8
+
9
+ ## Overview
10
+
11
+ Modern component library and design system engineering. Enforces design token hierarchies (spacing, radii, elevation), accessible component primitives (shadcn/ui, Radix), and responsive layout constraints.
12
+
13
+ ## When to Use
14
+
15
+ Activate when designing design systems, reusable UI component libraries, navigation bars, modals, data tables, and interactive dashboards.
16
+
17
+ ## Rules & Patterns
18
+ <!-- Source: ui.md -->
19
+
20
+ ## UI Design - Best Practices
21
+
22
+ ## Design System Foundations
23
+
24
+ ### Color
25
+
26
+ - **Never use generic colors** - curate a harmonious palette
27
+ - **Always tint** - no pure black (#000), no pure gray. Add a subtle warm or cool tint
28
+ - **Color roles**: primary (action), secondary (accent), neutral (text, borders), semantic (error, success, warning, info)
29
+ - **Dark mode**: design intentionally, not just invert. Surface hierarchy: background < surface < elevated
30
+ - **Contrast**: 4.5:1 minimum for body text, 3:1 for large text
31
+
32
+ ### Typography
33
+
34
+ - **Never use browser defaults** - choose a curated font (Inter, Outfit, Geist, Sora)
35
+ - **Type scale**: use a modular scale (1.25 ratio) - 12, 14, 16, 20, 24, 32, 40, 48
36
+ - **Font weights**: Regular (400), Medium (500), Semibold (600), Bold (700). Don't use all of them - pick 2-3
37
+ - **Line height**: 1.5 for body, 1.2 for headings, 1.6 for long-form text
38
+ - **Max line width**: 65-75 characters for readability
39
+
40
+ ### Spacing
41
+
42
+ - **Use a 4px grid** - all spacing should be multiples of 4
43
+ - **Spacing scale**: 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96
44
+ - **Consistency** - same spacing between similar elements
45
+ - **Whitespace is design** - don't fill every pixel
46
+
47
+ ### Layout
48
+
49
+ - **Grid system**: 12-column grid for desktop, 4-column for mobile
50
+ - **Visual hierarchy**: size, weight, color, spacing, position
51
+ - **F-pattern/Z-pattern** - for content-heavy pages
52
+ - **Group related items** - use proximity and boundaries
53
+
54
+ ## Component Patterns
55
+
56
+ ### Buttons
57
+
58
+ - Clear hierarchy: Primary > Secondary > Ghost/Text
59
+ - Consistent sizing: sm (32px), md (40px), lg (48px)
60
+ - States: default, hover, active, disabled, loading
61
+ - Always accessible: sufficient contrast, focus indicator
62
+
63
+ ### Forms
64
+
65
+ - Labels above inputs (not floating labels for critical forms)
66
+ - Clear error states with inline messages
67
+ - Logical tab order
68
+ - Progressive disclosure - don't show all fields at once
69
+
70
+ ### Cards
71
+
72
+ - Don't nest cards inside cards
73
+ - Clear visual hierarchy within the card
74
+ - Consistent padding and spacing
75
+ - Interactive cards need hover state
76
+
77
+ ### Navigation
78
+
79
+ - Maximum 7±2 items in primary nav
80
+ - Clear active state
81
+ - Mobile: bottom nav or hamburger (not both)
82
+ - Breadcrumbs for deep hierarchies
83
+
84
+ ## Animation Principles
85
+
86
+ - **Purpose**: guide attention, show relationships, provide feedback
87
+ - **Duration**: 150-300ms for micro-interactions, 300-500ms for transitions
88
+ - **Easing**: `ease-out` for entrances, `ease-in` for exits. Never `bounce` or `elastic`
89
+ - **Reduce motion**: respect `prefers-reduced-motion`
90
+
91
+ ## Anti-Patterns (from Impeccable)
92
+
93
+ - [FAIL] Gray text on colored backgrounds - destroys readability
94
+ - [FAIL] Pure black text on white (#000 on #fff) - too harsh, tint the black
95
+ - [FAIL] Cards nested inside cards - visual noise
96
+ - [FAIL] Bounce/elastic easing - feels dated
97
+ - [FAIL] Icon tile above every heading - SaaS template tell
98
+ - [FAIL] Purple-to-blue gradient on everything - overused
99
+ - [FAIL] Using Inter for everything - pick a font that matches your brand
100
+ - [FAIL] Rounded-square icons everywhere - lack of visual variety
101
+
102
+ ## Dark Mode
103
+
104
+ - Surface elevation through subtle lightening (not colored backgrounds)
105
+ - Reduce white contrast - use #E0E0E0, not #FFFFFF
106
+ - Shadows become less visible - use subtle borders or elevation changes
107
+ - Test all states in both modes
108
+
109
+
110
+ ## Code Examples
111
+
112
+ See `EXAMPLES.md` for detailed code examples.
113
+
114
+ ## Validation Checklist
115
+
116
+ What to verify during the review phase before completing the task.
117
+
118
+ ## Common Mistakes
119
+
120
+ Anti-patterns and things to explicitly avoid. See `TROUBLESHOOTING.md`.
121
+
122
+ ## Integration Notes
123
+
124
+ How this skill interacts with other skills.
@@ -0,0 +1,19 @@
1
+ # ui-design Troubleshooting & Common Mistakes
2
+
3
+ ## 1. Z-Index Chaos
4
+
5
+ - **Symptom**: Tooltips rendered underneath dialog overlays, or dropdowns hidden behind sticky headers.
6
+ - **Root Cause**: Ad-hoc hardcoded values (z-50, z-[999], z-[9999]).
7
+ - **Fix**: Use Radix / shadcn Portals for floating elements so they render at root DOM level, or declare strict z-index tokens.
8
+
9
+ ## 2. Inconsistent Component States
10
+
11
+ - **Symptom**: Buttons have hover states but lack focus-visible rings or disabled states.
12
+ - **Root Cause**: Styling only the default and hover states.
13
+ - **Fix**: Standardize state matrices for every interactive element: default, hover, focus-visible, active, disabled, loading.
14
+
15
+ ## 3. Ignoring Empty and Error Component States
16
+
17
+ - **Symptom**: Tables or list views show a blank white box when there are 0 records.
18
+ - **Root Cause**: Developers only design for the "ideal data" case.
19
+ - **Fix**: Every data component must explicitly render designed EmptyState and ErrorState fallbacks.
@@ -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,16 @@
1
+ schemaVersion: 2
2
+ id: ui-design
3
+ name: UI Design
4
+ category: design
5
+ type: instruction-only
6
+ requires: []
7
+ optional: [react, tailwind, web-accessibility]
8
+ conflicts: []
9
+ weight: 7
10
+ deprecated: true
11
+ canonical: ui-ux-pro
12
+ resources:
13
+ - EXAMPLES.md
14
+ - SKILL.md
15
+ - TROUBLESHOOTING.md
16
+ - VALIDATION.json
@@ -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.