design-system-validator
Validate design system compliance in code and detect token usage violations
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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/design-system-validator/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How design-system-validator Compares
| Feature / Agent | design-system-validator | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/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
RESTful API design principles, versioning, pagination, HATEOAS, and documentation.
design-tokens
Design token management, generation, and multi-platform support.
design-token-transformer
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
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
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
Validate OpenAPI specifications for correctness, security, and best practices
k8s-validator
Validate Kubernetes manifests for security, best practices, and resource limits
scope-permission-designer
Design and implement scoped permission models
rate-limiter-designer
Design and implement rate limiting strategies
protobuf-grpc-designer
Protocol Buffers and gRPC service definition with backward compatibility checks
middleware-chain-designer
Design middleware and interceptor chains for SDK extensibility
graphql-schema-designer
GraphQL schema design and optimization with federation support