Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
AI-powered design system generator that produces complete, tailored design systems from project requirements.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: ckm:design-system3description: Token architecture, component specifications, and slide generation. Three-layer tokens (primitive→semantic→component), CSS variables, spacing/typography scales, component specs, strategic slide creation. Use for design tokens, systematic design, brand-compliant presentations.4argument-hint: "[component or token]"5license: MIT6metadata:7author: claudekit8version: "1.0.0"9---1011# Design System1213Token architecture, component specifications, systematic design, slide generation.1415## When to Use1617- Design token creation18- Component state definitions19- CSS variable systems20- Spacing/typography scales21- Design-to-code handoff22- Tailwind theme configuration23- **Slide/presentation generation**2425## Token Architecture2627Load: `references/token-architecture.md`2829### Three-Layer Structure3031```32Primitive (raw values)33↓34Semantic (purpose aliases)35↓36Component (component-specific)37```3839**Example:**40```css41/* Primitive */42--color-blue-600: #2563EB;4344/* Semantic */45--color-primary: var(--color-blue-600);4647/* Component */48--button-bg: var(--color-primary);49```5051## Quick Start5253**Generate tokens:**54```bash55node scripts/generate-tokens.cjs --config tokens.json -o tokens.css56```5758**Validate usage:**59```bash60node scripts/validate-tokens.cjs --dir src/61```6263## References6465| Topic | File |66|-------|------|67| Token Architecture | `references/token-architecture.md` |68| Primitive Tokens | `references/primitive-tokens.md` |69| Semantic Tokens | `references/semantic-tokens.md` |70| Component Tokens | `references/component-tokens.md` |71| Component Specs | `references/component-specs.md` |72| States & Variants | `references/states-and-variants.md` |73| Tailwind Integration | `references/tailwind-integration.md` |7475## Component Spec Pattern7677| Property | Default | Hover | Active | Disabled |78|----------|---------|-------|--------|----------|79| Background | primary | primary-dark | primary-darker | muted |80| Text | white | white | white | muted-fg |81| Border | none | none | none | muted-border |82| Shadow | sm | md | none | none |8384## Scripts8586| Script | Purpose |87|--------|---------|88| `generate-tokens.cjs` | Generate CSS from JSON token config |89| `validate-tokens.cjs` | Check for hardcoded values in code |90| `search-slides.py` | BM25 search + contextual recommendations |91| `slide-token-validator.py` | Validate slide HTML for token compliance |92| `fetch-background.py` | Fetch images from Pexels/Unsplash |9394## Templates9596| Template | Purpose |97|----------|---------|98| `design-tokens-starter.json` | Starter JSON with three-layer structure |99100## Integration101102**With brand:** Extract primitives from brand colors/typography103**With ui-styling:** Component tokens → Tailwind config104105**Skill Dependencies:** brand, ui-styling106**Primary Agents:** ui-ux-designer, frontend-developer107108## Slide System109110Brand-compliant presentations using design tokens + Chart.js + contextual decision system.111112### Source of Truth113114| File | Purpose |115|------|---------|116| `docs/brand-guidelines.md` | Brand identity, voice, colors |117| `assets/design-tokens.json` | Token definitions (primitive→semantic→component) |118| `assets/design-tokens.css` | CSS variables (import in slides) |119| `assets/css/slide-animations.css` | CSS animation library |120121### Slide Search (BM25)122123```bash124# Basic search (auto-detect domain)125python scripts/search-slides.py "investor pitch"126127# Domain-specific search128python scripts/search-slides.py "problem agitation" -d copy129python scripts/search-slides.py "revenue growth" -d chart130131# Contextual search (Premium System)132python scripts/search-slides.py "problem slide" --context --position 2 --total 9133python scripts/search-slides.py "cta" --context --position 9 --prev-emotion frustration134```135136### Decision System CSVs137138| File | Purpose |139|------|---------|140| `data/slide-strategies.csv` | 15 deck structures + emotion arcs + sparkline beats |141| `data/slide-layouts.csv` | 25 layouts + component variants + animations |142| `data/slide-layout-logic.csv` | Goal → Layout + break_pattern flag |143| `data/slide-typography.csv` | Content type → Typography scale |144| `data/slide-color-logic.csv` | Emotion → Color treatment |145| `data/slide-backgrounds.csv` | Slide type → Image category (Pexels/Unsplash) |146| `data/slide-copy.csv` | 25 copywriting formulas (PAS, AIDA, FAB) |147| `data/slide-charts.csv` | 25 chart types with Chart.js config |148149### Contextual Decision Flow150151```1521. Parse goal/context153↓1542. Search slide-strategies.csv → Get strategy + emotion beats155↓1563. For each slide:157a. Query slide-layout-logic.csv → layout + break_pattern158b. Query slide-typography.csv → type scale159c. Query slide-color-logic.csv → color treatment160d. Query slide-backgrounds.csv → image if needed161e. Apply animation class from slide-animations.css162↓1634. Generate HTML with design tokens164↓1655. Validate with slide-token-validator.py166```167168### Pattern Breaking (Duarte Sparkline)169170Premium decks alternate between emotions for engagement:171```172"What Is" (frustration) ↔ "What Could Be" (hope)173```174175System calculates pattern breaks at 1/3 and 2/3 positions.176177### Slide Requirements178179**ALL slides MUST:**1801. Import `assets/design-tokens.css` - single source of truth1812. Use CSS variables: `var(--color-primary)`, `var(--slide-bg)`, etc.1823. Use Chart.js for charts (NOT CSS-only bars)1834. Include navigation (keyboard arrows, click, progress bar)1845. Center align content1856. Focus on persuasion/conversion186187### Chart.js Integration188189```html190<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.umd.min.js"></script>191192<canvas id="revenueChart"></canvas>193<script>194new Chart(document.getElementById('revenueChart'), {195type: 'line',196data: {197labels: ['Sep', 'Oct', 'Nov', 'Dec'],198datasets: [{199data: [5, 12, 28, 45],200borderColor: '#FF6B6B', // Use brand coral201backgroundColor: 'rgba(255, 107, 107, 0.1)',202fill: true,203tension: 0.4204}]205}206});207</script>208```209210### Token Compliance211212```css213/* CORRECT - uses token */214background: var(--slide-bg);215color: var(--color-primary);216font-family: var(--typography-font-heading);217218/* WRONG - hardcoded */219background: #0D0D0D;220color: #FF6B6B;221font-family: 'Space Grotesk';222```223224### Reference Implementation225226Working example with all features:227```228assets/designs/slides/claudekit-pitch-251223.html229```230231### Command232233```bash234/slides:create "10-slide investor pitch for ClaudeKit Marketing"235```236237## Best Practices2382391. Never use raw hex in components - always reference tokens2402. Semantic layer enables theme switching (light/dark)2413. Component tokens enable per-component customization2424. Use HSL format for opacity control2435. Document every token's purpose2446. **Slides must import design-tokens.css and use var() exclusively**245