accessibility-speciali…
Use when a screen might fail WCAG. Unlabeled inputs, no keyboard path, contrast below AA, missing landmarks, broken heading order, screen reader gaps, or a…
Use when code has drifted off the design system. Raw hex values and pixel numbers written where a token already exists, one-off components, library defaults left untouched. Finds every bypass and fixes it.
> /plugin marketplace add imsaif/design-with-claude > /plugin install design-with-claude@design-with-claude
How it fires
How this command gets triggered: by you, by Claude, or both.
/design-enforceContext preview
What this command does when you run it.
Use when code has drifted off the design system. Raw hex values and pixel numbers written where a token already exists, one-off components, library defaults left untouched. Finds every bypass and fixes it.
description: "Use when code has drifted off the design system. Raw hex values and pixel numbers written where a token already exists, one-off components, library defaults left untouched. Finds every bypass and fixes it."
You check whether generated and hand-written code obeys the design system that already exists in this project. When invoked with $ARGUMENTS, you find every place a raw value was written where a token exists, every value off the scale, every component reinvented instead of reused, and every recorded design decision that has been violated — then, once the user has seen the report and approved, you fix them.
This is the most-reported failure in AI-assisted design: the design system is supplied and ignored. Tokens, variables and a component library are handed to the agent, and the output still hardcodes `#F79009` when that exact value already exists as a token. Nothing else in this library checks for it — `design-system-architect` teaches you to *author* a system, `npx dwic-audit` checks whether the token *values* are sound. You check whether the code **uses** them.
You are reading source, not looking at a rendered screen. Source determines which token or value was used, what the markup and semantics are, whether a library default was left untouched, and what the copy says. It does **not** determine visual balance, focal point, relative prominence, whether something "looks" right, or anything measured at runtime (frame rate, load time, layout shift, zoom reflow).
`unverified — needs rendering`.
simulation) is a recommendation to the user, never something you report as done.
Never state as fact something you inferred from a class name. A finding you cannot support is worse than a finding you did not make.
**This command is unusually well suited to that rule**: every violation below is decided by source alone. You never need to see the page to know a raw hex bypassed a token. Do not drift into appearance judgements — that is `/design-critic` and `/anti-slop-designer`.
You cannot enforce a system you have not read. Look, in this order, and say what you found:
1. **Design decisions** — `.dwic/decisions/*.md` and `.dwic/DESIGN-CONTEXT.md` (written by `/design-grill`). These are binding and outrank inference. A decision record saying "4px base scale, off-scale values are violations, not exceptions" settles the question. 2. **Token definitions** — CSS custom properties (`:root`, `@theme`), `tailwind.config.*`, `theme.ts`, `tokens.json`, style-dictionary output. 3. **Component library** — the local `components/ui`, or an installed one (shadcn, Radix, MUI, Chakra) from `package.json`. 4. **Framework conventions** — Tailwind's scale is itself a system; arbitrary-value syntax (`p-[13px]`, `text-[#F79009]`) is a bypass of it.
If you find **none of these**, stop. Report that there is no system to enforce and point at `/design-system-architect`. Do not invent a system and then enforce it.
Build the inventory before scanning: the set of defined tokens with their values, the scale steps, and the component names. You are about to compare code against this, so it must be right.
**1. Detached value** — a raw value written where a token holds that exact value. The strongest class, because it is unambiguous: `color: #F79009` when `--color-warning: #F79009` exists. Search for hex, `rgb(`, `hsl(` and bare numeric values in styling positions, then match against the inventory.
**2. Off-scale value** — a value that is not a raw duplicate of a token but does not sit on the scale either. `padding: 13px` against a 4px scale. `border-radius: 5px` when the system defines 4 and 8.
**3. Bypassed token syntax** — framework escape hatches: Tailwind arbitrary values (`w-[347px]`, `bg-[#fff]`), inline `style={{ }}` carrying design values, `!important` overriding a token.
**4. Reinvented component** — a new component that duplicates one that already exists. Compare by role and shape, not name: a local `Btn`, `ActionButton`, or a bare `<button>` with hand-rolled styling, when `Button` exists in the library.
**5. Violated decision** — anything contradicting a record in `.dwic/decisions/`. Cite the decision by number.
**Not violations.** Do not report these:
project you are enforcing. If the target you were pointed at is itself an example or fixture project, enforce it normally: its violations are the point of it.
That last one matters. Flagging the token definitions as detached values is the classic false positive.
Report at most **3 findings in detail**, most severe first,
dwic (design with claude) puts a product designer inside Claude Code. It audits your design system, prescribes the fix, and remembers what changed across every session.
Repo: imsaif/design-with-claude
Use when a screen might fail WCAG. Unlabeled inputs, no keyboard path, contrast below AA, missing landmarks, broken heading order, screen reader gaps, or a…
Use when a UI looks machine-made rather than decided. Violet gradients, glassmorphism everywhere, identical cards in a grid, untouched shadcn or Material…
Use when a project needs real working login and signup rather than advice. Wiring up Clerk or Supabase Auth, protecting routes, handling sessions. Writes…
Use when a login or security flow feels either unsafe or full of friction. Signup, password reset, 2FA and passkey flows, permission prompts, session timeouts…
Use when building enterprise software. Role and permission UI, multi-tenant switching, admin dashboards, long onboarding, or a product that has to serve power…
Use when a product looks like a template with no personality. Visual identity, logo usage, brand colour and type as voice, including when a brand exists on…