Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

token-docs

БесплатноБез исполняемых скриптовНе проверен

Generates design token documentation with visual swatches and code examples. Use when documenting token values, creating token reference guides, or building…

dylantarreот dylantarre★ 56 звёзд на GitHub17 установок в других каталогах

Об этом скилле

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

  1. Gather token data: Import from CSS, JSON, or JS files
  2. Structure sections: Organize by category
  3. Add visuals: Swatches, scales, examples
  4. Write guidelines: When and how to use each token
  5. Include code: Copy-paste examples for each format
  6. 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) | ![#eff6ff](swatch) | Subtle backgrounds |
| `--color-primary-100` | oklch(93% 0.02 250) | ![#dbeafe](swatch) | Hover states (light) |
| `--color-primary-500` | oklch(55% 0.15 250) | ![#3b82f6](swatch) | **Primary brand color** |
| `--color-primary-600` | oklch(45% 0.15 250) | ![#2563eb](swatch) | Hover states (dark) |
| `--color-primary-900` | oklch(20% 0.10 250) | ![#1e3a8a](swatch) | 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 |
Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить token-docs с