一键导入
design-system-management
Manage design system tokens including CRUD operations, multi-format export, version tracking, and synchronization with design files
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Manage design system tokens including CRUD operations, multi-format export, version tracking, and synchronization with design files
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Strategic search planning for agent-driven research. Generates structured search-term matrices with tiered fallback strategies, engine-specific operators, and grading criteria before executing any searches. Use this skill whenever research requires more than a single search query — comparing technologies, verifying claims across sources, surveying a landscape, investigating a multi-faceted question, or building evidence for a decision. Do NOT use for quick factual lookups, fetching a single known URL, or questions answerable from a single source. Covers tech, academic, regulatory, and general domains. Think of it as "research planning" — the matrix is the plan, execution comes after.
Create language conversion skills for translating code from language A to language B. Use when building 'convert-X-Y' skills, designing type mappings between languages, establishing idiom translation patterns, or defining conversion methodologies. Provides foundational patterns that specific conversion skills extend.
Guide for translating code between programming languages. Use when converting code from one language to another, planning language migrations, understanding conversion challenges, asking about type mappings, idiom translations, or referencing pattern mappings. Covers APTV workflow, type systems, error handling, concurrency, and language-specific gotchas.
Identify skill coverage gaps and improvement opportunities. Use when analyzing missing skills for a task, creating skill gap issues, evaluating skill effectiveness, or refining skill progressive disclosure.
Validate Claude Code skills against best practices. Use when checking skill quality, running validation, or creating improvement issues.
{{DESCRIPTION}}
| name | design-system-management |
| description | Manage design system tokens including CRUD operations, multi-format export, version tracking, and synchronization with design files |
| created | "2026-02-22T00:00:00.000Z" |
| updated | "2026-02-22T00:00:00.000Z" |
| tags | ["design-system","tokens","versioning","sync","multi-format"] |
| extends | design-theme-factory-dev |
Comprehensive design token management for maintaining consistency between design files and code.
This skill provides tools for managing design system tokens throughout their lifecycle, from extraction to code generation, with support for versioning, conflict detection, and multi-platform export.
This skill covers:
This skill does NOT cover:
design-tokens-extraction skill)design-to-* skills)| Operation | Command | Description |
|---|---|---|
| List | /sync-design-system --list | Show all tokens |
| Add | Token CRUD workflow | Add new token |
| Update | Token CRUD workflow | Modify token value |
| Delete | Token CRUD workflow | Remove token |
| Export | /sync-design-system --target <path> | Export to code |
| Format | File Extension | Target |
|---|---|---|
| W3C JSON | .tokens.json | Platform-agnostic |
| Swift | .swift | iOS/macOS |
| CSS | .css | Web (custom properties) |
| Tailwind | tailwind.config.js | Tailwind CSS |
| Flutter | .dart | Flutter/Dart |
Create or locate the design tokens file:
tokens/
├── design-tokens.json # W3C format (source of truth)
├── generated/
│ ├── Theme.swift # iOS/macOS output
│ ├── theme.css # Web output
│ └── tailwind.config.js # Tailwind output
└── .tokens-history/ # Version history
Create Token:
{
"operation": "create",
"path": "color.semantic.error",
"value": {
"$value": "#DC2626",
"$type": "color",
"$description": "Error state color for destructive actions"
}
}
Read Token:
{
"operation": "read",
"path": "color.semantic.error"
}
// Returns full token definition with metadata
Update Token:
{
"operation": "update",
"path": "color.semantic.error",
"value": {
"$value": "#EF4444"
},
"reason": "Improved contrast ratio"
}
Delete Token:
{
"operation": "delete",
"path": "color.deprecated.oldRed",
"reason": "Replaced by color.semantic.error"
}
Track changes to maintain history:
{
"version": "1.2.0",
"timestamp": "2026-02-22T10:30:00Z",
"changes": [
{
"type": "update",
"path": "color.semantic.error",
"previous": "#DC2626",
"current": "#EF4444",
"reason": "Improved contrast ratio"
}
],
"author": "design-system-sync"
}
Export tokens to target formats:
To Swift:
// Generated from design-tokens.json v1.2.0
extension Color {
enum Semantic {
static let error = Color(hex: "#EF4444")
}
}
To CSS:
/* Generated from design-tokens.json v1.2.0 */
:root {
--color-semantic-error: #EF4444;
}
To Tailwind:
// Generated from design-tokens.json v1.2.0
module.exports = {
theme: {
extend: {
colors: {
semantic: {
error: '#EF4444'
}
}
}
}
}
design-tokens.jsondesign-tokens.jsonWhen conflicts are detected:
## Token Conflict: color.primary
| Source | Value |
|--------|-------|
| Design | #2196F3 |
| Code | #1E88E5 |
Resolution Options:
1. Use design value (update code)
2. Use code value (flag for design update)
3. Keep both (create variant)
4. Manual review
## Naming Conflict
Design: "Primary Blue"
Code: "color.brand.primary"
Suggested mapping:
- Create alias: "Primary Blue" → "color.brand.primary"
- Or rename in design to match code convention
{
"color": {
"primitive": {
"blue": { "50": {}, "100": {}, "500": {}, "900": {} }
},
"semantic": {
"background": {},
"surface": {},
"text": {},
"error": {},
"success": {}
},
"component": {
"button": {
"primary": {},
"secondary": {}
}
}
},
"typography": {
"fontFamily": {},
"fontSize": {},
"fontWeight": {},
"lineHeight": {}
},
"spacing": {},
"borderRadius": {},
"shadow": {},
"duration": {}
}
| Level | Pattern | Example |
|---|---|---|
| Category | <category> | color |
| Subcategory | <category>.<subcategory> | color.semantic |
| Token | <category>.<subcategory>.<name> | color.semantic.error |
| Variant | <token>.<variant> | color.semantic.error.light |
Before applying changes, validate:
Type Consistency:
Reference Integrity:
Naming Compliance:
Configure per-format output:
{
"exports": {
"swift": {
"output": "./Sources/Theme/",
"template": "swift-extensions",
"colorFormat": "hex-initializer"
},
"css": {
"output": "./styles/tokens.css",
"prefix": "--design-",
"colorFormat": "hex"
},
"tailwind": {
"output": "./tailwind.config.js",
"mode": "extend",
"includeCategories": ["color", "spacing", "borderRadius"]
}
}
}
After sync, generate report:
## Design System Sync Report
**Version**: 1.2.0 → 1.3.0
**Timestamp**: 2026-02-22T10:30:00Z
### Changes Applied
| Category | Added | Updated | Removed |
|----------|-------|---------|---------|
| Colors | 3 | 2 | 0 |
| Typography | 0 | 1 | 0 |
| Spacing | 2 | 0 | 0 |
### Details
#### Added
- `color.semantic.warning`: #F59E0B
- `color.semantic.info`: #3B82F6
- `color.semantic.neutral`: #6B7280
#### Updated
- `color.semantic.error`: #DC2626 → #EF4444 (contrast improvement)
- `typography.fontSize.xl`: 1.25rem → 1.375rem
### Files Updated
- tokens/design-tokens.json
- Sources/Theme/Colors.swift
- styles/tokens.css
Symptoms: Export fails or produces invalid output
Solution:
Symptoms: Multiple sources have different versions
Solution:
design-tokens-extraction skill - Initial token extraction/sync-design-system command - Sync tokens to codedesign-token-json style - W3C format outputdesign-token-swift style - Swift output format