[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CRZJP0HMWKJJ3FBE5MSKAQ":3,"skill-same:01M7CRZJP0HMWKJJ3FBE5MSKAQ":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7CRZJP0HMWKJJ3FBE5MSKAQ","web-design-system-foundation",null,"Use when the repository has no design system yet (no tokens, no component library - a new site\u002Fapp, 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.","makifbaysal\u002Ftasktrooper","makifbaysal","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F25031940?v=4","01M7CRG3ZCSYZSSEVDMW3DEYC8","Mehmet Akif Baysal","01M7CRG401FJ8YAXH5ER730XYV",122,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Ffrontend-developer\u002Fskills\u002Fweb-design-system-foundation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: web-design-system-foundation\ncategory: frontend\ndescription: Use when the repository has no design system yet (no tokens, no component library - a new site\u002Fapp, 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.\nsource: anthropics\u002Fskills frontend-design (Apache-2.0), adapted\n---\n# Web Design System Foundation\n\n## Overview\n\nA 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.\n\n**Core principle:** Lay the foundation before the first page section — tokens, folders, and the first atoms come before any feature work.\n\n## Detect first\n\n`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\u002Ftokens.json`, `design\u002Ftokens.css`, `design\u002FINVENTORY.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 \"..\u002Fdesign\u002Ftokens.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\u002Fcomponents\u002FINVENTORY.md` lists the repository's components under the names `design\u002FINVENTORY.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.\n\nGreenfield (use this skill) vs existing (map and follow `component-composition`, never restructure):\n- `grep -r \"@theme\\|:root\" src\u002Findex.css` (v4) or `tailwind.config.*` `theme.extend.colors` (v3) — tokens defined?\n- `ls src\u002Fcomponents` — do `atoms\u002Fmolecules\u002Forganisms\u002Ftemplates` already exist, or a `components.json` (shadcn already initialized)?\n- `cat src\u002Fcomponents\u002FINVENTORY.md` present → library exists, reuse it.\n- Tailwind major: `grep '\"tailwindcss\"' package.json` (`^4` → `@theme`; `^3` → config + CSS vars).\n\nAny of these present → stop, this skill doesn't apply; follow `component-composition` against the existing structure.\n\n## Design direction (5 minutes, written into the plan, not a separate doc)\n\nOnly 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\u002Faccent\u002Fdestructive at minimum — use the brief's colors if given); **type pairing**, max 2 families, self-hosted or Google Fonts `\u003Clink>` with `&display=swap`; **radius + shadow** choice (one `--radius`, elevation via `shadow-sm`\u002F`shadow-md` only); **ASCII wireframe** of the key page at phone (360) and desktop (1440).\n\nAvoid 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.\n\n## Foundation steps, in order (each a committable step)\n\n**(a) `@\u002F` alias.** `tsconfig.app.json` → `\"compilerOptions\": { \"paths\": { \"@\u002F*\": [\".\u002Fsrc\u002F*\"] } }` (no `baseUrl` — TS 6 deprecates it; `paths` alone resolves under `moduleResolution: \"bundler\"`). `vite.config.ts`:\n```ts\nimport path from 'node:path'\nresolve: { alias: { '@': path.resolve(import.meta.dirname, '.\u002Fsrc') } }\n```\nUse `import.meta.dirname`, not `__dirname` (Vite 8 warns and will require it).\n\n**(b) Deps.** `npm i clsx tailwind-merge class-variance-authority lucide-react` (runtime dependencies; `lucide-react` is the one icon library). Add `@radix-ui\u002Freact-\u003Cx>` only when a specific primitive is needed (dialog, popover, tabs...) — install that one package, not a bundle.\nDo not run `npx shadcn init` on a Vite 8 + TS 6 + Tailwind 4.3 project: verified it does not resolve the `@\u002F*` tsconfig path and writes `components\u002Fui\u002F` and `lib\u002Futils.ts` into a literal `.\u002F@\u002F` directory at the project root instead of `src\u002F`, and it pulls in extra dependencies and tokens this foundation doesn't use (a bundled `radix-ui`\u002F`cn` package, `@fontsource-variable\u002Fgeist`, `tw-animate-css`, `--chart-*`\u002F`--sidebar-*` CSS vars). Hand-write primitives in `components\u002Fui\u002F` on top of the individually installed `@radix-ui\u002Freact-\u003Cx>` packages instead.\n\n**(c) Tokens in `src\u002Findex.css`** (Tailwind v4 — `@theme` maps semantic names to CSS vars, `:root` holds the light values, `.dark` the dark override):\n```css\n@import \"tailwindcss\";\n\n@theme {\n  --color-background: var(--background);\n  --color-foreground: var(--foreground);\n  --color-card: var(--card);\n  --color-card-foreground: var(--card-foreground);\n  --color-popover: var(--popover);\n  --color-popover-foreground: var(--popover-foreground);\n  --color-primary: var(--primary);\n  --color-primary-foreground: var(--primary-foreground);\n  --color-secondary: var(--secondary);\n  --color-secondary-foreground: var(--secondary-foreground);\n  --color-muted: var(--muted);\n  --color-muted-foreground: var(--muted-foreground);\n  --color-accent: var(--accent);\n  --color-accent-foreground: var(--accent-foreground);\n  --color-destructive: var(--destructive);\n  --color-destructive-foreground: var(--destructive-foreground);\n  --color-border: var(--border);\n  --color-input: var(--input);\n  --color-ring: var(--ring);\n  --radius-sm: calc(var(--radius) - 4px);\n  --radius-md: calc(var(--radius) - 2px);\n  --radius-lg: var(--radius);\n  --radius-xl: calc(var(--radius) + 4px);\n  --font-sans: \"\u003Cbody face from the design direction>\", ui-sans-serif, system-ui, sans-serif;\n  \u002F* --font-display: \"\u003Cdisplay face>\", serif;  optional second family; load faces via \u003Clink> in index.html with &display=swap *\u002F\n}\n\n:root {\n  --background: oklch(1 0 0);\n  --foreground: oklch(0.18 0.01 260);\n  --card: oklch(1 0 0);\n  --card-foreground: oklch(0.18 0.01 260);\n  --popover: oklch(1 0 0);\n  --popover-foreground: oklch(0.18 0.01 260);\n  --primary: oklch(0.42 0.17 264);        \u002F* ← brand color from the design direction *\u002F\n  --primary-foreground: oklch(0.98 0.005 260);\n  --secondary: oklch(0.96 0.01 260);\n  --secondary-foreground: oklch(0.24 0.02 260);\n  --muted: oklch(0.96 0.01 260);\n  --muted-foreground: oklch(0.5 0.02 260);\n  --accent: oklch(0.93 0.03 264);\n  --accent-foreground: oklch(0.24 0.02 260);\n  --destructive: oklch(0.55 0.22 27);\n  --destructive-foreground: oklch(0.98 0.005 260);\n  --border: oklch(0.9 0.01 260);\n  --input: oklch(0.9 0.01 260);\n  --ring: oklch(0.42 0.17 264);\n  --radius: 0.5rem;\n}\n\n.dark {\n  --background: oklch(0.18 0.01 260);\n  --foreground: oklch(0.96 0.005 260);\n  \u002F* ...same keys, dark values. Optional: only add if the brief needs dark mode. *\u002F\n}\n\n@layer base {\n  * {\n    border-color: var(--color-border);\n    outline-color: color-mix(in oklch, var(--color-ring) 50%, transparent);\n  }\n  body {\n    background-color: var(--color-background);\n    color: var(--color-foreground);\n    color-scheme: light;\n    text-rendering: optimizeLegibility;\n  }\n  .dark body { color-scheme: dark; }\n  :focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }\n  ::selection { background-color: var(--color-primary); color: var(--color-primary-foreground); }\n}\n```\nVerified: `npm run build` includes `.bg-primary`, `.text-muted-foreground`, `.rounded-lg { border-radius: var(--radius-lg) }` in the built CSS from this block alone.\n\nTailwind v3 equivalent: same `:root`\u002F`.dark` variable block, plus in `tailwind.config.ts` → `theme.extend.colors = { background: \"var(--background)\", primary: { DEFAULT: \"var(--primary)\", foreground: \"var(--primary-foreground)\" }, ... }` for every semantic pair, and `borderRadius: { lg: \"var(--radius)\", md: \"calc(var(--radius) - 2px)\", sm: \"calc(var(--radius) - 4px)\" }`.\n\n**(d) `src\u002Flib\u002Futils.ts`:**\n```ts\nimport { clsx } from 'clsx'\nimport type { ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs))\n}\n```\n\n**(e) Folders** — create exactly this tree:\n```\nsrc\u002F\n  index.css                 tokens (@theme) + base layer\n  lib\u002Futils.ts              cn()\n  components\u002F\n    ui\u002F                     Radix\u002Fshadcn primitives (atom-level vendor layer)\n    atoms\u002F                  Button, Input, Label, Badge, Icon, Heading, Text, Container, Stack, Link\n    molecules\u002F              FormField, NavLink, PriceTag, …\n    organisms\u002F              SiteHeader, MobileNav, PricingTable, ContactForm, SiteFooter, …\n    templates\u002F              MarketingLayout, AppLayout — page skeletons, own grid + breakpoints, no data\n    INVENTORY.md            one line per component: level · name · purpose · variants\u002Fprops\n  pages\u002F                    route components: data + state wiring\n  hooks\u002F , api\u002F             data hooks and API clients — imported by pages only\n```\nOne component per file, PascalCase file = export name, tests co-located (`atoms\u002FButton.tsx` + `atoms\u002FButton.test.tsx`), direct imports via `@\u002Fcomponents\u002Fatoms\u002FButton` — no barrel `index.ts` files. Start `INVENTORY.md` with the header `One line per component: level · name · purpose · variants\u002Fprops.` and add a bullet for every component in the same commit that creates it.\n\n**(f) Base atoms first.** `Button` in full (cva variants × sizes, loading keeps the label and adds a spinner, `min-h-11` touch target on phone, `focus-visible` ring, `ref` as a plain prop — React 19 needs no `forwardRef`):\n```tsx\nimport type { ButtonHTMLAttributes, Ref } from 'react'\nimport { cva } from 'class-variance-authority'\nimport type { VariantProps } from 'class-variance-authority'\nimport { Loader2 } from 'lucide-react'\nimport { cn } from '@\u002Flib\u002Futils'\n\nconst buttonVariants = cva(\n  'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',\n  {\n    variants: {\n      variant: {\n        primary: 'bg-primary text-primary-foreground hover:bg-primary\u002F90',\n        secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary\u002F80',\n        outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',\n        ghost: 'hover:bg-accent hover:text-accent-foreground',\n        destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive\u002F90',\n        link: 'text-primary underline-offset-4 hover:underline',\n      },\n      size: {\n        sm: 'h-9 min-h-11 sm:min-h-9 px-3 text-sm',\n        md: 'h-10 min-h-11 sm:min-h-10 px-4 text-sm',\n        lg: 'h-11 min-h-11 px-6 text-base',\n        icon: 'h-10 w-10 min-h-11 min-w-11 sm:min-h-10 sm:min-w-10',\n      },\n    },\n    defaultVariants: { variant: 'primary', size: 'md' },\n  },\n)\n\nexport interface ButtonProps\n  extends ButtonHTMLAttributes\u003CHTMLButtonElement>,\n    VariantProps\u003Ctypeof buttonVariants> {\n  loading?: boolean\n  ref?: Ref\u003CHTMLButtonElement>\n}\n\nexport function Button({ className, variant, size, loading = false, disabled, children, ref, ...props }: ButtonProps) {\n  return (\n    \u003Cbutton\n      ref={ref}\n      type=\"button\"\n      className={cn(buttonVariants({ variant, size }), className)}\n      disabled={disabled || loading}\n      aria-busy={loading}\n      {...props}\n    >\n      {loading ? \u003CLoader2 className=\"size-4 animate-spin\" aria-hidden \u002F> : null}\n      {children}\n    \u003C\u002Fbutton>\n  )\n}\n```\nThen, one line each, same pattern (cva + `cn`, `ref` prop, every state styled, no outer margin):\n- **Input** — text\u002Femail\u002Fetc, `aria-invalid` red ring, `text-base` (16px, no iOS zoom) on phone.\n- **Label** — wraps native `\u003Clabel>`, required-marker slot.\n- **Heading** — `level` 1–4 prop mapping to `h1`–`h4` + a fixed size\u002Fweight per level, `text-balance`.\n- **Text** — body paragraph, `muted` boolean for `text-muted-foreground`, `text-pretty`.\n- **Container** — `mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8`, no other styling.\n- **Stack** — flex column\u002Frow + `gap-*`, the only layout atom that takes a `gap` prop (never margins on siblings).\n- **Badge** — status chip, variant per semantic color, never color-only (pair with text\u002Ficon).\n- **Icon** — thin wrapper around one icon library (`lucide-react`) fixing size via `className=\"size-4\"` etc.\n\n**(g) Templates.** `MarketingLayout` \u002F `AppLayout`: header\u002Fmain\u002Ffooter skeleton owning the `Container` width and the responsive grid, no data, children render inside `main`.\n\n**(h) ui-guard**, wired as:\n```json\n\"scripts\": { \"prebuild\": \"npm run lint:ui\", \"lint:ui\": \"node scripts\u002Fui-guard.mjs\", \"build\": \"tsc -b && vite build\" }\n```\nFull script (`scripts\u002Fui-guard.mjs`, dependency-free, verified: clean on correct code, catches every violation below, exits 0 under `--warn`):\n```js\n#!\u002Fusr\u002Fbin\u002Fenv node\nimport { readFileSync, readdirSync, statSync } from 'node:fs'\nimport { dirname, join, relative, resolve } from 'node:path'\n\nconst WARN = process.argv.includes('--warn')\nconst ROOT = resolve(import.meta.dirname, '..')\nconst SRC = join(ROOT, 'src')\n\nconst LEVEL_ORDER = ['ui', 'atoms', 'molecules', 'organisms', 'templates', 'pages']\nconst PALETTE_RE = \u002F\\b(bg|text|border|ring|fill|stroke|from|via|to|outline|decoration|divide|placeholder|shadow)-(slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-\\d{2,3}\\b\u002F\nconst HEX_RE = \u002F#[0-9a-fA-F]{3,8}\\b\u002F\nconst ARBITRARY_RE = \u002F-\\[[^\\]]+\\]\u002Fg\nconst ALLOWED_ARBITRARY = [\n  \u002Fgrid-cols-\\[repeat\\(auto-(fit|fill),minmax\\(\u002F,\n  \u002Fmax-w-\\[[\\d.]+ch\\]\u002F,\n  \u002Faspect-\\[[^\\]]+\\]\u002F,\n]\nconst BANNED_UTILS = ['h-screen', 'space-x-', 'space-y-', 'transition-all']\nconst Z_ARBITRARY_RE = \u002F\\bz-\\[[^\\]]+\\]\u002F\n\nfunction listFiles(dir) {\n  const out = []\n  for (const entry of readdirSync(dir)) {\n    const full = join(dir, entry)\n    const st = statSync(full)\n    if (st.isDirectory()) out.push(...listFiles(full))\n    else if (\u002F\\.(ts|tsx)$\u002F.test(entry)) out.push(full)\n  }\n  return out\n}\n\nfunction levelOf(file) {\n  const rel = relative(SRC, file).replace(\u002F\\\\\u002Fg, '\u002F')\n  if (rel.startsWith('components\u002Fui\u002F')) return 'ui'\n  if (rel.startsWith('components\u002Fatoms\u002F')) return 'atoms'\n  if (rel.startsWith('components\u002Fmolecules\u002F')) return 'molecules'\n  if (rel.startsWith('components\u002Forganisms\u002F')) return 'organisms'\n  if (rel.startsWith('components\u002Ftemplates\u002F')) return 'templates'\n  if (rel.startsWith('pages\u002F')) return 'pages'\n  if (rel.startsWith('hooks\u002F') || rel.startsWith('api\u002F')) return 'data'\n  return 'other'\n}\n\nfunction resolveImport(fromFile, spec) {\n  if (spec.startsWith('@\u002F')) return join(SRC, spec.slice(2))\n  if (spec.startsWith('.')) return resolve(dirname(fromFile), spec)\n  return null\n}\n\nfunction findings(file, lines) {\n  const found = []\n  const fileLevel = levelOf(file)\n\n  lines.forEach((line, i) => {\n    const lineNo = i + 1\n    const allow = \u002Fui-guard-allow:\u002F.test(line)\n\n    const importMatch = line.match(\u002Ffrom\\s+['\"]([^'\"]+)['\"]\u002F)\n    if (importMatch && LEVEL_ORDER.includes(fileLevel)) {\n      const resolved = resolveImport(file, importMatch[1])\n      if (resolved) {\n        const targetLevel = levelOf(resolved + '.tsx')\n        if (targetLevel === 'data' && fileLevel !== 'pages') {\n          found.push(`${lineNo}: import-direction — ${fileLevel} imports hooks\u002Fapi (only pages\u002F may)`)\n        } else if (LEVEL_ORDER.includes(targetLevel)) {\n          const fromIdx = LEVEL_ORDER.indexOf(fileLevel)\n          const toIdx = LEVEL_ORDER.indexOf(targetLevel)\n          const sameLevelOk = fileLevel === 'organisms' && targetLevel === 'organisms'\n          if (toIdx > fromIdx && !sameLevelOk) {\n            found.push(`${lineNo}: import-direction — ${fileLevel} may not import ${targetLevel} (fix: move the import to a level at or right of ${fileLevel}, or lift this logic up)`)\n          }\n        }\n      }\n    }\n\n    if (!allow) {\n      if (PALETTE_RE.test(line)) found.push(`${lineNo}: raw-palette-color — use a semantic token class (bg-primary, text-muted-foreground, …) instead of a raw Tailwind palette class`)\n      if (HEX_RE.test(line) && \u002FclassName|style\u002F.test(line)) found.push(`${lineNo}: hex-color — use a semantic token, not a literal hex value`)\n\n      const arbMatches = line.match(ARBITRARY_RE) || []\n      for (const m of arbMatches) {\n        const isAllowed = ALLOWED_ARBITRARY.some((re) => re.test(line))\n        if (!isAllowed) found.push(`${lineNo}: arbitrary-value — \"${m}\" is not on the allow-list; use a scale token or add \"ui-guard-allow: \u003Creason>\" on this line`)\n      }\n\n      for (const banned of BANNED_UTILS) {\n        if (line.includes(`\"${banned}`) || line.includes(`'${banned}`) || line.includes(` ${banned}`) || line.includes(`\\`${banned}`)) {\n          found.push(`${lineNo}: banned-utility — \"${banned}\" is disallowed (use min-h-dvh\u002Fh-dvh, gap-*, or the explicit transition properties)`)\n        }\n      }\n      if (Z_ARBITRARY_RE.test(line)) found.push(`${lineNo}: arbitrary-z-index — use the fixed z-10\u002F20\u002F30\u002F40\u002F50 scale, not an arbitrary z-[…]`)\n      if (\u002Fstyle=\\{\\{\u002F.test(line)) found.push(`${lineNo}: static-inline-style — use Tailwind classes; style={{}} is reserved for runtime-computed values (add ui-guard-allow: \u003Creason> if genuinely dynamic)`)\n    }\n  })\n\n  return found\n}\n\nfunction main() {\n  const files = listFiles(SRC)\n  let violations = 0\n\n  for (const file of files) {\n    const content = readFileSync(file, 'utf8')\n    const lines = content.split('\\n')\n    const found = findings(file, lines)\n    for (const f of found) {\n      violations++\n      console.log(`${relative(ROOT, file)}:${f}`)\n    }\n  }\n\n  if (violations > 0) {\n    console.log(`\\nui-guard: ${violations} violation(s)${WARN ? ' (--warn: not failing)' : ''}`)\n    process.exit(WARN ? 0 : 1)\n  }\n\n  console.log('ui-guard: clean')\n  process.exit(0)\n}\n\nmain()\n```\nOn an EXISTING repo, run it with `--warn` only (report mode, always exits 0) unless a human explicitly asks for enforcement — never flip a legacy repo's build red. ESLint-based repos may add `eslint-plugin-boundaries` on top; this script stays the stack-agnostic default (Vite 8 templates ship oxlint, not ESLint).\n\n**(i) Tests for atoms.** Co-located RTL test per `component-testing` (e.g. `Button.test.tsx` next to `Button.tsx`) — behavior-focused, `byRole`, `user-event`.\n\n**(j) Only then page sections** — compose, don't invent; see `component-composition`.\n\n## Worked Example\n\n```\n❌ Start writing a hero section straight away: inline `#1a1a2e` background,\n   a hand-rolled `\u003Cdiv onClick>` button, `w-[600px]` card, no INVENTORY.md.\n\n✅ 1. tsconfig\u002Fvite alias → 2. npm i clsx tailwind-merge class-variance-authority lucide-react\n   → 3. tokens in index.css → 4. lib\u002Futils.ts → 5. folders + INVENTORY.md\n   → 6. Button, Container, Heading, Text atoms + tests → 7. ui-guard wired,\n   `npm run build` green → 8. MarketingLayout template → 9. first page section,\n   built entirely from atoms already in INVENTORY.md.\n```\n\n## Common Mistakes\n\n- Writing a page section before any tokens exist — every color becomes a one-off hex.\n- Running `npx shadcn init` on this stack without checking where it actually wrote files (it writes to `.\u002F@\u002F...`, not `.\u002Fsrc\u002F...`, verified).\n- `baseUrl` in `tsconfig.app.json` — deprecated under TS 6; `paths` alone is enough with `moduleResolution: \"bundler\"`.\n- `__dirname` in `vite.config.ts` — use `import.meta.dirname`.\n- Skipping `INVENTORY.md` — the next task re-invents a Button.\n- Wiring `lint:ui` but forgetting `prebuild`, so `npm run build` never actually runs ui-guard.\n\n## Red Flags\n\n- A component file with a raw hex color or `bg-blue-500` anywhere in the diff.\n- `src\u002Fcomponents\u002F` with no `INVENTORY.md`.\n- `npm run build` green but `dist\u002F*.css` has no `--color-primary`\u002F`.bg-primary` — tokens aren't wired into Tailwind.\n- A primitive hand-rolled in a page file instead of `components\u002Fui\u002F`.\n","# Web Design System Foundation\n\n## Overview\n\nA 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.\n\n**Core principle:** Lay the foundation before the first page section — tokens, folders, and the first atoms come before any feature work.\n\n## Detect first\n\n`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\u002Ftokens.json`, `design\u002Ftokens.css`, `design\u002FINVENTORY.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 \"..\u002Fdesign\u002Ftokens.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\u002Fcomponents\u002FINVENTORY.md` lists the repository's components under the names `design\u002FINVENTORY.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.\n\nGreenfield (use this skill) vs existing (map and follow `component-composition`, never restructure):\n- `grep -r \"@theme\\|:root\" src\u002Findex.css` (v4) or `tailwind.config.*` `theme.extend.colors` (v3) — tokens defined?\n- `ls src\u002Fcomponents` — do `atoms\u002Fmolecules\u002Forganisms\u002Ftemplates` already exist, or a `components.json` (shadcn already initialized)?\n- `cat src\u002Fcomponents\u002FINVENTORY.md` present → library exists, reuse it.\n- Tailwind major: `grep '\"tailwindcss\"' package.json` (`^4` → `@theme`; `^3` → config + CSS vars).\n\nAny of these present → stop, this skill doesn't apply; follow `component-composition` against the existing structure.\n\n## Design direction (5 minutes, written into the plan, not a separate doc)\n\nOnly 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\u002Faccent\u002Fdestructive at minimum — use the brief's colors if given); **type pairing**, max 2 families, self-hosted or Google Fonts `\u003Clink>` with `&display=swap`; **radius + shadow** choice (one `--radius`, elevation via `shadow-sm`\u002F`shadow-md` only); **ASCII wireframe** of the key page at phone (360) and desktop (1440).\n\nAvoid 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.\n\n## Foundation steps, in order (each a committable step)\n\n**(a) `@\u002F` alias.** `tsconfig.app.json` → `\"compilerOptions\": { \"paths\": { \"@\u002F*\": [\".\u002Fsrc\u002F*\"] } }` (no `baseUrl` — TS 6 deprecates it; `paths` alone resolves under `moduleResolution: \"bundler\"`). `vite.config.ts`:\n```ts\nimport path from 'node:path'\nresolve: { alias: { '@': path.resolve(import.meta.dirname, '.\u002Fsrc') } }\n```\nUse `import.meta.dirname`, not `__dirname` (Vite 8 warns and will require it).\n\n**(b) Deps.** `npm i clsx tailwind-merge class-variance-authority lucide-react` (runtime dependencies; `lucide-react` is the one icon library). Add `@radix-ui\u002Freact-\u003Cx>` only when a specific primitive is needed (dialog, popover, tabs...) — install that one package, not a bundle.\nDo not run `npx shadcn init` on a Vite 8 + TS 6 + Tailwind 4.3 project: verified it does not resolve the `@\u002F*` tsconfig path and writes `components\u002Fui\u002F` and `lib\u002Futils.ts` into a literal `.\u002F@\u002F` directory at the project root instead of `src\u002F`, and it pulls in extra dependencies and tokens this foundation doesn't use (a bundled `radix-ui`\u002F`cn` package, `@fontsource-variable\u002Fgeist`, `tw-animate-css`, `--chart-*`\u002F`--sidebar-*` CSS vars). Hand-write primitives in `components\u002Fui\u002F` on top of the individually installed `@radix-ui\u002Freact-\u003Cx>` packages instead.\n\n**(c) Tokens in `src\u002Findex.css`** (Tailwind v4 — `@theme` maps semantic names to CSS vars, `:root` holds the light values, `.dark` the dark override):\n```css\n@import \"tailwindcss\";\n\n@theme {\n  --color-background: var(--background);\n  --color-foreground: var(--foreground);\n  --color-card: var(--card);\n  --color-card-foreground: var(--card-foreground);\n  --color-popover: var(--popover);\n  --color-popover-foreground: var(--popover-foreground);\n  --color-primary: var(--primary);\n  --color-primary-foreground: var(--primary-foreground);\n  --color-secondary: var(--secondary);\n  --color-secondary-foreground: var(--secondary-foreground);\n  --color-muted: var(--muted);\n  --color-muted-foreground: var(--muted-foreground);\n  --color-accent: var(--accent);\n  --color-accent-foreground: var(--accent-foreground);\n  --color-destructive: var(--destructive);\n  --color-destructive-foreground: var(--destructive-foreground);\n  --color-border: var(--border);\n  --color-input: var(--input);\n  --color-ring: var(--ring);\n  --radius-sm: calc(var(--radius) - 4px);\n  --radius-md: calc(var(--radius) - 2px);\n  --radius-lg: var(--radius);\n  --radius-xl: calc(var(--radius) + 4px);\n  --font-sans: \"\u003Cbody face from the design direction>\", ui-sans-serif, system-ui, sans-serif;\n  \u002F* --font-display: \"\u003Cdisplay face>\", serif;  optional second family; load faces via \u003Clink> in index.html with &display=swap *\u002F\n}\n\n:root {\n  --background: oklch(1 0 0);\n  --foreground: oklch(0.18 0.01 260);\n  --card: oklch(1 0 0);\n  --card-foreground: oklch(0.18 0.01 260);\n  --popover: oklch(1 0 0);\n  --popover-foreground: oklch(0.18 0.01 260);\n  --primary: oklch(0.42 0.17 264);        \u002F* ← brand color from the design direction *\u002F\n  --primary-foreground: oklch(0.98 0.005 260);\n  --secondary: oklch(0.96 0.01 260);\n  --secondary-foreground: oklch(0.24 0.02 260);\n  --muted: oklch(0.96 0.01 260);\n  --muted-foreground: oklch(0.5 0.02 260);\n  --accent: oklch(0.93 0.03 264);\n  --accent-foreground: oklch(0.24 0.02 260);\n  --destructive: oklch(0.55 0.22 27);\n  --destructive-foreground: oklch(0.98 0.005 260);\n  --border: oklch(0.9 0.01 260);\n  --input: oklch(0.9 0.01 260);\n  --ring: oklch(0.42 0.17 264);\n  --radius: 0.5rem;\n}\n\n.dark {\n  --background: oklch(0.18 0.01 260);\n  --foreground: oklch(0.96 0.005 260);\n  \u002F* ...same keys, dark values. Optional: only add if the brief needs dark mode. *\u002F\n}\n\n@layer base {\n  * {\n    border-color: var(--color-border);\n    outline-color: color-mix(in oklch, var(--color-ring) 50%, transparent);\n  }\n  body {\n    background-color: var(--color-background);\n    color: var(--color-foreground);\n    color-scheme: light;\n    text-rendering: optimizeLegibility;\n  }\n  .dark body { color-scheme: dark; }\n  :focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }\n  ::selection { background-color: var(--color-primary); color: var(--color-primary-foreground); }\n}\n```\nVerified: `npm run build` includes `.bg-primary`, `.text-muted-foreground`, `.rounded-lg { border-radius: var(--radius-lg) }` in the built CSS from this block alone.\n\nTailwind v3 equivalent: same `:root`\u002F`.dark` variable block, plus in `tailwind.config.ts` → `theme.extend.colors = { background: \"var(--background)\", primary: { DEFAULT: \"var(--primary)\", foreground: \"var(--primary-foreground)\" }, ... }` for every semantic pair, and `borderRadius: { lg: \"var(--radius)\", md: \"calc(var(--radius) - 2px)\", sm: \"calc(var(--radius) - 4px)\" }`.\n\n**(d) `src\u002Flib\u002Futils.ts`:**\n```ts\nimport { clsx } from 'clsx'\nimport type { ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs))\n}\n```\n\n**(e) Folders** — create exactly this tree:\n```\nsrc\u002F\n  index.css                 tokens (@theme) + base layer\n  lib\u002Futils.ts              cn()\n  components\u002F\n    ui\u002F                     Radix\u002Fshadcn primitives (atom-level vendor layer)\n    atoms\u002F                  Button, Input, Label, Badge, Icon, Heading, Text, Container, Stack, Link\n    molecules\u002F              FormField, NavLink, PriceTag, …\n    organisms\u002F              SiteHeader, MobileNav, PricingTable, ContactForm, SiteFooter, …\n    templates\u002F              MarketingLayout, AppLayout — page skeletons, own grid + breakpoints, no data\n    INVENTORY.md            one line per component: level · name · purpose · variants\u002Fprops\n  pages\u002F                    route components: data + state wiring\n  hooks\u002F , api\u002F             data hooks and API clients — imported by pages only\n```\nOne component per file, PascalCase file = export name, tests co-located (`atoms\u002FButton.tsx` + `atoms\u002FButton.test.tsx`), direct imports via `@\u002Fcomponents\u002Fatoms\u002FButton` — no barrel `index.ts` files. Start `INVENTORY.md` with the header `One line per component: level · name · purpose · variants\u002Fprops.` and add a bullet for every component in the same commit that creates it.\n\n**(f) Base atoms first.** `Button` in full (cva variants × sizes, loading keeps the label and adds a spinner, `min-h-11` touch target on phone, `focus-visible` ring, `ref` as a plain prop — React 19 needs no `forwardRef`):\n```tsx\nimport type { ButtonHTMLAttributes, Ref } from 'react'\nimport { cva } from 'class-variance-authority'\nimport type { VariantProps } from 'class-variance-authority'\nimport { Loader2 } from 'lucide-react'\nimport { cn } from '@\u002Flib\u002Futils'\n\nconst buttonVariants = cva(\n  'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',\n  {\n    variants: {\n      variant: {\n        primary: 'bg-primary text-primary-foreground hover:bg-primary\u002F90',\n        secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary\u002F80',\n        outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',\n        ghost: 'hover:bg-accent hover:text-accent-foreground',\n        destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive\u002F90',\n        link: 'text-primary underline-offset-4 hover:underline',\n      },\n      size: {\n        sm: 'h-9 min-h-11 sm:min-h-9 px-3 text-sm',\n        md: 'h-10 min-h-11 sm:min-h-10 px-4 text-sm',\n        lg: 'h-11 min-h-11 px-6 text-base',\n        icon: 'h-10 w-10 min-h-11 min-w-11 sm:min-h-10 sm:min-w-10',\n      },\n    },\n    defaultVariants: { variant: 'primary', size: 'md' },\n  },\n)\n\nexport interface ButtonProps\n  extends ButtonHTMLAttributes\u003CHTMLButtonElement>,\n    VariantProps\u003Ctypeof buttonVariants> {\n  loading?: boolean\n  ref?: Ref\u003CHTMLButtonElement>\n}\n\nexport function Button({ className, variant, size, loading = false, disabled, children, ref, ...props }: ButtonProps) {\n  return (\n    \u003Cbutton\n      ref={ref}\n      type=\"button\"\n      className={cn(buttonVariants({ variant, size }), className)}\n      disabled={disabled || loading}\n      aria-busy={loading}\n      {...props}\n    >\n      {loading ? \u003CLoader2 className=\"size-4 animate-spin\" aria-hidden \u002F> : null}\n      {children}\n    \u003C\u002Fbutton>\n  )\n}\n```\nThen, one line each, same pattern (cva + `cn`, `ref` prop, every state styled, no outer margin):\n- **Input** — text\u002Femail\u002Fetc, `aria-invalid` red ring, `text-base` (16px, no iOS zoom) on phone.\n- **Label** — wraps native `\u003Clabel>`, required-marker slot.\n- **Heading** — `level` 1–4 prop mapping to `h1`–`h4` + a fixed size\u002Fweight per level, `text-balance`.\n- **Text** — body paragraph, `muted` boolean for `text-muted-foreground`, `text-pretty`.\n- **Container** — `mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8`, no other styling.\n- **Stack** — flex column\u002Frow + `gap-*`, the only layout atom that takes a `gap` prop (never margins on siblings).\n- **Badge** — status chip, variant per semantic color, never color-only (pair with text\u002Ficon).\n- **Icon** — thin wrapper around one icon library (`lucide-react`) fixing size via `className=\"size-4\"` etc.\n\n**(g) Templates.** `MarketingLayout` \u002F `AppLayout`: header\u002Fmain\u002Ffooter skeleton owning the `Container` width and the responsive grid, no data, children render inside `main`.\n\n**(h) ui-guard**, wired as:\n```json\n\"scripts\": { \"prebuild\": \"npm run lint:ui\", \"lint:ui\": \"node scripts\u002Fui-guard.mjs\", \"build\": \"tsc -b && vite build\" }\n```\nFull script (`scripts\u002Fui-guard.mjs`, dependency-free, verified: clean on correct code, catches every violation below, exits 0 under `--warn`):\n```js\n#!\u002Fusr\u002Fbin\u002Fenv node\nimport { readFileSync, readdirSync, statSync } from 'node:fs'\nimport { dirname, join, relative, resolve } from 'node:path'\n\nconst WARN = process.argv.includes('--warn')\nconst ROOT = resolve(import.meta.dirname, '..')\nconst SRC = join(ROOT, 'src')\n\nconst LEVEL_ORDER = ['ui', 'atoms', 'molecules', 'organisms', 'templates', 'pages']\nconst PALETTE_RE = \u002F\\b(bg|text|border|ring|fill|stroke|from|via|to|outline|decoration|divide|placeholder|shadow)-(slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-\\d{2,3}\\b\u002F\nconst HEX_RE = \u002F#[0-9a-fA-F]{3,8}\\b\u002F\nconst ARBITRARY_RE = \u002F-\\[[^\\]]+\\]\u002Fg\nconst ALLOWED_ARBITRARY = [\n  \u002Fgrid-cols-\\[repeat\\(auto-(fit|fill),minmax\\(\u002F,\n  \u002Fmax-w-\\[[\\d.]+ch\\]\u002F,\n  \u002Faspect-\\[[^\\]]+\\]\u002F,\n]\nconst BANNED_UTILS = ['h-screen', 'space-x-', 'space-y-', 'transition-all']\nconst Z_ARBITRARY_RE = \u002F\\bz-\\[[^\\]]+\\]\u002F\n\nfunction listFiles(dir) {\n  const out = []\n  for (const entry of readdirSync(dir)) {\n    const full = join(dir, entry)\n    const st = statSync(full)\n    if (st.isDirectory()) out.push(...listFiles(full))\n    else if (\u002F\\.(ts|tsx)$\u002F.test(entry)) out.push(full)\n  }\n  return out\n}\n\nfunction levelOf(file) {\n  const rel = relative(SRC, file).replace(\u002F\\\\\u002Fg, '\u002F')\n  if (rel.startsWith('components\u002Fui\u002F')) return 'ui'\n  if (rel.startsWith('components\u002Fatoms\u002F')) return 'atoms'\n  if (rel.startsWith('components\u002Fmolecules\u002F')) return 'molecules'\n  if (rel.startsWith('components\u002Forganisms\u002F')) return 'organisms'\n  if (rel.startsWith('components\u002Ftemplates\u002F')) return 'templates'\n  if (rel.startsWith('pages\u002F')) return 'pages'\n  if (rel.startsWith('hooks\u002F') || rel.startsWith('api\u002F')) return 'data'\n  return 'other'\n}\n\nfunction resolveImport(fromFile, spec) {\n  if (spec.startsWith('@\u002F')) return join(SRC, spec.slice(2))\n  if (spec.startsWith('.')) return resolve(dirname(fromFile), spec)\n  return null\n}\n\nfunction findings(file, lines) {\n  const found = []\n  const fileLevel = levelOf(file)\n\n  lines.forEach((line, i) => {\n    const lineNo = i + 1\n    const allow = \u002Fui-guard-allow:\u002F.test(line)\n\n    const importMatch = line.match(\u002Ffrom\\s+['\"]([^'\"]+)['\"]\u002F)\n    if (importMatch && LEVEL_ORDER.includes(fileLevel)) {\n      const resolved = resolveImport(file, importMatch[1])\n      if (resolved) {\n        const targetLevel = levelOf(resolved + '.tsx')\n        if (targetLevel === 'data' && fileLevel !== 'pages') {\n          found.push(`${lineNo}: import-direction — ${fileLevel} imports hooks\u002Fapi (only pages\u002F may)`)\n        } else if (LEVEL_ORDER.includes(targetLevel)) {\n          const fromIdx = LEVEL_ORDER.indexOf(fileLevel)\n          const toIdx = LEVEL_ORDER.indexOf(targetLevel)\n          const sameLevelOk = fileLevel === 'organisms' && targetLevel === 'organisms'\n          if (toIdx > fromIdx && !sameLevelOk) {\n            found.push(`${lineNo}: import-direction — ${fileLevel} may not import ${targetLevel} (fix: move the import to a level at or right of ${fileLevel}, or lift this logic up)`)\n          }\n        }\n      }\n    }\n\n    if (!allow) {\n      if (PALETTE_RE.test(line)) found.push(`${lineNo}: raw-palette-color — use a semantic token class (bg-primary, text-muted-foreground, …) instead of a raw Tailwind palette class`)\n      if (HEX_RE.test(line) && \u002FclassName|style\u002F.test(line)) found.push(`${lineNo}: hex-color — use a semantic token, not a literal hex value`)\n\n      const arbMatches = line.match(ARBITRARY_RE) || []\n      for (const m of arbMatches) {\n        const isAllowed = ALLOWED_ARBITRARY.some((re) => re.test(line))\n        if (!isAllowed) found.push(`${lineNo}: arbitrary-value — \"${m}\" is not on the allow-list; use a scale token or add \"ui-guard-allow: \u003Creason>\" on this line`)\n      }\n\n      for (const banned of BANNED_UTILS) {\n        if (line.includes(`\"${banned}`) || line.includes(`'${banned}`) || line.includes(` ${banned}`) || line.includes(`\\`${banned}`)) {\n          found.push(`${lineNo}: banned-utility — \"${banned}\" is disallowed (use min-h-dvh\u002Fh-dvh, gap-*, or the explicit transition properties)`)\n        }\n      }\n      if (Z_ARBITRARY_RE.test(line)) found.push(`${lineNo}: arbitrary-z-index — use the fixed z-10\u002F20\u002F30\u002F40\u002F50 scale, not an arbitrary z-[…]`)\n      if (\u002Fstyle=\\{\\{\u002F.test(line)) found.push(`${lineNo}: static-inline-style — use Tailwind classes; style={{}} is reserved for runtime-computed values (add ui-guard-allow: \u003Creason> if genuinely dynamic)`)\n    }\n  })\n\n  return found\n}\n\nfunction main() {\n  const files = listFiles(SRC)\n  let violations = 0\n\n  for (const file of files) {\n    const content = readFileSync(file, 'utf8')\n    const lines = content.split('\\n')\n    const found = findings(file, lines)\n    for (const f of found) {\n      violations++\n      console.log(`${relative(ROOT, file)}:${f}`)\n    }\n  }\n\n  if (violations > 0) {\n    console.log(`\\nui-guard: ${violations} violation(s)${WARN ? ' (--warn: not failing)' : ''}`)\n    process.exit(WARN ? 0 : 1)\n  }\n\n  console.log('ui-guard: clean')\n  process.exit(0)\n}\n\nmain()\n```\nOn an EXISTING repo, run it with `--warn` only (report mode, always exits 0) unless a human explicitly asks for enforcement — never flip a legacy repo's build red. ESLint-based repos may add `eslint-plugin-boundaries` on top; this script stays the stack-agnostic default (Vite 8 templates ship oxlint, not ESLint).\n\n**(i) Tests for atoms.** Co-located RTL test per `component-testing` (e.g. `Button.test.tsx` next to `Button.tsx`) — behavior-focused, `byRole`, `user-event`.\n\n**(j) Only then page sections** — compose, don't invent; see `component-composition`.\n\n## Worked Example\n\n```\n❌ Start writing a hero section straight away: inline `#1a1a2e` background,\n   a hand-rolled `\u003Cdiv onClick>` button, `w-[600px]` card, no INVENTORY.md.\n\n✅ 1. tsconfig\u002Fvite alias → 2. npm i clsx tailwind-merge class-variance-authority lucide-react\n   → 3. tokens in index.css → 4. lib\u002Futils.ts → 5. folders + INVENTORY.md\n   → 6. Button, Container, Heading, Text atoms + tests → 7. ui-guard wired,\n   `npm run build` green → 8. MarketingLayout template → 9. first page section,\n   built entirely from atoms already in INVENTORY.md.\n```\n\n## Common Mistakes\n\n- Writing a page section before any tokens exist — every color becomes a one-off hex.\n- Running `npx shadcn init` on this stack without checking where it actually wrote files (it writes to `.\u002F@\u002F...`, not `.\u002Fsrc\u002F...`, verified).\n- `baseUrl` in `tsconfig.app.json` — deprecated under TS 6; `paths` alone is enough with `moduleResolution: \"bundler\"`.\n- `__dirname` in `vite.config.ts` — use `import.meta.dirname`.\n- Skipping `INVENTORY.md` — the next task re-invents a Button.\n- Wiring `lint:ui` but forgetting `prebuild`, so `npm run build` never actually runs ui-guard.\n\n## Red Flags\n\n- A component file with a raw hex color or `bg-blue-500` anywhere in the diff.\n- `src\u002Fcomponents\u002F` with no `INVENTORY.md`.\n- `npm run build` green but `dist\u002F*.css` has no `--color-primary`\u002F`.bg-primary` — tokens aren't wired into Tailwind.\n- A primitive hand-rolled in a page file instead of `components\u002Fui\u002F`.\n",{"name":5,"source":24,"category":25,"description":7},"anthropics\u002Fskills frontend-design (Apache-2.0), adapted","frontend","main","910394a0b6db9fc8c9a8f36328ec421d3ebd8b38","catalog\u002Fagents\u002Ffrontend-developer\u002Fskills\u002Fweb-design-system-foundation",18,"https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper","https:\u002F\u002Ftasktrooper.ai","https:\u002F\u002Fgithub.com\u002Fmakifbaysal","Senior Software Developer","2026-11-15 04:50:29",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add makifbaysal\u002Ftasktrooper --skill web-design-system-foundation",{"tool":41,"command":42},"bunx","bunx skills add makifbaysal\u002Ftasktrooper --skill web-design-system-foundation",{"tool":44,"command":45},"pnpm","pnpm dlx skills add makifbaysal\u002Ftasktrooper --skill web-design-system-foundation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Ffrontend-developer\u002Fskills\u002Fweb-design-system-foundation\u002FSKILL.md",true,[],[50,56,63,70,77,84],{"skillNo":51,"name":52,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7CSVEPQW6J6TD6CS2T5FPNZ","visual-craft","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fvisual-craft\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7CSVAQG91ETHQ0HBNZDG5FR","ux-copy","Use when you write any words a user reads in a mockup or a hand-off - content language and voice, buttons, labels, errors, empty states, confirmations, numbers and dates, and the longest-string check","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fux-copy\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7CSV6H0J38659NDXHJQ8396","screen-mockup-html","Use when you draw screens as the design task's HTML mockup - ONE canvas document holding every screen and every variant side by side, the sanitizer-safe recipe, phone and wide frames, the states grid, static control states, and the loopback self-check with screenshots at 375, 768 and 1440 attached to the task","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fscreen-mockup-html\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7CSV3JFRF3BM3XK52M7YEYR","performance-awareness","How the performance score moves for your role. Use when the score context shows a declining trend, or before handing off work you have not self-checked against every criterion.","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fperformance-awareness\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7CSTZDH00YRF5SCT7BRT9QD","design-variants","Use when a screen design needs variants - how many, variants as side-by-side rows on the one canvas, what makes two variants genuinely different, recommending one, how the human's choice is read, and narrowing to the chosen one in revision","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fdesign-variants\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7CSTV6P3SM3PAE28DB0RF77","design-system-authoring","Use when you derive, change or extend a design system - where tokens live per stack, the DTCG token tree, role-based names for both themes, base vs layer vs drift, the DESIGN.md section order, the inventory format, the contrast check and the lint every proposal returns","https:\u002F\u002Fgithub.com\u002Fmakifbaysal\u002Ftasktrooper\u002Fblob\u002Fmain\u002Fcatalog\u002Fagents\u002Fui-designer\u002Fskills\u002Fdesign-system-authoring\u002FSKILL.md",[],[]]