@biggora/claude-plugins 1.1.1 → 1.2.2

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 (104) hide show
  1. package/.claude/settings.local.json +3 -1
  2. package/README.md +24 -17
  3. package/package.json +1 -1
  4. package/registry/registry.json +319 -244
  5. package/specs/coding.md +24 -0
  6. package/specs/pod.md +2 -0
  7. package/src/skills/captcha/README.md +221 -0
  8. package/src/skills/captcha/SKILL.md +355 -0
  9. package/src/skills/captcha/references/captcha-types.md +254 -0
  10. package/src/skills/captcha/references/services.md +172 -0
  11. package/src/skills/captcha/references/stealth.md +238 -0
  12. package/src/skills/captcha/scripts/solve_captcha.py +323 -0
  13. package/src/skills/captcha/scripts/solve_image_grid.py +350 -0
  14. package/src/skills/codex-cli/SKILL.md +21 -11
  15. package/src/skills/gemini-cli/SKILL.md +27 -13
  16. package/src/skills/gemini-cli/references/commands.md +21 -14
  17. package/src/skills/gemini-cli/references/configuration.md +23 -18
  18. package/src/skills/gemini-cli/references/headless-and-scripting.md +7 -17
  19. package/src/skills/gemini-cli/references/mcp-and-extensions.md +12 -6
  20. package/src/skills/google-merchant-api/SKILL.md +581 -0
  21. package/src/skills/google-merchant-api/references/accounts.md +247 -0
  22. package/src/skills/google-merchant-api/references/content-api-legacy.md +216 -0
  23. package/src/skills/google-merchant-api/references/datasources.md +233 -0
  24. package/src/skills/google-merchant-api/references/inventories.md +201 -0
  25. package/src/skills/google-merchant-api/references/migration.md +267 -0
  26. package/src/skills/google-merchant-api/references/products.md +316 -0
  27. package/src/skills/google-merchant-api/references/promotions.md +201 -0
  28. package/src/skills/google-merchant-api/references/reports.md +240 -0
  29. package/src/skills/lv-aggregators-api/SKILL.md +113 -0
  30. package/src/skills/lv-aggregators-api/references/integration-guide.md +368 -0
  31. package/src/skills/lv-aggregators-api/references/kurpirkt.md +103 -0
  32. package/src/skills/lv-aggregators-api/references/salidzini.md +122 -0
  33. package/src/skills/notebook-lm/SKILL.md +1 -1
  34. package/src/skills/screen-recording/SKILL.md +243 -213
  35. package/src/skills/screen-recording/references/design-patterns.md +4 -2
  36. package/src/skills/screen-recording/references/ffmpeg-recording.md +473 -0
  37. package/src/skills/screen-recording/references/{approach1-programmatic.md → programmatic-generation.md} +45 -22
  38. package/src/skills/screen-recording/references/python-fallback.md +222 -0
  39. package/src/skills/tailwindcss-best-practices/SKILL.md +180 -0
  40. package/src/skills/tailwindcss-best-practices/references/best-practices-utility-patterns.md +87 -0
  41. package/src/skills/tailwindcss-best-practices/references/core-installation.md +109 -0
  42. package/src/skills/tailwindcss-best-practices/references/core-preflight.md +200 -0
  43. package/src/skills/tailwindcss-best-practices/references/core-responsive.md +163 -0
  44. package/src/skills/tailwindcss-best-practices/references/core-source-detection.md +114 -0
  45. package/src/skills/tailwindcss-best-practices/references/core-theme.md +108 -0
  46. package/src/skills/tailwindcss-best-practices/references/core-utility-classes.md +59 -0
  47. package/src/skills/tailwindcss-best-practices/references/core-variants.md +204 -0
  48. package/src/skills/tailwindcss-best-practices/references/effects-form-controls.md +76 -0
  49. package/src/skills/tailwindcss-best-practices/references/effects-mask.md +91 -0
  50. package/src/skills/tailwindcss-best-practices/references/effects-scroll-snap.md +59 -0
  51. package/src/skills/tailwindcss-best-practices/references/effects-text-shadow.md +78 -0
  52. package/src/skills/tailwindcss-best-practices/references/effects-transition-animation.md +80 -0
  53. package/src/skills/tailwindcss-best-practices/references/effects-visibility-interactivity.md +82 -0
  54. package/src/skills/tailwindcss-best-practices/references/features-content-detection.md +175 -0
  55. package/src/skills/tailwindcss-best-practices/references/features-custom-styles.md +203 -0
  56. package/src/skills/tailwindcss-best-practices/references/features-dark-mode.md +137 -0
  57. package/src/skills/tailwindcss-best-practices/references/features-functions-directives.md +241 -0
  58. package/src/skills/tailwindcss-best-practices/references/features-upgrade.md +160 -0
  59. package/src/skills/tailwindcss-best-practices/references/layout-aspect-ratio.md +39 -0
  60. package/src/skills/tailwindcss-best-practices/references/layout-columns.md +80 -0
  61. package/src/skills/tailwindcss-best-practices/references/layout-display.md +110 -0
  62. package/src/skills/tailwindcss-best-practices/references/layout-flexbox.md +112 -0
  63. package/src/skills/tailwindcss-best-practices/references/layout-grid.md +87 -0
  64. package/src/skills/tailwindcss-best-practices/references/layout-height.md +97 -0
  65. package/src/skills/tailwindcss-best-practices/references/layout-inset.md +103 -0
  66. package/src/skills/tailwindcss-best-practices/references/layout-logical-properties.md +92 -0
  67. package/src/skills/tailwindcss-best-practices/references/layout-margin.md +126 -0
  68. package/src/skills/tailwindcss-best-practices/references/layout-min-max-sizing.md +63 -0
  69. package/src/skills/tailwindcss-best-practices/references/layout-object-fit-position.md +64 -0
  70. package/src/skills/tailwindcss-best-practices/references/layout-overflow.md +57 -0
  71. package/src/skills/tailwindcss-best-practices/references/layout-padding.md +77 -0
  72. package/src/skills/tailwindcss-best-practices/references/layout-position.md +85 -0
  73. package/src/skills/tailwindcss-best-practices/references/layout-tables.md +67 -0
  74. package/src/skills/tailwindcss-best-practices/references/layout-width.md +102 -0
  75. package/src/skills/tailwindcss-best-practices/references/transform-base.md +68 -0
  76. package/src/skills/tailwindcss-best-practices/references/transform-rotate.md +70 -0
  77. package/src/skills/tailwindcss-best-practices/references/transform-scale.md +83 -0
  78. package/src/skills/tailwindcss-best-practices/references/transform-skew.md +62 -0
  79. package/src/skills/tailwindcss-best-practices/references/transform-translate.md +77 -0
  80. package/src/skills/tailwindcss-best-practices/references/typography-font-text.md +142 -0
  81. package/src/skills/tailwindcss-best-practices/references/typography-list-style.md +65 -0
  82. package/src/skills/tailwindcss-best-practices/references/typography-text-align.md +60 -0
  83. package/src/skills/tailwindcss-best-practices/references/visual-background.md +76 -0
  84. package/src/skills/tailwindcss-best-practices/references/visual-border.md +108 -0
  85. package/src/skills/tailwindcss-best-practices/references/visual-effects.md +111 -0
  86. package/src/skills/tailwindcss-best-practices/references/visual-svg.md +82 -0
  87. package/src/skills/test-mobile-app/SKILL.md +11 -6
  88. package/src/skills/test-mobile-app/scripts/analyze_apk.py +15 -4
  89. package/src/skills/test-mobile-app/scripts/check_environment.py +5 -5
  90. package/src/skills/test-mobile-app/scripts/run_tests.py +1 -1
  91. package/src/skills/test-web-ui/SKILL.md +264 -84
  92. package/src/skills/test-web-ui/scripts/discover.py +25 -12
  93. package/src/skills/test-web-ui/scripts/run_tests.py +3 -2
  94. package/src/skills/tm-search/SKILL.md +242 -106
  95. package/src/skills/tm-search/references/scraping-fallback.md +60 -95
  96. package/src/skills/tm-search/scripts/tm_search.py +453 -375
  97. package/src/skills/vite-best-practices/SKILL.md +115 -0
  98. package/src/skills/vite-best-practices/references/build-and-ssr.md +255 -0
  99. package/src/skills/vite-best-practices/references/core-config.md +231 -0
  100. package/src/skills/vite-best-practices/references/core-features.md +222 -0
  101. package/src/skills/vite-best-practices/references/core-plugin-api.md +294 -0
  102. package/src/skills/vite-best-practices/references/environment-api.md +108 -0
  103. package/src/skills/vite-best-practices/references/rolldown-migration.md +242 -0
  104. package/src/skills/screen-recording/references/approach2-xvfb.md +0 -232
@@ -0,0 +1,222 @@
1
+ # Python Fallback — Screen Recording without FFmpeg
2
+
3
+ Use this approach when FFmpeg is not installed. Captures screenshots in a loop using `mss` and assembles them into MP4 with OpenCV.
4
+
5
+ > **Limitations**: No audio capture, no cursor capture, lower FPS than FFmpeg, larger CPU usage.
6
+
7
+ ## Dependencies
8
+
9
+ ```bash
10
+ pip install mss opencv-python numpy
11
+ ```
12
+
13
+ ## Full Working Template
14
+
15
+ ```python
16
+ #!/usr/bin/env python3
17
+ """
18
+ Screen recorder using Python only (mss + OpenCV).
19
+ No FFmpeg required. Cross-platform: Windows, macOS, Linux.
20
+
21
+ Limitations:
22
+ - No audio capture
23
+ - No cursor capture
24
+ - Lower FPS (~15-25 depending on resolution and hardware)
25
+ """
26
+
27
+ import time, os, sys
28
+ import numpy as np
29
+ import cv2
30
+ import mss
31
+
32
+ def record_screen(output="recording.mp4", duration=30, fps=20,
33
+ region=None, monitor=1):
34
+ """
35
+ Record the screen using mss + OpenCV.
36
+
37
+ Args:
38
+ output: Output file path (.mp4)
39
+ duration: Recording duration in seconds
40
+ fps: Target frames per second (actual may be lower)
41
+ region: Tuple (x, y, w, h) for specific region, or None for full screen
42
+ monitor: Monitor number (1 = primary, 2 = secondary, etc.)
43
+ """
44
+ with mss.mss() as sct:
45
+ # Define capture area
46
+ if region:
47
+ x, y, w, h = region
48
+ capture_area = {"left": x, "top": y, "width": w, "height": h}
49
+ else:
50
+ mon = sct.monitors[monitor] # monitors[0] is "all monitors"
51
+ capture_area = {
52
+ "left": mon["left"],
53
+ "top": mon["top"],
54
+ "width": mon["width"],
55
+ "height": mon["height"],
56
+ }
57
+
58
+ width = capture_area["width"]
59
+ height = capture_area["height"]
60
+
61
+ # Setup video writer
62
+ # Try H264 first, fall back to mp4v
63
+ fourcc = cv2.VideoWriter_fourcc(*"mp4v")
64
+ writer = cv2.VideoWriter(output, fourcc, fps, (width, height))
65
+
66
+ if not writer.isOpened():
67
+ raise RuntimeError(f"Failed to open VideoWriter for {output}")
68
+
69
+ print(f"Recording {width}x{height} @ {fps}fps → {output}")
70
+ print(f"Duration: {duration}s (Ctrl+C to stop early)")
71
+
72
+ frame_count = 0
73
+ frame_interval = 1.0 / fps
74
+ start_time = time.time()
75
+
76
+ try:
77
+ while True:
78
+ frame_start = time.time()
79
+ elapsed = frame_start - start_time
80
+
81
+ if elapsed >= duration:
82
+ break
83
+
84
+ # Capture screenshot
85
+ screenshot = sct.grab(capture_area)
86
+ # Convert BGRA → BGR (OpenCV format)
87
+ frame = np.array(screenshot)[:, :, :3]
88
+ # mss returns BGRA, but numpy slice gives BGR which is what OpenCV expects
89
+
90
+ writer.write(frame)
91
+ frame_count += 1
92
+
93
+ # Frame rate control
94
+ frame_time = time.time() - frame_start
95
+ sleep_time = frame_interval - frame_time
96
+ if sleep_time > 0:
97
+ time.sleep(sleep_time)
98
+
99
+ except KeyboardInterrupt:
100
+ print("\nStopped by user.")
101
+
102
+ writer.release()
103
+ actual_duration = time.time() - start_time
104
+ actual_fps = frame_count / actual_duration if actual_duration > 0 else 0
105
+ size = os.path.getsize(output) if os.path.exists(output) else 0
106
+
107
+ print(f"Saved: {output}")
108
+ print(f" Frames: {frame_count}")
109
+ print(f" Duration: {actual_duration:.1f}s")
110
+ print(f" Actual FPS: {actual_fps:.1f}")
111
+ print(f" Size: {size:,} bytes ({size // 1024} KB)")
112
+
113
+ return output
114
+
115
+
116
+ def list_monitors():
117
+ """List available monitors and their dimensions."""
118
+ with mss.mss() as sct:
119
+ for i, mon in enumerate(sct.monitors):
120
+ if i == 0:
121
+ print(f" [0] All monitors combined: {mon['width']}x{mon['height']}")
122
+ else:
123
+ print(f" [{i}] Monitor {i}: {mon['width']}x{mon['height']} at ({mon['left']}, {mon['top']})")
124
+
125
+
126
+ if __name__ == "__main__":
127
+ import argparse
128
+ parser = argparse.ArgumentParser(description="Record screen (Python only)")
129
+ parser.add_argument("output", nargs="?", default="recording.mp4")
130
+ parser.add_argument("--duration", "-t", type=int, default=30)
131
+ parser.add_argument("--fps", type=int, default=20)
132
+ parser.add_argument("--region", "-r", type=str, default=None,
133
+ help="x,y,w,h (e.g. 100,200,800,600)")
134
+ parser.add_argument("--monitor", "-m", type=int, default=1,
135
+ help="Monitor number (default: 1 = primary)")
136
+ parser.add_argument("--list-monitors", action="store_true",
137
+ help="List available monitors and exit")
138
+ args = parser.parse_args()
139
+
140
+ if args.list_monitors:
141
+ list_monitors()
142
+ sys.exit(0)
143
+
144
+ region = tuple(map(int, args.region.split(","))) if args.region else None
145
+ record_screen(args.output, args.duration, args.fps, region, args.monitor)
146
+ ```
147
+
148
+ ## Multi-Monitor Support
149
+
150
+ ```python
151
+ with mss.mss() as sct:
152
+ # sct.monitors[0] = virtual screen (all monitors combined)
153
+ # sct.monitors[1] = primary monitor
154
+ # sct.monitors[2] = secondary monitor, etc.
155
+
156
+ # Record specific monitor
157
+ mon = sct.monitors[2] # secondary monitor
158
+ screenshot = sct.grab(mon)
159
+
160
+ # Record all monitors as one image
161
+ screenshot = sct.grab(sct.monitors[0])
162
+ ```
163
+
164
+ ## Performance Tips
165
+
166
+ ### Reduce resolution for higher FPS
167
+ ```python
168
+ # Capture at half resolution, then resize for writing
169
+ frame = np.array(sct.grab(capture_area))[:, :, :3]
170
+ small = cv2.resize(frame, (width // 2, height // 2))
171
+ writer.write(small)
172
+ ```
173
+
174
+ ### Use JPEG compression for intermediate frames
175
+ ```python
176
+ # For very long recordings, write frames as JPEG to reduce memory/disk
177
+ _, buf = cv2.imencode('.jpg', frame, [cv2.IMWRITE_JPEG_QUALITY, 85])
178
+ # Later decode for video assembly
179
+ ```
180
+
181
+ ### Codec alternatives
182
+ ```python
183
+ # mp4v — most compatible, larger files
184
+ fourcc = cv2.VideoWriter_fourcc(*"mp4v")
185
+
186
+ # XVID — better compression (requires ffmpeg/xvid codec)
187
+ fourcc = cv2.VideoWriter_fourcc(*"XVID")
188
+ # Output file should be .avi for XVID
189
+
190
+ # H264 — best compression (may not be available everywhere)
191
+ fourcc = cv2.VideoWriter_fourcc(*"avc1") # macOS
192
+ fourcc = cv2.VideoWriter_fourcc(*"H264") # Linux
193
+ ```
194
+
195
+ ## Adding Audio After Recording
196
+
197
+ If you need audio, record video with this script, then merge audio separately:
198
+
199
+ ```python
200
+ import subprocess
201
+
202
+ def add_audio_to_video(video_path, audio_path, output_path):
203
+ """Merge separately-recorded audio into the video."""
204
+ subprocess.run([
205
+ "ffmpeg", "-i", video_path, "-i", audio_path,
206
+ "-c:v", "copy", "-c:a", "aac", "-b:a", "128k",
207
+ "-shortest", output_path, "-y", "-loglevel", "quiet"
208
+ ], check=True)
209
+ ```
210
+
211
+ ## Comparison: Python Fallback vs FFmpeg
212
+
213
+ | Feature | Python (mss+cv2) | FFmpeg Native |
214
+ |---------|-------------------|---------------|
215
+ | **FPS** | 15-25 (resolution-dependent) | 30-60 |
216
+ | **Audio** | No | Yes |
217
+ | **Cursor** | No | Yes |
218
+ | **CPU Usage** | Higher | Lower |
219
+ | **Dependencies** | pip only | System FFmpeg |
220
+ | **File Size** | Larger (mp4v codec) | Smaller (H.264) |
221
+ | **Setup** | Easier | Requires FFmpeg install |
222
+ | **Reliability** | Good | Excellent |
@@ -0,0 +1,180 @@
1
+ ---
2
+ name: tailwindcss-best-practices
3
+ description: Tailwind CSS v4.x utility-first CSS framework best practices. Use when styling web applications with utility classes, building responsive layouts, customizing design systems with @theme variables, migrating from v3 to v4, configuring dark mode, creating custom utilities with @utility, or working with any Tailwind CSS v4 features. This skill covers the full v4.x line through v4.2 including text shadows, masks, logical properties, and source detection. Use this skill even for simple Tailwind questions — v4 changed many class names and configuration patterns that trip people up.
4
+ ---
5
+
6
+ # Tailwind CSS v4.x Best Practices
7
+
8
+ > Covers Tailwind CSS v4.0 through v4.2.2 (latest stable as of March 2026). Always check the official docs at https://tailwindcss.com/docs for the latest.
9
+
10
+ Tailwind CSS is a utility-first CSS framework. Instead of writing custom CSS, you compose designs using utility classes directly in your markup. Tailwind v4 introduced CSS-first configuration with `@theme` variables, `@utility` for custom utilities, and `@custom-variant` for custom variants — replacing the old `tailwind.config.js` approach entirely.
11
+
12
+ ## Critical v4 Migration Gotchas
13
+
14
+ These are the most common mistakes when working with Tailwind v4. If you're migrating from v3 or using v4 for the first time, read the [upgrade guide](references/features-upgrade.md) — but here are the top trip-ups:
15
+
16
+ | v3 (old) | v4 (correct) | Why it changed |
17
+ |----------|-------------|----------------|
18
+ | `!bg-red-500` | `bg-red-500!` | Important modifier moved from prefix to suffix |
19
+ | `bg-opacity-75` | `bg-red-500/75` | Opacity modifiers removed; use slash syntax on the color |
20
+ | `shadow` | `shadow-sm` | Shadow scale shifted down one step |
21
+ | `shadow-sm` | `shadow-xs` | Shadow scale shifted down one step |
22
+ | `rounded` | `rounded-sm` | Border radius scale shifted down one step |
23
+ | `rounded-sm` | `rounded-xs` | Border radius scale shifted down one step |
24
+ | `ring` | `ring-3` | Default ring width changed from 3px to 1px |
25
+ | `outline-none` | `outline-hidden` | Renamed for clarity |
26
+ | `flex-shrink-0` | `shrink-0` | Shorter alias is now the only form |
27
+ | `flex-grow` | `grow` | Shorter alias is now the only form |
28
+ | `overflow-ellipsis` | `text-ellipsis` | Renamed for consistency |
29
+ | `blur` | `blur-sm` | Blur scale shifted down one step |
30
+ | `@tailwind base/components/utilities` | `@import "tailwindcss"` | Single CSS import replaces three directives |
31
+ | `tailwind.config.js` | `@theme { }` in CSS | CSS-first configuration replaces JS config |
32
+ | `darkMode: 'class'` | `@custom-variant dark (&:where(.dark, .dark *));` | Dark mode config moves to CSS |
33
+ | `bg-[--var]` | `bg-(--var)` | CSS variable arbitrary values use parentheses |
34
+ | `theme(screens.xl)` | `theme(--breakpoint-xl)` | Theme function uses CSS variable names |
35
+ | `@layer utilities { }` | `@utility name { }` | Custom utilities use dedicated directive |
36
+ | `start-*` / `end-*` | `inset-s-*` / `inset-e-*` | Deprecated in v4.2 |
37
+
38
+ ## Core References
39
+
40
+ | Topic | Description | Reference |
41
+ |-------|-------------|-----------|
42
+ | Installation | Vite, PostCSS, Webpack, CLI, and CDN setup | [core-installation](references/core-installation.md) |
43
+ | Utility Classes | Understanding Tailwind's utility-first approach | [core-utility-classes](references/core-utility-classes.md) |
44
+ | Theme Variables | Design tokens, `@theme` directive, theme variable namespaces | [core-theme](references/core-theme.md) |
45
+ | Responsive Design | Mobile-first breakpoints, responsive variants, container queries | [core-responsive](references/core-responsive.md) |
46
+ | Variants | Conditional styling with state, pseudo-class, media query, and pointer variants | [core-variants](references/core-variants.md) |
47
+ | Preflight | Tailwind's base styles and how to extend or disable them | [core-preflight](references/core-preflight.md) |
48
+ | Source Detection | How Tailwind detects classes, `@source`, `@source not`, `@source inline()` | [core-source-detection](references/core-source-detection.md) |
49
+
50
+ ## Layout
51
+
52
+ ### Display & Flexbox & Grid
53
+
54
+ | Topic | Description | Reference |
55
+ |-------|-------------|-----------|
56
+ | Display | flex, grid, block, inline, hidden, sr-only, flow-root, contents | [layout-display](references/layout-display.md) |
57
+ | Flexbox | flex-direction, justify, items, gap, grow, shrink, wrap, order | [layout-flexbox](references/layout-flexbox.md) |
58
+ | Grid | grid-cols, grid-rows, gap, place-items, col-span, row-span, subgrid | [layout-grid](references/layout-grid.md) |
59
+ | Aspect Ratio | Controlling element aspect ratio for responsive media | [layout-aspect-ratio](references/layout-aspect-ratio.md) |
60
+ | Columns | Multi-column layout for magazine-style or masonry layouts | [layout-columns](references/layout-columns.md) |
61
+
62
+ ### Positioning
63
+
64
+ | Topic | Description | Reference |
65
+ |-------|-------------|-----------|
66
+ | Position | Controlling element positioning with static, relative, absolute, fixed, and sticky | [layout-position](references/layout-position.md) |
67
+ | Inset | Placement of positioned elements with inset, logical inset (`inset-s-*`, `inset-bs-*`), and deprecated `start-*`/`end-*` | [layout-inset](references/layout-inset.md) |
68
+
69
+ ### Sizing
70
+
71
+ | Topic | Description | Reference |
72
+ |-------|-------------|-----------|
73
+ | Width | Setting element width with spacing scale, fractions, container sizes, viewport units | [layout-width](references/layout-width.md) |
74
+ | Height | Setting element height with spacing scale, fractions, viewport units | [layout-height](references/layout-height.md) |
75
+ | Min & Max Sizing | min-width, max-width, min-height, max-height constraints | [layout-min-max-sizing](references/layout-min-max-sizing.md) |
76
+ | Logical Sizing | Writing-mode-aware sizing: `inline-*`, `block-*`, `min-inline-*`, `max-block-*` (v4.2) | [layout-logical-properties](references/layout-logical-properties.md) |
77
+
78
+ ### Spacing
79
+
80
+ | Topic | Description | Reference |
81
+ |-------|-------------|-----------|
82
+ | Margin | Margins with spacing scale, negative values, logical properties (`mbs-*`, `mbe-*`) | [layout-margin](references/layout-margin.md) |
83
+ | Padding | Padding with spacing scale, logical properties (`pbs-*`, `pbe-*`) | [layout-padding](references/layout-padding.md) |
84
+
85
+ ### Overflow
86
+
87
+ | Topic | Description | Reference |
88
+ |-------|-------------|-----------|
89
+ | Overflow | Controlling how elements handle content that overflows | [layout-overflow](references/layout-overflow.md) |
90
+
91
+ ### Images & Replaced Elements
92
+
93
+ | Topic | Description | Reference |
94
+ |-------|-------------|-----------|
95
+ | Object Fit & Position | Controlling how images and video are resized and positioned | [layout-object-fit-position](references/layout-object-fit-position.md) |
96
+
97
+ ### Tables
98
+
99
+ | Topic | Description | Reference |
100
+ |-------|-------------|-----------|
101
+ | Table Layout | border-collapse, table-auto, table-fixed | [layout-tables](references/layout-tables.md) |
102
+
103
+ ## Transforms
104
+
105
+ | Topic | Description | Reference |
106
+ |-------|-------------|-----------|
107
+ | Transform Base | Base transform utilities, hardware acceleration, custom transform values | [transform-base](references/transform-base.md) |
108
+ | Translate | Translating elements on x, y, z axes with spacing scale and percentages | [transform-translate](references/transform-translate.md) |
109
+ | Rotate | Rotating elements in 2D and 3D space | [transform-rotate](references/transform-rotate.md) |
110
+ | Scale | Scaling elements uniformly or on specific axes | [transform-scale](references/transform-scale.md) |
111
+ | Skew | Skewing elements on x and y axes | [transform-skew](references/transform-skew.md) |
112
+
113
+ ## Typography
114
+
115
+ | Topic | Description | Reference |
116
+ |-------|-------------|-----------|
117
+ | Font & Text | Font size, weight, color, line-height, letter-spacing, decoration, truncate, `wrap-break-word`, `wrap-anywhere` | [typography-font-text](references/typography-font-text.md) |
118
+ | Text Align | Controlling text alignment with left, center, right, justify | [typography-text-align](references/typography-text-align.md) |
119
+ | List Style | list-style-type, list-style-position for bullets and markers | [typography-list-style](references/typography-list-style.md) |
120
+
121
+ ## Visual
122
+
123
+ | Topic | Description | Reference |
124
+ |-------|-------------|-----------|
125
+ | Background | Background color, gradient, image, size, position | [visual-background](references/visual-background.md) |
126
+ | Border | Border width, color, radius, divide, ring, block border utilities (`border-bs-*`, `border-be-*`) | [visual-border](references/visual-border.md) |
127
+ | Effects | Box shadow, opacity, mix-blend, backdrop-blur, filter, colored drop shadows | [visual-effects](references/visual-effects.md) |
128
+ | SVG | fill, stroke, stroke-width for SVG and icon styling | [visual-svg](references/visual-svg.md) |
129
+ | Text Shadow | Text shadow sizes, colors, and opacity modifiers (v4.1) | [effects-text-shadow](references/effects-text-shadow.md) |
130
+ | Mask | Composable mask utilities with gradient and radial masks (v4.1) | [effects-mask](references/effects-mask.md) |
131
+
132
+ ## Effects & Interactivity
133
+
134
+ | Topic | Description | Reference |
135
+ |-------|-------------|-----------|
136
+ | Transition & Animation | CSS transitions, animation keyframes, reduced motion | [effects-transition-animation](references/effects-transition-animation.md) |
137
+ | Visibility & Interactivity | Visibility, cursor, pointer-events, user-select, z-index | [effects-visibility-interactivity](references/effects-visibility-interactivity.md) |
138
+ | Form Controls | accent-color, appearance, caret-color, resize | [effects-form-controls](references/effects-form-controls.md) |
139
+ | Scroll Snap | scroll-snap-type, scroll-snap-align for carousels | [effects-scroll-snap](references/effects-scroll-snap.md) |
140
+
141
+ ## Features
142
+
143
+ ### Dark Mode
144
+
145
+ | Topic | Description | Reference |
146
+ |-------|-------------|-----------|
147
+ | Dark Mode | Dark mode with `dark:` variant, `@custom-variant`, class and data-attribute strategies | [features-dark-mode](references/features-dark-mode.md) |
148
+
149
+ ### Migration
150
+
151
+ | Topic | Description | Reference |
152
+ |-------|-------------|-----------|
153
+ | Upgrade Guide | Migrating from v3 to v4, all renamed/removed utilities, scale shifts, config migration | [features-upgrade](references/features-upgrade.md) |
154
+
155
+ ### Customization
156
+
157
+ | Topic | Description | Reference |
158
+ |-------|-------------|-----------|
159
+ | Custom Styles | Adding custom styles, utilities with `@utility`, variants with `@custom-variant`, arbitrary values | [features-custom-styles](references/features-custom-styles.md) |
160
+ | Functions & Directives | Tailwind's CSS directives (`@theme`, `@utility`, `@custom-variant`, `@source`) and functions | [features-functions-directives](references/features-functions-directives.md) |
161
+ | Content Detection | How Tailwind detects classes, `@source` configuration, safelisting with `@source inline()` | [features-content-detection](references/features-content-detection.md) |
162
+
163
+ ## Best Practices
164
+
165
+ | Topic | Description | Reference |
166
+ |-------|-------------|-----------|
167
+ | Utility Patterns | Managing duplication, conflicts, important modifier, when to use components | [best-practices-utility-patterns](references/best-practices-utility-patterns.md) |
168
+
169
+ ## Key Recommendations
170
+
171
+ - **Use utility classes directly in markup** — compose designs by combining utilities
172
+ - **Customize with `@theme` directive** — define design tokens as CSS variables, not in JS config
173
+ - **Mobile-first responsive design** — unprefixed utilities for mobile, prefixed for breakpoints
174
+ - **Use complete class names** — never construct classes dynamically with string interpolation
175
+ - **Leverage variants** — stack variants for complex conditional styling (`dark:md:hover:bg-blue-600`)
176
+ - **Prefer CSS-first configuration** — use `@theme`, `@utility`, and `@custom-variant` over JavaScript configs
177
+ - **Use oklch for custom colors** — Tailwind v4 defaults to oklch; prefer it for perceptual uniformity
178
+ - **Use rem for custom breakpoints** — e.g., `--breakpoint-3xl: 90rem` not `1440px`
179
+ - **Know the scale shifts** — shadow, rounded, and blur all shifted down one step in v4
180
+ - **Use `@custom-variant`** (not `@variant`) — for defining custom variants like class-based dark mode
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: best-practices-utility-patterns
3
+ description: Managing duplication, conflicts, important modifier, and when to use components
4
+ ---
5
+
6
+ # Best Practices: Utility Patterns
7
+
8
+ Practical patterns when building with Tailwind utilities.
9
+
10
+ ## Managing duplication
11
+
12
+ **Use components** for repeated UI: Extract into React/Vue/Svelte components or template partials.
13
+
14
+ ```jsx
15
+ function Button({ children, variant = 'primary' }) {
16
+ const base = 'px-4 py-2 rounded-lg font-medium'
17
+ const variants = {
18
+ primary: 'bg-blue-500 hover:bg-blue-600 text-white',
19
+ secondary: 'bg-gray-200 hover:bg-gray-300 text-gray-900',
20
+ }
21
+ return <button className={`${base} ${variants[variant]}`}>{children}</button>
22
+ }
23
+ ```
24
+
25
+ **Use loops** when markup is repeated from data—the class list is written once.
26
+
27
+ **Multi-cursor editing** for localized duplication in a single file.
28
+
29
+ ## Managing conflicts
30
+
31
+ When two utilities target the same property, the one **later in the stylesheet** wins. Avoid adding conflicting classes:
32
+
33
+ ```html
34
+ <!-- Bad -->
35
+ <div class="flex grid">Conflict</div>
36
+
37
+ <!-- Good: conditional class -->
38
+ <div class={gridLayout ? 'grid' : 'flex'}>
39
+ ```
40
+
41
+ ## Important modifier
42
+
43
+ Add `!` suffix to force `!important`:
44
+
45
+ ```html
46
+ <div class="bg-teal-500 bg-red-500!">Red wins</div>
47
+ ```
48
+
49
+ Use sparingly; prefer fixing specificity properly.
50
+
51
+ ## Important flag (global)
52
+
53
+ ```css
54
+ @import "tailwindcss" important;
55
+ ```
56
+
57
+ Makes all utilities `!important`. Useful when integrating into existing high-specificity CSS.
58
+
59
+ ## Prefix option
60
+
61
+ ```css
62
+ @import "tailwindcss" prefix(tw);
63
+ ```
64
+
65
+ Generates `tw:text-red-500` etc. Use when project class names conflict with Tailwind.
66
+
67
+ ## When to use inline styles
68
+
69
+ - Values from API/database (e.g. brand colors)
70
+ - Dynamic values that change at runtime
71
+ - Complex arbitrary values hard to read as class names
72
+ - Pattern: set CSS variables via inline style, reference with `bg-(--my-var)`
73
+
74
+ ## Key Points
75
+
76
+ - Extract repeated patterns into components
77
+ - Never add two conflicting utilities—use conditional classes
78
+ - `!` suffix = single utility `!important`
79
+ - `important` flag = all utilities `!important`
80
+ - `prefix(tw)` = prefix all utilities
81
+ - Use inline styles for dynamic values; utilities for static design
82
+
83
+ <!--
84
+ Source references:
85
+ - https://tailwindcss.com/docs/utility-first#managing-duplication
86
+ - https://tailwindcss.com/docs/utility-first#managing-style-conflicts
87
+ -->
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: core-installation
3
+ description: Installing Tailwind CSS with Vite, PostCSS, CLI, or CDN
4
+ ---
5
+
6
+ # Installation
7
+
8
+ How to add Tailwind CSS to a project.
9
+
10
+ ## Vite (Recommended)
11
+
12
+ ```bash
13
+ npm install tailwindcss @tailwindcss/vite
14
+ ```
15
+
16
+ ```ts
17
+ // vite.config.ts
18
+ import { defineConfig } from 'vite'
19
+ import tailwindcss from '@tailwindcss/vite'
20
+
21
+ export default defineConfig({
22
+ plugins: [tailwindcss()],
23
+ })
24
+ ```
25
+
26
+ ```css
27
+ /* style.css */
28
+ @import "tailwindcss";
29
+ ```
30
+
31
+ ## PostCSS
32
+
33
+ ```bash
34
+ npm install tailwindcss @tailwindcss/postcss postcss
35
+ ```
36
+
37
+ ```js
38
+ // postcss.config.js
39
+ export default {
40
+ plugins: {
41
+ '@tailwindcss/postcss': {},
42
+ },
43
+ }
44
+ ```
45
+
46
+ ```css
47
+ @import "tailwindcss";
48
+ ```
49
+
50
+ ## Tailwind CLI
51
+
52
+ ```bash
53
+ npx @tailwindcss/cli -i ./src/input.css -o ./dist/output.css --watch
54
+ ```
55
+
56
+ ```css
57
+ /* input.css */
58
+ @import "tailwindcss";
59
+ ```
60
+
61
+ ## Webpack (v4.2+)
62
+
63
+ ```bash
64
+ npm install tailwindcss @tailwindcss/webpack
65
+ ```
66
+
67
+ ```js
68
+ // webpack.config.js
69
+ const tailwindcss = require('@tailwindcss/webpack')
70
+
71
+ module.exports = {
72
+ plugins: [tailwindcss()],
73
+ }
74
+ ```
75
+
76
+ ```css
77
+ @import "tailwindcss";
78
+ ```
79
+
80
+ ## Play CDN (Development only)
81
+
82
+ ```html
83
+ <script src="https://cdn.tailwindcss.com"></script>
84
+ ```
85
+
86
+ Not for production: no purging, larger payload.
87
+
88
+ ## Framework guides
89
+
90
+ - **Nuxt**: `@nuxtjs/tailwindcss` module or `@tailwindcss/vite`
91
+ - **Next.js**: Use Vite or PostCSS with `tailwind.config.js` if needed
92
+ - **React Router / SvelteKit / SolidJS**: Use `@tailwindcss/vite`
93
+
94
+ ## Key Points
95
+
96
+ - Vite: `@tailwindcss/vite` plugin + `@import "tailwindcss"` (supports Vite 8+)
97
+ - PostCSS: `@tailwindcss/postcss`
98
+ - Webpack: `@tailwindcss/webpack` (v4.2+)
99
+ - CLI: `npx @tailwindcss/cli`
100
+ - v4 uses CSS-first config; no `tailwind.config.js` required for basics
101
+ - Use `@theme` in CSS to customize design tokens
102
+
103
+ <!--
104
+ Source references:
105
+ - https://tailwindcss.com/docs/installation/using-vite
106
+ - https://tailwindcss.com/docs/installation/using-postcss
107
+ - https://tailwindcss.com/docs/installation/tailwind-cli
108
+ - https://tailwindcss.com/docs/installation/play-cdn
109
+ -->