Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

web-design-system-foundation

БесплатноБез исполняемых скриптовНе проверен

Use when the repository has no design system yet (no tokens, no component library - a new site/app, an "Apply design system" task, or a task that asks for…

makifbaysalот makifbaysal★ 123 звезды на GitHub

Об этом скилле

Web Design System Foundation

Overview

A page built before tokens, a cn() helper, and the atomic folders exist turns into hex colors, one-off spacing, and a component library that never forms. This skill lays that foundation once, in order, so every page after it is composition, not invention.

Core principle: Lay the foundation before the first page section — tokens, folders, and the first atoms come before any feature work.

Detect first

get_design_system with files: true for this repository before anything else. When it returns a design system, the direction is already decided and approved: skip the design direction below and materialize it instead. Write every file in files verbatim at its path — DESIGN.md, design/tokens.json, design/tokens.css, design/INVENTORY.md; each carries a generated-file header and is never edited by hand, never transcribed. Then build the token block in step (c) on them: @import "../design/tokens.css"; right after @import "tailwindcss";, and every value in the step (c) block points at the generated variable by role instead of holding a value — each token is a CSS variable named by its path (color.light.primary → --color-light-primary), so --primary: var(--color-light-primary) in :root, --primary: var(--color-dark-primary) in .dark, --font-sans: var(--font-family-sans) in @theme. A generated name that already is a Tailwind theme variable (--radius-md, --shadow-sm, --font-weight-semibold) is used as it is: drop the step (c) line that would define it a second time, never point it at itself. src/components/INVENTORY.md lists the repository's components under the names design/INVENTORY.md gives them. A token block that already exists but differs keeps its structure and gets its values pointed at the generated variables. Only an empty answer leaves the direction to you.

Greenfield (use this skill) vs existing (map and follow component-composition, never restructure):

  • grep -r "@theme\|:root" src/index.css (v4) or tailwind.config.* theme.extend.colors (v3) — tokens defined?
  • ls src/components — do atoms/molecules/organisms/templates already exist, or a components.json (shadcn already initialized)?
  • cat src/components/INVENTORY.md present → library exists, reuse it.
  • Tailwind major: grep '"tailwindcss"' package.json (^4 → @theme; ^3 → config + CSS vars).

Any of these present → stop, this skill doesn't apply; follow component-composition against the existing structure.

Design direction (5 minutes, written into the plan, not a separate doc)

Only when get_design_system returned nothing. One line each, from the task brief (the brief's own words win over any default below): audience + tone (e.g. "B2B finance ops, calm and precise"); 4–6 named brand colors mapped onto the semantic tokens (primary/accent/destructive at minimum — use the brief's colors if given); type pairing, max 2 families, self-hosted or Google Fonts <link> with &display=swap; radius + shadow choice (one --radius, elevation via shadow-sm/shadow-md only); ASCII wireframe of the key page at phone (360) and desktop (1440).

Avoid the generic-AI defaults (warm-cream+serif+terracotta; near-black+one acid accent; identical-card SaaS kit) unless the brief asks for one — see ui-ux-craft's anti-generic-look list.

Foundation steps, in order (each a committable step)

(a) @/ alias. tsconfig.app.json → "compilerOptions": { "paths": { "@/*": ["./src/*"] } } (no baseUrl — TS 6 deprecates it; paths alone resolves under moduleResolution: "bundler"). vite.config.ts:

import path from 'node:path'
resolve: { alias: { '@': path.resolve(import.meta.dirname, './src') } }

Use import.meta.dirname, not __dirname (Vite 8 warns and will require it).

(b) Deps. npm i clsx tailwind-merge class-variance-authority lucide-react (runtime dependencies; lucide-react is the one icon library). Add @radix-ui/react-<x> only when a specific primitive is needed (dialog, popover, tabs...) — install that one package, not a bundle. Do not run npx shadcn init on a Vite 8 + TS 6 + Tailwind 4.3 project: verified it does not resolve the @/* tsconfig path and writes components/ui/ and lib/utils.ts into a literal ./@/ directory at the project root instead of src/, and it pulls in extra dependencies and tokens this foundation doesn't use (a bundled radix-ui/cn package, @fontsource-variable/geist, tw-animate-css, --chart-*/--sidebar-* CSS vars). Hand-write primitives in components/ui/ on top of the individually installed @radix-ui/react-<x> packages instead.

(c) Tokens in src/index.css (Tailwind v4 — @theme maps semantic names to CSS vars, :root holds the light values, .dark the dark override):

@import "tailwindcss";

@theme {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-fo
Полный SKILL.md на GitHub

Установить web-design-system-foundation в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл web-design-system-foundation?

Use when the repository has no design system yet (no tokens, no component library - a new site/app, an "Apply design system" task, or a task that asks for one), before building any page section - writes the approved design system's generated files from get_design_system (files true) and builds the tokens on them when there is one.

Как установить скилл web-design-system-foundation?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл web-design-system-foundation запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить web-design-system-foundation с