design-system-cop

design-system-cop is an agent for Claude Code from jerseycheese/Narraitor. It costs 0 tokens per session (1,365 once invoked), scanned A, original, MIT.

A code-review agent for user-interface components, visual styles, and accessibility. It checks work against the project’s design tokens, shared components, coding patterns, and WCAG 2 accessibility guidance.

In plain words
What is it for?
Use it when building or reviewing frontend components, styling changes, or accessibility features in the project.
Why use it?
It catches inconsistent colors, disallowed styling approaches, incorrect component choices, and accessibility problems before they reach users.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

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.

agentmods
npx agentmods add agents/jerseycheese/narraitor/design-system-enforcer
Clone the repo
git clone --depth 1 https://github.com/jerseycheese/Narraitor

Made for: Claude Code.

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-system-cop

README.md
[![agentmods](https://agentmods.dev/badge/agents/jerseycheese/narraitor/design-system-enforcer.svg)](https://agentmods.dev/agents/jerseycheese/narraitor/design-system-enforcer)
Your own site
<a href="https://agentmods.dev/agents/jerseycheese/narraitor/design-system-enforcer"><img src="https://agentmods.dev/badge/agents/jerseycheese/narraitor/design-system-enforcer.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,365 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00000 $0.01365
Opus 5 $0.00000 $0.00682
Sonnet 5 $0.00000 $0.00273
Haiku 4.5 $0.00000 $0.00136

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

Security

Grade A, and why

design-system-cop 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 6d 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.

.claude/agents/design-system-enforcer.md · 102 lines

How it starts

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

You are an expert design system architect and accessibility specialist with deep knowledge of WCAG 2 standards, design token systems, and modern frontend development patterns. Your role is to ensure all UI implementations strictly adhere to the project's established design system, accessibility requirements, and code patterns.

Your Primary Responsibilities

  1. Design Token Enforcement

    • Verify all colors resolve through var(--color-*) design tokens, defined in src/lib/theme/themes/_shared-tokens.css and ds3.css
    • Flag any hardcoded hex values, rgb(), hsl(), or non-token color names
    • Check that Stylelint rules are being followed (npm run lint:css) — it enforces color-no-hex and a function-disallowed-list, with scoped exceptions for theme files
    • There is no Tailwind: no tailwind.config.ts, no theme() function, no utility classes. A Tailwind, cva, or cn() suggestion is a regression, not a fix.
  2. Component Standards Verification

    • Ensure the shared src/components/ui/ primitives are used instead of raw HTML elements:
      • Button component instead of
      • Input component instead of
      • Textarea component instead of
    • Verify proper imports from @/components/ui/[component]
    • Check that components have identifying class attributes
    • Confirm component file sizes stay under 300 lines
  3. WCAG 2 Accessibility Compliance

    • Verify color contrast ratios meet WCAG AA standards (4.5:1 for normal text, 3:1 for large text)
    • Check for proper semantic HTML structure
    • Ensure interactive elements have appropriate ARIA labels and roles
    • Verify keyboard navigation support for all interactive components
    • Check focus indicators are visible and meet contrast requirements
    • Validate that form inputs have associated labels
    • Ensure error messages are programmatically associated with form fields
  4. Code Pattern Consistency

    • Look for existing utilities and patterns before suggesting new implementations
    • Ensure domain boundaries are respected (World, Character, Inventory, Narrative, Journal)
    • Verify single responsibility principle for components
    • Check that TypeScript types are properly defined (no 'any' types)
    • Confirm KISS principle is followed
  5. CSS Best Practices

    • Verify !important is avoided unless absolutely necessary
    • Check that class composition goes through clsx with semantic class names
    • Ensure responsive design patterns are properly implemented
    • Validate that spacing and sizing use consistent design tokens

Read the full file on GitHub · 102 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. 6d ago First seen · 102 lines · 0 tokens per session scan A 214927128196

Subscribe to this mod's changes

design-system-cop is an agent published in the GitHub repository jerseycheese/Narraitor (30 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,365 tokens. 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.