design-system-validator

Validate design system compliance in code and detect token usage violations

509 stars

Best use case

design-system-validator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Validate design system compliance in code and detect token usage violations

Teams using design-system-validator should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/design-system-validator/SKILL.md --create-dirs "https://raw.githubusercontent.com/a5c-ai/babysitter/main/library/specializations/ux-ui-design/skills/design-system-validator/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/design-system-validator/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How design-system-validator Compares

Feature / Agentdesign-system-validatorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Validate design system compliance in code and detect token usage violations

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Design System Validator Skill

## Purpose

Validate that code adheres to design system specifications, checking token usage, component props, and style consistency.

## Capabilities

- Check design token usage in CSS/SCSS
- Validate component prop usage
- Detect hard-coded values that should use tokens
- Ensure naming convention compliance
- Generate compliance reports
- Integrate with linting tools

## Target Processes

- design-system.js
- component-library.js

## Integration Points

- ESLint plugins for design systems
- Stylelint for CSS validation
- Custom AST analyzers
- Token documentation

## Input Schema

```json
{
  "type": "object",
  "properties": {
    "scanPath": {
      "type": "string",
      "description": "Path to code to validate"
    },
    "tokenDefinitions": {
      "type": "string",
      "description": "Path to design token definitions"
    },
    "rules": {
      "type": "object",
      "properties": {
        "enforceTokenColors": { "type": "boolean", "default": true },
        "enforceTokenSpacing": { "type": "boolean", "default": true },
        "enforceTokenTypography": { "type": "boolean", "default": true },
        "allowHardcodedValues": { "type": "array", "items": { "type": "string" } }
      }
    },
    "fileTypes": {
      "type": "array",
      "items": { "type": "string" },
      "default": ["css", "scss", "tsx", "jsx"]
    },
    "severity": {
      "type": "string",
      "enum": ["error", "warning", "info"],
      "default": "warning"
    }
  },
  "required": ["scanPath", "tokenDefinitions"]
}
```

## Output Schema

```json
{
  "type": "object",
  "properties": {
    "violations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "file": { "type": "string" },
          "line": { "type": "number" },
          "rule": { "type": "string" },
          "message": { "type": "string" },
          "suggestion": { "type": "string" }
        }
      }
    },
    "summary": {
      "type": "object",
      "properties": {
        "filesScanned": { "type": "number" },
        "totalViolations": { "type": "number" },
        "byRule": { "type": "object" },
        "complianceScore": { "type": "number" }
      }
    },
    "tokenCoverage": {
      "type": "object",
      "description": "Token usage statistics"
    }
  }
}
```

## Usage Example

```javascript
const result = await skill.execute({
  scanPath: './src/components',
  tokenDefinitions: './tokens/design-tokens.json',
  rules: {
    enforceTokenColors: true,
    enforceTokenSpacing: true,
    enforceTokenTypography: true
  },
  severity: 'warning'
});
```

Related Skills

rest-api-design

509
from a5c-ai/babysitter

RESTful API design principles, versioning, pagination, HATEOAS, and documentation.

design-tokens

509
from a5c-ai/babysitter

Design token management, generation, and multi-platform support.

design-token-transformer

509
from a5c-ai/babysitter

Transform design tokens across multiple formats and platforms. Parse W3C design token format, transform to CSS/SCSS/JS/iOS/Android, handle token aliases and references, and generate documentation.

link-validator

509
from a5c-ai/babysitter

Comprehensive link checking and validation for documentation. Validate internal links, external URLs, anchors, detect redirects, monitor link rot, and generate sitemap validation reports.

code-sample-validator

509
from a5c-ai/babysitter

Extract, validate, and test code samples in documentation. Verify syntax, execute samples, check outputs, validate imports, and ensure code samples are up-to-date with current APIs.

openapi-validator

509
from a5c-ai/babysitter

Validate OpenAPI specifications for correctness, security, and best practices

k8s-validator

509
from a5c-ai/babysitter

Validate Kubernetes manifests for security, best practices, and resource limits

scope-permission-designer

509
from a5c-ai/babysitter

Design and implement scoped permission models

rate-limiter-designer

509
from a5c-ai/babysitter

Design and implement rate limiting strategies

protobuf-grpc-designer

509
from a5c-ai/babysitter

Protocol Buffers and gRPC service definition with backward compatibility checks

middleware-chain-designer

509
from a5c-ai/babysitter

Design middleware and interceptor chains for SDK extensibility

graphql-schema-designer

509
from a5c-ai/babysitter

GraphQL schema design and optimization with federation support