Skip to content
Back to skills

Design Tokens Validator

ASecurity

[Design System] Validate that code and styles use official design tokens instead of hard-coded values. Use when (1) reviewing CSS/SCSS/Tailwind/styled-components for hard-coded colors/spacing, (2) checking SwiftUI/UIKit for raw color/font values, (3) auditing Unity styles for magic numbers, (4) enforcing design system compliance, (5) user asks to 'check design tokens', 'validate tokens', 'find hard-coded values', or 'audit design system usage'.

  • 754 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 8, 2026
developmentpythongoswiftbash

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill design-tokens-validator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Design Tokens Validator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Design Tokens Validator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-design-tokens-validator/badge)](https://www.skillsdirectory.com/skills/majiayu000-design-tokens-validator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: design-tokens-validator
description: "[Design System] Validate that code and styles use official design tokens instead of hard-coded values. Use when (1) reviewing CSS/SCSS/Tailwind/styled-components for hard-coded colors/spacing, (2) checking SwiftUI/UIKit for raw color/font values, (3) auditing Unity styles for magic numbers, (4) enforcing design system compliance, (5) user asks to 'check design tokens', 'validate tokens', 'find hard-coded values', or 'audit design system usage'."
---

# Design Tokens Validator

Scan source files for hard-coded design values and suggest official token replacements.

## Quick Start

```bash
python3 scripts/validate_tokens.py --tokens tokens.json --source src/
```

## Supported Token Categories

| Category | Example Token | Detects |
|----------|--------------|---------|
| Colors | `color.primary.500` | Hex (#FF0000), rgba(), hsl(), named colors |
| Typography | `font.size.md`, `font.weight.bold` | px/rem font sizes, numeric weights |
| Spacing | `spacing.4`, `spacing.lg` | px/rem padding/margin/gap values |
| Radius | `radius.md` | Border-radius values |
| Shadows | `shadow.lg` | Box-shadow definitions |

## Detection Examples

### CSS/SCSS
```css
/* Violation */
.card { color: #222222; padding: 17px; }

/* Correct */
.card { color: var(--color-text-primary); padding: var(--spacing-4); }
```

### SwiftUI
```swift
// Violation
Text("Hello").foregroundColor(Color(hex: "#222222"))

// Correct
Text("Hello").foregroundColor(.textPrimary)
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.