nubos-pilot 0.7.2 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/agents/np-executor.md +1 -0
  2. package/bin/install.js +2 -0
  3. package/bin/np-tools/_commands.cjs +98 -64
  4. package/bin/np-tools/dashboard.cjs +11 -5
  5. package/bin/np-tools/dashboard.test.cjs +80 -0
  6. package/bin/np-tools/help.cjs +16 -7
  7. package/bin/np-tools/help.test.cjs +63 -0
  8. package/bin/np-tools/stats.cjs +99 -3
  9. package/bin/np-tools/stats.test.cjs +65 -0
  10. package/lib/dashboard.cjs +41 -10
  11. package/lib/dashboard.test.cjs +83 -0
  12. package/lib/install/runtime-assets.cjs +50 -1
  13. package/lib/install/runtime-assets.test.cjs +190 -0
  14. package/lib/install/runtimes-registry.cjs +1 -0
  15. package/lib/runtime/_readline.cjs +49 -11
  16. package/lib/runtime/_readline.test.cjs +59 -0
  17. package/lib/runtime/claude.cjs +8 -1
  18. package/package.json +2 -1
  19. package/skills/np-composition-patterns/AGENTS.md +946 -0
  20. package/skills/np-composition-patterns/README.md +60 -0
  21. package/skills/np-composition-patterns/SKILL.md +89 -0
  22. package/skills/np-composition-patterns/metadata.json +11 -0
  23. package/skills/np-composition-patterns/rules/_sections.md +29 -0
  24. package/skills/np-composition-patterns/rules/_template.md +24 -0
  25. package/skills/np-composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
  26. package/skills/np-composition-patterns/rules/architecture-compound-components.md +112 -0
  27. package/skills/np-composition-patterns/rules/patterns-children-over-render-props.md +87 -0
  28. package/skills/np-composition-patterns/rules/patterns-explicit-variants.md +100 -0
  29. package/skills/np-composition-patterns/rules/react19-no-forwardref.md +42 -0
  30. package/skills/np-composition-patterns/rules/state-context-interface.md +191 -0
  31. package/skills/np-composition-patterns/rules/state-decouple-implementation.md +113 -0
  32. package/skills/np-composition-patterns/rules/state-lift-state.md +125 -0
  33. package/skills/np-council/SKILL.md +300 -0
  34. package/skills/np-design/SKILL.md +679 -0
  35. package/skills/np-frontend-design/LICENSE.txt +177 -0
  36. package/skills/np-frontend-design/SKILL.md +42 -0
  37. package/skills/np-high-end-visual-design/SKILL.md +98 -0
  38. package/skills/np-impeccable/SKILL.md +152 -0
  39. package/skills/np-impeccable/agents/openai.yaml +4 -0
  40. package/skills/np-impeccable/reference/adapt.md +190 -0
  41. package/skills/np-impeccable/reference/animate.md +173 -0
  42. package/skills/np-impeccable/reference/audit.md +134 -0
  43. package/skills/np-impeccable/reference/bolder.md +113 -0
  44. package/skills/np-impeccable/reference/brand.md +104 -0
  45. package/skills/np-impeccable/reference/clarify.md +174 -0
  46. package/skills/np-impeccable/reference/cognitive-load.md +106 -0
  47. package/skills/np-impeccable/reference/color-and-contrast.md +105 -0
  48. package/skills/np-impeccable/reference/colorize.md +154 -0
  49. package/skills/np-impeccable/reference/craft.md +138 -0
  50. package/skills/np-impeccable/reference/critique.md +213 -0
  51. package/skills/np-impeccable/reference/delight.md +302 -0
  52. package/skills/np-impeccable/reference/distill.md +111 -0
  53. package/skills/np-impeccable/reference/document.md +427 -0
  54. package/skills/np-impeccable/reference/extract.md +70 -0
  55. package/skills/np-impeccable/reference/harden.md +347 -0
  56. package/skills/np-impeccable/reference/heuristics-scoring.md +234 -0
  57. package/skills/np-impeccable/reference/interaction-design.md +195 -0
  58. package/skills/np-impeccable/reference/layout.md +141 -0
  59. package/skills/np-impeccable/reference/live.md +513 -0
  60. package/skills/np-impeccable/reference/motion-design.md +99 -0
  61. package/skills/np-impeccable/reference/onboard.md +234 -0
  62. package/skills/np-impeccable/reference/optimize.md +258 -0
  63. package/skills/np-impeccable/reference/overdrive.md +130 -0
  64. package/skills/np-impeccable/reference/personas.md +178 -0
  65. package/skills/np-impeccable/reference/polish.md +232 -0
  66. package/skills/np-impeccable/reference/product.md +62 -0
  67. package/skills/np-impeccable/reference/quieter.md +99 -0
  68. package/skills/np-impeccable/reference/responsive-design.md +114 -0
  69. package/skills/np-impeccable/reference/shape.md +136 -0
  70. package/skills/np-impeccable/reference/spatial-design.md +100 -0
  71. package/skills/np-impeccable/reference/teach.md +137 -0
  72. package/skills/np-impeccable/reference/typeset.md +124 -0
  73. package/skills/np-impeccable/reference/typography.md +159 -0
  74. package/skills/np-impeccable/reference/ux-writing.md +107 -0
  75. package/skills/np-impeccable/scripts/cleanup-deprecated.mjs +284 -0
  76. package/skills/np-impeccable/scripts/command-metadata.json +94 -0
  77. package/skills/np-impeccable/scripts/design-parser.mjs +820 -0
  78. package/skills/np-impeccable/scripts/detect-csp.mjs +198 -0
  79. package/skills/np-impeccable/scripts/is-generated.mjs +69 -0
  80. package/skills/np-impeccable/scripts/live-accept.mjs +465 -0
  81. package/skills/np-impeccable/scripts/live-browser.js +4684 -0
  82. package/skills/np-impeccable/scripts/live-inject.mjs +436 -0
  83. package/skills/np-impeccable/scripts/live-poll.mjs +187 -0
  84. package/skills/np-impeccable/scripts/live-server.mjs +679 -0
  85. package/skills/np-impeccable/scripts/live-wrap.mjs +395 -0
  86. package/skills/np-impeccable/scripts/live.mjs +247 -0
  87. package/skills/np-impeccable/scripts/load-context.mjs +93 -0
  88. package/skills/np-impeccable/scripts/modern-screenshot.umd.js +14 -0
  89. package/skills/np-impeccable/scripts/pin.mjs +214 -0
  90. package/skills/np-industrial-brutalist-ui/SKILL.md +92 -0
  91. package/skills/np-minimalist-ui/SKILL.md +85 -0
  92. package/skills/np-react-best-practices/AGENTS.md +3810 -0
  93. package/skills/np-react-best-practices/README.md +123 -0
  94. package/skills/np-react-best-practices/SKILL.md +149 -0
  95. package/skills/np-react-best-practices/metadata.json +15 -0
  96. package/skills/np-react-best-practices/rules/_sections.md +46 -0
  97. package/skills/np-react-best-practices/rules/_template.md +28 -0
  98. package/skills/np-react-best-practices/rules/advanced-effect-event-deps.md +56 -0
  99. package/skills/np-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  100. package/skills/np-react-best-practices/rules/advanced-init-once.md +42 -0
  101. package/skills/np-react-best-practices/rules/advanced-use-latest.md +39 -0
  102. package/skills/np-react-best-practices/rules/async-api-routes.md +38 -0
  103. package/skills/np-react-best-practices/rules/async-cheap-condition-before-await.md +37 -0
  104. package/skills/np-react-best-practices/rules/async-defer-await.md +82 -0
  105. package/skills/np-react-best-practices/rules/async-dependencies.md +51 -0
  106. package/skills/np-react-best-practices/rules/async-parallel.md +28 -0
  107. package/skills/np-react-best-practices/rules/async-suspense-boundaries.md +99 -0
  108. package/skills/np-react-best-practices/rules/bundle-analyzable-paths.md +63 -0
  109. package/skills/np-react-best-practices/rules/bundle-barrel-imports.md +60 -0
  110. package/skills/np-react-best-practices/rules/bundle-conditional.md +31 -0
  111. package/skills/np-react-best-practices/rules/bundle-defer-third-party.md +49 -0
  112. package/skills/np-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  113. package/skills/np-react-best-practices/rules/bundle-preload.md +50 -0
  114. package/skills/np-react-best-practices/rules/client-event-listeners.md +74 -0
  115. package/skills/np-react-best-practices/rules/client-localstorage-schema.md +71 -0
  116. package/skills/np-react-best-practices/rules/client-passive-event-listeners.md +48 -0
  117. package/skills/np-react-best-practices/rules/client-swr-dedup.md +56 -0
  118. package/skills/np-react-best-practices/rules/js-batch-dom-css.md +107 -0
  119. package/skills/np-react-best-practices/rules/js-cache-function-results.md +80 -0
  120. package/skills/np-react-best-practices/rules/js-cache-property-access.md +28 -0
  121. package/skills/np-react-best-practices/rules/js-cache-storage.md +70 -0
  122. package/skills/np-react-best-practices/rules/js-combine-iterations.md +32 -0
  123. package/skills/np-react-best-practices/rules/js-early-exit.md +50 -0
  124. package/skills/np-react-best-practices/rules/js-flatmap-filter.md +60 -0
  125. package/skills/np-react-best-practices/rules/js-hoist-regexp.md +45 -0
  126. package/skills/np-react-best-practices/rules/js-index-maps.md +37 -0
  127. package/skills/np-react-best-practices/rules/js-length-check-first.md +49 -0
  128. package/skills/np-react-best-practices/rules/js-min-max-loop.md +82 -0
  129. package/skills/np-react-best-practices/rules/js-request-idle-callback.md +105 -0
  130. package/skills/np-react-best-practices/rules/js-set-map-lookups.md +24 -0
  131. package/skills/np-react-best-practices/rules/js-tosorted-immutable.md +57 -0
  132. package/skills/np-react-best-practices/rules/rendering-activity.md +26 -0
  133. package/skills/np-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  134. package/skills/np-react-best-practices/rules/rendering-conditional-render.md +40 -0
  135. package/skills/np-react-best-practices/rules/rendering-content-visibility.md +38 -0
  136. package/skills/np-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  137. package/skills/np-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  138. package/skills/np-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  139. package/skills/np-react-best-practices/rules/rendering-resource-hints.md +85 -0
  140. package/skills/np-react-best-practices/rules/rendering-script-defer-async.md +68 -0
  141. package/skills/np-react-best-practices/rules/rendering-svg-precision.md +28 -0
  142. package/skills/np-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  143. package/skills/np-react-best-practices/rules/rerender-defer-reads.md +39 -0
  144. package/skills/np-react-best-practices/rules/rerender-dependencies.md +45 -0
  145. package/skills/np-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  146. package/skills/np-react-best-practices/rules/rerender-derived-state.md +29 -0
  147. package/skills/np-react-best-practices/rules/rerender-functional-setstate.md +74 -0
  148. package/skills/np-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  149. package/skills/np-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  150. package/skills/np-react-best-practices/rules/rerender-memo.md +44 -0
  151. package/skills/np-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  152. package/skills/np-react-best-practices/rules/rerender-no-inline-components.md +82 -0
  153. package/skills/np-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  154. package/skills/np-react-best-practices/rules/rerender-split-combined-hooks.md +64 -0
  155. package/skills/np-react-best-practices/rules/rerender-transitions.md +40 -0
  156. package/skills/np-react-best-practices/rules/rerender-use-deferred-value.md +59 -0
  157. package/skills/np-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  158. package/skills/np-react-best-practices/rules/server-after-nonblocking.md +73 -0
  159. package/skills/np-react-best-practices/rules/server-auth-actions.md +96 -0
  160. package/skills/np-react-best-practices/rules/server-cache-lru.md +41 -0
  161. package/skills/np-react-best-practices/rules/server-cache-react.md +76 -0
  162. package/skills/np-react-best-practices/rules/server-dedup-props.md +65 -0
  163. package/skills/np-react-best-practices/rules/server-hoist-static-io.md +149 -0
  164. package/skills/np-react-best-practices/rules/server-no-shared-module-state.md +50 -0
  165. package/skills/np-react-best-practices/rules/server-parallel-fetching.md +83 -0
  166. package/skills/np-react-best-practices/rules/server-parallel-nested-fetching.md +34 -0
  167. package/skills/np-react-best-practices/rules/server-serialization.md +38 -0
  168. package/skills/np-react-native-skills/AGENTS.md +2897 -0
  169. package/skills/np-react-native-skills/README.md +165 -0
  170. package/skills/np-react-native-skills/SKILL.md +121 -0
  171. package/skills/np-react-native-skills/metadata.json +16 -0
  172. package/skills/np-react-native-skills/rules/_sections.md +86 -0
  173. package/skills/np-react-native-skills/rules/_template.md +28 -0
  174. package/skills/np-react-native-skills/rules/animation-derived-value.md +53 -0
  175. package/skills/np-react-native-skills/rules/animation-gesture-detector-press.md +95 -0
  176. package/skills/np-react-native-skills/rules/animation-gpu-properties.md +65 -0
  177. package/skills/np-react-native-skills/rules/design-system-compound-components.md +66 -0
  178. package/skills/np-react-native-skills/rules/fonts-config-plugin.md +71 -0
  179. package/skills/np-react-native-skills/rules/imports-design-system-folder.md +68 -0
  180. package/skills/np-react-native-skills/rules/js-hoist-intl.md +61 -0
  181. package/skills/np-react-native-skills/rules/list-performance-callbacks.md +44 -0
  182. package/skills/np-react-native-skills/rules/list-performance-function-references.md +132 -0
  183. package/skills/np-react-native-skills/rules/list-performance-images.md +53 -0
  184. package/skills/np-react-native-skills/rules/list-performance-inline-objects.md +97 -0
  185. package/skills/np-react-native-skills/rules/list-performance-item-expensive.md +94 -0
  186. package/skills/np-react-native-skills/rules/list-performance-item-memo.md +82 -0
  187. package/skills/np-react-native-skills/rules/list-performance-item-types.md +104 -0
  188. package/skills/np-react-native-skills/rules/list-performance-virtualize.md +67 -0
  189. package/skills/np-react-native-skills/rules/monorepo-native-deps-in-app.md +46 -0
  190. package/skills/np-react-native-skills/rules/monorepo-single-dependency-versions.md +63 -0
  191. package/skills/np-react-native-skills/rules/navigation-native-navigators.md +188 -0
  192. package/skills/np-react-native-skills/rules/react-compiler-destructure-functions.md +50 -0
  193. package/skills/np-react-native-skills/rules/react-compiler-reanimated-shared-values.md +48 -0
  194. package/skills/np-react-native-skills/rules/react-state-dispatcher.md +91 -0
  195. package/skills/np-react-native-skills/rules/react-state-fallback.md +56 -0
  196. package/skills/np-react-native-skills/rules/react-state-minimize.md +65 -0
  197. package/skills/np-react-native-skills/rules/rendering-no-falsy-and.md +74 -0
  198. package/skills/np-react-native-skills/rules/rendering-text-in-text-component.md +36 -0
  199. package/skills/np-react-native-skills/rules/scroll-position-no-state.md +82 -0
  200. package/skills/np-react-native-skills/rules/state-ground-truth.md +80 -0
  201. package/skills/np-react-native-skills/rules/ui-expo-image.md +66 -0
  202. package/skills/np-react-native-skills/rules/ui-image-gallery.md +104 -0
  203. package/skills/np-react-native-skills/rules/ui-measure-views.md +78 -0
  204. package/skills/np-react-native-skills/rules/ui-menus.md +174 -0
  205. package/skills/np-react-native-skills/rules/ui-native-modals.md +77 -0
  206. package/skills/np-react-native-skills/rules/ui-pressable.md +61 -0
  207. package/skills/np-react-native-skills/rules/ui-safe-area-scroll.md +65 -0
  208. package/skills/np-react-native-skills/rules/ui-scrollview-content-inset.md +45 -0
  209. package/skills/np-react-native-skills/rules/ui-styling.md +87 -0
  210. package/skills/np-react-view-transitions/AGENTS.md +955 -0
  211. package/skills/np-react-view-transitions/README.md +42 -0
  212. package/skills/np-react-view-transitions/SKILL.md +320 -0
  213. package/skills/np-react-view-transitions/metadata.json +12 -0
  214. package/skills/np-react-view-transitions/references/css-recipes.md +242 -0
  215. package/skills/np-react-view-transitions/references/implementation.md +182 -0
  216. package/skills/np-react-view-transitions/references/nextjs.md +176 -0
  217. package/skills/np-react-view-transitions/references/patterns.md +262 -0
  218. package/skills/np-redesign-existing-projects/SKILL.md +178 -0
  219. package/skills/np-shadcn/SKILL.md +250 -0
  220. package/skills/np-shadcn/agents/openai.yml +5 -0
  221. package/skills/np-shadcn/assets/shadcn-small.png +0 -0
  222. package/skills/np-shadcn/assets/shadcn.png +0 -0
  223. package/skills/np-shadcn/cli.md +276 -0
  224. package/skills/np-shadcn/customization.md +209 -0
  225. package/skills/np-shadcn/evals/evals.json +47 -0
  226. package/skills/np-shadcn/mcp.md +94 -0
  227. package/skills/np-shadcn/rules/base-vs-radix.md +306 -0
  228. package/skills/np-shadcn/rules/composition.md +195 -0
  229. package/skills/np-shadcn/rules/forms.md +192 -0
  230. package/skills/np-shadcn/rules/icons.md +101 -0
  231. package/skills/np-shadcn/rules/styling.md +162 -0
  232. package/skills/np-stitch-design-taste/DESIGN.md +121 -0
  233. package/skills/np-stitch-design-taste/SKILL.md +184 -0
  234. package/skills/np-web-design-guidelines/SKILL.md +39 -0
  235. package/workflows/add-todo.md +5 -0
  236. package/workflows/discuss-phase.md +2 -0
  237. package/workflows/execute-phase.md +27 -0
  238. package/workflows/note.md +5 -0
  239. package/workflows/plan-phase.md +12 -0
  240. package/workflows/stats.md +27 -90
  241. package/workflows/verify-work.md +12 -0
@@ -0,0 +1,178 @@
1
+ ---
2
+ name: np-redesign-existing-projects
3
+ description: Upgrades existing websites and apps to premium quality. Audits current design, identifies generic AI patterns, and applies high-end design standards without breaking functionality. Works with any CSS framework or vanilla CSS.
4
+ ---
5
+
6
+ # Redesign Skill
7
+
8
+ ## How This Works
9
+
10
+ When applied to an existing project, follow this sequence:
11
+
12
+ 1. **Scan** — Read the codebase. Identify the framework, styling method (Tailwind, vanilla CSS, styled-components, etc.), and current design patterns.
13
+ 2. **Diagnose** — Run through the audit below. List every generic pattern, weak point, and missing state you find.
14
+ 3. **Fix** — Apply targeted upgrades working with the existing stack. Do not rewrite from scratch. Improve what's there.
15
+
16
+ ## Design Audit
17
+
18
+ ### Typography
19
+
20
+ Check for these problems and fix them:
21
+
22
+ - **Browser default fonts or Inter everywhere.** Replace with a font that has character. Good options: `Geist`, `Outfit`, `Cabinet Grotesk`, `Satoshi`. For editorial/creative projects, pair a serif header with a sans-serif body.
23
+ - **Headlines lack presence.** Increase size for display text, tighten letter-spacing, reduce line-height. Headlines should feel heavy and intentional.
24
+ - **Body text too wide.** Limit paragraph width to roughly 65 characters. Increase line-height for readability.
25
+ - **Only Regular (400) and Bold (700) weights used.** Introduce Medium (500) and SemiBold (600) for more subtle hierarchy.
26
+ - **Numbers in proportional font.** Use a monospace font or enable tabular figures (`font-variant-numeric: tabular-nums`) for data-heavy interfaces.
27
+ - **Missing letter-spacing adjustments.** Use negative tracking for large headers, positive tracking for small caps or labels.
28
+ - **All-caps subheaders everywhere.** Try lowercase italics, sentence case, or small-caps instead.
29
+ - **Orphaned words.** Single words sitting alone on the last line. Fix with `text-wrap: balance` or `text-wrap: pretty`.
30
+
31
+ ### Color and Surfaces
32
+
33
+ - **Pure `#000000` background.** Replace with off-black, dark charcoal, or tinted dark (`#0a0a0a`, `#121212`, or a dark navy).
34
+ - **Oversaturated accent colors.** Keep saturation below 80%. Desaturate accents so they blend with neutrals instead of screaming.
35
+ - **More than one accent color.** Pick one. Remove the rest. Consistency beats variety.
36
+ - **Mixing warm and cool grays.** Stick to one gray family. Tint all grays with a consistent hue (warm or cool, not both).
37
+ - **Purple/blue "AI gradient" aesthetic.** This is the most common AI design fingerprint. Replace with neutral bases and a single, considered accent.
38
+ - **Generic `box-shadow`.** Tint shadows to match the background hue. Use colored shadows (e.g., dark blue shadow on a blue background) instead of pure black at low opacity.
39
+ - **Flat design with zero texture.** Add subtle noise, grain, or micro-patterns to backgrounds. Pure flat vectors feel sterile.
40
+ - **Perfectly even gradients.** Break the uniformity with radial gradients, noise overlays, or mesh gradients instead of standard linear 45-degree fades.
41
+ - **Inconsistent lighting direction.** Audit all shadows to ensure they suggest a single, consistent light source.
42
+ - **Random dark sections in a light mode page (or vice versa).** A single dark-background section breaking an otherwise light page looks like a copy-paste accident. Either commit to a full dark mode or keep a consistent background tone throughout. If contrast is needed, use a slightly darker shade of the same palette — not a sudden jump to `#111` in the middle of a cream page.
43
+ - **Empty, flat sections with no visual depth.** Sections that are just text on a plain background feel unfinished. Add high-quality background imagery (blurred, overlaid, or masked), subtle patterns, or ambient gradients. Use reliable placeholder sources like `https://picsum.photos/seed/{name}/1920/1080` when real assets are not available. Experiment with background images behind hero sections, feature blocks, or CTAs — even a subtle full-width photo at low opacity adds presence.
44
+
45
+ ### Layout
46
+
47
+ - **Everything centered and symmetrical.** Break symmetry with offset margins, mixed aspect ratios, or left-aligned headers over centered content.
48
+ - **Three equal card columns as feature row.** This is the most generic AI layout. Replace with a 2-column zig-zag, asymmetric grid, horizontal scroll, or masonry layout.
49
+ - **Using `height: 100vh` for full-screen sections.** Replace with `min-height: 100dvh` to prevent layout jumping on mobile browsers (iOS Safari viewport bug).
50
+ - **Complex flexbox percentage math.** Replace with CSS Grid for reliable multi-column structures.
51
+ - **No max-width container.** Add a container constraint (around 1200-1440px) with auto margins so content doesn't stretch edge-to-edge on wide screens.
52
+ - **Cards of equal height forced by flexbox.** Allow variable heights or use masonry when content varies in length.
53
+ - **Uniform border-radius on everything.** Vary the radius: tighter on inner elements, softer on containers.
54
+ - **No overlap or depth.** Elements sit flat next to each other. Use negative margins to create layering and visual depth.
55
+ - **Symmetrical vertical padding.** Top and bottom padding are always identical. Adjust optically — bottom padding often needs to be slightly larger.
56
+ - **Dashboard always has a left sidebar.** Try top navigation, a floating command menu, or a collapsible panel instead.
57
+ - **Missing whitespace.** Double the spacing. Let the design breathe. Dense layouts work for data dashboards, not for marketing pages.
58
+ - **Buttons not bottom-aligned in card groups.** When cards have different content lengths, CTAs end up at random heights. Pin buttons to the bottom of each card so they form a clean horizontal line regardless of content above.
59
+ - **Feature lists starting at different vertical positions.** In pricing tables or comparison cards, the list of features should start at the same Y position across all columns. Use consistent spacing above the list or fixed-height title/price blocks.
60
+ - **Inconsistent vertical rhythm in side-by-side elements.** When placing cards, columns, or panels next to each other, align shared elements (titles, descriptions, prices, buttons) across all items. Misaligned baselines make the layout look broken.
61
+ - **Mathematical alignment that looks optically wrong.** Centering by the math doesn't always look centered to the eye. Icons next to text, play buttons in circles, or text in buttons often need 1-2px optical adjustments to feel right.
62
+
63
+ ### Interactivity and States
64
+
65
+ - **No hover states on buttons.** Add background shift, slight scale, or translate on hover.
66
+ - **No active/pressed feedback.** Add a subtle `scale(0.98)` or `translateY(1px)` on press to simulate a physical click.
67
+ - **Instant transitions with zero duration.** Add smooth transitions (200-300ms) to all interactive elements.
68
+ - **Missing focus ring.** Ensure visible focus indicators for keyboard navigation. This is an accessibility requirement, not optional.
69
+ - **No loading states.** Replace generic circular spinners with skeleton loaders that match the layout shape.
70
+ - **No empty states.** An empty dashboard showing nothing is a missed opportunity. Design a composed "getting started" view.
71
+ - **No error states.** Add clear, inline error messages for forms. Do not use `window.alert()`.
72
+ - **Dead links.** Buttons that link to `#`. Either link to real destinations or visually disable them.
73
+ - **No indication of current page in navigation.** Style the active nav link differently so users know where they are.
74
+ - **Scroll jumping.** Anchor clicks jump instantly. Add `scroll-behavior: smooth`.
75
+ - **Animations using `top`, `left`, `width`, `height`.** Switch to `transform` and `opacity` for GPU-accelerated, smooth animation.
76
+
77
+ ### Content
78
+
79
+ - **Generic names like "John Doe" or "Jane Smith".** Use diverse, realistic-sounding names.
80
+ - **Fake round numbers like `99.99%`, `50%`, `$100.00`.** Use organic, messy data: `47.2%`, `$99.00`, `+1 (312) 847-1928`.
81
+ - **Placeholder company names like "Acme Corp", "Nexus", "SmartFlow".** Invent contextual, believable brand names.
82
+ - **AI copywriting cliches.** Never use "Elevate", "Seamless", "Unleash", "Next-Gen", "Game-changer", "Delve", "Tapestry", or "In the world of...". Write plain, specific language.
83
+ - **Exclamation marks in success messages.** Remove them. Be confident, not loud.
84
+ - **"Oops!" error messages.** Be direct: "Connection failed. Please try again."
85
+ - **Passive voice.** Use active voice: "We couldn't save your changes" instead of "Mistakes were made."
86
+ - **All blog post dates identical.** Randomize dates to appear real.
87
+ - **Same avatar image for multiple users.** Use unique assets for every distinct person.
88
+ - **Lorem Ipsum.** Never use placeholder latin text. Write real draft copy.
89
+ - **Title Case On Every Header.** Use sentence case instead.
90
+
91
+ ### Component Patterns
92
+
93
+ - **Generic card look (border + shadow + white background).** Remove the border, or use only background color, or use only spacing. Cards should exist only when elevation communicates hierarchy.
94
+ - **Always one filled button + one ghost button.** Add text links or tertiary styles to reduce visual noise.
95
+ - **Pill-shaped "New" and "Beta" badges.** Try square badges, flags, or plain text labels.
96
+ - **Accordion FAQ sections.** Use a side-by-side list, searchable help, or inline progressive disclosure.
97
+ - **3-card carousel testimonials with dots.** Replace with a masonry wall, embedded social posts, or a single rotating quote.
98
+ - **Pricing table with 3 towers.** Highlight the recommended tier with color and emphasis, not just extra height.
99
+ - **Modals for everything.** Use inline editing, slide-over panels, or expandable sections instead of popups for simple actions.
100
+ - **Avatar circles exclusively.** Try squircles or rounded squares for a less generic look.
101
+ - **Light/dark toggle always a sun/moon switch.** Use a dropdown, system preference detection, or integrate it into settings.
102
+ - **Footer link farm with 4 columns.** Simplify. Focus on main navigational paths and legally required links.
103
+
104
+ ### Iconography
105
+
106
+ - **Lucide or Feather icons exclusively.** These are the "default" AI icon choice. Use Phosphor, Heroicons, or a custom set for differentiation.
107
+ - **Rocketship for "Launch", shield for "Security".** Replace cliche metaphors with less obvious icons (bolt, fingerprint, spark, vault).
108
+ - **Inconsistent stroke widths across icons.** Audit all icons and standardize to one stroke weight.
109
+ - **Missing favicon.** Always include a branded favicon.
110
+ - **Stock "diverse team" photos.** Use real team photos, candid shots, or a consistent illustration style instead of uncanny stock imagery.
111
+
112
+ ### Code Quality
113
+
114
+ - **Div soup.** Use semantic HTML: `<nav>`, `<main>`, `<article>`, `<aside>`, `<section>`.
115
+ - **Inline styles mixed with CSS classes.** Move all styling to the project's styling system.
116
+ - **Hardcoded pixel widths.** Use relative units (`%`, `rem`, `em`, `max-width`) for flexible layouts.
117
+ - **Missing alt text on images.** Describe image content for screen readers. Never leave `alt=""` or `alt="image"` on meaningful images.
118
+ - **Arbitrary z-index values like `9999`.** Establish a clean z-index scale in the theme/variables.
119
+ - **Commented-out dead code.** Remove all debug artifacts before shipping.
120
+ - **Import hallucinations.** Check that every import actually exists in `package.json` or the project dependencies.
121
+ - **Missing meta tags.** Add proper `<title>`, `description`, `og:image`, and social sharing meta tags.
122
+
123
+ ### Strategic Omissions (What AI Typically Forgets)
124
+
125
+ - **No legal links.** Add privacy policy and terms of service links in the footer.
126
+ - **No "back" navigation.** Dead ends in user flows. Every page needs a way back.
127
+ - **No custom 404 page.** Design a helpful, branded "page not found" experience.
128
+ - **No form validation.** Add client-side validation for emails, required fields, and format checks.
129
+ - **No "skip to content" link.** Essential for keyboard users. Add a hidden skip-link.
130
+ - **No cookie consent.** If required by jurisdiction, add a compliant consent banner.
131
+
132
+ ## Upgrade Techniques
133
+
134
+ When upgrading a project, pull from these high-impact techniques to replace generic patterns:
135
+
136
+ ### Typography Upgrades
137
+ - **Variable font animation.** Interpolate weight or width on scroll or hover for text that feels alive.
138
+ - **Outlined-to-fill transitions.** Text starts as a stroke outline and fills with color on scroll entry or interaction.
139
+ - **Text mask reveals.** Large typography acting as a window to video or animated imagery behind it.
140
+
141
+ ### Layout Upgrades
142
+ - **Broken grid / asymmetry.** Elements that deliberately ignore column structure — overlapping, bleeding off-screen, or offset with calculated randomness.
143
+ - **Whitespace maximization.** Aggressive use of negative space to force focus on a single element.
144
+ - **Parallax card stacks.** Sections that stick and physically stack over each other during scroll.
145
+ - **Split-screen scroll.** Two halves of the screen sliding in opposite directions.
146
+
147
+ ### Motion Upgrades
148
+ - **Smooth scroll with inertia.** Decouple scrolling from browser defaults for a heavier, cinematic feel.
149
+ - **Staggered entry.** Elements cascade in with slight delays, combining Y-axis translation with opacity fade. Never mount everything at once.
150
+ - **Spring physics.** Replace linear easing with spring-based motion for a natural, weighty feel on all interactive elements.
151
+ - **Scroll-driven reveals.** Content entering through expanding masks, wipes, or draw-on SVG paths tied to scroll progress.
152
+
153
+ ### Surface Upgrades
154
+ - **True glassmorphism.** Go beyond `backdrop-filter: blur`. Add a 1px inner border and a subtle inner shadow to simulate edge refraction.
155
+ - **Spotlight borders.** Card borders that illuminate dynamically under the cursor.
156
+ - **Grain and noise overlays.** A fixed, pointer-events-none overlay with subtle noise to break digital flatness.
157
+ - **Colored, tinted shadows.** Shadows that carry the hue of the background rather than using generic black.
158
+
159
+ ## Fix Priority
160
+
161
+ Apply changes in this order for maximum visual impact with minimum risk:
162
+
163
+ 1. **Font swap** — biggest instant improvement, lowest risk
164
+ 2. **Color palette cleanup** — remove clashing or oversaturated colors
165
+ 3. **Hover and active states** — makes the interface feel alive
166
+ 4. **Layout and spacing** — proper grid, max-width, consistent padding
167
+ 5. **Replace generic components** — swap cliche patterns for modern alternatives
168
+ 6. **Add loading, empty, and error states** — makes it feel finished
169
+ 7. **Polish typography scale and spacing** — the premium final touch
170
+
171
+ ## Rules
172
+
173
+ - Work with the existing tech stack. Do not migrate frameworks or styling libraries.
174
+ - Do not break existing functionality. Test after every change.
175
+ - Before importing any new library, check the project's dependency file first.
176
+ - If the project uses Tailwind, check the version (v3 vs v4) before modifying config.
177
+ - If the project has no framework, use vanilla CSS.
178
+ - Keep changes reviewable and focused. Small, targeted improvements over big rewrites.
@@ -0,0 +1,250 @@
1
+ ---
2
+ name: np-shadcn
3
+ description: Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI. Provides project context, component docs, and usage examples. Applies when working with shadcn/ui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for "shadcn init", "create an app with --preset", or "switch to --preset".
4
+ user-invocable: false
5
+ allowed-tools: Bash(npx shadcn@latest *), Bash(pnpm dlx shadcn@latest *), Bash(bunx --bun shadcn@latest *)
6
+ ---
7
+
8
+ # shadcn/ui
9
+
10
+ A framework for building ui, components and design systems. Components are added as source code to the user's project via the CLI.
11
+
12
+ > **IMPORTANT:** Run all CLI commands using the project's package runner: `npx shadcn@latest`, `pnpm dlx shadcn@latest`, or `bunx --bun shadcn@latest` — based on the project's `packageManager`. Examples below use `npx shadcn@latest` but substitute the correct runner for the project.
13
+
14
+ ## Current Project Context
15
+
16
+ ```json
17
+ !`npx shadcn@latest info --json`
18
+ ```
19
+
20
+ The JSON above contains the project config and installed components. Use `npx shadcn@latest docs <component>` to get documentation and example URLs for any component.
21
+
22
+ ## Principles
23
+
24
+ 1. **Use existing components first.** Use `npx shadcn@latest search` to check registries before writing custom UI. Check community registries too.
25
+ 2. **Compose, don't reinvent.** Settings page = Tabs + Card + form controls. Dashboard = Sidebar + Card + Chart + Table.
26
+ 3. **Use built-in variants before custom styles.** `variant="outline"`, `size="sm"`, etc.
27
+ 4. **Use semantic colors.** `bg-primary`, `text-muted-foreground` — never raw values like `bg-blue-500`.
28
+
29
+ ## Critical Rules
30
+
31
+ These rules are **always enforced**. Each links to a file with Incorrect/Correct code pairs.
32
+
33
+ ### Styling & Tailwind → [styling.md](./rules/styling.md)
34
+
35
+ - **`className` for layout, not styling.** Never override component colors or typography.
36
+ - **No `space-x-*` or `space-y-*`.** Use `flex` with `gap-*`. For vertical stacks, `flex flex-col gap-*`.
37
+ - **Use `size-*` when width and height are equal.** `size-10` not `w-10 h-10`.
38
+ - **Use `truncate` shorthand.** Not `overflow-hidden text-ellipsis whitespace-nowrap`.
39
+ - **No manual `dark:` color overrides.** Use semantic tokens (`bg-background`, `text-muted-foreground`).
40
+ - **Use `cn()` for conditional classes.** Don't write manual template literal ternaries.
41
+ - **No manual `z-index` on overlay components.** Dialog, Sheet, Popover, etc. handle their own stacking.
42
+
43
+ ### Forms & Inputs → [forms.md](./rules/forms.md)
44
+
45
+ - **Forms use `FieldGroup` + `Field`.** Never use raw `div` with `space-y-*` or `grid gap-*` for form layout.
46
+ - **`InputGroup` uses `InputGroupInput`/`InputGroupTextarea`.** Never raw `Input`/`Textarea` inside `InputGroup`.
47
+ - **Buttons inside inputs use `InputGroup` + `InputGroupAddon`.**
48
+ - **Option sets (2–7 choices) use `ToggleGroup`.** Don't loop `Button` with manual active state.
49
+ - **`FieldSet` + `FieldLegend` for grouping related checkboxes/radios.** Don't use a `div` with a heading.
50
+ - **Field validation uses `data-invalid` + `aria-invalid`.** `data-invalid` on `Field`, `aria-invalid` on the control. For disabled: `data-disabled` on `Field`, `disabled` on the control.
51
+
52
+ ### Component Structure → [composition.md](./rules/composition.md)
53
+
54
+ - **Items always inside their Group.** `SelectItem` → `SelectGroup`. `DropdownMenuItem` → `DropdownMenuGroup`. `CommandItem` → `CommandGroup`.
55
+ - **Use `asChild` (radix) or `render` (base) for custom triggers.** Check `base` field from `npx shadcn@latest info`. → [base-vs-radix.md](./rules/base-vs-radix.md)
56
+ - **Dialog, Sheet, and Drawer always need a Title.** `DialogTitle`, `SheetTitle`, `DrawerTitle` required for accessibility. Use `className="sr-only"` if visually hidden.
57
+ - **Use full Card composition.** `CardHeader`/`CardTitle`/`CardDescription`/`CardContent`/`CardFooter`. Don't dump everything in `CardContent`.
58
+ - **Button has no `isPending`/`isLoading`.** Compose with `Spinner` + `data-icon` + `disabled`.
59
+ - **`TabsTrigger` must be inside `TabsList`.** Never render triggers directly in `Tabs`.
60
+ - **`Avatar` always needs `AvatarFallback`.** For when the image fails to load.
61
+
62
+ ### Use Components, Not Custom Markup → [composition.md](./rules/composition.md)
63
+
64
+ - **Use existing components before custom markup.** Check if a component exists before writing a styled `div`.
65
+ - **Callouts use `Alert`.** Don't build custom styled divs.
66
+ - **Empty states use `Empty`.** Don't build custom empty state markup.
67
+ - **Toast via `sonner`.** Use `toast()` from `sonner`.
68
+ - **Use `Separator`** instead of `<hr>` or `<div className="border-t">`.
69
+ - **Use `Skeleton`** for loading placeholders. No custom `animate-pulse` divs.
70
+ - **Use `Badge`** instead of custom styled spans.
71
+
72
+ ### Icons → [icons.md](./rules/icons.md)
73
+
74
+ - **Icons in `Button` use `data-icon`.** `data-icon="inline-start"` or `data-icon="inline-end"` on the icon.
75
+ - **No sizing classes on icons inside components.** Components handle icon sizing via CSS. No `size-4` or `w-4 h-4`.
76
+ - **Pass icons as objects, not string keys.** `icon={CheckIcon}`, not a string lookup.
77
+
78
+ ### CLI
79
+
80
+ - **Never decode or fetch preset codes manually.** Pass them directly to `npx shadcn@latest apply --preset <code>` for existing projects, or `npx shadcn@latest init --preset <code>` when initializing.
81
+
82
+ ## Key Patterns
83
+
84
+ These are the most common patterns that differentiate correct shadcn/ui code. For edge cases, see the linked rule files above.
85
+
86
+ ```tsx
87
+ // Form layout: FieldGroup + Field, not div + Label.
88
+ <FieldGroup>
89
+ <Field>
90
+ <FieldLabel htmlFor="email">Email</FieldLabel>
91
+ <Input id="email" />
92
+ </Field>
93
+ </FieldGroup>
94
+
95
+ // Validation: data-invalid on Field, aria-invalid on the control.
96
+ <Field data-invalid>
97
+ <FieldLabel>Email</FieldLabel>
98
+ <Input aria-invalid />
99
+ <FieldDescription>Invalid email.</FieldDescription>
100
+ </Field>
101
+
102
+ // Icons in buttons: data-icon, no sizing classes.
103
+ <Button>
104
+ <SearchIcon data-icon="inline-start" />
105
+ Search
106
+ </Button>
107
+
108
+ // Spacing: gap-*, not space-y-*.
109
+ <div className="flex flex-col gap-4"> // correct
110
+ <div className="space-y-4"> // wrong
111
+
112
+ // Equal dimensions: size-*, not w-* h-*.
113
+ <Avatar className="size-10"> // correct
114
+ <Avatar className="w-10 h-10"> // wrong
115
+
116
+ // Status colors: Badge variants or semantic tokens, not raw colors.
117
+ <Badge variant="secondary">+20.1%</Badge> // correct
118
+ <span className="text-emerald-600">+20.1%</span> // wrong
119
+ ```
120
+
121
+ ## Component Selection
122
+
123
+ | Need | Use |
124
+ | -------------------------- | --------------------------------------------------------------------------------------------------- |
125
+ | Button/action | `Button` with appropriate variant |
126
+ | Form inputs | `Input`, `Select`, `Combobox`, `Switch`, `Checkbox`, `RadioGroup`, `Textarea`, `InputOTP`, `Slider` |
127
+ | Toggle between 2–5 options | `ToggleGroup` + `ToggleGroupItem` |
128
+ | Data display | `Table`, `Card`, `Badge`, `Avatar` |
129
+ | Navigation | `Sidebar`, `NavigationMenu`, `Breadcrumb`, `Tabs`, `Pagination` |
130
+ | Overlays | `Dialog` (modal), `Sheet` (side panel), `Drawer` (bottom sheet), `AlertDialog` (confirmation) |
131
+ | Feedback | `sonner` (toast), `Alert`, `Progress`, `Skeleton`, `Spinner` |
132
+ | Command palette | `Command` inside `Dialog` |
133
+ | Charts | `Chart` (wraps Recharts) |
134
+ | Layout | `Card`, `Separator`, `Resizable`, `ScrollArea`, `Accordion`, `Collapsible` |
135
+ | Empty states | `Empty` |
136
+ | Menus | `DropdownMenu`, `ContextMenu`, `Menubar` |
137
+ | Tooltips/info | `Tooltip`, `HoverCard`, `Popover` |
138
+
139
+ ## Key Fields
140
+
141
+ The injected project context contains these key fields:
142
+
143
+ - **`aliases`** → use the actual alias prefix for imports (e.g. `@/`, `~/`), never hardcode.
144
+ - **`isRSC`** → when `true`, components using `useState`, `useEffect`, event handlers, or browser APIs need `"use client"` at the top of the file. Always reference this field when advising on the directive.
145
+ - **`tailwindVersion`** → `"v4"` uses `@theme inline` blocks; `"v3"` uses `tailwind.config.js`.
146
+ - **`tailwindCssFile`** → the global CSS file where custom CSS variables are defined. Always edit this file, never create a new one.
147
+ - **`style`** → component visual treatment (e.g. `nova`, `vega`).
148
+ - **`base`** → primitive library (`radix` or `base`). Affects component APIs and available props.
149
+ - **`iconLibrary`** → determines icon imports. Use `lucide-react` for `lucide`, `@tabler/icons-react` for `tabler`, etc. Never assume `lucide-react`.
150
+ - **`resolvedPaths`** → exact file-system destinations for components, utils, hooks, etc.
151
+ - **`framework`** → routing and file conventions (e.g. Next.js App Router vs Vite SPA).
152
+ - **`packageManager`** → use this for any non-shadcn dependency installs (e.g. `pnpm add date-fns` vs `npm install date-fns`).
153
+
154
+ See [cli.md — `info` command](./cli.md) for the full field reference.
155
+
156
+ ## Component Docs, Examples, and Usage
157
+
158
+ Run `npx shadcn@latest docs <component>` to get the URLs for a component's documentation, examples, and API reference. Fetch these URLs to get the actual content.
159
+
160
+ ```bash
161
+ npx shadcn@latest docs button dialog select
162
+ ```
163
+
164
+ **When creating, fixing, debugging, or using a component, always run `npx shadcn@latest docs` and fetch the URLs first.** This ensures you're working with the correct API and usage patterns rather than guessing.
165
+
166
+ ## Workflow
167
+
168
+ 1. **Get project context** — already injected above. Run `npx shadcn@latest info` again if you need to refresh.
169
+ 2. **Check installed components first** — before running `add`, always check the `components` list from project context or list the `resolvedPaths.ui` directory. Don't import components that haven't been added, and don't re-add ones already installed.
170
+ 3. **Find components** — `npx shadcn@latest search`.
171
+ 4. **Get docs and examples** — run `npx shadcn@latest docs <component>` to get URLs, then fetch them. Use `npx shadcn@latest view` to browse registry items you haven't installed. To preview changes to installed components, use `npx shadcn@latest add --diff`.
172
+ 5. **Install or update** — `npx shadcn@latest add`. When updating existing components, use `--dry-run` and `--diff` to preview changes first (see [Updating Components](#updating-components) below).
173
+ 6. **Fix imports in third-party components** — After adding components from community registries (e.g. `@bundui`, `@magicui`), check the added non-UI files for hardcoded import paths like `@/components/ui/...`. These won't match the project's actual aliases. Use `npx shadcn@latest info` to get the correct `ui` alias (e.g. `@workspace/ui/components`) and rewrite the imports accordingly. The CLI rewrites imports for its own UI files, but third-party registry components may use default paths that don't match the project.
174
+ 7. **Review added components** — After adding a component or block from any registry, **always read the added files and verify they are correct**. Check for missing sub-components (e.g. `SelectItem` without `SelectGroup`), missing imports, incorrect composition, or violations of the [Critical Rules](#critical-rules). Also replace any icon imports with the project's `iconLibrary` from the project context (e.g. if the registry item uses `lucide-react` but the project uses `hugeicons`, swap the imports and icon names accordingly). Fix all issues before moving on.
175
+ 8. **Registry must be explicit** — When the user asks to add a block or component, **do not guess the registry**. If no registry is specified (e.g. user says "add a login block" without specifying `@shadcn`, `@tailark`, etc.), ask which registry to use. Never default to a registry on behalf of the user.
176
+ 9. **Switching presets** — Ask the user first: **overwrite**, **partial**, **merge**, or **skip**?
177
+ - **Overwrite**: `npx shadcn@latest apply --preset <code>`. Overwrites detected components, fonts, and CSS variables.
178
+ - **Partial**: `npx shadcn@latest apply --preset <code> --only theme,font`. Updates only the selected preset parts without reinstalling UI components. Supported values are `theme` and `font`; comma-separated combinations are allowed. `icon` is intentionally not supported, because icon changes may require full component reinstall and transforms.
179
+ - **Merge**: `npx shadcn@latest init --preset <code> --force --no-reinstall`, then run `npx shadcn@latest info` to list installed components, then for each installed component use `--dry-run` and `--diff` to [smart merge](#updating-components) it individually.
180
+ - **Skip**: `npx shadcn@latest init --preset <code> --force --no-reinstall`. Only updates config and CSS, leaves components as-is.
181
+ - **Important**: Always run preset commands inside the user's project directory. `apply` only works in an existing project with a `components.json` file. The CLI automatically preserves the current base (`base` vs `radix`) from `components.json`. If you must use a scratch/temp directory (e.g. for `--dry-run` comparisons), pass `--base <current-base>` explicitly — preset codes do not encode the base.
182
+
183
+ ## Updating Components
184
+
185
+ When the user asks to update a component from upstream while keeping their local changes, use `--dry-run` and `--diff` to intelligently merge. **NEVER fetch raw files from GitHub manually — always use the CLI.**
186
+
187
+ 1. Run `npx shadcn@latest add <component> --dry-run` to see all files that would be affected.
188
+ 2. For each file, run `npx shadcn@latest add <component> --diff <file>` to see what changed upstream vs local.
189
+ 3. Decide per file based on the diff:
190
+ - No local changes → safe to overwrite.
191
+ - Has local changes → read the local file, analyze the diff, and apply upstream updates while preserving local modifications.
192
+ - User says "just update everything" → use `--overwrite`, but confirm first.
193
+ 4. **Never use `--overwrite` without the user's explicit approval.**
194
+
195
+ ## Quick Reference
196
+
197
+ ```bash
198
+ # Create a new project.
199
+ npx shadcn@latest init --name my-app --preset base-nova
200
+ npx shadcn@latest init --name my-app --preset a2r6bw --template vite
201
+
202
+ # Create a monorepo project.
203
+ npx shadcn@latest init --name my-app --preset base-nova --monorepo
204
+ npx shadcn@latest init --name my-app --preset base-nova --template next --monorepo
205
+
206
+ # Initialize existing project.
207
+ npx shadcn@latest init --preset base-nova
208
+ npx shadcn@latest init --defaults # shortcut: --template=next --preset=nova (base style implied)
209
+
210
+ # Apply a preset to an existing project.
211
+ npx shadcn@latest apply --preset a2r6bw
212
+ npx shadcn@latest apply a2r6bw
213
+ npx shadcn@latest apply --preset a2r6bw --only theme
214
+ npx shadcn@latest apply --preset a2r6bw --only font
215
+ npx shadcn@latest apply --preset a2r6bw --only theme,font
216
+
217
+ # Add components.
218
+ npx shadcn@latest add button card dialog
219
+ npx shadcn@latest add @magicui/shimmer-button
220
+ npx shadcn@latest add --all
221
+
222
+ # Preview changes before adding/updating.
223
+ npx shadcn@latest add button --dry-run
224
+ npx shadcn@latest add button --diff button.tsx
225
+ npx shadcn@latest add @acme/form --view button.tsx
226
+
227
+ # Search registries.
228
+ npx shadcn@latest search @shadcn -q "sidebar"
229
+ npx shadcn@latest search @tailark -q "stats"
230
+
231
+ # Get component docs and example URLs.
232
+ npx shadcn@latest docs button dialog select
233
+
234
+ # View registry item details (for items not yet installed).
235
+ npx shadcn@latest view @shadcn/button
236
+ ```
237
+
238
+ **Named presets:** `nova`, `vega`, `maia`, `lyra`, `mira`, `luma`
239
+ **Templates:** `next`, `vite`, `start`, `react-router`, `astro` (all support `--monorepo`) and `laravel` (not supported for monorepo)
240
+ **Preset codes:** Version-prefixed base62 strings (e.g. `a2r6bw` or `b0`), from [ui.shadcn.com](https://ui.shadcn.com).
241
+
242
+ ## Detailed References
243
+
244
+ - [rules/forms.md](./rules/forms.md) — FieldGroup, Field, InputGroup, ToggleGroup, FieldSet, validation states
245
+ - [rules/composition.md](./rules/composition.md) — Groups, overlays, Card, Tabs, Avatar, Alert, Empty, Toast, Separator, Skeleton, Badge, Button loading
246
+ - [rules/icons.md](./rules/icons.md) — data-icon, icon sizing, passing icons as objects
247
+ - [rules/styling.md](./rules/styling.md) — Semantic colors, variants, className, spacing, size, truncate, dark mode, cn(), z-index
248
+ - [rules/base-vs-radix.md](./rules/base-vs-radix.md) — asChild vs render, Select, ToggleGroup, Slider, Accordion
249
+ - [cli.md](./cli.md) — Commands, flags, presets, templates
250
+ - [customization.md](./customization.md) — Theming, CSS variables, extending components
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "shadcn/ui"
3
+ short_description: "Manages shadcn/ui components — adding, searching, fixing, debugging, styling, and composing UI."
4
+ icon_small: "./assets/shadcn-small.png"
5
+ icon_large: "./assets/shadcn.png"