design-system

design-system is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 122 tokens per session (1,686 once invoked), scanned A, original, Apache-2.0.

A method for organizing a frontend’s colors, spacing, components, and interaction states into reusable rules.

In plain words
What is it for?
Use it to define design tokens, component variants, loading and error states, focus behavior, dark mode, and accessibility details.
Why use it?
It prevents each screen or component from developing its own styling and helps the interface stay consistent as it grows.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to define design tokens, component variants, loading and error states, focus behavior, dark mode, and accessibility details.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tmj-90/gaffer/design-system
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.

Any agent
npx skills add tmj-90/gaffer --skill design-system
Clone the repo
git clone --depth 1 https://github.com/tmj-90/gaffer

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmj-90/gaffer/design-system/github.svg)](https://agentmods.dev/skills/tmj-90/gaffer/design-system)
Your own site
<a href="https://agentmods.dev/skills/tmj-90/gaffer/design-system"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/design-system/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-system

Your own site · 80×15
<a href="https://agentmods.dev/skills/tmj-90/gaffer/design-system"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/design-system.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,686 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.00122 $0.01686
Opus 5.5 $0.00049 $0.00674
Sonnet 5.5 $0.00024 $0.00337
Haiku 4.5 $0.00012 $0.00169

Measured 20d ago against content hash d2655377fd3c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

runner/skills/design-system/SKILL.md · 108 lines

How it starts

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

Build a systematic design system

The brand skill decides the identity; the frontend-design skill decides how a surface looks. This pack decides how that look is structured so it scales: a three-layer token architecture with one source of truth, component specs that cover every state, and checks that stop raw values leaking back in. Load a reference when you need depth:

Topic Reference
Layers, naming, dark mode, DTCG JSON, migration from flat tokens references/token-architecture.md
Variants, sizes and state matrices for button/input/card/badge/alert/dialog/table references/component-specs.md
State priority, focus rings, error/loading patterns, ARIA per state references/states-and-variants.md

The architecture in one breath

/* PRIMITIVE — raw values, no meaning. Change rarely. */
--blue-600: oklch(55% 0.2 264);
/* SEMANTIC — purpose. The theme seam: light/dark/brand override only this layer. */
--color-primary: var(--blue-600);
/* COMPONENT — per-component knobs, referencing semantic tokens. */
--button-bg: var(--color-primary);

Components consume component or semantic tokens — never a primitive, never a literal. Themes (dark, high contrast, a second brand) re-point semantic tokens and nothing else.

Source of truth. If the repo keeps tokens as W3C Design Tokens Community Group (DTCG) JSON — the format reached its first stable version, 2025.10, in October 2025 — those files are the source: tokens carry $value and $type, aliases are written {color.blue.600}, and a build tool (Style Dictionary or the repo's equivalent) generates CSS variables, Tailwind theme and native values. Edit the JSON and regenerate; never hand-edit generated output. If the repo has only CSS custom properties, those are the source. Do not introduce a second source.

Steps

  1. Read what exists. search_lore for design-system ADRs; find token files (*.tokens.json, tokens/, theme.ts, :root blocks, Tailwind config), the build command that generates outputs, and two sibling components. Extend the existing system in its idiom; never add a competing one.
  2. Audit before adding. Count literals in component styles (commands below). Every leak you touch is either replaced by an existing token or justifies a new one.
  3. Place each new token in its layer. Primitive only for a genuinely new raw value; semantic for a new purpose (--color-surface-raised, --space-section); component only when one component must diverge. Names describe purpose, not appearance (--color-danger, not --color-red). Colour primitives in oklch (house idiom), type in a clamp() fluid scale, spacing on one base unit (4px or 8px).
  4. Theme at the semantic seam. Dark mode and other themes override semantic tokens in one block ([data-theme="dark"], .dark or @media (prefers-color-scheme: dark), per the repo) and set color-scheme so native controls and scrollbars follow. A theme that overrides a primitive or a component token means the seam is in the wrong place.
  5. Verify contrast per theme. For every foreground/background semantic pair actually used (text on surface, text on primary, border on surface, focus ring on surface), compute the WCAG contrast ratio in each theme: 4.5:1 for body text, 3:1 for large text, UI boundaries and focus indicators. oklch lightness is not the WCAG ratio — compute it (a script, the repo's checker, or a test). Record the table.
  6. Specify components fully. Variants, sizes (explicit height, padding, font token), and the state matrix — default, hover, focus-visible, active, disabled, loading, error, plus selected/checked where relevant — with the ARIA each state exposes. Priority when several apply: disabled > loading > error > active > focus > hover > default. Focus is always visible (:focus-visible ring from --color-ring, never outline: none alone). Details: the references.
  7. Recommending a system for a new product: reason from the product, not a kit — (a) pattern and density (marketing, data-dense dashboard, transactional flow), (b) direction (defer to brand), (c) palette posture (semantic roles incl. success/ warning/danger/info; dark mode only if users need it), (d) accessibility and performance targets stated up front. Output a short rationale plus the token and component scaffold; hand visual execution to frontend-design.
  8. Verify and evidence. Regenerate token outputs if the repo builds them and confirm the diff is only what you intended; run lint, type-check and tests; run the leak checks; render the changed components in every theme through the repo's component or screenshot tests where they exist. Record per-AC evidence with the record-evidence skill (leak count before/after, contrast table), then stop.

Read the full file on GitHub · 108 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 20d ago Changed · -24 lines · +16 tokens per session d2655377fd3c
  2. 1mo ago First seen · 132 lines · 106 tokens per session scan A 4e1131425f79

Subscribe to this mod's changes

design-system is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 20d ago), licensed Apache-2.0. It adds 122 tokens to every session and 1,686 once invoked, about $0.0005 per session on Opus 5.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-31.

Related

Other skills, from other repositories

maintaining-dev-playground

Keeps the Dev Playground current with the application. Use when editing UI components in apps/client/src/ — assesses playground candidacy, checks existing playground coverage, and guides adding or updating showcases. Also use when directly editing files in apps/client/src/dev/, building new widgets or features, or…

dork-labs/dorkos · 95 tokens

sota-frontend-design

State-of-the-art web design, UI/UX, and motion engineering standards (2026). Use when building OR auditing/reviewing user interfaces: components, pages, design systems, stylesheets, themes, forms, navigation, animations, or accessibility. Covers typography, color (OKLCH, dark mode), spacing/layout (grid, container…

martinholovsky/SOTA-skills · 164 tokens

design-system

Token architecture, component specifications, and slide generation. Three-layer tokens (primitive→semantic→component), CSS variables, spacing/typography scales, component specs, strategic slide creation. Use for design tokens, systematic design, brand-compliant presentations.

nicohodt/claude-code-ui-ux-skill · 52 tokens

ui-styling

Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs. Use when building user interfaces, implementing design systems, creating responsive layouts, adding accessible components (dialogs, dropdowns…

nicohodt/claude-code-ui-ux-skill · 90 tokens

css-expert

CSS expert for flexbox, grid, animations, responsive design, and modern layout techniques.

ginkida/rustyhand · 21 tokens

frontend-aesthetics

Use when creating UI designs to avoid generic "AI slop" aesthetics. Enforces distinctive typography, cohesive color systems, purposeful motion, and atmospheric backgrounds. Critical for landing pages, dashboards, and branded interfaces.

nek1987/auto-agent-harness · 47 tokens