Back to Skills

ui-typography

Professional typography rules for UI design, web applications, software interfaces, and all screen-based text. Enforces timeless typographic correctness that LLMs consistently get wrong: proper quote marks, dashes, spacing, hierarchy, and layout. ENFORCEMENT MODE: When generating ANY HTML, CSS, React, JSX, or UI code containing visible text, auto-apply every rule in this skill silently — do not ask, do not explain, just produce correct typography. AUDIT MODE: When reviewing or improving existing

330stars47forksUpdated 7/11/2026

Security Assessment

Safe(100/100)
Security Score100/100

About ui-typography

UI Typography enforces professional typographic correctness across UI design, web applications, and any screen-based text, codifying rules distilled from Matthew Butterick's Practical Typography. It presents these as permanent, reading-validated conventions rather than trends or opinions, and operates in two modes. In enforcement mode, the default, it silently applies every rule when generating HTML, CSS, React, or JSX that contains visible text, using correct HTML entities and CSS without asking or explaining. In audit mode it reviews existing interfaces or legacy code, flags violations, and supplies before-and-after fixes.

The character rules require curly quotes and apostrophes, with apostrophes always pointing down to match the closing single quote, and correct handling of edge cases like decade abbreviations and word-initial contractions that smart-quote engines get wrong. Three distinct dash characters are mandated: a hyphen for compound words, an en dash for ranges and connections, and an em dash for sentence breaks, never approximated with double or triple hyphens. Further rules cover single-character ellipses, multiplication and minus signs, real trademark and copyright symbols instead of ASCII substitutes, section and paragraph marks followed by nonbreaking spaces, and mandatory accents in proper names. A notable exception to the curly-quote rule is foot and inch marks, which must be straight.

Spacing rules insist on exactly one space after punctuation, never two, and prescribe nonbreaking spaces before numeric references and after certain symbols and honorifics. Formatting rules make bold and italic mutually exclusive, discourage overuse of emphasis, forbid underlining outside of subtly styled links, and require letterspaced, sub-line-length all-caps. A dedicated JSX and React warning explains that Unicode escape sequences such as backslash-u2019 render literally in JSX text between tags, and offers working alternatives: pasting real UTF-8 characters, wrapping escapes in a JSX expression, or using sed with raw UTF-8 bytes for bulk fixes. Reference files provide a full CSS baseline template with responsive patterns and OpenType features, plus a complete HTML entity table, so the correct entity or CSS can be looked up while generating output.

FAQ

What are these rules based on?

They are distilled from Matthew Butterick's Practical Typography, and the skill treats them as permanent, reading-validated conventions rather than trends.

What are the two modes of operation?

Enforcement mode, the default, silently applies every rule when generating any UI with visible text. Audit mode reviews existing code or design, flags violations, and provides before-and-after fixes.

Which dash goes where?

A hyphen for compound words and line breaks, an en dash for ranges and connections, and an em dash for sentence breaks. Never approximate with two or three hyphens.

Why do curly quotes break in JSX or React?

Unicode escape sequences render literally in JSX text between tags because the transpiler treats that text as a string literal. Use the real UTF-8 character, wrap the escape in a JSX expression, or for bulk fixes use sed with raw UTF-8 bytes.

Is there an exception to the always-curly-quotes rule?

Yes. Foot and inch marks must be straight, using the straight-quote entities, and a nonbreaking space is placed between the foot and inch values.

All Files

3 files
SKILL.md13.8 KB
View
css-templates.md7.2 KB
View
html-entities.md4.5 KB
View

Install ui-typography

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill