/design-system-ops:schema-validatorfrom design-system-ops
Validates design token files for structural compliance with DTCG 2025.10, Style Dictionary 3-5, or Tokens Studio. Catches parse errors, missing $type/$value, broken or circular aliases before they break builds.
Ships in design-system-ops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A skill for validating that design token files conform to their expected format — DTCG 2025.10 (token files and resolver documents), Style Dictionary 3, 4 or 5, Tokens Studio, or a custom schema. Catches structural issues before they break build pipelines, cause silent failures, or produce incorrect output.
Confirm that every path in this skill's frontmatter references: exists relative to this SKILL.md. If any is missing, stop: the install is incomplete, usually because a flattening installer (for example npx skills install) dropped the repo-root knowledge-notes/ directory. Tell the user to reinstall by a method in 1-INSTALL.md and run verify-install.sh from the install root. Proceed without the references only if the user explicitly says to, and then say in the output that it was produced without the pack's reference material.
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?
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.
If .ds-ops-config.yml exists, follow the configuration-and-recurring knowledge note (../../knowledge-notes/configuration-and-recurring.md) for loading, integration fallbacks and recurring runs. This skill reads:
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-checkseverity.schema_* — overrides for finding severity (e.g. schema_missing_type: critical)Run the tool the repo already has, first. Hand-validation is the fallback, not the method.
integrations.style_dictionary.enabled: true, or a config file in the repo): run npx style-dictionary build --config [path] into a scratch output directory to get its own reference and parse errors. Version 5 reads DTCG natively; version 4 needs usesDtcg: true; version 3 uses value/type and doesn't read DTCG at all.terrazzo.config.* file, or @terrazzo/cli in package.json): run npx terrazzo lint for DTCG validation and npx terrazzo build for alias resolution.Ask for or confirm:
value property)$value property; v5 reads DTCG natively)If the token files contain format indicators (e.g., $type fields suggest DTCG), auto-detect the format and confirm with the user.
For each file in the provided path:
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 |
Figures in this and later examples are illustrative.
For each successfully parsed file, run format-specific validation:
$value property$type; if its value is an alias, the resolved type of the target; otherwise the closest parent group's $type. Flag only tokens with none of these.fontStyle is not a type.{group.token} syntax with curly bracesstrokeStyle also accepts a plain keyword such as "dashed"color is an object (colorSpace, components, optional alpha and hex), dimension is { value, unit } with px or rem only, and duration is { value, unit } with ms or s (see the token-architecture note). String values such as "#ff0000" or "16px" are the older draft format: report them as a migration item, not a broken file.em, % and other units in a dimension are outside the spec; flag them$ prefix on non-spec properties — custom properties should not start with $ to avoid confusion with spec properties$extensions if present, keyed by reverse-domain name$ and must not contain {, } or .; a dotted name breaks alias syntax and is an error, not a style point$deprecated — if present, must be true, false or a string; a group's value applies to its children unless a token overrides itFor every *.resolver.json:
version must be the string "2025.10"sets is a map of named sets, each with an array of token sources (inline objects or file paths); every file path resolvesmodifiers is a map; each modifier has a required contexts map of name → array of token sources, and an optional default that names one of its contextsresolutionOrder is present and every entry names an existing set or modifier, each at most oncetheme-audit decides whether an inherited theme-dependent token is a gap)value required — every leaf token must have a value property (not $value){group.token}; the older {group.token.value} form is also acceptedvalue, original, name, comment, themeable, attributes, path, filePath and isSource are reservedv4 still accepts the legacy value/type format; v5 reads DTCG natively and treats usesDtcg as on. Apply the DTCG checks above only when the project opts into DTCG format (e.g. usesDtcg, or its files use $value); otherwise apply the v3 checks. Plus:
$value and value tokens{size.base} * 2), validate syntax{group.token} without .value suffixIf files use multiple formats (common during migration):
Structure the report as:
# Token Schema Validation Report
[Headline sentence: how many files are valid, and the most serious problem to fix first]
## Summary
- Files scanned: X
- Files valid: Y
- Files with errors: Z
- Target format: [DTCG 2025.10 / Style Dictionary v3 / etc.]
- Strictness: [strict / lenient]
## File Inventory
[Table from Step 2]
## Validation Results
### ✅ Valid Files
[List each valid file with token count]
### ❌ Files with Errors
#### [filename.json]
| # | Check | Severity | Evidence | Detail | Fix |
|---|-------|----------|----------|--------|-----|
| SV-01 | $type resolvable | 🟠 High | `colors.json:14,31,58` | 3 tokens have no own, alias-derived, or group `$type`: `color.brand.accent`, `spacing.page.gutter`, `font.body.family` | Add `$type: "color"`, `$type: "dimension"`, `$type: "fontFamily"` respectively, or set `$type` on the parent group |
| SV-02 | Alias resolution | 🔴 Critical | `semantic.json:22` | `{color.legacy.blue}` referenced by `color.semantic.info` does not exist | Either create `color.legacy.blue` or update the reference to `{color.primitive.blue.500}` |
Severity: 🔴 Critical for a parse error or a broken alias (the build fails, or a value silently resolves to nothing); 🟠 High for an unresolvable `$type`, an invalid unit, a circular alias, or a name that breaks alias syntax; 🟡 Medium for pre-2025.10 string values and mixed formats in one file (migration items); ⚪ Low for a missing `$description` or a non-`$` custom property. Evidence is the file and line where the parser or the check found the problem.
### ⚠️ Warnings
[Non-critical issues: missing $description, custom $ properties, etc.]
## Format compliance
- [Counts, e.g. "10 of 12 files valid; 3 tokens with no resolvable $type; 1 broken alias"]
- [If migrating] Legacy tokens remaining: N files, M tokens (e.g. string colour values still to convert)
## Recommendations
[Prioritised list of fixes, grouped by: parse errors first, then broken references, then missing declarations]
**Scope**
- **Inspected:** [files and directories parsed]
- **Not inspected:** [files skipped, formats not recognised, build config not run]
- **How "none found" was checked:** [e.g. every alias resolved against the parsed token tree — N aliases in total — so "no broken aliases" covers all of them]
- **Assumptions:** [target format, strictness level]
If any of these are deliberate (e.g. string colour values kept for a tool that can't read the object form yet), tell me and I'll skip them in future runs.
If the user requests it or if the output will feed into another tool:
{
"format": "dtcg-2025.10",
"files_scanned": 12,
"files_valid": 10,
"files_invalid": 2,
"findings": [
{
"id": "SV-01",
"file": "colors.json",
"token": "color.brand.accent",
"check": "$type_required",
"status": "FAIL",
"fix": "Add $type: \"color\""
}
]
}
Before delivering the report, verify:
$type: \"color\" to token color.brand.accentFor systems with fewer than 5 token files: run the same validation but present results as a single-page summary rather than a per-file breakdown. Include the specific fix for every single issue rather than grouping by pattern.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (murphytrueman/design-system-ops) — no native marketplace selected
npx claudepluginhub p/murphytrueman-design-system-ops36 skills in this plugin
/accessibility-per-componentAudit one design system component's accessibility against WCAG 2.2 AA: keyboard, screen reader, contrast, focus, ARIA, target size. Trigger: a11y audit, is this accessible, WCAG check, screen reader support, keyboard navigation check. Not for page- or product-wide audits./adoption-reportAdoption report: coverage (what the system provides), reach (teams with access) and adoption (teams shipping with it), design vs engineering, trend and at-risk teams. Triggers: adoption report, usage metrics, which teams use the system. Not docs coverage — use docs-coverage./agent-instructionsWrite the AGENTS.md that tells coding agents how to use this design system: where things live, sourced rules, how to check work, what not to do; Claude, Cursor or Copilot pointers on request. Triggers: AGENTS.md for our system, make it AI-navigable, agent instructions. Inventory: codebase-index./ai-component-descriptionWrite a six-section prose description (purpose, props, anti-patterns, composition, accessibility, examples) for a Figma component's description field so LLMs read it via MCP. Triggers: describe this component for AI, Figma MCP description. JSON metadata files: use metadata-schema-generator./backlog-generatorTurn existing audit findings into sprint-ready tickets with T-shirt estimates, acceptance criteria, dependencies and phases. Triggers: tickets from audit, backlog from findings, sprint planning from report. Not for the contribution process (contribution-workflow)./change-communicationWrite release notes, a migration guide and a team announcement for a design system change that is already decided, scaled to its impact. Triggers: release notes, announce this change, tell teams about a breaking change. Semver call: version-bump-advisor. Deprecation plan: deprecation-process.Other plugins' skills for the same job