token-docs
БесплатноБез исполняемых скриптовНе проверенGenerates design token documentation with visual swatches and code examples. Use when documenting token values, creating token reference guides, or building…
Об этом скилле
Design Token Documentation Generator
Overview
Generate comprehensive documentation for design tokens including visual swatches, usage guidelines, code examples, and cross-reference tables. Create living documentation that stays in sync with token values.
When to Use
- Documenting a new token system
- Creating a design system style guide
- Generating token reference for developers
- Building visual documentation pages
Quick Reference: Documentation Sections
| Section | Content | Audience |
|---|---|---|
| Overview | System philosophy, naming conventions | All |
| Color Tokens | Swatches, contrast info, usage | Designers, Devs |
| Typography | Font stacks, scale, line heights | Designers, Devs |
| Spacing | Scale visualization, use cases | Devs |
| Shadows | Visual examples, elevation guide | Designers, Devs |
| Radius | Corner examples, component mapping | Devs |
| Breakpoints | Device targets, media queries | Devs |
The Process
- Gather token data: Import from CSS, JSON, or JS files
- Structure sections: Organize by category
- Add visuals: Swatches, scales, examples
- Write guidelines: When and how to use each token
- Include code: Copy-paste examples for each format
- Cross-reference: Link related tokens and components
Documentation Templates
Color Token Documentation
# Color Tokens
Our color system uses OKLCH for perceptual uniformity, ensuring consistent
visual steps across the entire scale.
## Naming Convention
`--color-{name}-{step}`
- **name**: Color category (primary, gray, success, etc.)
- **step**: Lightness value (50-950, lower = lighter)
## Primary
Our brand color, used for primary actions and key UI elements.
| Token | Value | Preview | Use Case |
|-------|-------|---------|----------|
| `--color-primary-50` | oklch(97% 0.01 250) |  | Subtle backgrounds |
| `--color-primary-100` | oklch(93% 0.02 250) |  | Hover states (light) |
| `--color-primary-500` | oklch(55% 0.15 250) |  | **Primary brand color** |
| `--color-primary-600` | oklch(45% 0.15 250) |  | Hover states (dark) |
| `--color-primary-900` | oklch(20% 0.10 250) |  | Text on light backgrounds |
### Accessibility
| Combination | Ratio | WCAG |
|-------------|-------|------|
| primary-900 on white | 9.4:1 | AAA |
| primary-500 on white | 4.5:1 | AA |
| white on primary-500 | 4.5:1 | AA |
| white on primary-600 | 5.8:1 | AA |
### Usage
```css
/* Primary actions */
.btn-primary {
background-color: var(--color-primary-500);
color: white;
}
.btn-primary:hover {
background-color: var(--color-primary-600);
}
/* Accent text */
.link {
color: var(--color-primary-600);
}
Do / Don't
✅ Do:
- Use primary-500 for main CTAs
- Use primary-600 for hover states
- Use primary-50/100 for selected backgrounds
❌ Don't:
- Use primary-500 for large text blocks
- Mix primary colors from different scales
- Use low-contrast combinations (primary-300 on white)
Gray (Neutral)
Neutral colors for text, backgrounds, borders, and UI elements.
| Token | Value | Use Case |
|---|---|---|
--color-gray-50 |
#f9fafb | Page backgrounds |
--color-gray-100 |
#f3f4f6 | Card backgrounds, hover states |
--color-gray-200 |
#e5e7eb | Borders, dividers |
--color-gray-300 |
#d1d5db | Input borders, disabled |
--color-gray-400 |
#9ca3af | Placeholder text |
--color-gray-500 |
#6b7280 | Muted text, icons |
--color-gray-600 |
#4b5563 | Secondary text |
--color-gray-700 |
#374151 | Body text |
--color-gray-800 |
#1f2937 | Headings |
--color-gray-900 |
#111827 | Primary text |
--color-gray-950 |
#030712 | Darkest, rarely used |
Semantic Colors
| Category | Token | Value | Use |
|---|---|---|---|
| Success | --color-success-500 |
#22c55e | Success messages, confirmations |
| Warning | --color-warning-500 |
#f59e0b | Warnings, caution states |
| Error | --color-error-500 |
#ef4444 | Errors, destructive actions |
| Info | --color-info-500 |
#3b82f6 | Informational messages |
Each semantic color has a full scale (50-900) for backgrounds, text, and borders.
---
### Typography Token Documentation
```markdown
# Typography Tokens
Our type scale uses a 1.2 (Minor Third) ratio for harmonious sizing.
Line heights are calculated based on font size for optimal readability.
## Font Families
| Token | Value | Use |
|-------|-------|-----|
| `--font-sans` | 'Inter', system-ui, sans-serif | Body text, UI |
| `--font-mono` | 'JetBrains Mono', monospace | Code, technical |
| `--font-serif` | 'Merriweather', Georgia, serif | Editorial (optional) |
## Font Sizes
| Token | Size | Line Height | Use |
|-------|------|-------------|-----|
| `--text-xs` | 12px | 1.7 | Captions, labels |
| `--text-sm` | 14px | 1.7 | Helper text, meta |
| `--text-base` | 16px | 1.6 | Body text |
Установить token-docs в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл token-docs?
Generates design token documentation with visual swatches and code examples. Use when documenting token values, creating token reference guides, or building searchable design system documentation.
Как установить скилл token-docs?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл token-docs запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic