StyleKit
Apply StyleKit's 146 curated visual styles to generated UI. Use the catalog, fetch the exact spec, install the theme, and honor the style's rules.
Workflow
- Detect project context — know the target project's stack before generating.
- Pick a style — match the user's intent to a catalog slug.
- Fetch the full spec — pull tokens, recipes, and AI rules for that slug.
- Install the theme (optional) — drop the shadcn registry theme into the project.
- Generate with the rules — use the style's exact tokens and do/don't lists.
Task routing
Route by what the user actually asked for:
- New UI (page, component, dashboard, landing page) → full workflow below.
- Restyle / fix existing UI ("this looks generic", "make it feel more Stripe") → Steps 0, 2, 3, then edit only the parts that violate the style's tokens and rules; keep the existing structure and states unless asked otherwise. See references/design-principles.md iteration modes.
- Migrate from one style to another → fetch both specs, diff their tokens and forbidden lists, then update classes style-by-style. Never mix tokens from both styles.
- Review / audit style consistency → fetch the style spec, then check every component against doList/dontList and the token table. Report violations concretely (file, element, class).
Step 0 — Detect project context
Before generating, run the detector in the target project directory:
python3 scripts/detect-project.py # run from the project root, or pass a path
Use the output to adapt generation:
- framework (
next/react/vue/svelte/vanilla) — match component style to the framework (client/server components for Next, etc.).
- tailwind.version — v4 uses CSS-first config (
@theme in CSS, no tailwind.config.js); v3 uses the config file. The shadcn registry install requires Tailwind v4; if the project is v3, install the theme manually from the spec's cssVars instead.
- shadcn.installedComponents — prefer reusing installed components over generating new ones; match the project's alias paths.
- reactVersion — target the project's React version; do not use APIs the version doesn't support.
If the detector reports a stack you did not expect (e.g. the user said "React" but the project is Vue), stop and confirm with the user before generating.
Step 1 — Pick a style
Match the user's request to a slug from the catalog:
- Human catalog: https://www.stylekit.top/styles
- By theme: https://www.stylekit.top/collections (dark-mode, retro-vintage, anime-manga, game-ui, colorful-bold, hand-drawn)
- Colors / hex codes: https://www.stylekit.top/colors
- Machine-readable list:
GET https://www.stylekit.top/api/styles → { total, styles: [{ slug, nameEn, description, styleType, keywords, colors }] }
- Common style signatures: see references/style-signatures.md for the visual traits of popular styles
For an ambiguous request, scan the /api/styles list keywords and pick the closest slug. When in doubt, ask the user between two candidates.
Step 2 — Fetch the full spec
Fetch the machine-readable spec for the chosen slug — do not guess tokens or rules from memory (styles get updated):
python3 scripts/fetch-style.py <slug> # full spec: tokens, recipes, rules
python3 scripts/fetch-style.py <slug> --tokens # tokens only
python3 scripts/fetch-style.py <slug> --recipes # recipes only
The script prints a compact spec for code generation. Raw endpoints are also available:
- Full pack:
GET https://www.stylekit.top/api/styles/{slug}
- Markdown:
GET https://www.stylekit.top/api/styles/{slug}/md
- Tokens:
GET https://www.stylekit.top/api/styles/{slug}/tokens
- Recipes:
GET https://www.stylekit.top/api/styles/{slug}/recipes
- Human page: https://www.stylekit.top/styles/{slug}
Process the spec in priority order
- aiRules — instruction string written for AI. Highest priority; overrides general patterns when they conflict.
- doList / dontList — hard constraints. Every generated component must satisfy all items.
- philosophy — the "why" behind the style. Determines ambiguous decisions (visual hierarchy, spacing, mood).
- colors —
{ primary, secondary, accent[] }. Source of truth for the palette.
- tokens — semantic categories mapped to exact Tailwind classes. Use instead of inventing classes.
- components — code templates for button, card, input (and optionally nav, hero, footer). Starting points.
- globalCss — base CSS that must be included in the page/layout when using this style.
Step 3 — Install the theme (optional)
Drop the theme into an existing shadcn/ui project (Tailwind v4):
npx shadcn add https://www.stylekit.top/r/<slug>.json
Requires a tsconfig.json in the target project. Injects the style's light + dark cssVars into globals.css. Full guide: https://www.stylekit.top/developers
If the project is not Tailwind v4 (per Step 0), do not run the registry install; apply the spec's cssVars and token classes manually.
Step 4 — Generate with the style's rules
- Use the style's design tokens (colors, spacing, typography, shadows, radii) — do not invent your own values.
- Follow the AI rules and doList/dontList — they encode what makes the style read as intentional (e.g. Neo-Brutalist: thick borders, hard shadows, no rounded corners; Glassmorphism: high blur, translucency, inner glow).
- Use component templates and recipes as starting points; adapt to the user's content and to the project's detected stack (Step 0).
- Keep the style consistent across every component in the session, including responsive breakpoints (mobile-first).
Good — uses exact token classes
// Neo-Brutalist button — token classes from the fetched spec
<button className="
px-6 py-3
bg-[#ff006e] text-white font-black
border-2 md:border-4 border-black rounded-none
shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] md:shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]
hover:shadow-none hover:translate-x-[2px] hover:translate-y-[2px]
active:translate-x-[4px] active:translate-y-[4px]
transition-all duration-200
">
Click Me
</button>
Bad — guessing classes, ignoring tokens
// WRONG: rounded-lg violates neo-brutalist (must be rounded-none)
// WRONG: shadow-lg violates neo-brutalist (must use hard-edge shadow)
// WRONG: bg-blue-500 is not in the style's color palette
<button className="px-6 py-3 bg-blue-500 rounded-lg shadow-lg">Click Me</button>
Anti-patterns
- Don't mix tokens from different styles. Each style's tokens are internally consistent; mixing produces incoherent UI.
- Don't ignore aiRules. They override general patterns and may contradict common Tailwind conventions.
- Don't use generic Tailwind when style-specific tokens exist. Use
shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] for neo-brutalist, not shadow-md.
- Don't skip the philosophy. It determines visual hierarchy decisions.
- Don't generate without checking doList/dontList. A glassmorphism component without
backdrop-blur is broken; a neo-brutalist component with rounded-lg is wrong.
- Don't hardcode hex values. Use the style's
colors object and token classes.
- Don't rely on memory — always fetch the spec. Styles get updated; stale data leads to violations.
Don't skip these — and why
| "I can skip this because…" |
Why you can't |
| "I already know neo-brutalist's tokens." |
The spec changes with every release; your memory is a snapshot. Fetch it. |
| "This is a tiny button, tokens don't matter." |
One off-token class breaks the whole style read. Every component must pass doList/dontList. |
| "The project looks like plain React, no need to detect." |
Framework, Tailwind version, and existing shadcn components change how you generate. Run Step 0. |
"I'll just use bg-white for glassmorphism, close enough." |
bg-white is on glassmorphism's forbidden list. Exact tokens or it's not the style. |
| "The user asked for a quick tweak, no spec needed." |
A tweak that ignores the spec silently drifts the UI away from the style. Fetch it. |
Quality gate
Before delivering generated UI, apply the checks in
references/design-principles.md: swap test, squint test,
signature test, and token test. Keep the style identity strong, meet the accessibility baseline,
and avoid the anti-pattern blacklist.
Run the evaluator on the generated code to catch rule violations mechanically:
python3 scripts/eval-check.py <slug> <file> # check a file
python3 scripts/eval-check.py <slug> <file> --component button # also enforce required classes for a declared component
eval-check.py reports forbidden classes, off-palette colors, and (with --component) missing
required classes. It treats the style's own component templates as the reference implementation:
a required entry is only enforced when the matching template uses it, so a spec-data inconsistency
does not produce false failures on generated code.
Pre-delivery checklist
Confirm each item with concrete evidence before presenting the result:
Spec data health
The catalog is community-curated; occasionally a style's required table or a component template
contains an internal contradiction (e.g. a template uses a class the style forbids, or a template
carries a hex not in the palette). When you hit one:
- Trust the component template over the required table — the template is the verified
reference implementation.
- Report the inconsistency rather than silently working around it: run
python3 scripts/verify-spec.py <slug> to enumerate the exact contradictions, and tell the
user (or open an issue on github.com/AnxForever/stylekit) so the catalog can be fixed.
Resources
references/style-signatures.md — visual traits, forbidden, and required classes for popular styles
references/design-principles.md — quality bar: intent-first generation, token hierarchy, accessibility baseline, pre-delivery validation
scripts/fetch-style.py — fetch a style's spec from the API and print a compact code-generation reference
scripts/detect-project.py — detect the target project's framework, Tailwind version, and shadcn setup
scripts/eval-check.py — mechanical compliance gate for generated code (forbidden, palette, required)
scripts/verify-spec.py — audit a style's spec for internal contradictions (data health)
scripts/benchmark.py — with/without-skill pass-rate comparison (regression suite)
1---2name: stylekit3description: Apply a specific, consistent visual style to frontend UI you are generating. Use when building or styling web UI (pages, components, dashboards, landing pages) and you want a named aesthetic — Glassmorphism, Neo-Brutalist, Cyberpunk, Bauhaus, Apple, Stripe, Linear, and many more — instead of generic AI defaults. StyleKit gives you design tokens, component recipes, and AI rules for each style, with themes installable through the shadcn registry.4---56# StyleKit78Apply StyleKit's 146 curated visual styles to generated UI. Use the catalog, fetch the exact spec, install the theme, and honor the style's rules.910## Workflow11121. **Detect project context** — know the target project's stack before generating.132. **Pick a style** — match the user's intent to a catalog slug.143. **Fetch the full spec** — pull tokens, recipes, and AI rules for that slug.154. **Install the theme** (optional) — drop the shadcn registry theme into the project.165. **Generate with the rules** — use the style's exact tokens and do/don't lists.1718## Task routing1920Route by what the user actually asked for:2122- **New UI** (page, component, dashboard, landing page) → full workflow below.23- **Restyle / fix existing UI** ("this looks generic", "make it feel more Stripe") → Steps 0, 2, 3, then edit only the parts that violate the style's tokens and rules; keep the existing structure and states unless asked otherwise. See [references/design-principles.md](references/design-principles.md) iteration modes.24- **Migrate from one style to another** → fetch both specs, diff their tokens and forbidden lists, then update classes style-by-style. Never mix tokens from both styles.25- **Review / audit style consistency** → fetch the style spec, then check every component against doList/dontList and the token table. Report violations concretely (file, element, class).2627## Step 0 — Detect project context2829Before generating, run the detector in the target project directory:3031```bash32python3 scripts/detect-project.py # run from the project root, or pass a path33```3435Use the output to adapt generation:3637- **framework** (`next`/`react`/`vue`/`svelte`/`vanilla`) — match component style to the framework (client/server components for Next, etc.).38- **tailwind.version** — v4 uses CSS-first config (`@theme` in CSS, no `tailwind.config.js`); v3 uses the config file. The shadcn registry install requires Tailwind v4; if the project is v3, install the theme manually from the spec's `cssVars` instead.39- **shadcn.installedComponents** — prefer reusing installed components over generating new ones; match the project's alias paths.40- **reactVersion** — target the project's React version; do not use APIs the version doesn't support.4142If the detector reports a stack you did not expect (e.g. the user said "React" but the project is Vue), stop and confirm with the user before generating.4344## Step 1 — Pick a style4546Match the user's request to a slug from the catalog:4748- **Human catalog**: https://www.stylekit.top/styles49- **By theme**: https://www.stylekit.top/collections (dark-mode, retro-vintage, anime-manga, game-ui, colorful-bold, hand-drawn)50- **Colors / hex codes**: https://www.stylekit.top/colors51- **Machine-readable list**: `GET https://www.stylekit.top/api/styles` → `{ total, styles: [{ slug, nameEn, description, styleType, keywords, colors }] }`52- **Common style signatures**: see [references/style-signatures.md](references/style-signatures.md) for the visual traits of popular styles5354For an ambiguous request, scan the `/api/styles` list keywords and pick the closest slug. When in doubt, ask the user between two candidates.5556## Step 2 — Fetch the full spec5758Fetch the machine-readable spec for the chosen slug — do not guess tokens or rules from memory (styles get updated):5960```bash61python3 scripts/fetch-style.py <slug> # full spec: tokens, recipes, rules62python3 scripts/fetch-style.py <slug> --tokens # tokens only63python3 scripts/fetch-style.py <slug> --recipes # recipes only64```6566The script prints a compact spec for code generation. Raw endpoints are also available:6768- Full pack: `GET https://www.stylekit.top/api/styles/{slug}`69- Markdown: `GET https://www.stylekit.top/api/styles/{slug}/md`70- Tokens: `GET https://www.stylekit.top/api/styles/{slug}/tokens`71- Recipes: `GET https://www.stylekit.top/api/styles/{slug}/recipes`72- Human page: https://www.stylekit.top/styles/{slug}7374### Process the spec in priority order75761. **aiRules** — instruction string written for AI. Highest priority; overrides general patterns when they conflict.772. **doList / dontList** — hard constraints. Every generated component must satisfy all items.783. **philosophy** — the "why" behind the style. Determines ambiguous decisions (visual hierarchy, spacing, mood).794. **colors** — `{ primary, secondary, accent[] }`. Source of truth for the palette.805. **tokens** — semantic categories mapped to exact Tailwind classes. Use instead of inventing classes.816. **components** — code templates for button, card, input (and optionally nav, hero, footer). Starting points.827. **globalCss** — base CSS that must be included in the page/layout when using this style.8384## Step 3 — Install the theme (optional)8586Drop the theme into an existing shadcn/ui project (Tailwind v4):8788```bash89npx shadcn add https://www.stylekit.top/r/<slug>.json90```9192Requires a `tsconfig.json` in the target project. Injects the style's light + dark `cssVars` into `globals.css`. Full guide: https://www.stylekit.top/developers9394If the project is not Tailwind v4 (per Step 0), do not run the registry install; apply the spec's `cssVars` and token classes manually.9596## Step 4 — Generate with the style's rules97981. Use the style's **design tokens** (colors, spacing, typography, shadows, radii) — do not invent your own values.992. Follow the **AI rules** and **doList/dontList** — they encode what makes the style read as intentional (e.g. Neo-Brutalist: thick borders, hard shadows, no rounded corners; Glassmorphism: high blur, translucency, inner glow).1003. Use **component templates** and **recipes** as starting points; adapt to the user's content and to the project's detected stack (Step 0).1014. Keep the style consistent across every component in the session, including responsive breakpoints (mobile-first).102103### Good — uses exact token classes104105```tsx106// Neo-Brutalist button — token classes from the fetched spec107<button className="108 px-6 py-3109 bg-[#ff006e] text-white font-black110 border-2 md:border-4 border-black rounded-none111 shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] md:shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]112 hover:shadow-none hover:translate-x-[2px] hover:translate-y-[2px]113 active:translate-x-[4px] active:translate-y-[4px]114 transition-all duration-200115">116 Click Me117</button>118```119120### Bad — guessing classes, ignoring tokens121122```tsx123// WRONG: rounded-lg violates neo-brutalist (must be rounded-none)124// WRONG: shadow-lg violates neo-brutalist (must use hard-edge shadow)125// WRONG: bg-blue-500 is not in the style's color palette126<button className="px-6 py-3 bg-blue-500 rounded-lg shadow-lg">Click Me</button>127```128129## Anti-patterns130131- **Don't mix tokens from different styles.** Each style's tokens are internally consistent; mixing produces incoherent UI.132- **Don't ignore aiRules.** They override general patterns and may contradict common Tailwind conventions.133- **Don't use generic Tailwind when style-specific tokens exist.** Use `shadow-[4px_4px_0px_0px_rgba(0,0,0,1)]` for neo-brutalist, not `shadow-md`.134- **Don't skip the philosophy.** It determines visual hierarchy decisions.135- **Don't generate without checking doList/dontList.** A glassmorphism component without `backdrop-blur` is broken; a neo-brutalist component with `rounded-lg` is wrong.136- **Don't hardcode hex values.** Use the style's `colors` object and token classes.137- **Don't rely on memory — always fetch the spec.** Styles get updated; stale data leads to violations.138139## Don't skip these — and why140141| "I can skip this because…" | Why you can't |142|----------------------------|---------------|143| "I already know neo-brutalist's tokens." | The spec changes with every release; your memory is a snapshot. Fetch it. |144| "This is a tiny button, tokens don't matter." | One off-token class breaks the whole style read. Every component must pass doList/dontList. |145| "The project looks like plain React, no need to detect." | Framework, Tailwind version, and existing shadcn components change how you generate. Run Step 0. |146| "I'll just use `bg-white` for glassmorphism, close enough." | `bg-white` is on glassmorphism's forbidden list. Exact tokens or it's not the style. |147| "The user asked for a quick tweak, no spec needed." | A tweak that ignores the spec silently drifts the UI away from the style. Fetch it. |148149## Quality gate150151Before delivering generated UI, apply the checks in152[references/design-principles.md](references/design-principles.md): swap test, squint test,153signature test, and token test. Keep the style identity strong, meet the accessibility baseline,154and avoid the anti-pattern blacklist.155156Run the evaluator on the generated code to catch rule violations mechanically:157158```bash159python3 scripts/eval-check.py <slug> <file> # check a file160python3 scripts/eval-check.py <slug> <file> --component button # also enforce required classes for a declared component161```162163`eval-check.py` reports forbidden classes, off-palette colors, and (with `--component`) missing164required classes. It treats the style's own component templates as the reference implementation:165a required entry is only enforced when the matching template uses it, so a spec-data inconsistency166does not produce false failures on generated code.167168## Pre-delivery checklist169170Confirm each item with concrete evidence before presenting the result:171172- [ ] Style spec was fetched (not guessed) — cite the slug and that `fetch-style.py` ran.173- [ ] Project context was detected (Step 0) — cite the detected framework/Tailwind version.174- [ ] Every generated class comes from the style's tokens or explicit allowed values.175- [ ] No class from the style's `forbidden` list is present in the output.176- [ ] doList items are all satisfied; dontList items are all absent.177- [ ] `prefers-reduced-motion` is respected if the style animates.178- [ ] Colors are the style's palette (primary/secondary/accent), not invented hexes.179- [ ] Swap test passed — replacing the signature classes with defaults would visibly change the identity.180- [ ] Responsive behavior is mobile-first and consistent across breakpoints.181- [ ] `eval-check.py` reported no violations for the delivered files.182183## Spec data health184185The catalog is community-curated; occasionally a style's required table or a component template186contains an internal contradiction (e.g. a template uses a class the style forbids, or a template187carries a hex not in the palette). When you hit one:188189- **Trust the component template** over the required table — the template is the verified190 reference implementation.191- **Report the inconsistency** rather than silently working around it: run192 `python3 scripts/verify-spec.py <slug>` to enumerate the exact contradictions, and tell the193 user (or open an issue on github.com/AnxForever/stylekit) so the catalog can be fixed.194195## Resources196197- `references/style-signatures.md` — visual traits, forbidden, and required classes for popular styles198- `references/design-principles.md` — quality bar: intent-first generation, token hierarchy, accessibility baseline, pre-delivery validation199- `scripts/fetch-style.py` — fetch a style's spec from the API and print a compact code-generation reference200- `scripts/detect-project.py` — detect the target project's framework, Tailwind version, and shadcn setup201- `scripts/eval-check.py` — mechanical compliance gate for generated code (forbidden, palette, required)202- `scripts/verify-spec.py` — audit a style's spec for internal contradictions (data health)203- `scripts/benchmark.py` — with/without-skill pass-rate comparison (regression suite)