/schema-validator
Validate token files against DTCG 2025.10, Style Dictionary, or custom schemas. Trigger when someone says: validate token JSON, check my token files for errors, schema validation for tokens, are my token files valid, DTCG compliance check, validate token format, or anything
$ npx -y skills add murphytrueman/design-system-ops --skill schema-validator --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/schema-validator
Context preview
The summary Claude sees to decide when to auto-load this skill.
Validate token files against DTCG 2025.10, Style Dictionary, or custom schemas. Trigger when someone says: validate token JSON, check my token files for errors, schema validation for tokens, are my token files valid, DTCG compliance check, validate token format, or anything
SKILL.md
schema-validator.SKILL.mdname: schema-validator
description: "Validate token files against DTCG 2025.10, Style Dictionary, or custom schemas. Trigger when someone says: validate token JSON, check my token files for errors, schema validation for tokens, are my token files valid, DTCG compliance check, validate token format, or anything about checking whether token files are structurally correct before they break builds."
references:
- ../../knowledge-notes/token-architecture.md
- ../../knowledge-notes/output-discipline.md
Schema validator
A skill for validating that design token files conform to their expected format — DTCG 2025.10, Style Dictionary v3/v4, Tokens Studio, or a custom schema. Catches structural issues before they break build pipelines, cause silent failures, or produce incorrect output.
Context
Token files are infrastructure. When a token file is malformed — a missing `$type` declaration, a `$value` that resolves to nothing, an alias that points to a deleted token — the failure mode is rarely loud. The build might still succeed. The wrong value might ship. The design intent might be silently lost.
Schema validation is the first line of defence. It answers a simple question: do these files meet the structural contract they claim to meet? A DTCG file must have `$value` on every token. A Style Dictionary file must have valid reference syntax. A Tokens Studio export must preserve group hierarchy.
This skill is not about naming conventions or architectural quality — those belong in `token-audit`. This skill is about structural integrity: can the file be parsed, transformed, and consumed by downstream tools without error?
Boundaries
This skill validates token file structure only. It does not assess naming quality (use `naming-audit`), token architecture health (use `token-audit`), or token usage in code (use `token-compliance`). If the token source format is not recognisable as DTCG, Style Dictionary, Tokens Studio, or a declared custom schema, ask the user to identify the format before proceeding. If no token files are provided or accessible, there is nothing to validate — stop and confirm the file location with the user.
---
Configuration
Check for `.ds-ops-config.yml` in the project root. If present, load:
- `system.token_format` — pre-selects the primary format to validate against (dtcg, style-dictionary-v3, style-dictionary-v4, tokens-studio, custom)
- `integrations.style_dictionary` — if enabled, use Style Dictionary's built-in validation as a cross-check
- `severity.schema_*` — overrides for finding severity (e.g. `schema_missing_type: critical`)
Auto-pull integrations
**Style Dictionary v4** (`integrations.style_dictionary.enabled: true`):
- Run `npx style-dictionary build --config [path] --dry-run` to get Style Dictionary's own validation errors
- Cross-reference Style Dictionary errors with this skill's findings for completeness
If no config exists, proceed with defaults.
---
Step 1: Identify files and target format
Ask for or confirm:
1. **Path to token files** — directory or specific files to validate 2. **Target format** — which specification to validate against:
- **DTCG 2025.10** (W3C Design Token Community Group specification)
- **Style Dictionary v3** (legacy JSON with `value` property)
- **Style Dictionary v4** (JSON with DTCG alignment, `$value` property)
- **Tokens Studio** (Figma Tokens plugin export format)
- **Custom** — if custom, ask for the schema or describe the expected structure
3. **Strictness level** — strict (every violation is an error) or lenient (warnings for non-critical issues)
If the token files contain format indicators (e.g., `$type` fields suggest DTCG), auto-detect the format and confirm with the user.
Step 2: Parse and inventory
For each file in the provided path:
1. **Attempt to parse** — JSON, YAML, JS module, or CSS custom properties 2. **Record parse status** — parsed successfully, failed with error, or empty file 3. **Count tokens** — total token definitions found 4. **Identify format signals** — which format the file appears to use (based on property names, structure)
Produce the file inventory:
| File | Format detected | Tokens | Parse status | |------|----------------|--------|-------------| | colors.json | DTCG 2025.10 | 47 | ✓ Parsed | | spacing.json | Style Dictionary v3 | 12 | ✓ Parsed | | broken.json | Unknown | 0 | ✗ Parse error: unexpected token at line 23 |
Step 3: Validate against target format
For each successfully parsed file, run format-specific validation:
DTCG 2025.10 checks
1. **$value required** — every leaf token must have a `$value` property 2. **$type present** — every token must declare `$type` (or inherit from a parent group's `$type`) 3. **$type values valid** — must be one of: color, dimension, fontFamily, fontWeight, duration, cubicBezier, number, strokeStyle, border, transition, shadow, gradient, typography, fontStyle 4. **$description optional but typed** — if present, must be a string 5. **Alias syntax correct** — aliases must use `{group.token}` syntax with curly braces 6. **Alias targets exist** — every alias must resolve to a real token (no broken references) 7. **No circular aliases** — alias chain must terminate at a concrete value 8. **Composite token structure** — composite types (border, shadow, typography, transition, gradient) must have correct sub-properties 9. **Color values valid** — hex, RGB, HSL, or named colour that resolves correctly 10. **Dimension values valid** — number + unit (px, rem, em, etc.) 11. **Group $type inheritance** — if a group declares `$type`, all children without their own `$type` inherit it 12. **No `$` prefix on non-spec properties** — custom properties should not start with `$` to avoid confusion with spec properties 13. **Extensions namespace** — custom metadata should live under `$extensions` if present
Style Dictionary v3 checks
1. **`value` required** — every leaf token must have a `value` property
Read more
name: schema-validator description: "Validate token files against DTCG 2025.10, Style Dictionary, or custom schemas. Trigger when someone says: validate token JSON, check my token files for errors, schema validation for tokens, are my token files valid, DTCG compliance check, validate token format, or anything about checking whether token files are structurally correct before they break builds." references: - ../../knowledge-notes/token-architecture.md - ../../knowledge-notes/output-discipline.md
Schema validator
A skill for validating that design token files conform to their expected format — DTCG 2025.10, Style Dictionary v3/v4, Tokens Studio, or a custom schema. Catches structural issues before they break build pipelines, cause silent failures, or produce incorrect output.
Context
Token files are infrastructure. When a token file is malformed — a missing `$type` declaration, a `$value` that resolves to nothing, an alias that points to a deleted token — the failure mode is rarely loud. The build might still succeed. The wrong value might ship. The design intent might be silently lost.
Schema validation is the first line of defence. It answers a simple question: do these files meet the structural contract they claim to meet? A DTCG file must have `$value` on every token. A Style Dictionary file must have valid reference syntax. A Tokens Studio export must preserve group hierarchy.
This skill is not about naming conventions or architectural quality — those belong in `token-audit`. This skill is about structural integrity: can the file be parsed, transformed, and consumed by downstream tools without error?
Boundaries
This skill validates token file structure only. It does not assess naming quality (use `naming-audit`), token architecture health (use `token-audit`), or token usage in code (use `token-compliance`). If the token source format is not recognisable as DTCG, Style Dictionary, Tokens Studio, or a declared custom schema, ask the user to identify the format before proceeding. If no token files are provided or accessible, there is nothing to validate — stop and confirm the file location with the user.
---
Configuration
Check for `.ds-ops-config.yml` in the project root. If present, load:
- `system.token_format` — pre-selects the primary format to validate against (dtcg, style-dictionary-v3, style-dictionary-v4, tokens-studio, custom)
- `integrations.style_dictionary` — if enabled, use Style Dictionary's built-in validation as a cross-check
- `severity.schema_*` — overrides for finding severity (e.g. `schema_missing_type: critical`)
Auto-pull integrations
**Style Dictionary v4** (`integrations.style_dictionary.enabled: true`):
- Run `npx style-dictionary build --config [path] --dry-run` to get Style Dictionary's own validation errors
- Cross-reference Style Dictionary errors with this skill's findings for completeness
If no config exists, proceed with defaults.
---
Step 1: Identify files and target format
Ask for or confirm:
1. **Path to token files** — directory or specific files to validate 2. **Target format** — which specification to validate against:
- **DTCG 2025.10** (W3C Design Token Community Group specification)
- **Style Dictionary v3** (legacy JSON with `value` property)
- **Style Dictionary v4** (JSON with DTCG alignment, `$value` property)
- **Tokens Studio** (Figma Tokens plugin export format)
- **Custom** — if custom, ask for the schema or describe the expected structure
3. **Strictness level** — strict (every violation is an error) or lenient (warnings for non-critical issues)
If the token files contain format indicators (e.g., `$type` fields suggest DTCG), auto-detect the format and confirm with the user.
Step 2: Parse and inventory
For each file in the provided path:
1. **Attempt to parse** — JSON, YAML, JS module, or CSS custom properties 2. **Record parse status** — parsed successfully, failed with error, or empty file 3. **Count tokens** — total token definitions found 4. **Identify format signals** — which format the file appears to use (based on property names, structure)
Produce the file inventory:
| File | Format detected | Tokens | Parse status | |------|----------------|--------|-------------| | colors.json | DTCG 2025.10 | 47 | ✓ Parsed | | spacing.json | Style Dictionary v3 | 12 | ✓ Parsed | | broken.json | Unknown | 0 | ✗ Parse error: unexpected token at line 23 |
Step 3: Validate against target format
For each successfully parsed file, run format-specific validation:
DTCG 2025.10 checks
1. **$value required** — every leaf token must have a `$value` property 2. **$type present** — every token must declare `$type` (or inherit from a parent group's `$type`) 3. **$type values valid** — must be one of: color, dimension, fontFamily, fontWeight, duration, cubicBezier, number, strokeStyle, border, transition, shadow, gradient, typography, fontStyle 4. **$description optional but typed** — if present, must be a string 5. **Alias syntax correct** — aliases must use `{group.token}` syntax with curly braces 6. **Alias targets exist** — every alias must resolve to a real token (no broken references) 7. **No circular aliases** — alias chain must terminate at a concrete value 8. **Composite token structure** — composite types (border, shadow, typography, transition, gradient) must have correct sub-properties 9. **Color values valid** — hex, RGB, HSL, or named colour that resolves correctly 10. **Dimension values valid** — number + unit (px, rem, em, etc.) 11. **Group $type inheritance** — if a group declares `$type`, all children without their own `$type` inherit it 12. **No `$` prefix on non-spec properties** — custom properties should not start with `$` to avoid confusion with spec properties 13. **Extensions namespace** — custom metadata should live under `$extensions` if present
Style Dictionary v3 checks
1. **`value` required** — every leaf token must have a `value` property
Showing the first part of this file.
Claude Code skills for the work that keeps a design system alive.
Repo: murphytrueman/design-system-ops
Other skills on design-system-ops.
- /accessibility-per-component
Run an accessibility audit on a specific design system component. Trigger when someone says: accessibility check, a11y audit, WCAG compliance, is this accessible, check accessibility, does this meet WCAG, screen reader support, keyboard navigation check, or anything about
Open skill - /adoption-report
Produce a design system adoption report separating coverage from actual adoption, with trend direction and risk flags. Trigger when someone says: adoption report, how much is the system being used, usage metrics, adoption status, coverage report, which teams are using the
Open skill - /ai-component-description
Generate AI-optimised text descriptions for components, formatted for Figma's MCP server and LLM consumption. This produces prose descriptions in a six-section format (purpose, props, anti-patterns, composition, accessibility, examples), NOT JSON schemas or structured data
Open skill - /backlog-generator
Transform audit findings into sprint-ready work items with effort estimates, acceptance criteria, and stakeholder-friendly rationale. This converts existing findings into tickets, NOT the process for contributing new components to the system. Trigger when someone says: generate
Open skill - /change-communication
Produce a communication package for a design system change — release notes, migration guide, and team announcement. This produces communication artefacts for changes that have already been decided, NOT the deprecation lifecycle itself. Trigger when someone says: communicate this
Open skill - /cicd-integration
Generate CI/CD pipeline configurations that automate design system quality checks — token validation, component linting, visual regression, accessibility scanning, and release gating. Produces ready-to-use pipeline files for GitHub Actions, GitLab CI, CircleCI, or Bitbucket
Open skill

