skills/design-system-documenter/SKILL.md
Creates comprehensive documentation for design systems - token tables, usage guidelines, component examples, and accessibility notes. Use after generating tokens to create developer-friendly docs.
npx skillsauth add curiositech/windags-skills design-system-documenterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Transform raw design tokens into developer-friendly documentation with usage examples, accessibility notes, and implementation guidelines.
Minimal example - document a token file:
Input: Generated tokens.json or CSS variables file
Output: Complete documentation with:
- Token reference tables
- Usage examples in code
- Accessibility annotations
- Do/Don't examples
Key principle: Documentation should answer "when do I use this?" not just "what is this?".
Bridge the gap between generated tokens and developer adoption by creating documentation that:
✅ Use when:
❌ Do NOT use when:
For each token category, generate tables with:
| Token | Value | Usage | Accessibility |
|-------|-------|-------|---------------|
| --color-primary | #FF5252 | CTAs, links, emphasis | ✅ 4.5:1 on white |
| --color-border | #000000 | All borders, dividers | — |
## Color Tokens
### Primary Colors
Use primary colors for:
- Call-to-action buttons
- Interactive links
- Important highlights
Do NOT use for:
- Body text
- Background fills (too saturated)
- Disabled states
### Code Example
```css
.button-primary {
background: var(--color-primary);
color: var(--color-text-on-primary);
border: var(--border-width) solid var(--color-border);
}
### 3. Visual Examples
Include visual swatches and demonstrations:
```markdown
## Shadow Tokens
| Name | Preview | CSS Value |
|------|---------|-----------|
| shadow-sm | [2px offset visual] | `2px 2px 0 0 #000` |
| shadow-md | [4px offset visual] | `4px 4px 0 0 #000` |
| shadow-lg | [6px offset visual] | `6px 6px 0 0 #000` |
### Interaction States
- **Default**: `shadow-md`
- **Hover**: `shadow-lg` + translate(-2px, -2px)
- **Active**: `shadow-sm` + translate(2px, 2px)
## Accessibility
### Color Contrast
| Combination | Ratio | WCAG Level |
|-------------|-------|------------|
| Primary on White | 4.8:1 | ✅ AA |
| Primary on Cream | 4.2:1 | ⚠️ AA Large only |
| Text on Primary | 8.2:1 | ✅ AAA |
### Motion
All animations respect `prefers-reduced-motion`:
```css
@media (prefers-reduced-motion: reduce) {
* { animation-duration: 0.01ms !important; }
}
### 5. Do/Don't Examples
```markdown
## Common Mistakes
### ❌ Don't: Use shadow-lg on small elements
Small elements with large shadows look unbalanced.
### ✅ Do: Scale shadow with element size
- Small buttons: shadow-sm
- Cards: shadow-md
- Modals: shadow-lg
### ❌ Don't: Mix border styles
Inconsistent borders break visual rhythm.
### ✅ Do: Use consistent border tokens
Always use `--border-width` (3px) for neobrutalist consistency.
Complete .md file for docs sites:
Same as Markdown plus:
Documentation stories:
1. design-system-generator → tokens.json / tokens.css
2. design-system-documenter → tokens-docs.md
3. Review and customize
4. Publish to docs site
---
title: Design Tokens
description: Complete reference for [Project] design tokens
---
# Design Tokens
Generated from [trend-name] design trend.
## Quick Reference
| Category | Tokens | Description |
|----------|--------|-------------|
| Colors | 12 | Primary, neutral, semantic |
| Typography | 8 | Fonts, sizes, weights |
| Spacing | 15 | 0-24 scale |
| Shadows | 5 | Size and state variants |
## Colors
### Primary Palette
[Token table with hex, usage, accessibility]
### Neutral Palette
[Token table]
### Semantic Colors
[Token table for success, warning, error, info]
## Typography
### Font Families
[Token table with font stacks and usage]
### Font Sizes
[Scale table with px/rem values]
## Spacing
### Spacing Scale
[0-24 scale with rem values]
## Shadows
### Shadow Variants
[Visual examples with code]
## Usage Examples
### Button Component
[Complete code example using tokens]
### Card Component
[Complete code example using tokens]
## Accessibility
### Contrast Ratios
[All color combinations with WCAG levels]
### Motion Preferences
[Reduced motion handling]
## Migration Guide
### From Arbitrary Values
[Before/after examples]
references/documentation-templates.md - Docusaurus, VitePress, Storybook, README templatesreferences/design-system-references.md - NEW: Real-world design system references
This skill produces:
tools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.