typography-design
Typography as a creative discipline: typeface selection criteria, type pairing (serif + sans, display + body), modular scale systems, line-height and tracking ratios, hierarchy construction, and web/mobile rendering considerations. The decisions behind design tokens, not the tokens themselves.
Best use case
typography-design is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Typography as a creative discipline: typeface selection criteria, type pairing (serif + sans, display + body), modular scale systems, line-height and tracking ratios, hierarchy construction, and web/mobile rendering considerations. The decisions behind design tokens, not the tokens themselves.
Teams using typography-design should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/typography-design/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How typography-design Compares
| Feature / Agent | typography-design | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Typography as a creative discipline: typeface selection criteria, type pairing (serif + sans, display + body), modular scale systems, line-height and tracking ratios, hierarchy construction, and web/mobile rendering considerations. The decisions behind design tokens, not the tokens themselves.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Typography Design Skill
## When to Activate
- Choosing typefaces for a new product or brand
- Building a typographic scale (H1–body–caption)
- Critiquing readability or hierarchy problems
- Optimising for web and mobile rendering
- Defining letter-spacing and line-height ratios
- Evaluating a font pairing
- Selecting a modular scale ratio appropriate for the information density of a UI
- Diagnosing FOUT or FOIT issues and choosing the right `font-display` strategy for body vs. display fonts
---
## Typeface Selection Criteria
Evaluate every candidate font on five criteria before using it:
| Criterion | What to check |
|-----------|--------------|
| **Personality** | Does the tone match the brand? (geometric = technical, humanist = friendly, slab = authoritative) |
| **Rendering quality** | Does it look good at screen sizes (12-18px)? Test hinting at small sizes. |
| **Weight range** | Minimum 4 weights needed: Light/Regular/Medium/Bold. Variable font preferred. |
| **Character set** | Does it support all required languages (Latin Extended, Cyrillic, Arabic)? |
| **License** | Free for web use? Requires self-hosting? Commercial license required? |
### Classification overview
| Classification | Characteristics | Use for |
|---------------|----------------|---------|
| **Geometric sans** | Circle-based O, uniform stroke | Tech, modern, minimal |
| **Humanist sans** | Variable stroke, organic | UI text, long-form, accessibility |
| **Transitional serif** | High contrast, bracketed serifs | Premium, editorial |
| **Slab serif** | Low contrast, block serifs | Authoritative, data-heavy |
| **Display** | Decorative, expressive | Headlines only, large sizes |
---
## Typeface Pairing Rules
### The contrast rule
Display and body must be from different classifications:
```
WORKS:
Geometric sans (display) + Humanist sans (body)
→ Space Grotesk + Inter
Serif (display) + Sans (body)
→ Playfair Display + Source Sans 3
Slab serif (display) + Clean sans (body)
→ Zilla Slab + Roboto
DOES NOT WORK:
Geometric sans + Geometric sans (both Inter-style: boring)
Two serifs (competing, no hierarchy)
Two display fonts (chaotic)
```
### The harmony rule
Despite contrasting in classification, paired fonts should share proportions:
- Similar x-height (body height of lowercase letters)
- Compatible optical weight at the same px size
- Test by setting both at the same size — do they feel balanced?
### Anti-patterns
- **Both fonts are variable fonts of the same super-family** — no contrast (e.g., Roboto + Roboto Condensed)
- **Display font used for body text** — decorative fonts are illegible at small sizes
- **Three or more typefaces** — almost always wrong; two is the limit
---
## Modular Scale
A modular scale generates all text sizes from a base size and a ratio. It creates visual harmony — sizes feel related rather than arbitrary.
### Choosing a ratio
| Ratio | Name | Character |
|-------|------|-----------|
| 1.067 | Minor Second | Tight, minimal — good for data-dense UIs |
| 1.125 | Major Second | Subtle, professional |
| 1.200 | Minor Third | Balanced — good default |
| 1.250 | Major Third | Clear hierarchy |
| 1.333 | Perfect Fourth | Strong contrast — editorial |
| 1.500 | Perfect Fifth | Very bold — display-heavy |
### Calculating the scale (base 16px, ratio 1.25)
```
caption: 10.24px (16 × 1.25⁻²)
small: 12.80px (16 × 1.25⁻¹)
base: 16.00px (16 × 1.25⁰)
large: 20.00px (16 × 1.25¹)
h4: 25.00px (16 × 1.25²)
h3: 31.25px (16 × 1.25³)
h2: 39.06px (16 × 1.25⁴)
h1: 48.83px (16 × 1.25⁵)
display: 61.04px (16 × 1.25⁶)
```
### CSS custom properties
```css
:root {
--text-xs: 0.640rem; /* 10.24px */
--text-sm: 0.800rem; /* 12.80px */
--text-base: 1.000rem; /* 16.00px */
--text-lg: 1.250rem; /* 20.00px */
--text-xl: 1.563rem; /* 25.00px */
--text-2xl: 1.953rem; /* 31.25px */
--text-3xl: 2.441rem; /* 39.06px */
--text-4xl: 3.052rem; /* 48.83px */
--text-5xl: 3.815rem; /* 61.04px */
}
```
---
## Spacing Ratios
### Line height
| Context | Line height | Why |
|---------|-------------|-----|
| Display / headlines | 1.1–1.2 | Tight — prevents gaps between lines at large sizes |
| Subheadings | 1.2–1.3 | — |
| Body text | 1.5–1.7 | Loose — aids readability at body sizes |
| Long-form (articles) | 1.6–1.8 | Maximum readability |
| UI labels, buttons | 1.0–1.2 | Single-line — no wrapping expected |
### Letter spacing (tracking)
| Context | Tracking | Why |
|---------|----------|-----|
| Headlines (32px+) | -0.02em to -0.04em | Tight — large letters feel too spaced at default |
| Body text | 0 (default) | Never adjust body letter spacing |
| ALL CAPS / small caps | +0.05em to +0.12em | All-caps needs extra air |
| UI labels (12-14px) | +0.01em | Tiny text benefits from extra tracking |
### Paragraph spacing
- Paragraph spacing = 0.75–1× the base line height
- Never use double line breaks for paragraph spacing in production — use `margin-bottom`
- Tighter paragraph spacing for UI; looser for editorial / article layouts
---
## Hierarchy Construction
### The three tools
Build hierarchy using these tools in priority order:
1. **Size** — most powerful; large type draws the eye first
2. **Weight** — second; bold vs. regular creates emphasis
3. **Color** — third; primary vs. secondary vs. disabled
Avoid using all three at once — it creates noise. One or two tools per level is enough.
### Anti-patterns
- **Too many sizes** — if more than 5 distinct text sizes exist in a single viewport, something is wrong
- **All bold** — when everything is emphasized, nothing is
- **Color only** — low-contrast secondary text on colored backgrounds fails WCAG
### H1–H6 specification template
```
H1 — 3.052rem / line-height 1.15 / weight 700 / tracking -0.02em
H2 — 2.441rem / line-height 1.20 / weight 700 / tracking -0.01em
H3 — 1.953rem / line-height 1.25 / weight 600 / tracking 0
H4 — 1.563rem / line-height 1.30 / weight 600 / tracking 0
Body large — 1.125rem / line-height 1.60 / weight 400
Body — 1.000rem / line-height 1.60 / weight 400
Body small — 0.875rem / line-height 1.50 / weight 400
Caption — 0.750rem / line-height 1.40 / weight 400 / tracking +0.01em
```
---
## Rendering Considerations
### Variable fonts
Use variable fonts where possible — one file covers all weights, reducing HTTP requests:
```css
@font-face {
font-family: 'Inter';
src: url('/fonts/Inter-Variable.woff2') format('woff2-variations');
font-weight: 100 900; /* entire weight axis */
font-display: swap;
}
```
### FOUT / FOIT strategy
- **FOUT** (Flash of Unstyled Text) — content visible immediately, swaps to web font
- **FOIT** (Flash of Invisible Text) — invisible until font loads
Use `font-display: swap` for body text (FOUT — content always readable).
Use `font-display: optional` for decorative display fonts (skip if load is slow).
### System font stack fallback
Define a fallback that matches the web font's character:
```css
/* For sans-serif web font */
font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
/* For serif web font */
font-family: 'Playfair Display', ui-serif, Georgia, 'Times New Roman', serif;
/* Mono */
font-family: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
```
### iOS vs. Android rendering
- iOS renders fonts at 1× sharper than Android at the same CSS px
- Android at small sizes may need `+0.01em` letter spacing for clarity
- Test at 12-14px on a physical Android device — system font fallbacks look very different
---
## Checklist
- [ ] Typeface evaluated on: personality, rendering, weight range, character set, license
- [ ] Pairing contrasts in classification (not two geometric sans)
- [ ] Paired fonts share similar x-height
- [ ] Modular scale chosen with ratio appropriate to the UI density
- [ ] Line height: 1.5-1.7 for body, 1.1-1.2 for headlines
- [ ] Negative tracking on headlines (32px+); never on body
- [ ] Positive tracking on all-caps text
- [ ] Hierarchy uses at most 2 of the 3 tools per level (size, weight, color)
- [ ] Maximum 5 distinct text sizes in a single viewport
- [ ] Variable font used where available
- [ ] `font-display: swap` on body text fonts
- [ ] System font fallback stack defined for each web fontRelated Skills
sdk-design-patterns
SDK design patterns — API ergonomics, backward compatibility (semantic versioning, deprecation), multi-language SDK generation (openapi-generator vs Speakeasy), error hierarchy design, SDK testing strategies, and documentation as first-class SDK artifact.
presentation-design
Presentation structure, narrative design, and slide layout principles. Covers the problem-solution-evidence arc, slide density rules (one idea per slide), slide type catalogue, opening hooks, and closing patterns. Use when structuring any slide deck — conference talk, demo, investor pitch, or team update.
marketing-design
Marketing asset design for developers: Open Graph / social media card specs and HTML generation, email template HTML/CSS patterns (table-based layout, Outlook compatibility, dark mode), banner and ad creative dimensions, print-safe PDF generation, and brand consistency across marketing touchpoints. From OG image code to email that renders in Outlook.
liquid-glass-design
iOS 26 Liquid Glass design system — dynamic glass material with blur, reflection, and interactive morphing for SwiftUI, UIKit, and WidgetKit.
generative-ai-design
AI-assisted design workflows: prompt engineering for image generation (Midjourney, DALL-E 3, Stable Diffusion, Flux), achieving style consistency across a generated asset set, post-processing AI outputs for production use, legal and licensing considerations, and when AI generation is and isn't appropriate. For teams integrating generative AI into their design workflow.
experiment-design
A/B testing and experimentation workflow: hypothesis design, metric selection, sample size calculation, statistical significance, common pitfalls (peeking, SRM, novelty effect), and experiment lifecycle. Complements feature-flags (implementation) with statistical rigor.
design-system
Design system architecture: design tokens (color, spacing, typography, radius), component library layers (Primitive → Composite → Pattern), theming with CSS Custom Properties and Tailwind, Storybook documentation, and dark mode. The foundation for consistent UI across an entire product.
design-ops
Design Operations: Figma file organization standards, design-to-dev handoff workflow, design QA checklist, design token sync pipeline (Figma Variables → Style Dictionary → CSS/Tailwind), design system versioning and governance, component audit methodology, and design-dev collaboration patterns. Bridges the gap between design tools and production code.
dashboard-design
Dashboard architecture and UX: KPI hierarchy, information density decisions, filter patterns, drill-down navigation, real-time update strategies (polling vs. WebSocket vs. SSE), empty and loading states for charts, and responsive dashboard layouts. Use when designing or building any analytics dashboard.
api-design-advanced
Advanced API design — per-language implementation patterns (TypeScript/Next.js, Go/net-http), anti-patterns (200 for everything, 500 for validation, contract breaking), and full pre-ship checklist.
api-design
REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs.
zero-trust-patterns
Zero-Trust security patterns — mTLS between microservices (Istio/SPIFFE), SPIRE workload identity, OPA/Envoy authorization, NetworkPolicy default-deny-all, short-lived credentials, service mesh security, and Kubernetes RBAC hardening.