Home / Market / design token alias validation

design token alias validation

Audit DTCG 2025.10 design-token alias chains offline across curly-brace references, JSON Pointer $ref, $extends, group $type inheritance, cycles, missing targets, and type mismatches.

skill★ 508530 dlgithubCC-BY-4.0 content; MIT code; upstream exceptions applyInstall in CosmosUpstream Source

Documentation & Preview

--- name: design-token-alias-validation description: "Audit DTCG 2025.10 design-token alias chains offline across curly-brace references, JSON Pointer $ref, $extends, group $type inheritance, cycles, missing targets, and type mismatches." category: design risk: safe source: self source_type: self date_added: "2026-12-01" author: Koushik-Katkam tags: [design-tokens, dtcg, json-pointer, aliases, validation, design-systems]

---

Design Token Alias Validation

Overview

Validate a focused subset of the Design Tokens Community Group (DTCG) Format Module 2025.10 offline using jsonschema==4.26.0 and referencing==0.37.0: verifies curly-brace {group.token} aliases, RFC 6901 JSON Pointer $ref references, group $type and $extends inheritance, multi-hop alias resolution inside leaf and composite values, circular reference detection, missing alias targets, and incompatible resolved token types.

Distinction from existing design and token skills:

When to Use

Prerequisites

How It Works

1. Documented DTCG 2025.10 implemented subset

This validator explicitly implements and documents the following DTCG 2025.10 subset (without claiming full DTCG Resolver Module .resolver.json context evaluation or external URI fetching):

2. Validate alias chains, cycles, and inherited types

Run the local verification suite in DTCG alias validation harness:

  1. Parse JSON cleanly (INVALID_INPUT on invalid JSON or non-object root).
  2. Expand $extends group inheritance with visited-path tracking and recursion bounds (CIRCULAR_EXTENDS / MISSING_ALIAS_TARGET / RESOLUTION_DEPTH_EXCEEDED).
  3. Compute each token's effective inherited $type from nearest ancestor group $type -> token $type (bounding group tree nesting at 64).
  4. Resolve every {path} and {"$ref": "#/..."} recursively across chains (a -> b -> c) and composite fields (shadow.color, border.width):

Examples

Run the self-contained verification suite in DTCG alias validation harness:

User request: "Audit our tokens.json for DTCG 2025.10 curly-brace and JSON Pointer alias errors and type mismatches."
Inputs: Local DTCG 2025.10 JSON document with inherited group $type, $extends, {a.b}, and {"$ref": "#/a/b/$value"}.
Expected result: Multi-hop valid chains and inherited group $type resolve cleanly with PASS; missing targets,
  direct/transitive cycles, and dimension->color type mismatches fail with concrete error codes; external $ref URIs
  return UNSUPPORTED.

Limitations

Safety and Side Effects

Sources and related skills