cursor-kit-cli 1.2.0-beta → 1.2.0-beta.3

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 (92) hide show
  1. package/bin/cursor-reinstall-instance.sh +102 -0
  2. package/dist/cli.cjs +366 -69
  3. package/dist/cli.cjs.map +1 -1
  4. package/dist/cli.js +367 -70
  5. package/dist/cli.js.map +1 -1
  6. package/dist/index.cjs +39 -1
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +9 -1
  9. package/dist/index.d.ts +9 -1
  10. package/dist/index.js +33 -2
  11. package/dist/index.js.map +1 -1
  12. package/package.json +1 -1
  13. package/templates/commands/docs.md +5 -3
  14. package/templates/commands/explain.md +5 -3
  15. package/templates/commands/fix.md +5 -3
  16. package/templates/commands/implement.md +5 -3
  17. package/templates/commands/refactor.md +5 -3
  18. package/templates/commands/review.md +5 -3
  19. package/templates/commands/test.md +5 -3
  20. package/templates/manifest.json +11 -8
  21. package/templates/rules/git.mdc +0 -2
  22. package/templates/rules/toc.mdc +17 -9
  23. package/templates/skills/aesthetic/SKILL.md +121 -0
  24. package/templates/skills/aesthetic/assets/design-guideline-template.md +163 -0
  25. package/templates/skills/aesthetic/assets/design-story-template.md +135 -0
  26. package/templates/skills/aesthetic/references/design-principles.md +62 -0
  27. package/templates/skills/aesthetic/references/design-resources.md +75 -0
  28. package/templates/skills/aesthetic/references/micro-interactions.md +53 -0
  29. package/templates/skills/aesthetic/references/storytelling-design.md +50 -0
  30. package/templates/skills/backend-development/SKILL.mdc +95 -0
  31. package/templates/skills/backend-development/references/backend-api-design.md +495 -0
  32. package/templates/skills/backend-development/references/backend-architecture.md +454 -0
  33. package/templates/skills/backend-development/references/backend-authentication.md +338 -0
  34. package/templates/skills/backend-development/references/backend-code-quality.md +659 -0
  35. package/templates/skills/backend-development/references/backend-debugging.md +904 -0
  36. package/templates/skills/backend-development/references/backend-devops.md +494 -0
  37. package/templates/skills/backend-development/references/backend-mindset.md +387 -0
  38. package/templates/skills/backend-development/references/backend-performance.md +397 -0
  39. package/templates/skills/backend-development/references/backend-security.md +290 -0
  40. package/templates/skills/backend-development/references/backend-technologies.md +256 -0
  41. package/templates/skills/backend-development/references/backend-testing.md +429 -0
  42. package/templates/skills/frontend-design/SKILL.mdc +41 -0
  43. package/templates/skills/frontend-design/references/animejs.md +396 -0
  44. package/templates/skills/frontend-development/SKILL.mdc +399 -0
  45. package/templates/skills/frontend-development/resources/common-patterns.md +331 -0
  46. package/templates/skills/frontend-development/resources/complete-examples.md +872 -0
  47. package/templates/skills/frontend-development/resources/component-patterns.md +502 -0
  48. package/templates/skills/frontend-development/resources/data-fetching.md +767 -0
  49. package/templates/skills/frontend-development/resources/file-organization.md +502 -0
  50. package/templates/skills/frontend-development/resources/loading-and-error-states.md +501 -0
  51. package/templates/skills/frontend-development/resources/performance.md +406 -0
  52. package/templates/skills/frontend-development/resources/routing-guide.md +364 -0
  53. package/templates/skills/frontend-development/resources/styling-guide.md +428 -0
  54. package/templates/skills/frontend-development/resources/typescript-standards.md +418 -0
  55. package/templates/skills/problem-solving/SKILL.mdc +96 -0
  56. package/templates/skills/problem-solving/references/attribution.md +69 -0
  57. package/templates/skills/problem-solving/references/collision-zone-thinking.md +79 -0
  58. package/templates/skills/problem-solving/references/inversion-exercise.md +91 -0
  59. package/templates/skills/problem-solving/references/meta-pattern-recognition.md +87 -0
  60. package/templates/skills/problem-solving/references/scale-game.md +95 -0
  61. package/templates/skills/problem-solving/references/simplification-cascades.md +80 -0
  62. package/templates/skills/problem-solving/references/when-stuck.md +72 -0
  63. package/templates/skills/research/SKILL.mdc +168 -0
  64. package/templates/skills/sequential-thinking/.env.example +8 -0
  65. package/templates/skills/sequential-thinking/README.md +183 -0
  66. package/templates/skills/sequential-thinking/SKILL.mdc +94 -0
  67. package/templates/skills/sequential-thinking/package.json +31 -0
  68. package/templates/skills/sequential-thinking/references/advanced-strategies.md +79 -0
  69. package/templates/skills/sequential-thinking/references/advanced-techniques.md +76 -0
  70. package/templates/skills/sequential-thinking/references/core-patterns.md +95 -0
  71. package/templates/skills/sequential-thinking/references/examples-api.md +88 -0
  72. package/templates/skills/sequential-thinking/references/examples-architecture.md +94 -0
  73. package/templates/skills/sequential-thinking/references/examples-debug.md +90 -0
  74. package/templates/skills/sequential-thinking/scripts/format-thought.js +159 -0
  75. package/templates/skills/sequential-thinking/scripts/process-thought.js +236 -0
  76. package/templates/skills/sequential-thinking/tests/format-thought.test.js +133 -0
  77. package/templates/skills/sequential-thinking/tests/process-thought.test.js +215 -0
  78. package/templates/skills/ui-styling/LICENSE.txt +202 -0
  79. package/templates/skills/ui-styling/SKILL.mdc +321 -0
  80. package/templates/skills/ui-styling/references/canvas-design-system.md +320 -0
  81. package/templates/skills/ui-styling/references/shadcn-accessibility.md +471 -0
  82. package/templates/skills/ui-styling/references/shadcn-components.md +424 -0
  83. package/templates/skills/ui-styling/references/shadcn-theming.md +373 -0
  84. package/templates/skills/ui-styling/references/tailwind-customization.md +483 -0
  85. package/templates/skills/ui-styling/references/tailwind-responsive.md +382 -0
  86. package/templates/skills/ui-styling/references/tailwind-utilities.md +455 -0
  87. package/templates/rules/frontend-design.mdc +0 -48
  88. package/templates/rules/performance.mdc +0 -54
  89. package/templates/rules/react.mdc +0 -58
  90. package/templates/rules/security.mdc +0 -50
  91. package/templates/rules/testing.mdc +0 -54
  92. package/templates/rules/typescript.mdc +0 -36
@@ -0,0 +1,455 @@
1
+ # Tailwind CSS Utility Reference
2
+
3
+ Core utility classes for layout, spacing, typography, colors, borders, and shadows.
4
+
5
+ ## Layout Utilities
6
+
7
+ ### Display
8
+
9
+ ```html
10
+ <div class="block">Block</div>
11
+ <div class="inline-block">Inline Block</div>
12
+ <div class="inline">Inline</div>
13
+ <div class="flex">Flexbox</div>
14
+ <div class="inline-flex">Inline Flex</div>
15
+ <div class="grid">Grid</div>
16
+ <div class="inline-grid">Inline Grid</div>
17
+ <div class="hidden">Hidden</div>
18
+ ```
19
+
20
+ ### Flexbox
21
+
22
+ **Container:**
23
+ ```html
24
+ <div class="flex flex-row">Row (default)</div>
25
+ <div class="flex flex-col">Column</div>
26
+ <div class="flex flex-row-reverse">Reverse row</div>
27
+ <div class="flex flex-col-reverse">Reverse column</div>
28
+ ```
29
+
30
+ **Justify (main axis):**
31
+ ```html
32
+ <div class="flex justify-start">Start</div>
33
+ <div class="flex justify-center">Center</div>
34
+ <div class="flex justify-end">End</div>
35
+ <div class="flex justify-between">Space between</div>
36
+ <div class="flex justify-around">Space around</div>
37
+ <div class="flex justify-evenly">Space evenly</div>
38
+ ```
39
+
40
+ **Align (cross axis):**
41
+ ```html
42
+ <div class="flex items-start">Start</div>
43
+ <div class="flex items-center">Center</div>
44
+ <div class="flex items-end">End</div>
45
+ <div class="flex items-baseline">Baseline</div>
46
+ <div class="flex items-stretch">Stretch</div>
47
+ ```
48
+
49
+ **Gap:**
50
+ ```html
51
+ <div class="flex gap-4">All sides</div>
52
+ <div class="flex gap-x-6 gap-y-2">X and Y</div>
53
+ ```
54
+
55
+ **Wrap:**
56
+ ```html
57
+ <div class="flex flex-wrap">Wrap</div>
58
+ <div class="flex flex-nowrap">No wrap</div>
59
+ ```
60
+
61
+ ### Grid
62
+
63
+ **Columns:**
64
+ ```html
65
+ <div class="grid grid-cols-1">1 column</div>
66
+ <div class="grid grid-cols-2">2 columns</div>
67
+ <div class="grid grid-cols-3">3 columns</div>
68
+ <div class="grid grid-cols-4">4 columns</div>
69
+ <div class="grid grid-cols-12">12 columns</div>
70
+ <div class="grid grid-cols-[1fr_500px_2fr]">Custom</div>
71
+ ```
72
+
73
+ **Rows:**
74
+ ```html
75
+ <div class="grid grid-rows-3">3 rows</div>
76
+ <div class="grid grid-rows-[auto_1fr_auto]">Custom</div>
77
+ ```
78
+
79
+ **Span:**
80
+ ```html
81
+ <div class="col-span-2">Span 2 columns</div>
82
+ <div class="row-span-3">Span 3 rows</div>
83
+ ```
84
+
85
+ **Gap:**
86
+ ```html
87
+ <div class="grid gap-4">All sides</div>
88
+ <div class="grid gap-x-8 gap-y-4">X and Y</div>
89
+ ```
90
+
91
+ ### Positioning
92
+
93
+ ```html
94
+ <div class="static">Static (default)</div>
95
+ <div class="relative">Relative</div>
96
+ <div class="absolute">Absolute</div>
97
+ <div class="fixed">Fixed</div>
98
+ <div class="sticky">Sticky</div>
99
+
100
+ <!-- Position values -->
101
+ <div class="absolute top-0 right-0">Top right</div>
102
+ <div class="absolute inset-0">All sides 0</div>
103
+ <div class="absolute inset-x-4">Left/right 4</div>
104
+ <div class="absolute inset-y-8">Top/bottom 8</div>
105
+ ```
106
+
107
+ ### Z-Index
108
+
109
+ ```html
110
+ <div class="z-0">z-index: 0</div>
111
+ <div class="z-10">z-index: 10</div>
112
+ <div class="z-20">z-index: 20</div>
113
+ <div class="z-50">z-index: 50</div>
114
+ ```
115
+
116
+ ## Spacing Utilities
117
+
118
+ ### Padding
119
+
120
+ ```html
121
+ <div class="p-4">All sides</div>
122
+ <div class="px-6">Left and right</div>
123
+ <div class="py-3">Top and bottom</div>
124
+ <div class="pt-8">Top</div>
125
+ <div class="pr-4">Right</div>
126
+ <div class="pb-2">Bottom</div>
127
+ <div class="pl-6">Left</div>
128
+ ```
129
+
130
+ ### Margin
131
+
132
+ ```html
133
+ <div class="m-4">All sides</div>
134
+ <div class="mx-auto">Center horizontally</div>
135
+ <div class="my-6">Top and bottom</div>
136
+ <div class="mt-8">Top</div>
137
+ <div class="-mt-4">Negative top</div>
138
+ <div class="ml-auto">Push to right</div>
139
+ ```
140
+
141
+ ### Space Between
142
+
143
+ ```html
144
+ <div class="space-x-4">Horizontal spacing</div>
145
+ <div class="space-y-6">Vertical spacing</div>
146
+ ```
147
+
148
+ ### Spacing Scale
149
+
150
+ - `0`: 0px
151
+ - `px`: 1px
152
+ - `0.5`: 0.125rem (2px)
153
+ - `1`: 0.25rem (4px)
154
+ - `2`: 0.5rem (8px)
155
+ - `3`: 0.75rem (12px)
156
+ - `4`: 1rem (16px)
157
+ - `6`: 1.5rem (24px)
158
+ - `8`: 2rem (32px)
159
+ - `12`: 3rem (48px)
160
+ - `16`: 4rem (64px)
161
+ - `24`: 6rem (96px)
162
+
163
+ ## Typography
164
+
165
+ ### Font Size
166
+
167
+ ```html
168
+ <p class="text-xs">Extra small (12px)</p>
169
+ <p class="text-sm">Small (14px)</p>
170
+ <p class="text-base">Base (16px)</p>
171
+ <p class="text-lg">Large (18px)</p>
172
+ <p class="text-xl">XL (20px)</p>
173
+ <p class="text-2xl">2XL (24px)</p>
174
+ <p class="text-3xl">3XL (30px)</p>
175
+ <p class="text-4xl">4XL (36px)</p>
176
+ <p class="text-5xl">5XL (48px)</p>
177
+ ```
178
+
179
+ ### Font Weight
180
+
181
+ ```html
182
+ <p class="font-thin">Thin (100)</p>
183
+ <p class="font-light">Light (300)</p>
184
+ <p class="font-normal">Normal (400)</p>
185
+ <p class="font-medium">Medium (500)</p>
186
+ <p class="font-semibold">Semibold (600)</p>
187
+ <p class="font-bold">Bold (700)</p>
188
+ <p class="font-black">Black (900)</p>
189
+ ```
190
+
191
+ ### Text Alignment
192
+
193
+ ```html
194
+ <p class="text-left">Left</p>
195
+ <p class="text-center">Center</p>
196
+ <p class="text-right">Right</p>
197
+ <p class="text-justify">Justify</p>
198
+ ```
199
+
200
+ ### Line Height
201
+
202
+ ```html
203
+ <p class="leading-none">1</p>
204
+ <p class="leading-tight">1.25</p>
205
+ <p class="leading-normal">1.5</p>
206
+ <p class="leading-relaxed">1.75</p>
207
+ <p class="leading-loose">2</p>
208
+ ```
209
+
210
+ ### Combined Font Utilities
211
+
212
+ ```html
213
+ <h1 class="text-4xl/tight font-bold">
214
+ Font size 4xl with tight line height
215
+ </h1>
216
+ ```
217
+
218
+ ### Text Transform
219
+
220
+ ```html
221
+ <p class="uppercase">UPPERCASE</p>
222
+ <p class="lowercase">lowercase</p>
223
+ <p class="capitalize">Capitalize</p>
224
+ <p class="normal-case">Normal</p>
225
+ ```
226
+
227
+ ### Text Decoration
228
+
229
+ ```html
230
+ <p class="underline">Underline</p>
231
+ <p class="line-through">Line through</p>
232
+ <p class="no-underline">No underline</p>
233
+ ```
234
+
235
+ ### Text Overflow
236
+
237
+ ```html
238
+ <p class="truncate">Truncate with ellipsis...</p>
239
+ <p class="line-clamp-3">Clamp to 3 lines...</p>
240
+ <p class="text-ellipsis overflow-hidden">Ellipsis</p>
241
+ ```
242
+
243
+ ## Colors
244
+
245
+ ### Text Colors
246
+
247
+ ```html
248
+ <p class="text-black">Black</p>
249
+ <p class="text-white">White</p>
250
+ <p class="text-gray-500">Gray 500</p>
251
+ <p class="text-red-600">Red 600</p>
252
+ <p class="text-blue-500">Blue 500</p>
253
+ <p class="text-green-600">Green 600</p>
254
+ ```
255
+
256
+ ### Background Colors
257
+
258
+ ```html
259
+ <div class="bg-white">White</div>
260
+ <div class="bg-gray-100">Gray 100</div>
261
+ <div class="bg-blue-500">Blue 500</div>
262
+ <div class="bg-red-600">Red 600</div>
263
+ ```
264
+
265
+ ### Color Scale
266
+
267
+ Each color has 11 shades (50-950):
268
+ - `50`: Lightest
269
+ - `100-400`: Light variations
270
+ - `500`: Base color
271
+ - `600-800`: Dark variations
272
+ - `950`: Darkest
273
+
274
+ ### Opacity Modifiers
275
+
276
+ ```html
277
+ <div class="bg-black/75">75% opacity</div>
278
+ <div class="text-blue-500/30">30% opacity</div>
279
+ <div class="bg-purple-500/[0.87]">87% opacity</div>
280
+ ```
281
+
282
+ ### Gradients
283
+
284
+ ```html
285
+ <div class="bg-gradient-to-r from-blue-500 to-purple-600">
286
+ Left to right gradient
287
+ </div>
288
+ <div class="bg-gradient-to-br from-pink-500 via-red-500 to-yellow-500">
289
+ With via color
290
+ </div>
291
+ ```
292
+
293
+ Directions: `to-t | to-tr | to-r | to-br | to-b | to-bl | to-l | to-tl`
294
+
295
+ ## Borders
296
+
297
+ ### Border Width
298
+
299
+ ```html
300
+ <div class="border">1px all sides</div>
301
+ <div class="border-2">2px all sides</div>
302
+ <div class="border-t">Top only</div>
303
+ <div class="border-r-4">Right 4px</div>
304
+ <div class="border-b-2">Bottom 2px</div>
305
+ <div class="border-l">Left only</div>
306
+ <div class="border-0">No border</div>
307
+ ```
308
+
309
+ ### Border Color
310
+
311
+ ```html
312
+ <div class="border border-gray-300">Gray</div>
313
+ <div class="border-2 border-blue-500">Blue</div>
314
+ <div class="border border-red-600/50">Red with opacity</div>
315
+ ```
316
+
317
+ ### Border Radius
318
+
319
+ ```html
320
+ <div class="rounded">0.25rem</div>
321
+ <div class="rounded-md">0.375rem</div>
322
+ <div class="rounded-lg">0.5rem</div>
323
+ <div class="rounded-xl">0.75rem</div>
324
+ <div class="rounded-2xl">1rem</div>
325
+ <div class="rounded-full">9999px</div>
326
+
327
+ <!-- Individual corners -->
328
+ <div class="rounded-t-lg">Top corners</div>
329
+ <div class="rounded-br-xl">Bottom right</div>
330
+ ```
331
+
332
+ ### Border Style
333
+
334
+ ```html
335
+ <div class="border border-solid">Solid</div>
336
+ <div class="border-2 border-dashed">Dashed</div>
337
+ <div class="border border-dotted">Dotted</div>
338
+ ```
339
+
340
+ ## Shadows
341
+
342
+ ```html
343
+ <div class="shadow-sm">Small</div>
344
+ <div class="shadow">Default</div>
345
+ <div class="shadow-md">Medium</div>
346
+ <div class="shadow-lg">Large</div>
347
+ <div class="shadow-xl">Extra large</div>
348
+ <div class="shadow-2xl">2XL</div>
349
+ <div class="shadow-none">No shadow</div>
350
+ ```
351
+
352
+ ### Colored Shadows
353
+
354
+ ```html
355
+ <div class="shadow-lg shadow-blue-500/50">Blue shadow</div>
356
+ ```
357
+
358
+ ## Width & Height
359
+
360
+ ### Width
361
+
362
+ ```html
363
+ <div class="w-full">100%</div>
364
+ <div class="w-1/2">50%</div>
365
+ <div class="w-1/3">33.333%</div>
366
+ <div class="w-64">16rem</div>
367
+ <div class="w-[500px]">500px</div>
368
+ <div class="w-screen">100vw</div>
369
+
370
+ <!-- Min/Max width -->
371
+ <div class="min-w-0">min-width: 0</div>
372
+ <div class="max-w-md">max-width: 28rem</div>
373
+ <div class="max-w-screen-xl">max-width: 1280px</div>
374
+ ```
375
+
376
+ ### Height
377
+
378
+ ```html
379
+ <div class="h-full">100%</div>
380
+ <div class="h-screen">100vh</div>
381
+ <div class="h-64">16rem</div>
382
+ <div class="h-[500px]">500px</div>
383
+
384
+ <!-- Min/Max height -->
385
+ <div class="min-h-screen">min-height: 100vh</div>
386
+ <div class="max-h-96">max-height: 24rem</div>
387
+ ```
388
+
389
+ ## Arbitrary Values
390
+
391
+ Use square brackets for custom values:
392
+
393
+ ```html
394
+ <!-- Spacing -->
395
+ <div class="p-[17px]">Custom padding</div>
396
+ <div class="top-[117px]">Custom position</div>
397
+
398
+ <!-- Colors -->
399
+ <div class="bg-[#bada55]">Hex color</div>
400
+ <div class="text-[rgb(123,45,67)]">RGB</div>
401
+
402
+ <!-- Sizes -->
403
+ <div class="w-[500px]">Custom width</div>
404
+ <div class="text-[22px]">Custom font size</div>
405
+
406
+ <!-- CSS variables -->
407
+ <div class="bg-[var(--brand-color)]">CSS var</div>
408
+
409
+ <!-- Complex values -->
410
+ <div class="grid-cols-[1fr_500px_2fr]">Custom grid</div>
411
+ ```
412
+
413
+ ## Aspect Ratio
414
+
415
+ ```html
416
+ <div class="aspect-square">1:1</div>
417
+ <div class="aspect-video">16:9</div>
418
+ <div class="aspect-[4/3]">4:3</div>
419
+ ```
420
+
421
+ ## Overflow
422
+
423
+ ```html
424
+ <div class="overflow-auto">Auto scroll</div>
425
+ <div class="overflow-hidden">Hidden</div>
426
+ <div class="overflow-scroll">Always scroll</div>
427
+ <div class="overflow-x-auto">Horizontal scroll</div>
428
+ <div class="overflow-y-hidden">No vertical scroll</div>
429
+ ```
430
+
431
+ ## Opacity
432
+
433
+ ```html
434
+ <div class="opacity-0">0%</div>
435
+ <div class="opacity-50">50%</div>
436
+ <div class="opacity-75">75%</div>
437
+ <div class="opacity-100">100%</div>
438
+ ```
439
+
440
+ ## Cursor
441
+
442
+ ```html
443
+ <div class="cursor-pointer">Pointer</div>
444
+ <div class="cursor-wait">Wait</div>
445
+ <div class="cursor-not-allowed">Not allowed</div>
446
+ <div class="cursor-default">Default</div>
447
+ ```
448
+
449
+ ## User Select
450
+
451
+ ```html
452
+ <div class="select-none">No select</div>
453
+ <div class="select-text">Text selectable</div>
454
+ <div class="select-all">Select all</div>
455
+ ```
@@ -1,48 +0,0 @@
1
- ---
2
- globs: *.tsx,*.jsx,*.ts,*.js,*.svelte,*.vue,*.mdx
3
- alwaysApply: false
4
- ---
5
-
6
- ## Purpose
7
- Acting as a senior frontend engineer, design the frontend of a web application with production-ready UI/UX, animations, and impressive visual impact. The user interface should be clean, modern, and minimalistic and consistent across the application.
8
-
9
- <use_interesting_fonts>
10
- Typography instantly signals quality. Avoid using boring, generic fonts.
11
-
12
- Never use: Inter, Roboto, Open Sans, Lato, default system fonts (unless the codebase is user-configurable)
13
-
14
- Here are some examples of good, impactful choices:
15
-
16
- - Code aesthetic: JetBrains Mono, Fira Code, Space Grotesk
17
- - Editorial: Playfair Display, Crimson Pro
18
- - Technical: IBM Plex family, Source Sans 3
19
- - Distinctive: Bricolage Grotesque, Newsreader
20
-
21
- Pairing principle: High contrast = interesting. Display + monospace, serif + geometric sans, variable font across weights.
22
-
23
- Use extremes: 100/200 weight vs 800/900, not 400 vs 600. Size jumps of 3x+, not 1.5x.
24
-
25
- Pick one distinctive font, use it decisively. Load from Google Fonts.
26
- </use_interesting_fonts>
27
-
28
- <frontend_aesthetics>
29
- Frontend aesthetics should be clean, modern, and minimalistic.
30
-
31
- Focus on:
32
-
33
- - Typography: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics.
34
- - Color & Theme: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes. Draw from IDE themes and cultural aesthetics for inspiration.
35
- - Motion: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions.
36
- - Backgrounds: Create atmosphere and depth rather than defaulting to solid colors. Layer CSS gradients, use geometric patterns, or add contextual effects that match the overall aesthetic.
37
- - UI: Use latest shadcn/ui + Tailwind, customize as needed, keep the UI clean and consistent.
38
- - Coding: Design components as compound components (composition). Use React Context only when children need shared state.
39
-
40
- Avoid generic AI-generated aesthetics:
41
-
42
- - Overused font families (Inter, Roboto, Arial, system fonts)
43
- - Clichéd color schemes (particularly purple gradients on white backgrounds)
44
- - Predictable layouts and component patterns
45
- - Cookie-cutter design that lacks context-specific character
46
-
47
- Interpret creatively and make unexpected choices that feel genuinely designed for the context. Vary between light and dark themes, different fonts, different aesthetics. You still tend to converge on common choices (Space Grotesk, for example) across generations. Avoid this: it is critical that you think outside the box!
48
- </frontend_aesthetics>
@@ -1,54 +0,0 @@
1
- ---
2
- description: Performance optimization guidelines
3
- globs:
4
- alwaysApply: false
5
- ---
6
-
7
- # Performance Guidelines
8
-
9
- ## General Principles
10
- - Measure before optimizing (profile first)
11
- - Optimize hot paths, not everything
12
- - Consider the tradeoff between readability and performance
13
- - Cache expensive computations
14
-
15
- ## JavaScript/TypeScript
16
- - Avoid blocking the main thread
17
- - Use Web Workers for heavy computation
18
- - Implement proper debouncing/throttling
19
- - Prefer `const` and `let` over `var`
20
- - Use appropriate data structures (Map, Set)
21
-
22
- ## React Specific
23
- - Use `React.memo` for expensive pure components
24
- - Implement `useMemo` for expensive calculations
25
- - Use `useCallback` for stable function references
26
- - Virtualize long lists (react-window, react-virtualized)
27
- - Code-split with `React.lazy` and `Suspense`
28
-
29
- ## Network
30
- - Minimize HTTP requests
31
- - Use HTTP/2 or HTTP/3 when possible
32
- - Implement caching strategies
33
- - Compress responses (gzip, brotli)
34
- - Use CDN for static assets
35
-
36
- ## Bundle Size
37
- - Tree-shake unused code
38
- - Dynamic import for non-critical features
39
- - Analyze bundle with webpack-bundle-analyzer
40
- - Use lighter alternatives when possible
41
-
42
- ## Database
43
- - Index frequently queried columns
44
- - Avoid N+1 queries
45
- - Use pagination for large datasets
46
- - Cache frequently accessed data
47
- - Use connection pooling
48
-
49
- ## Images & Assets
50
- - Use modern formats (WebP, AVIF)
51
- - Implement responsive images
52
- - Lazy load below-the-fold images
53
- - Optimize SVGs
54
- - Use appropriate compression levels
@@ -1,58 +0,0 @@
1
- ---
2
- description: React component patterns and best practices
3
- globs: ["**/*.tsx", "**/*.jsx"]
4
- alwaysApply: false
5
- ---
6
-
7
- # React Guidelines
8
-
9
- ## Component Design
10
- - Prefer functional components with hooks
11
- - Keep components small and focused
12
- - Use composition over inheritance
13
- - Design components as compound components when appropriate
14
-
15
- ## Props & State
16
- - Destructure props in function signature
17
- - Use TypeScript interfaces for prop types
18
- - Keep state as close to where it's used as possible
19
- - Lift state only when necessary for sharing
20
-
21
- ## Hooks
22
- - Follow the Rules of Hooks
23
- - Extract reusable logic into custom hooks
24
- - Use `useMemo` and `useCallback` judiciously (profile first)
25
- - Prefer `useReducer` for complex state logic
26
-
27
- ## Event Handlers
28
- - Prefix with "handle" (e.g., `handleClick`, `handleChange`)
29
- - Define handlers outside of JSX for readability
30
- - Use proper TypeScript event types
31
-
32
- ## Performance
33
- - Avoid inline object/array creation in JSX
34
- - Use React.memo only when proven necessary
35
- - Implement proper key props in lists
36
- - Consider code-splitting for large components
37
-
38
- ## Patterns to Follow
39
- ```tsx
40
- // Good: Compound component pattern
41
- <Select>
42
- <Select.Option value="a">Option A</Select.Option>
43
- <Select.Option value="b">Option B</Select.Option>
44
- </Select>
45
-
46
- // Good: Custom hook for logic
47
- function useToggle(initial = false) {
48
- const [state, setState] = useState(initial);
49
- const toggle = useCallback(() => setState(s => !s), []);
50
- return [state, toggle] as const;
51
- }
52
- ```
53
-
54
- ## Avoid
55
- - Prop drilling more than 2 levels (use Context or state management)
56
- - Business logic in components (extract to hooks/utils)
57
- - Inline styles (use CSS-in-JS or CSS modules)
58
- - Index as key in dynamic lists
@@ -1,50 +0,0 @@
1
- ---
2
- description: Security best practices
3
- globs:
4
- alwaysApply: true
5
- ---
6
-
7
- # Security Guidelines
8
-
9
- ## Input Validation
10
- - Validate all user inputs on both client and server
11
- - Sanitize inputs before use in queries or rendering
12
- - Use allowlists over denylists when possible
13
- - Validate file uploads (type, size, content)
14
-
15
- ## Authentication
16
- - Never store passwords in plain text
17
- - Use strong hashing algorithms (bcrypt, argon2)
18
- - Implement proper session management
19
- - Use secure, httpOnly, sameSite cookies
20
-
21
- ## Authorization
22
- - Check permissions on every protected operation
23
- - Implement principle of least privilege
24
- - Validate user access at API level, not just UI
25
- - Use role-based or attribute-based access control
26
-
27
- ## Data Protection
28
- - Encrypt sensitive data at rest and in transit
29
- - Use HTTPS everywhere
30
- - Don't log sensitive information
31
- - Implement proper key management
32
-
33
- ## Common Vulnerabilities to Prevent
34
- - **XSS**: Escape output, use Content Security Policy
35
- - **CSRF**: Use anti-CSRF tokens
36
- - **SQL Injection**: Use parameterized queries
37
- - **Path Traversal**: Validate and sanitize file paths
38
-
39
- ## API Security
40
- - Use rate limiting
41
- - Implement proper CORS configuration
42
- - Validate and sanitize all API inputs
43
- - Use API keys and tokens appropriately
44
- - Don't expose stack traces or internal errors
45
-
46
- ## Dependencies
47
- - Keep dependencies updated
48
- - Audit for known vulnerabilities regularly
49
- - Use lockfiles for reproducible builds
50
- - Review new dependencies before adding