From addit-harness
Scan the current TS/React project's existing UI layer and write .claude/design-conventions.md — a project-specific visual design convention file that rules/typescript.md loads before UI work. Use when starting UI work in an existing project, when design conventions have drifted, or when --refresh is passed to merge in new patterns.
How this skill is triggered — by the user, by Claude, or both
Slash command
/addit-harness:design-conventions [--refresh][--refresh]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Scans the current TypeScript/React project's UI layer and produces
Scans the current TypeScript/React project's UI layer and produces
.claude/design-conventions.md — a lightweight, project-specific visual design
convention reference. rules/typescript.md instructs loading this file first for
any UI work, so the design language loads cheaply without re-scanning each session.
This skill derives from what exists. If the project has no existing UI at all
(no Tailwind config, no token files, no components, no screens), stop and tell the
user to ask @frontend-architect first — creating a design language from a blank
slate is design work, not derivation. If only config exists (Tailwind config, a
chosen component lib, token file stubs) with no implemented screens, seed a minimal
stub from that and flag the rest for the architect.
--refresh — when the design system has evolved or a new visual pattern has
been established. Merges new patterns into the existing file; preserves hand-edits.Verify you're in a TS/React project: check for package.json, a tsconfig.json,
and the presence of .ts/.tsx files. If absent, stop and say so.
Check whether .claude/design-conventions.md already exists. If it does and
--refresh was not passed, report what's there and ask the user to pass --refresh
to merge new patterns.
Read these artifacts in priority order:
a. Design token / config foundation
tailwind.config.{ts,js} — custom color palette, spacing scale, type scale,
breakpoints, font families, border-radius tokens, shadow scaletokens/ or design-tokens/ directory — primitive and semantic token definitionsvariables.css, globals.css, :root blocks)theme.{ts,js} or theme/ — if using a component lib (MUI, Chakra, Mantine)b. Component library / primitives
package.json — identify which component library is installed (Radix, Mantine,
MUI, Chakra, shadcn/ui, etc.) and the styling solution (Tailwind, CSS Modules,
styled-components, vanilla-extract)components/ui/ or src/ui/ or lib/components/ — base primitive components
(Button, Input, Card, Badge, etc.); read 3-4 to understand the token usage patternc. Representative screens / pages
d. State presentation patterns
From what you read, identify the established patterns for each section below.
Only document what you actually observed — don't invent from general knowledge.
If a section has no established pattern, omit it (leave a brief # TODO: note).
Sections to cover:
text-sm/base/lg/xl, font-medium/semibold)prefers-reduced-motion handlingWrite to .claude/design-conventions.md in the repo root (create .claude/ if
needed).
With --refresh: read the existing file first, merge new patterns in, keep
existing content that is still valid. Never overwrite hand-edits — look for
# NOTE: or # OVERRIDE: markers and preserve them.
File header:
# Design conventions — {project-name}
Derived from codebase scan on {date}. Maintained by `/design-conventions --refresh`.
> **Stack:** {styling solution} · {component library} · {key UI deps}
Then one section per category found. Each section:
// see tailwind.config.ts)Keep each section tight — 5-15 lines max. This file is loaded before every UI session; brevity matters more than completeness.
Tell the user:
@.claude/design-conventions.md to the project's CLAUDE.md for
automatic inclusion (optional; rules/typescript.md reads it on demand without this)Do not commit the file unless the user asks.
@frontend-architect for a greenfield project is a valid
starting point — run /design-conventions --refresh after the first screens are
built to extend it with observed patterns.npx claudepluginhub addit-digital/addit-harness --plugin addit-harnessCreates, edits, and verifies skills using a test-driven development approach with pressure scenarios and subagents.