设计 Token 使用规范

Detect hardcoded colors, spacing, and fonts in Vue or CSS projects.

3|Updated May 1, 2026
One-click install
npx skills add https://github.com/ChenyCHENYU/wl-skills-ui --skill token-chenychenyu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 设计 Token 使用规范
Source: https://github.com/ChenyCHENYU/wl-skills-ui/tree/main/skills/runtime/design-tokens
Command: npx skills add https://github.com/ChenyCHENYU/wl-skills-ui --skill token-chenychenyu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill enforces the consistent application of design tokens, ensuring all colors, spacing, and fonts are referenced via CSS variables, thereby maintaining uniform UI style across projects.

Core Features & Use Cases

  • Design Consistency: Guarantees that all UI elements use predefined CSS variables for colors and spacing.
  • Code Quality Enforcement: Detects hardcoded color hex values in stylesheets, templates, and scripts.
  • Use Case: When updating a large codebase, quickly identify and replace hardcoded hex colors with standardized CSS tokens to maintain visual consistency.

Quick Start

Use the design tokens skill to scan your project directory for any hardcoded color values and replace them with the CSS variables defined in the style guide.

Frequently Asked Questions about 设计 Token 使用规范

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find and replace hardcoded color hex values with CSS variables?

To replace hardcoded color hex values with CSS variables, scan your project directory to detect hardcoded values in stylesheets, templates, and scripts, then substitute them with predefined CSS design tokens to ensure visual consistency.

What are design tokens and how do they enforce UI consistency?

Design tokens enforce UI consistency by centralizing predefined colors, spacing, and fonts into CSS variables. Referencing these tokens across a codebase guarantees that all UI elements maintain a uniform style and adhere to the design system.

Can I use this design tokens approach to scan large Vue projects?

Yes, you can use this design tokens approach to scan large Vue projects. It is specifically designed to analyze style files and source code within large Vue or CSS projects to identify hardcoded values and enforce strict style adherence.

What is the best way to maintain style consistency when updating a large codebase?

The best way to maintain style consistency when updating a large codebase is to enforce design tokens by detecting hardcoded color hex values in stylesheets and scripts, replacing them with standardized CSS variables for colors and spacing.

Why does my UI style look inconsistent across different components?

Your UI style looks inconsistent because components likely contain hardcoded color hex values instead of using CSS variables. Scanning the codebase to enforce design tokens ensures all colors, spacing, and fonts reference a unified style guide.