design-tokens

design-tokens is a skill for Claude Code from marcusgoll/Spec-Flow. It costs 0 tokens per session (12,576 once invoked), scanned A, original, MIT.

Guidance for creating and maintaining design tokens, which are named values for shared colors, spacing, typography, and other visual settings.

In plain words
What is it for?
Use it to scan existing projects or generate a new palette, store tokens in JSON and CSS, support multiple output types, and enforce WCAG 2.1 contrast requirements.
Why use it?
It helps keep the appearance consistent across interfaces, emails, PDFs, command-line tools, charts, and documentation while checking color contrast.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is @import '../design/systems/tokens.css';.

Good fit Use it to scan existing projects or generate a new palette, store tokens in JSON and CSS, support multiple output types, and enforce WCAG 2.1 contrast requirements.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/marcusgoll/Spec-Flow
agentmods
npx agentmods add skills/marcusgoll/spec-flow/design-tokens

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-tokens

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/marcusgoll/spec-flow/design-tokens"><img src="https://agentmods.dev/badge/skills/marcusgoll/spec-flow/design-tokens.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 12,576 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.00000 $0.12576
Opus 5 $0.00000 $0.06288
Sonnet 5 $0.00000 $0.02515
Haiku 4.5 $0.00000 $0.01258

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

Security

Grade A, and why

design-tokens 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 10d 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/skills/design-tokens/SKILL.md · 1,262 lines

How it starts

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

Design Tokens - Comprehensive Reference

Version: 2.0.0 Purpose: Generate and maintain design system tokens across all project surfaces (UI, emails, PDFs, CLI, charts, docs)


Overview

This skill provides comprehensive guidance for initializing and maintaining design tokens in design/systems/tokens.json and tokens.css. Supports both brownfield (scan existing code) and greenfield (generate new palette) modes.

Coverage:

  • UI components (React/Vue/Svelte)
  • MJML/HTML emails
  • PDF styling (WeasyPrint, Puppeteer)
  • CLI colors (chalk/colorette)
  • Data visualization (d3, Chart.js, Recharts)
  • Documentation assets (MD/MDX)

What Changed in v2

Non-UI surface coverage:

  • MJML/HTML emails (inline CSS)
  • PDF styling (WeasyPrint, Puppeteer CSS)
  • CLI colors (chalk/colorette)
  • Data visualization palettes (d3, Chart.js, Recharts)
  • Documentation assets (MD/MDX)

Brownfield scan improvements:

  • Source-agnostic: JSX/TSX, CSS/SCSS, CSS-in-JS, MD/MDX, MJML, Python/JS PDF styles
  • Scans 10+ file types
  • Detects arbitrary Tailwind values (bg-[#xxx])

Contrast enforcement:

  • Auto-nudges OKLCH lightness until WCAG 2.1 passes (≥4.5:1)
  • Uses colorjs.io for perceptually accurate contrast calculation

Tailwind v4 alignment:

  • Theme variables as CSS variables (not hardcoded palette)
  • Validates tokens.css import in globals.css

Color-blind-safe palettes:

  • Okabe-Ito categorical palette for charts
  • 8 colors scientifically validated for color-blind users

Mental Model

Flow: detect mode → scan/generate → consolidate → validate wiring → contrast fixups → emit artifacts → report debt

Brownfield: Scan existing code for patterns across UI, emails, PDFs, CLI, charts, docs. Consolidate duplicates and propose migrations.

Greenfield: Ask minimal questions, generate OKLCH palette with contrast validation.


Prerequisites

Dependencies:

{
  "devDependencies": {
    "colorjs.io": "^0.5.0",
    "picocolors": "^1.0.0",
    "fs-extra": "^11.2.0"
  }
}

Read the full file on GitHub · 1,262 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. 10d ago First seen · 1,262 lines · 0 tokens per session scan A 9997d5dff030

Subscribe to this mod's changes

design-tokens is a skill published in the GitHub repository marcusgoll/Spec-Flow (92 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 12,576 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.

Related

Other skills, from other repositories

HTMLHero.skill

A workflow for building a working, previewable first-page hero section—a prominent opening area of a website—from a prompt, brand direction, and visual requirements. It can work with HTML or React projects and treats the hero as the visual template for later pages.

YiShu5/claude-skills · 107 tokens

HTMLPPT.skill

A workflow for turning a designed HTML page or existing web project into a multi-page presentation that runs in a browser. It keeps later slides consistent with the first page's visual style.

YiShu5/claude-skills · 114 tokens

skill-premium-web-experience

Use for creating, redesigning, or transforming websites into premium, cinematic, conversion-focused web experiences with visual research, storytelling, scroll-driven interaction, responsive design, motion, performance, accessibility, and visual QA.

IAPro-Community/Orquestrador-Maestro · 49 tokens

skill-frontend-ux-guardrails

Use as a frontend UX quality gate for responsive behavior, overflow, accessibility, interaction usability, touch targets, typography, layout stability, mobile behavior, focus states, reduced motion, and final visual validation.

IAPro-Community/Orquestrador-Maestro · 49 tokens

skill-modern-ui-patterns

Use for professional frontend UI implementation with modern component composition, interaction states, forms, tables, cards, navigation, dashboards, SaaS surfaces, and maintainable design-system consistency.

IAPro-Community/Orquestrador-Maestro · 41 tokens

skill-impeccable

Orquestra melhorias de frontend inspiradas no Impeccable a partir de pedidos conversacionais de design, UX, acessibilidade, responsividade, tipografia, layout, cor, motion, clareza, hardening e polish.

IAPro-Community/Orquestrador-Maestro · 53 tokens