typography

petekp/agent-skills · updated May 27, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/petekp/agent-skills --skill typography
0 commentsdiscussion
summary

Professional typography for user interfaces, grounded in principles from the masters.

skill.md

Typography

Professional typography for user interfaces, grounded in principles from the masters.

"Typography exists to honor content." — Robert Bringhurst

Reference Files

For detailed guidance on specific topics, consult these references:

Topic When to Read
masters.md Seeking authoritative backing, making nuanced judgments, understanding "why"
variable-fonts.md Using variable fonts, fluid weight, performance optimization
font-loading.md FOIT/FOUT issues, preloading, Core Web Vitals, self-hosting
opentype-features.md Ligatures, tabular numbers, stylistic sets, slashed zero
fluid-typography.md clamp(), text-wrap, truncation, vertical rhythm, font smoothing
tailwind-integration.md Tailwind typography utilities, prose plugin, customization
internationalization.md RTL languages, Arabic/Hebrew, CJK, bidirectional text

Output Formats

Type System Recommendations

## Type System

### Scale
- Base: [size, e.g., 16px]
- Ratio: [e.g., Minor Third 1.200]
- Rationale: [why this ratio]

### Hierarchy
| Level | Size | Weight | Line Height | Letter Spacing | Use |
|-------|------|--------|-------------|----------------|-----|
| Display | ... | ... | ... | ... | Hero, marketing |
| H1 | ... | ... | ... | ... | Page titles |
| H2 | ... | ... | ... | ... | Section heads |
| Body | ... | ... | ... | ... | Paragraphs |
| Small | ... | ... | ... | ... | Captions, labels |

### Fonts
- Primary: [font] — [rationale]
- Secondary: [font, if applicable]
- Mono: [font, if applicable]

### Implementation
[Ready-to-use CSS/Tailwind]

Typography Audits

## Typography Audit

### Issues
| Element | Problem | Recommendation |
|---------|---------|----------------|
| ... | ... | ... |

### Quick Wins
- [Immediate improvement 1]
- [Immediate improvement 2]

Core Principles

The Four Fundamentals (Bringhurst)

The most important typographic considerations for body text:

  1. Point size — 16px minimum for body; 14px absolute floor for secondary text
  2. Line spacing — 1.5-1.7 for body; 1.1-1.3 for headings
  3. Line length — 45-75 characters (66 ideal); use max-w-prose (~65ch)
  4. Font choice — Match typeface to content and context

Hierarchy Through Contrast

Establish hierarchy using multiple dimensions:

Dimension Low Contrast High Contrast
Size 14px → 16px 16px → 48px
Weight 400 → 500 400 → 700
Color Gray-600 → Gray-900 Gray-400 → Black
Case Normal UPPERCASE

"Use one typeface per design. Avoid italics and bold—rely on gradations of scale instead." — Massimo Vignelli

Restraint

  • 1-2 font families maximum — One serif, one sans if pairing
  • 3-4 heading levels in practice — Deeper nesting usually signals structure problems
  • Stick to your type scale — Resist arbitrary sizes
  • Let whitespace work — Don't fill every gap

"In the new computer age, the proliferation of typefaces represents a new level of visual pollution." — Massimo Vignelli


Type Scales

Modular Scale Ratios

Name Ratio Character
Minor Second 1.067 Subtle, conservative
Major Second 1.125 Gentle, professional
Minor Third 1.200 Balanced, versatile
Major Third 1.250 Bold, impactful
Perfect Fourth 1.333 Strong hierarchy
Golden Ratio 1.618 Dramatic, editorial

Practical Scale (Minor Third @ 16px)

--text-xs:   12px;  /* 0.75rem */
--text-sm:   14px;  /* 0.875rem */
--text-base: 16px;  /* 1rem */
--text-lg:   18px;  /* 1.125rem — not in pure scale */
--text-xl:   20px;  /* 1.25rem */
--text-2xl:  24px;  /* 1.5rem */
--text-3xl:  30px;  /* 1.875rem */
--text-4xl:  36px;  /* 2.25rem */
--text-5xl:  48px;  /* 3rem */

When to Deviate

  • Marketing/hero: Larger jumps allowed
  • Dense data interfaces: Tighter scale
  • Mobile: Slightly larger base (17-18px)

Spacing Guidelines

Line Height by Context

Context Line Height Rationale
Body text 1.5-1.7 Generous for readability
Headings 1.1-1.3 Tighter, especially large sizes
UI labels 1.2-1.4 Compact but legible
Buttons 1.0-1.25 Single line, tight

"The eye does not read letters, but the space between them." — Adrian Frutiger

Letter Spacing

Context Tracking CSS
Body text Default or +0.01em tracking-normal
All caps +0.05em to +0.1em tracking-wide / tracking-wider
Large headings -0.01em to -0.02em tracking-tight
Small text (<14px) +0.01em to +0.02em tracking-wide

All-caps rule: Always add tracking. Keep short (1-3 words).

Paragraph Spacing

  • Between paragraphs: 1em to 1.5em (equal to or slightly more than line-height)
  • After headings: Reduced top margin on first paragraph
  • Between sections: 2-3× paragraph spacing

Font Selection

System Font Stacks

/* Sans-serif (modern) */
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";

/* Serif */
font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;

/* Monospace */
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

Safe Web Font Recommendations

Category Fonts Use Case
Sans-serif Inter, Source Sans 3, Work Sans, DM Sans UI, body text
Serif Source Serif 4, Lora, Merriweather, Literata Editorial, long-form
Monospace JetBrains Mono, Fira Code, Source Code Pro Code, data
Display Fraunces, Epilogue, Outfit Headlines

Pairing Principles

  • Pair by contrast — Serif + sans-serif
  • Match x-height — For visual harmony when mixed
  • Ensure weight availability — Both need needed weights/styles

"A father should not have a favorite among his daughters." — Hermann Zapf (on his typefaces)


Modern CSS Typography

Text Wrapping

/* Balanced line lengths for headings (≤6 lines) */
h1, h2, h3, blockquote, figcaption {
  text-wrap: balance;
}

/* Prevent orphans in body text */
p, li {
  text-wrap: pretty;
}

Caveat: Don't use balance inside bordered containers—creates visual imbalance.

Fluid Typography

/* Font scales smoothly between breakpoints */
h1 {
  font-size: clamp(2rem, 1rem + 4vw, 4rem);
  line-height: clamp(1.1, 1.3 - 0.1vw, 1.3);
}

body {
  font-size: clamp(1rem, 0.95rem + 
how to use typography

How to use typography on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add typography
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/petekp/agent-skills --skill typography

The skills CLI fetches typography from GitHub repository petekp/agent-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/typography

Reload or restart Cursor to activate typography. Access the skill through slash commands (e.g., /typography) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.553 reviews
  • Dhruvi Jain· Dec 24, 2024

    I recommend typography for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Hiroshi Yang· Dec 20, 2024

    I recommend typography for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Kabir Okafor· Dec 12, 2024

    typography reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Ira Farah· Dec 12, 2024

    Keeps context tight: typography is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Rahul Santra· Nov 23, 2024

    Useful defaults in typography — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Amelia Thomas· Nov 19, 2024

    Useful defaults in typography — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Oshnikdeep· Nov 15, 2024

    Solid pick for teams standardizing on skills: typography is focused, and the summary matches what you get after install.

  • Mei Yang· Nov 11, 2024

    Solid pick for teams standardizing on skills: typography is focused, and the summary matches what you get after install.

  • Nikhil Sanchez· Nov 7, 2024

    Registry listing for typography matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Ira Nasser· Nov 3, 2024

    typography has been reliable in day-to-day use. Documentation quality is above average for community skills.

showing 1-10 of 53

1 / 6