visualize-design-system
Add optional preview routes to a shadcn/ui app — a demo marketing landing at /demo-landing and/or a live design-system theme builder at /design-system (dashboard, mail, chat, finances, CRM). Use when
Files60
View on GitHubSKILL.mdskills/visualize-design-system/SKILL.md
GitHubVisualize a shadcn design system
Copies two optional preview apps from herocn into the user's project. Does not restyle components/ui. Does not replace the homepage.
Live reference: https://herocn.sagarkemble.dev (landing = /, theme builder = /themes). In the consumer app the routes are /demo-landing and /design-system.
Looks closest on HeroUI/herocn tokens (--surface, --default, pressible, Button tertiary). On other registries, still copy; missing tokens/variants are listed, never invented.
Files
| Path | Use |
|---|---|
reference/demo-landing/ |
Marketing landing (app/page.tsx + components/landing/* + landing CSS) |
reference/design-system/ |
Theme builder (app/themes → app/design-system, components/themes, lib/theme-editor) |
LICENSE-herocn |
MIT, © 2026 Maqed — copied landing/theme UI classes |
LICENSE-heroui |
Apache-2.0 — theme maths and preset PNG gradients |
$S = this skill folder.
Hard rules
- Ask first. Never add either route until the user answers the prompt in step 2.
- Do not overwrite
/. Landing goes to/demo-landingonly. Design system goes to/design-systemonly. - Do not edit
components/ui/*except toshadcn addmissing primitives the pages import. - Never invent token values. If
--surface/tertiary/pressibleare missing, keep the copied classes and report them. Suggestshadcn-to-herouifor the HeroUI look; do not hand-paint colors. - Next.js App Router only. If the app is Pages Router or Vite, stop those routes and report NOT FOUND.
- Copy files verbatim from
reference/, then apply only the rewrites in step 4.
Procedure
1. Detect the project
- Read
package.jsonandcomponents.json. Need Tailwind v4 and acomponents/uifolder. - App Router:
app/orsrc/app/. If neither, skip both routes (NOT FOUND). - Note
aliases.utils(usually@/lib/utils) and whethercnis a package orexport function cnin utils. - HeroUI-styled if globals.css has
--surface,--primary-soft, and@utility pressible. Record yes/no. - List existing
components/ui/*.tsxnames.
2. Ask (one message, wait)
I can add two optional preview routes (any shadcn registry; closest match with HeroUI/herocn tokens):
- Demo landing at
/demo-landing— marketing page with header, hero, product walls, and mock UIs.- Design system at
/design-system— theme builder (color, radius, font) plus Dashboard, Mail, Chat, Finances, and CRM templates. Which should I add? Both, landing only, design system only, or neither.
If the user already asked for one or both, skip the ask. If neither, stop and report that nothing was added.
If app/demo-landing or app/design-system already exists, ask before overwriting.
3. Missing UI primitives
Union of imports from the routes you will add (from reference/). shadcn add only names that are not in components/ui. Use the project's default registry (do not force @herocn/ unless components.json already has it).
Landing: accordion, avatar, badge, button, calendar, card, chart, checkbox, command, input, input-group, kbd, label, navigation-menu, progress, select, separator, sheet, slider, switch, table, tabs, toggle-group, tooltip.
Design system: alert, alert-dialog, avatar, badge, bubble, button, card, chart, checkbox, code-block, dialog, drawer, dropdown-menu, field, input, input-group, input-otp, item, kbd, label, message, popover, progress, radio-group, scroll-area, select, separator, sheet, slider, spinner, surface, switch, table, tabs, toast, tooltip.
Also: next-themes + a ThemeProvider wrapping the app; lucide-react; landing needs simple-icons. recharts if chart is added. Install packages the CLI does not.
If shadcn add has no bubble / message / surface / code-block on the official registry, skip those templates' extra files only after trying; report NOT FOUND. Do not write fake components.
4. Copy
APP = app or src/app. Keep @/ aliases.
Landing (reference/demo-landing/):
components/landing/*→components/landing/page.tsx→$APP/demo-landing/page.tsx- Append
landing.cssto the global CSS file (components.json→tailwind.css) if those utilities (.display-statement,.wall-blue,.hero-slot,.marquee-y) are missing. Do not replace:roottokens. - In root layout, add Inter Tight as
--font-displayif missing (next/font/google,variable: "--font-display", put the class on<html>). Ifnext/fontis unavailable, set--font-display: var(--font-sans)in CSS and report it. - Rewrite
from "cn"tofrom "<aliases.utils>"when the project has nocnpackage. - In
components/landing/header.tsx, point Themes to/design-systemif that route was added, else#. Point Docs / Registry / Skills at#unless those routes exist.
Design system (reference/design-system/):
lib/theme-editor/*→lib/theme-editor/components/themes/*→components/themes/app/themes/*→$APP/design-system/(page +assets/PNGs)- Imports already use
@/app/design-system/assets. Rewritefrom "cn"the same way as landing. - In
components/themes/builder-header.tsx, set the wordmarkhrefto/demo-landingif landing was added, else/. - Page must stay wrapped in
<Suspense>(URL theme state).
Preset PNGs are Apache-2.0 (HeroUI theme-builder gradients, no logos). Keep LICENSE-heroui in the skill; mention it in the report.
5. Verify
npx tsc --noEmitand the project build. Fix only errors you introduced.- Open
/demo-landingand/or/design-system. Switching templates and a color slider must work on the design system. Do not require the landing to match heroui.com pixel-for-pixel on a non-herocn theme.
6. Report
Which routes were added, HeroUI-styled yes/no, primitives installed, cn rewrites, header link rewrites, NOT FOUND items, build/typecheck.
License
Landing/theme chrome uses herocn (MIT, © 2026 Maqed). Theme engine and preset thumbs: HeroUI Apache-2.0 (LICENSE-heroui). Keep both notices when redistributing the copied files.