design-enforce

design-enforce is a command for Claude Code from imsaif/design-with-claude. It costs 40 tokens per session (2,093 once invoked), scanned A, original, MIT.

A checker for whether code follows an existing design system: a shared set of visual rules, reusable components, and recorded design decisions.

In plain words
What is it for?
Use it to inspect generated or hand-written interface code for unused design tokens, inconsistent values, duplicated components, and violated design decisions.
Why use it?
It finds hardcoded values, off-scale values, one-off components, unchanged library defaults, and other code that bypasses the system. It reports these issues and can fix them after approval.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Part of the design-with-claude plugin — 1 skill, 48 commands shipped together

Good fit Use it to inspect generated or hand-written interface code for unused design tokens, inconsistent values, duplicated components, and violated design decisions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/imsaif/design-with-claude/design-enforce
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/imsaif/design-with-claude

Made for: Claude Code.

Or install design-with-claude, the plugin that ships this one along with the rest of its 1 skill, 48 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for design-enforce

README.md
[![agentmods](https://agentmods.dev/badge/commands/imsaif/design-with-claude/design-enforce/github.svg)](https://agentmods.dev/commands/imsaif/design-with-claude/design-enforce)
Your own site
<a href="https://agentmods.dev/commands/imsaif/design-with-claude/design-enforce"><img src="https://agentmods.dev/badge/commands/imsaif/design-with-claude/design-enforce/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for design-enforce

Your own site · 80×15
<a href="https://agentmods.dev/commands/imsaif/design-with-claude/design-enforce"><img src="https://agentmods.dev/badge/commands/imsaif/design-with-claude/design-enforce.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,093 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00040 $0.02093
Opus 5 $0.00020 $0.01046
Sonnet 5 $0.00008 $0.00419
Haiku 4.5 $0.00004 $0.00209

Measured 9d ago against content hash 330f50dd01ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

design-enforce scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/design-enforce.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

The evidence rule

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).

  • Judge from source only what source determines.
  • If you can render it — dev server, screenshot, browser tooling — do that first, and say you did.
  • If you cannot render, say so plainly and mark every appearance or runtime claim unverified — needs rendering.
  • Human or assistive-technology testing (screen readers, real users, colour-blindness 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.

Read the full file on GitHub · 146 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 146 lines · 40 tokens per session scan A 330f50dd01ac

Subscribe to this mod's changes

design-enforce is a command published in the GitHub repository imsaif/design-with-claude (11 stars, last pushed 18d ago), licensed MIT. It adds 40 tokens to every session and 2,093 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.