npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@designesy/tokens

v0.2.2

Published

Standalone DTCG 2025.10 design token validator — 20 conformance checks, zero dependencies, works offline.

Readme

@designesy/tokens

npm version npm downloads license CI dependencies DTCG Node

Standalone DTCG 2025.10 design token validator. 20 conformance checks. Zero dependencies. Works offline.

Why

The W3C Design Tokens Format Module reached its first stable version (2025.10) on October 28, 2025, backed by 24+ organizations including Adobe, Google, Meta, and Figma. Token adoption is at 84% of teams.

But no standalone DTCG validator CLI exists on npm. Terrazzo has co check, but it's bundled inside a full token compiler. This package is the first focused, standalone DTCG validator — the npm audit of design tokens.

Install

# One-off (no install needed)
npx @designesy/tokens tokens.json

# Or install locally
npm install --save-dev @designesy/tokens

Usage

Validate a local file

npx @designesy/tokens tokens.json

Output:

Designesy Tokens Validator — DTCG 2025.10
Source: tokens.json
Tokens: 47

Score: 90/100  Grade: A  —  18 pass, 2 warn, 0 fail

  ✓ t01  PASS  Every token has $type (direct or inherited)
  ✓ t02  PASS  Every token has $value
  ✓ t03  PASS  Semantic tokens have $description
  ~ t04  WARN  Color tokens use OKLCH or Display-P3
         3 primitive color(s) using legacy hex (valid DTCG, should migrate to OKLCH)
  ✓ t05  PASS  Custom types namespaced under $extensions
  ✓ t06  PASS  Aliases resolve to valid typed tokens
  ~ t07  WARN  $schema property present
  ✓ t08  PASS  DTCG 2025.10 structural validation
  ✓ t09  PASS  No type drift between themes
  ✓ t10  PASS  Dimension units are px or rem only
  ✓ t11  PASS  $type is one of 15 valid spec types
  ✓ t12  PASS  Token names don't start with $ (except $root)
  ✓ t13  PASS  Token names don't contain {, }, or .
  ✓ t14  PASS  $value matches $type structure (primitives)
  ✓ t15  PASS  Color value well-formedness
  ✓ t16  PASS  Composite type structure
  ✓ t17  PASS  Canonical $value:"{ref}" alias syntax
  ✓ t18  PASS  Alias type compatibility
  ✓ t19  PASS  Circular reference detection
  ✓ t20  PASS  $deprecated value valid

Result: PASS with 2 warning(s)

Validate a remote URL

npx @designesy/tokens https://www.designesy.org/export/dtcg

CI gate — fail if score below threshold

npx @designesy/tokens tokens.json --min-score 80
# Exit code 0 if score ≥ 80, exit code 1 if below

JSON output for piping

npx @designesy/tokens tokens.json --json

Quiet mode (only output on failure)

npx @designesy/tokens tokens.json --quiet

The 20 Checks

| ID | Check | PASS | WARN | FAIL | |----|-------|------|------|------| | t01 | Every token has $type (direct or inherited) | All typed | — | Any missing | | t02 | Every token has $value | All valued | — | Any missing | | t03 | Semantic tokens have $description | All described | Primitive missing | Semantic missing | | t04 | Color tokens use OKLCH or Display-P3 | All structured | Legacy hex primitives | Semantic uses bare hex | | t05 | Custom types namespaced under $extensions | Namespaced | — | Bare custom type | | t06 | Aliases resolve to valid typed tokens | All resolve | — | Dangling reference | | t07 | $schema property present | Present | Missing (no editor validation) | — | | t08 | DTCG 2025.10 structural validation | Passes | — | Schema violation | | t09 | No type drift between themes | Consistent | — | Drift detected | | t10 | Dimension units are px or rem only | Valid units | — | Invalid unit | | t11 | $type is one of 15 valid spec types | All valid | — | Invalid type name | | t12 | Token names don't start with $ (except $root) | All valid | — | Name starts with $ | | t13 | Token names don't contain {, }, or . | All valid | — | Forbidden character | | t14 | $value matches $type structure (primitives) | All conform | — | Value/type mismatch | | t15 | Color value well-formedness | All well-formed | — | Malformed color | | t16 | Composite type structure | All valid | — | Missing required child | | t17 | Canonical $value:"{ref}" alias syntax | All valid | — | Invalid alias syntax | | t18 | Alias type compatibility | All compatible | — | Type mismatch | | t19 | Circular reference detection | No cycles | — | Circular chain detected | | t20 | $deprecated value valid | All valid | — | Invalid value type |

Scoring

20 checks. PASS = 1 point, WARN = 0.5 points, FAIL = 0 points.

Score = (points / 20) × 100

| Grade | Score | |-------|-------| | A | ≥ 90 | | B | ≥ 80 | | C | ≥ 70 | | D | ≥ 60 | | F | < 60 |

Programmatic API

import { validateTokens, validateTokenString } from '@designesy/tokens';

// From a parsed object
const result = validateTokens(tokenJsonObject, 'tokens.json');
console.log(result.score);  // 90
console.log(result.grade);  // 'A'
console.log(result.valid);  // true (no FAILs)

// From a JSON string
const result2 = validateTokenString(jsonString, 'tokens.json');
if ('error' in result2) {
  console.error(result2.error);
}

GitHub Actions

Use this package as a CI gate to validate your design tokens on every PR. The example below uses SHA-pinned actions — the 2026 supply-chain security best practice. Dependabot bumps the SHAs when new versions land.

name: Validate design tokens
on: [pull_request]
permissions:
  contents: read
jobs:
  tokens:
    runs-on: ubuntu-latest
    steps:
      # SHA-pinned (replace with current SHAs from the action repos)
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af573 # v4.2.2
      - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
        with:
          node-version: '22'
      - run: npx @designesy/[email protected] tokens.json --min-score 80

Or use the composite action (no Node setup needed):

- uses: LE-VAI/designesy-org/.github/actions/tokens-validate@main
  with:
    url: https://example.com/tokens.json
    min-score: 80

Spec Reference

License

MIT © Designesy