start-vibing 2.0.8 → 2.0.10

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 (139) hide show
  1. package/README.md +177 -176
  2. package/dist/cli.js +38 -11
  3. package/package.json +42 -42
  4. package/template/.claude/CLAUDE.md +174 -152
  5. package/template/.claude/agents/01-orchestration/agent-selector.md +130 -123
  6. package/template/.claude/agents/01-orchestration/checkpoint-manager.md +142 -131
  7. package/template/.claude/agents/01-orchestration/context-manager.md +138 -124
  8. package/template/.claude/agents/01-orchestration/error-recovery.md +182 -176
  9. package/template/.claude/agents/01-orchestration/orchestrator.md +114 -107
  10. package/template/.claude/agents/01-orchestration/parallel-coordinator.md +141 -130
  11. package/template/.claude/agents/01-orchestration/task-decomposer.md +121 -118
  12. package/template/.claude/agents/01-orchestration/workflow-router.md +114 -111
  13. package/template/.claude/agents/02-typescript/bun-runtime-expert.md +197 -180
  14. package/template/.claude/agents/02-typescript/esm-resolver.md +193 -187
  15. package/template/.claude/agents/02-typescript/import-alias-enforcer.md +158 -149
  16. package/template/.claude/agents/02-typescript/ts-generics-helper.md +183 -165
  17. package/template/.claude/agents/02-typescript/ts-migration-helper.md +238 -227
  18. package/template/.claude/agents/02-typescript/ts-strict-checker.md +180 -162
  19. package/template/.claude/agents/02-typescript/ts-types-analyzer.md +199 -185
  20. package/template/.claude/agents/02-typescript/type-definition-writer.md +187 -183
  21. package/template/.claude/agents/02-typescript/zod-schema-designer.md +212 -197
  22. package/template/.claude/agents/02-typescript/zod-validator.md +158 -153
  23. package/template/.claude/agents/03-testing/playwright-assertions.md +265 -255
  24. package/template/.claude/agents/03-testing/playwright-e2e.md +247 -245
  25. package/template/.claude/agents/03-testing/playwright-fixtures.md +234 -240
  26. package/template/.claude/agents/03-testing/playwright-multi-viewport.md +256 -261
  27. package/template/.claude/agents/03-testing/playwright-page-objects.md +247 -247
  28. package/template/.claude/agents/03-testing/test-cleanup-manager.md +248 -256
  29. package/template/.claude/agents/03-testing/test-data-generator.md +254 -266
  30. package/template/.claude/agents/03-testing/tester-integration.md +278 -278
  31. package/template/.claude/agents/03-testing/tester-unit.md +207 -204
  32. package/template/.claude/agents/03-testing/vitest-config.md +287 -289
  33. package/template/.claude/agents/04-docker/container-health.md +255 -239
  34. package/template/.claude/agents/04-docker/deployment-validator.md +225 -217
  35. package/template/.claude/agents/04-docker/docker-compose-designer.md +281 -268
  36. package/template/.claude/agents/04-docker/docker-env-manager.md +235 -228
  37. package/template/.claude/agents/04-docker/docker-multi-stage.md +241 -229
  38. package/template/.claude/agents/04-docker/dockerfile-optimizer.md +208 -204
  39. package/template/.claude/agents/05-database/data-migration.md +0 -293
  40. package/template/.claude/agents/05-database/database-seeder.md +273 -270
  41. package/template/.claude/agents/05-database/mongodb-query-optimizer.md +230 -219
  42. package/template/.claude/agents/05-database/mongoose-aggregation.md +306 -280
  43. package/template/.claude/agents/05-database/mongoose-index-optimizer.md +182 -174
  44. package/template/.claude/agents/05-database/mongoose-schema-designer.md +267 -267
  45. package/template/.claude/agents/06-security/auth-session-validator.md +68 -65
  46. package/template/.claude/agents/06-security/input-sanitizer.md +80 -81
  47. package/template/.claude/agents/06-security/owasp-checker.md +97 -87
  48. package/template/.claude/agents/06-security/permission-auditor.md +100 -95
  49. package/template/.claude/agents/06-security/security-auditor.md +84 -82
  50. package/template/.claude/agents/06-security/sensitive-data-scanner.md +83 -85
  51. package/template/.claude/agents/07-documentation/api-documenter.md +136 -131
  52. package/template/.claude/agents/07-documentation/changelog-manager.md +105 -96
  53. package/template/.claude/agents/07-documentation/documenter.md +76 -73
  54. package/template/.claude/agents/07-documentation/domain-updater.md +81 -74
  55. package/template/.claude/agents/07-documentation/jsdoc-generator.md +114 -114
  56. package/template/.claude/agents/07-documentation/readme-generator.md +135 -132
  57. package/template/.claude/agents/08-git/branch-manager.md +58 -58
  58. package/template/.claude/agents/08-git/commit-manager.md +63 -61
  59. package/template/.claude/agents/08-git/pr-creator.md +76 -72
  60. package/template/.claude/agents/09-quality/code-reviewer.md +71 -64
  61. package/template/.claude/agents/09-quality/quality-checker.md +67 -67
  62. package/template/.claude/agents/10-research/best-practices-finder.md +89 -82
  63. package/template/.claude/agents/10-research/competitor-analyzer.md +106 -96
  64. package/template/.claude/agents/10-research/pattern-researcher.md +93 -86
  65. package/template/.claude/agents/10-research/research-cache-manager.md +76 -75
  66. package/template/.claude/agents/10-research/research-web.md +98 -91
  67. package/template/.claude/agents/10-research/tech-evaluator.md +101 -94
  68. package/template/.claude/agents/11-ui-ux/accessibility-auditor.md +136 -128
  69. package/template/.claude/agents/11-ui-ux/design-system-enforcer.md +125 -116
  70. package/template/.claude/agents/11-ui-ux/skeleton-generator.md +118 -120
  71. package/template/.claude/agents/11-ui-ux/ui-desktop.md +132 -126
  72. package/template/.claude/agents/11-ui-ux/ui-mobile.md +98 -94
  73. package/template/.claude/agents/11-ui-ux/ui-tablet.md +110 -111
  74. package/template/.claude/agents/12-performance/api-latency-analyzer.md +156 -149
  75. package/template/.claude/agents/12-performance/bundle-analyzer.md +113 -107
  76. package/template/.claude/agents/12-performance/memory-leak-detector.md +137 -126
  77. package/template/.claude/agents/12-performance/performance-profiler.md +115 -108
  78. package/template/.claude/agents/12-performance/query-optimizer.md +124 -116
  79. package/template/.claude/agents/12-performance/render-optimizer.md +154 -148
  80. package/template/.claude/agents/13-debugging/build-error-fixer.md +207 -188
  81. package/template/.claude/agents/13-debugging/debugger.md +149 -137
  82. package/template/.claude/agents/13-debugging/error-stack-analyzer.md +141 -131
  83. package/template/.claude/agents/13-debugging/network-debugger.md +208 -185
  84. package/template/.claude/agents/13-debugging/runtime-error-fixer.md +181 -173
  85. package/template/.claude/agents/13-debugging/type-error-resolver.md +185 -173
  86. package/template/.claude/agents/14-validation/final-validator.md +93 -83
  87. package/template/.claude/agents/_backup/analyzer.md +134 -125
  88. package/template/.claude/agents/_backup/code-reviewer.md +279 -272
  89. package/template/.claude/agents/_backup/commit-manager.md +219 -212
  90. package/template/.claude/agents/_backup/debugger.md +280 -271
  91. package/template/.claude/agents/_backup/documenter.md +237 -220
  92. package/template/.claude/agents/_backup/domain-updater.md +197 -194
  93. package/template/.claude/agents/_backup/final-validator.md +169 -164
  94. package/template/.claude/agents/_backup/orchestrator.md +149 -138
  95. package/template/.claude/agents/_backup/performance.md +232 -228
  96. package/template/.claude/agents/_backup/quality-checker.md +240 -240
  97. package/template/.claude/agents/_backup/research.md +315 -299
  98. package/template/.claude/agents/_backup/security-auditor.md +192 -186
  99. package/template/.claude/agents/_backup/tester.md +566 -564
  100. package/template/.claude/agents/_backup/ui-ux-reviewer.md +247 -242
  101. package/template/.claude/commands/feature.md +48 -48
  102. package/template/.claude/config/README.md +30 -30
  103. package/template/.claude/config/mcp-config.json +344 -330
  104. package/template/.claude/config/project-config.json +53 -53
  105. package/template/.claude/config/quality-gates.json +46 -46
  106. package/template/.claude/config/security-rules.json +45 -45
  107. package/template/.claude/config/testing-config.json +164 -168
  108. package/template/.claude/hooks/SETUP.md +126 -126
  109. package/template/.claude/hooks/run-hook.ts +176 -172
  110. package/template/.claude/hooks/stop-validator.ts +825 -353
  111. package/template/.claude/hooks/user-prompt-submit.ts +886 -794
  112. package/template/.claude/scripts/mcp-quick-install.ts +151 -151
  113. package/template/.claude/scripts/setup-mcps.ts +651 -628
  114. package/template/.claude/settings.json +275 -276
  115. package/template/.claude/skills/bun-runtime/SKILL.md +430 -430
  116. package/template/.claude/skills/codebase-knowledge/SKILL.md +145 -145
  117. package/template/.claude/skills/codebase-knowledge/domains/claude-system.md +431 -403
  118. package/template/.claude/skills/codebase-knowledge/domains/mcp-integration.md +295 -281
  119. package/template/.claude/skills/debugging-patterns/SKILL.md +485 -484
  120. package/template/.claude/skills/docker-patterns/SKILL.md +555 -547
  121. package/template/.claude/skills/docs-tracker/SKILL.md +239 -239
  122. package/template/.claude/skills/final-check/SKILL.md +284 -284
  123. package/template/.claude/skills/git-workflow/SKILL.md +454 -454
  124. package/template/.claude/skills/mongoose-patterns/SKILL.md +499 -512
  125. package/template/.claude/skills/nextjs-app-router/SKILL.md +327 -337
  126. package/template/.claude/skills/performance-patterns/SKILL.md +547 -549
  127. package/template/.claude/skills/playwright-automation/SKILL.md +438 -438
  128. package/template/.claude/skills/quality-gate/SKILL.md +294 -294
  129. package/template/.claude/skills/react-patterns/SKILL.md +389 -376
  130. package/template/.claude/skills/research-cache/SKILL.md +222 -207
  131. package/template/.claude/skills/security-scan/SKILL.md +222 -222
  132. package/template/.claude/skills/shadcn-ui/SKILL.md +511 -520
  133. package/template/.claude/skills/tailwind-patterns/SKILL.md +465 -467
  134. package/template/.claude/skills/test-coverage/SKILL.md +467 -464
  135. package/template/.claude/skills/trpc-api/SKILL.md +434 -435
  136. package/template/.claude/skills/typescript-strict/SKILL.md +367 -368
  137. package/template/.claude/skills/ui-ux-audit/SKILL.md +254 -254
  138. package/template/.claude/skills/zod-validation/SKILL.md +403 -405
  139. package/template/CLAUDE.md +25 -25
@@ -1,467 +1,465 @@
1
- ---
2
- name: tailwind-patterns
3
- description: Tailwind CSS patterns and utilities. Responsive design, dark mode, animations, custom components. Use when styling with Tailwind CSS.
4
- allowed-tools: Read, Write, Edit, Grep, Glob
5
- ---
6
-
7
- # Tailwind Patterns - Utility-First CSS
8
-
9
- ## Purpose
10
-
11
- Expert guidance for Tailwind CSS:
12
-
13
- - **Responsive Design** - Mobile-first breakpoints
14
- - **Dark Mode** - Theming patterns
15
- - **Animations** - Transitions and keyframes
16
- - **Layout** - Flexbox and Grid patterns
17
- - **Custom Utilities** - Extending Tailwind
18
-
19
- ---
20
-
21
- ## Responsive Breakpoints
22
-
23
- ### Default Breakpoints
24
-
25
- ```typescript
26
- // Mobile-first approach
27
- const breakpoints = {
28
- 'sm': '640px', // Small devices
29
- 'md': '768px', // Tablets
30
- 'lg': '1024px', // Laptops
31
- 'xl': '1280px', // Desktops
32
- '2xl': '1536px', // Large screens
33
- };
34
- ```
35
-
36
- ### Usage Pattern
37
-
38
- ```tsx
39
- // Mobile-first: styles apply from that breakpoint UP
40
- <div className="
41
- w-full // All screens
42
- md:w-1/2 // >= 768px
43
- lg:w-1/3 // >= 1024px
44
- xl:w-1/4 // >= 1280px
45
- ">
46
- ```
47
-
48
- ### Custom Breakpoints
49
-
50
- ```javascript
51
- // tailwind.config.js
52
- module.exports = {
53
- theme: {
54
- screens: {
55
- 'xs': '375px', // iPhone SE
56
- 'sm': '640px',
57
- 'md': '768px',
58
- 'lg': '1024px',
59
- 'xl': '1280px',
60
- '2xl': '1536px',
61
- },
62
- },
63
- };
64
- ```
65
-
66
- ---
67
-
68
- ## Layout Patterns
69
-
70
- ### Flexbox
71
-
72
- ```tsx
73
- // Center content
74
- <div className="flex items-center justify-center h-screen">
75
- <Content />
76
- </div>
77
-
78
- // Space between
79
- <div className="flex items-center justify-between">
80
- <Logo />
81
- <Navigation />
82
- </div>
83
-
84
- // Column layout
85
- <div className="flex flex-col gap-4">
86
- <Header />
87
- <Main />
88
- <Footer />
89
- </div>
90
-
91
- // Responsive direction
92
- <div className="flex flex-col md:flex-row gap-4">
93
- <Sidebar />
94
- <Content />
95
- </div>
96
- ```
97
-
98
- ### Grid
99
-
100
- ```tsx
101
- // Basic grid
102
- <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
103
- {items.map((item) => <Card key={item.id} />)}
104
- </div>
105
-
106
- // Auto-fit grid
107
- <div className="grid grid-cols-[repeat(auto-fit,minmax(300px,1fr))] gap-4">
108
- {items.map((item) => <Card key={item.id} />)}
109
- </div>
110
-
111
- // Complex layout
112
- <div className="grid grid-cols-12 gap-4">
113
- <aside className="col-span-12 lg:col-span-3">Sidebar</aside>
114
- <main className="col-span-12 lg:col-span-9">Content</main>
115
- </div>
116
- ```
117
-
118
- ### Container
119
-
120
- ```tsx
121
- // Centered container with padding
122
- <div className="container mx-auto px-4">
123
- <Content />
124
- </div>
125
-
126
- // Max-width variations
127
- <div className="max-w-screen-xl mx-auto px-4 sm:px-6 lg:px-8">
128
- <Content />
129
- </div>
130
- ```
131
-
132
- ---
133
-
134
- ## Common Component Patterns
135
-
136
- ### Card
137
-
138
- ```tsx
139
- <div className="
140
- bg-white dark:bg-gray-800
141
- rounded-lg shadow-md
142
- p-6
143
- border border-gray-200 dark:border-gray-700
144
- hover:shadow-lg transition-shadow
145
- ">
146
- <h3 className="text-lg font-semibold text-gray-900 dark:text-white">
147
- Title
148
- </h3>
149
- <p className="mt-2 text-gray-600 dark:text-gray-300">
150
- Description
151
- </p>
152
- </div>
153
- ```
154
-
155
- ### Button
156
-
157
- ```tsx
158
- // Primary
159
- <button className="
160
- bg-primary text-primary-foreground
161
- px-4 py-2 rounded-md
162
- font-medium
163
- hover:bg-primary/90
164
- focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2
165
- disabled:opacity-50 disabled:cursor-not-allowed
166
- transition-colors
167
- ">
168
- Click me
169
- </button>
170
-
171
- // Icon button
172
- <button className="
173
- p-2 rounded-full
174
- hover:bg-gray-100 dark:hover:bg-gray-800
175
- focus:outline-none focus:ring-2 focus:ring-offset-2
176
- transition-colors
177
- ">
178
- <Icon className="h-5 w-5" />
179
- <span className="sr-only">Action</span>
180
- </button>
181
- ```
182
-
183
- ### Input
184
-
185
- ```tsx
186
- <input
187
- type="text"
188
- className="
189
- w-full px-3 py-2
190
- bg-white dark:bg-gray-900
191
- border border-gray-300 dark:border-gray-700
192
- rounded-md
193
- text-gray-900 dark:text-white
194
- placeholder:text-gray-400
195
- focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent
196
- disabled:opacity-50 disabled:cursor-not-allowed
197
- "
198
- placeholder="Enter text..."
199
- />
200
- ```
201
-
202
- ---
203
-
204
- ## Dark Mode
205
-
206
- ### Setup
207
-
208
- ```javascript
209
- // tailwind.config.js
210
- module.exports = {
211
- darkMode: 'class', // or 'media' for system preference
212
- };
213
- ```
214
-
215
- ### Usage
216
-
217
- ```tsx
218
- <div className="
219
- bg-white dark:bg-gray-900
220
- text-gray-900 dark:text-white
221
- border-gray-200 dark:border-gray-800
222
- ">
223
- <p className="text-gray-600 dark:text-gray-300">
224
- Content adapts to theme
225
- </p>
226
- </div>
227
- ```
228
-
229
- ### Theme Provider
230
-
231
- ```tsx
232
- 'use client';
233
-
234
- import { ThemeProvider } from 'next-themes';
235
-
236
- export function Providers({ children }: { children: React.ReactNode }) {
237
- return (
238
- <ThemeProvider attribute="class" defaultTheme="system" enableSystem>
239
- {children}
240
- </ThemeProvider>
241
- );
242
- }
243
- ```
244
-
245
- ---
246
-
247
- ## Animations
248
-
249
- ### Transitions
250
-
251
- ```tsx
252
- // Color transition
253
- <button className="bg-blue-500 hover:bg-blue-600 transition-colors duration-200">
254
- Hover me
255
- </button>
256
-
257
- // Multiple properties
258
- <div className="transform hover:scale-105 transition-all duration-300 ease-in-out">
259
- Scale on hover
260
- </div>
261
-
262
- // Custom timing
263
- <div className="transition-transform duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]">
264
- Custom easing
265
- </div>
266
- ```
267
-
268
- ### Built-in Animations
269
-
270
- ```tsx
271
- // Spin
272
- <Loader className="h-5 w-5 animate-spin" />
273
-
274
- // Pulse (skeleton loading)
275
- <div className="h-4 w-24 bg-gray-200 animate-pulse rounded" />
276
-
277
- // Bounce
278
- <div className="animate-bounce">New!</div>
279
-
280
- // Ping
281
- <span className="relative flex h-3 w-3">
282
- <span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-75" />
283
- <span className="relative inline-flex rounded-full h-3 w-3 bg-red-500" />
284
- </span>
285
- ```
286
-
287
- ### Custom Animations
288
-
289
- ```javascript
290
- // tailwind.config.js
291
- module.exports = {
292
- theme: {
293
- extend: {
294
- animation: {
295
- 'fade-in': 'fadeIn 0.3s ease-in-out',
296
- 'slide-up': 'slideUp 0.3s ease-out',
297
- 'slide-down': 'slideDown 0.3s ease-out',
298
- },
299
- keyframes: {
300
- fadeIn: {
301
- '0%': { opacity: '0' },
302
- '100%': { opacity: '1' },
303
- },
304
- slideUp: {
305
- '0%': { transform: 'translateY(10px)', opacity: '0' },
306
- '100%': { transform: 'translateY(0)', opacity: '1' },
307
- },
308
- slideDown: {
309
- '0%': { transform: 'translateY(-10px)', opacity: '0' },
310
- '100%': { transform: 'translateY(0)', opacity: '1' },
311
- },
312
- },
313
- },
314
- },
315
- };
316
- ```
317
-
318
- ---
319
-
320
- ## Typography
321
-
322
- ```tsx
323
- // Headings
324
- <h1 className="text-4xl font-bold tracking-tight text-gray-900 dark:text-white">
325
- Heading 1
326
- </h1>
327
-
328
- // Body text
329
- <p className="text-base text-gray-600 dark:text-gray-300 leading-relaxed">
330
- Body text with comfortable line height.
331
- </p>
332
-
333
- // Small/muted text
334
- <span className="text-sm text-gray-500 dark:text-gray-400">
335
- Secondary information
336
- </span>
337
-
338
- // Truncate
339
- <p className="truncate">Very long text that will be truncated...</p>
340
-
341
- // Line clamp
342
- <p className="line-clamp-3">
343
- Long text that will be limited to 3 lines...
344
- </p>
345
- ```
346
-
347
- ---
348
-
349
- ## Spacing System
350
-
351
- ```tsx
352
- // Consistent spacing scale (4px base)
353
- <div className="space-y-4"> {/* 16px gap between children */}
354
- <Item />
355
- <Item />
356
- </div>
357
-
358
- // Padding
359
- <div className="p-4"> {/* 16px all sides */}
360
- <div className="px-4 py-2"> {/* 16px horizontal, 8px vertical */}
361
- <div className="pt-8 pb-4"> {/* 32px top, 16px bottom */}
362
-
363
- // Margin
364
- <div className="mt-4"> {/* 16px top margin */}
365
- <div className="mx-auto"> {/* auto horizontal margins (center) */}
366
-
367
- // Gap (for flex/grid)
368
- <div className="flex gap-4"> {/* 16px gap between items */}
369
- ```
370
-
371
- ---
372
-
373
- ## Hiding/Showing
374
-
375
- ```tsx
376
- // Hide on mobile, show on desktop
377
- <div className="hidden lg:block">Desktop only</div>
378
-
379
- // Show on mobile, hide on desktop
380
- <div className="block lg:hidden">Mobile only</div>
381
-
382
- // Screen reader only
383
- <span className="sr-only">For screen readers</span>
384
-
385
- // Not screen reader only (visible)
386
- <span className="not-sr-only">Visible</span>
387
- ```
388
-
389
- ---
390
-
391
- ## Custom Utilities
392
-
393
- ### Extend Theme
394
-
395
- ```javascript
396
- // tailwind.config.js
397
- module.exports = {
398
- theme: {
399
- extend: {
400
- colors: {
401
- brand: {
402
- 50: '#f0f9ff',
403
- 500: '#3b82f6',
404
- 900: '#1e3a8a',
405
- },
406
- },
407
- spacing: {
408
- '18': '4.5rem',
409
- '88': '22rem',
410
- },
411
- fontSize: {
412
- 'xxs': '0.625rem',
413
- },
414
- },
415
- },
416
- };
417
- ```
418
-
419
- ### Plugin
420
-
421
- ```javascript
422
- // tailwind.config.js
423
- const plugin = require('tailwindcss/plugin');
424
-
425
- module.exports = {
426
- plugins: [
427
- plugin(function({ addUtilities }) {
428
- addUtilities({
429
- '.scrollbar-hide': {
430
- '-ms-overflow-style': 'none',
431
- 'scrollbar-width': 'none',
432
- '&::-webkit-scrollbar': {
433
- display: 'none',
434
- },
435
- },
436
- });
437
- }),
438
- ],
439
- };
440
- ```
441
-
442
- ---
443
-
444
- ## Agent Integration
445
-
446
- This skill is used by:
447
-
448
- - **tailwind-expert** subagent
449
- - **ui-mobile/tablet/desktop** agents
450
- - **design-system-enforcer** agent
451
- - **render-optimizer** for performance
452
-
453
- ---
454
-
455
- ## FORBIDDEN
456
-
457
- 1. **`!important`** - Fix specificity properly
458
- 2. **Arbitrary values when utilities exist** - Use the scale
459
- 3. **Mixing CSS with Tailwind** - Stick to utilities
460
- 4. **Overly long class strings** - Use @apply or components
461
- 5. **Inconsistent spacing** - Follow the 4px scale
462
-
463
- ---
464
-
465
- ## Version
466
-
467
- - **v1.0.0** - Initial implementation based on Tailwind CSS 3.x patterns
1
+ ---
2
+ name: tailwind-patterns
3
+ description: Tailwind CSS patterns and utilities. Responsive design, dark mode, animations, custom components. Use when styling with Tailwind CSS.
4
+ allowed-tools: Read, Write, Edit, Grep, Glob
5
+ ---
6
+
7
+ # Tailwind Patterns - Utility-First CSS
8
+
9
+ ## Purpose
10
+
11
+ Expert guidance for Tailwind CSS:
12
+
13
+ - **Responsive Design** - Mobile-first breakpoints
14
+ - **Dark Mode** - Theming patterns
15
+ - **Animations** - Transitions and keyframes
16
+ - **Layout** - Flexbox and Grid patterns
17
+ - **Custom Utilities** - Extending Tailwind
18
+
19
+ ---
20
+
21
+ ## Responsive Breakpoints
22
+
23
+ ### Default Breakpoints
24
+
25
+ ```typescript
26
+ // Mobile-first approach
27
+ const breakpoints = {
28
+ sm: '640px', // Small devices
29
+ md: '768px', // Tablets
30
+ lg: '1024px', // Laptops
31
+ xl: '1280px', // Desktops
32
+ '2xl': '1536px', // Large screens
33
+ };
34
+ ```
35
+
36
+ ### Usage Pattern
37
+
38
+ ```tsx
39
+ // Mobile-first: styles apply from that breakpoint UP
40
+ <div className="
41
+ w-full // All screens
42
+ md:w-1/2 // >= 768px
43
+ lg:w-1/3 // >= 1024px
44
+ xl:w-1/4 // >= 1280px
45
+ ">
46
+ ```
47
+
48
+ ### Custom Breakpoints
49
+
50
+ ```javascript
51
+ // tailwind.config.js
52
+ module.exports = {
53
+ theme: {
54
+ screens: {
55
+ xs: '375px', // iPhone SE
56
+ sm: '640px',
57
+ md: '768px',
58
+ lg: '1024px',
59
+ xl: '1280px',
60
+ '2xl': '1536px',
61
+ },
62
+ },
63
+ };
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Layout Patterns
69
+
70
+ ### Flexbox
71
+
72
+ ```tsx
73
+ // Center content
74
+ <div className="flex items-center justify-center h-screen">
75
+ <Content />
76
+ </div>
77
+
78
+ // Space between
79
+ <div className="flex items-center justify-between">
80
+ <Logo />
81
+ <Navigation />
82
+ </div>
83
+
84
+ // Column layout
85
+ <div className="flex flex-col gap-4">
86
+ <Header />
87
+ <Main />
88
+ <Footer />
89
+ </div>
90
+
91
+ // Responsive direction
92
+ <div className="flex flex-col md:flex-row gap-4">
93
+ <Sidebar />
94
+ <Content />
95
+ </div>
96
+ ```
97
+
98
+ ### Grid
99
+
100
+ ```tsx
101
+ // Basic grid
102
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
103
+ {items.map((item) => <Card key={item.id} />)}
104
+ </div>
105
+
106
+ // Auto-fit grid
107
+ <div className="grid grid-cols-[repeat(auto-fit,minmax(300px,1fr))] gap-4">
108
+ {items.map((item) => <Card key={item.id} />)}
109
+ </div>
110
+
111
+ // Complex layout
112
+ <div className="grid grid-cols-12 gap-4">
113
+ <aside className="col-span-12 lg:col-span-3">Sidebar</aside>
114
+ <main className="col-span-12 lg:col-span-9">Content</main>
115
+ </div>
116
+ ```
117
+
118
+ ### Container
119
+
120
+ ```tsx
121
+ // Centered container with padding
122
+ <div className="container mx-auto px-4">
123
+ <Content />
124
+ </div>
125
+
126
+ // Max-width variations
127
+ <div className="max-w-screen-xl mx-auto px-4 sm:px-6 lg:px-8">
128
+ <Content />
129
+ </div>
130
+ ```
131
+
132
+ ---
133
+
134
+ ## Common Component Patterns
135
+
136
+ ### Card
137
+
138
+ ```tsx
139
+ <div
140
+ className="
141
+ bg-white dark:bg-gray-800
142
+ rounded-lg shadow-md
143
+ p-6
144
+ border border-gray-200 dark:border-gray-700
145
+ hover:shadow-lg transition-shadow
146
+ "
147
+ >
148
+ <h3 className="text-lg font-semibold text-gray-900 dark:text-white">Title</h3>
149
+ <p className="mt-2 text-gray-600 dark:text-gray-300">Description</p>
150
+ </div>
151
+ ```
152
+
153
+ ### Button
154
+
155
+ ```tsx
156
+ // Primary
157
+ <button className="
158
+ bg-primary text-primary-foreground
159
+ px-4 py-2 rounded-md
160
+ font-medium
161
+ hover:bg-primary/90
162
+ focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2
163
+ disabled:opacity-50 disabled:cursor-not-allowed
164
+ transition-colors
165
+ ">
166
+ Click me
167
+ </button>
168
+
169
+ // Icon button
170
+ <button className="
171
+ p-2 rounded-full
172
+ hover:bg-gray-100 dark:hover:bg-gray-800
173
+ focus:outline-none focus:ring-2 focus:ring-offset-2
174
+ transition-colors
175
+ ">
176
+ <Icon className="h-5 w-5" />
177
+ <span className="sr-only">Action</span>
178
+ </button>
179
+ ```
180
+
181
+ ### Input
182
+
183
+ ```tsx
184
+ <input
185
+ type="text"
186
+ className="
187
+ w-full px-3 py-2
188
+ bg-white dark:bg-gray-900
189
+ border border-gray-300 dark:border-gray-700
190
+ rounded-md
191
+ text-gray-900 dark:text-white
192
+ placeholder:text-gray-400
193
+ focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent
194
+ disabled:opacity-50 disabled:cursor-not-allowed
195
+ "
196
+ placeholder="Enter text..."
197
+ />
198
+ ```
199
+
200
+ ---
201
+
202
+ ## Dark Mode
203
+
204
+ ### Setup
205
+
206
+ ```javascript
207
+ // tailwind.config.js
208
+ module.exports = {
209
+ darkMode: 'class', // or 'media' for system preference
210
+ };
211
+ ```
212
+
213
+ ### Usage
214
+
215
+ ```tsx
216
+ <div
217
+ className="
218
+ bg-white dark:bg-gray-900
219
+ text-gray-900 dark:text-white
220
+ border-gray-200 dark:border-gray-800
221
+ "
222
+ >
223
+ <p className="text-gray-600 dark:text-gray-300">Content adapts to theme</p>
224
+ </div>
225
+ ```
226
+
227
+ ### Theme Provider
228
+
229
+ ```tsx
230
+ 'use client';
231
+
232
+ import { ThemeProvider } from 'next-themes';
233
+
234
+ export function Providers({ children }: { children: React.ReactNode }) {
235
+ return (
236
+ <ThemeProvider attribute="class" defaultTheme="system" enableSystem>
237
+ {children}
238
+ </ThemeProvider>
239
+ );
240
+ }
241
+ ```
242
+
243
+ ---
244
+
245
+ ## Animations
246
+
247
+ ### Transitions
248
+
249
+ ```tsx
250
+ // Color transition
251
+ <button className="bg-blue-500 hover:bg-blue-600 transition-colors duration-200">
252
+ Hover me
253
+ </button>
254
+
255
+ // Multiple properties
256
+ <div className="transform hover:scale-105 transition-all duration-300 ease-in-out">
257
+ Scale on hover
258
+ </div>
259
+
260
+ // Custom timing
261
+ <div className="transition-transform duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]">
262
+ Custom easing
263
+ </div>
264
+ ```
265
+
266
+ ### Built-in Animations
267
+
268
+ ```tsx
269
+ // Spin
270
+ <Loader className="h-5 w-5 animate-spin" />
271
+
272
+ // Pulse (skeleton loading)
273
+ <div className="h-4 w-24 bg-gray-200 animate-pulse rounded" />
274
+
275
+ // Bounce
276
+ <div className="animate-bounce">New!</div>
277
+
278
+ // Ping
279
+ <span className="relative flex h-3 w-3">
280
+ <span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-75" />
281
+ <span className="relative inline-flex rounded-full h-3 w-3 bg-red-500" />
282
+ </span>
283
+ ```
284
+
285
+ ### Custom Animations
286
+
287
+ ```javascript
288
+ // tailwind.config.js
289
+ module.exports = {
290
+ theme: {
291
+ extend: {
292
+ animation: {
293
+ 'fade-in': 'fadeIn 0.3s ease-in-out',
294
+ 'slide-up': 'slideUp 0.3s ease-out',
295
+ 'slide-down': 'slideDown 0.3s ease-out',
296
+ },
297
+ keyframes: {
298
+ fadeIn: {
299
+ '0%': { opacity: '0' },
300
+ '100%': { opacity: '1' },
301
+ },
302
+ slideUp: {
303
+ '0%': { transform: 'translateY(10px)', opacity: '0' },
304
+ '100%': { transform: 'translateY(0)', opacity: '1' },
305
+ },
306
+ slideDown: {
307
+ '0%': { transform: 'translateY(-10px)', opacity: '0' },
308
+ '100%': { transform: 'translateY(0)', opacity: '1' },
309
+ },
310
+ },
311
+ },
312
+ },
313
+ };
314
+ ```
315
+
316
+ ---
317
+
318
+ ## Typography
319
+
320
+ ```tsx
321
+ // Headings
322
+ <h1 className="text-4xl font-bold tracking-tight text-gray-900 dark:text-white">
323
+ Heading 1
324
+ </h1>
325
+
326
+ // Body text
327
+ <p className="text-base text-gray-600 dark:text-gray-300 leading-relaxed">
328
+ Body text with comfortable line height.
329
+ </p>
330
+
331
+ // Small/muted text
332
+ <span className="text-sm text-gray-500 dark:text-gray-400">
333
+ Secondary information
334
+ </span>
335
+
336
+ // Truncate
337
+ <p className="truncate">Very long text that will be truncated...</p>
338
+
339
+ // Line clamp
340
+ <p className="line-clamp-3">
341
+ Long text that will be limited to 3 lines...
342
+ </p>
343
+ ```
344
+
345
+ ---
346
+
347
+ ## Spacing System
348
+
349
+ ```tsx
350
+ // Consistent spacing scale (4px base)
351
+ <div className="space-y-4"> {/* 16px gap between children */}
352
+ <Item />
353
+ <Item />
354
+ </div>
355
+
356
+ // Padding
357
+ <div className="p-4"> {/* 16px all sides */}
358
+ <div className="px-4 py-2"> {/* 16px horizontal, 8px vertical */}
359
+ <div className="pt-8 pb-4"> {/* 32px top, 16px bottom */}
360
+
361
+ // Margin
362
+ <div className="mt-4"> {/* 16px top margin */}
363
+ <div className="mx-auto"> {/* auto horizontal margins (center) */}
364
+
365
+ // Gap (for flex/grid)
366
+ <div className="flex gap-4"> {/* 16px gap between items */}
367
+ ```
368
+
369
+ ---
370
+
371
+ ## Hiding/Showing
372
+
373
+ ```tsx
374
+ // Hide on mobile, show on desktop
375
+ <div className="hidden lg:block">Desktop only</div>
376
+
377
+ // Show on mobile, hide on desktop
378
+ <div className="block lg:hidden">Mobile only</div>
379
+
380
+ // Screen reader only
381
+ <span className="sr-only">For screen readers</span>
382
+
383
+ // Not screen reader only (visible)
384
+ <span className="not-sr-only">Visible</span>
385
+ ```
386
+
387
+ ---
388
+
389
+ ## Custom Utilities
390
+
391
+ ### Extend Theme
392
+
393
+ ```javascript
394
+ // tailwind.config.js
395
+ module.exports = {
396
+ theme: {
397
+ extend: {
398
+ colors: {
399
+ brand: {
400
+ 50: '#f0f9ff',
401
+ 500: '#3b82f6',
402
+ 900: '#1e3a8a',
403
+ },
404
+ },
405
+ spacing: {
406
+ 18: '4.5rem',
407
+ 88: '22rem',
408
+ },
409
+ fontSize: {
410
+ xxs: '0.625rem',
411
+ },
412
+ },
413
+ },
414
+ };
415
+ ```
416
+
417
+ ### Plugin
418
+
419
+ ```javascript
420
+ // tailwind.config.js
421
+ const plugin = require('tailwindcss/plugin');
422
+
423
+ module.exports = {
424
+ plugins: [
425
+ plugin(function ({ addUtilities }) {
426
+ addUtilities({
427
+ '.scrollbar-hide': {
428
+ '-ms-overflow-style': 'none',
429
+ 'scrollbar-width': 'none',
430
+ '&::-webkit-scrollbar': {
431
+ display: 'none',
432
+ },
433
+ },
434
+ });
435
+ }),
436
+ ],
437
+ };
438
+ ```
439
+
440
+ ---
441
+
442
+ ## Agent Integration
443
+
444
+ This skill is used by:
445
+
446
+ - **tailwind-expert** subagent
447
+ - **ui-mobile/tablet/desktop** agents
448
+ - **design-system-enforcer** agent
449
+ - **render-optimizer** for performance
450
+
451
+ ---
452
+
453
+ ## FORBIDDEN
454
+
455
+ 1. **`!important`** - Fix specificity properly
456
+ 2. **Arbitrary values when utilities exist** - Use the scale
457
+ 3. **Mixing CSS with Tailwind** - Stick to utilities
458
+ 4. **Overly long class strings** - Use @apply or components
459
+ 5. **Inconsistent spacing** - Follow the 4px scale
460
+
461
+ ---
462
+
463
+ ## Version
464
+
465
+ - **v1.0.0** - Initial implementation based on Tailwind CSS 3.x patterns