Command Palette

Search for a command to run...

Back to skills
skill № 72474

ui-typography

Typography rules for screen text: quote marks, dashes, entities, spacing, hierarchy and layout. Use when writing or reviewing visible UI text, fixing…

FreeNo executable scripts
tensologyby tensology★ 17 GitHub stars

Install ui-typography in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Scope (22 Oct 2026): For app/dashboard/product UI defer to ui-ux-system (~/.agents/skills/ui-ux-system/SKILL.md).

Global interface source

Before using this skill for interface work, read the current global ui-ux-system skill (~/.agents/skills/ui-ux-system/SKILL.md), especially its Paul's rules, settled taste rules, and Definition of Done - UI. Those rules are authoritative and override conflicting guidance here. Aesthetic recipes are opt-in: use them only when the brief explicitly calls for them and they earn their place. This skill adds only its specialized guidance.

UI Typography Skill

Attribution

These rules are distilled from Matthew Butterick's Practical Typography (https://practicaltypography.com). Butterick is a typographer, writer, and type designer whose work bridges professional typography and everyday digital writing. Thank you, Matthew, for making this knowledge accessible and encyclopedic. If you find this skill valuable, consider supporting his work directly.

Mode of Operation

These are permanent rules — not trends, not opinions. They come from centuries of typographic practice, validated by how the human eye reads. They do not go out of style.

APPLY (when this skill is loaded): When writing UI with visible text, apply these rules with correct HTML entities and CSS, and mention notable typography fixes in your summary. Dashes follow ui-ux-system section 8a: no em dashes in agent-written UI copy; en dashes for ranges; keep supplied copy as written.

AUDIT: When reviewing existing code or design, identify violations and provide before/after fixes.

Reference files (read when generating CSS or looking up entities):

  • references/css-templates.md — Full CSS baseline template, responsive patterns, OpenType features
  • references/html-entities.md — Complete entity table with all characters and codes

Characters

Quotes and Apostrophes — Always Curly

Straight quotes are typewriter artifacts. Use “ ” for double, ‘ ’ for single.

Apostrophes always point down — identical to closing single quote ’. Smart-quote engines wrongly insert opening quotes before decade abbreviations ('70s) and word-initial contractions ('n'). Fix with explicit ’.

The <q> tag auto-applies curly quotes when <html lang="en"> is set.

Hawaiian okina points upward — it's a letter, not an apostrophe. Use opening single quote or anglicize.

JSX/React Implementation Warning

Unicode escape sequences (\u2019, \u201C, etc.) do NOT work in JSX text content. They render as literal characters — the user sees \u2019 instead of a curly apostrophe. This is because JSX text between tags is treated as string literals by the transpiler, not as JavaScript expressions.

What fails:

{/* WRONG — renders literally as \u2019 */}
<p>Don\u2019t do this</p>

What works (pick one):

  1. Actual UTF-8 characters (preferred): Paste the real character directly into the source file.

    <p>Don\u2019t do this</p>  {/* This is the actual curly apostrophe character U+2019 */}
    
  2. JSX expression with string literal: Wrap in curly braces so the JS engine interprets the escape.

    <p>Don{'\u2019'}t do this</p>
    
  3. HTML entity (HTML files only): Use &rsquo; — but this does NOT work in JSX/React.

For bulk fixes via CLI, use sed with raw UTF-8 bytes (not escape sequences):

CURLY=$(printf '\xe2\x80\x99')  # U+2019 RIGHT SINGLE QUOTATION MARK
sed -i '' "s/don't/don${CURLY}t/g" file.tsx

In JavaScript data arrays and string literals, \u2019 works correctly because the JS engine processes the escape. The bug only affects JSX text content between tags.

Dashes and Hyphens — Three Distinct Characters

Character HTML Use
- (hyphen) - Compound words (cost-effective), line breaks
– (en dash) &ndash; Ranges (1–10), connections (Sarbanes–Oxley Act)
— (em dash) &mdash; Only in user-supplied copy; agent-written UI copy uses commas, colons or parentheses (ui-ux-system 8a)

Never approximate with -- or ---. If you open with "from", pair with "to" not en dash. Hyphen for compound names (marriage); en dash for joint authorship. Em dash typically flush; add &thinsp; if crushed. No slash where en dash belongs. Hyphenate phrasal adjectives (five-dollar bills). No hyphen after -ly adverbs.

Ellipses — One Character

Use &hellip; (…), not three periods. Spaces before and after; use &nbsp; on the text-adjacent side. For interrupted dialogue in supplied copy, keep the author's punctuation; agent-written UI copy avoids em dashes (ui-ux-system 8a).

Math and Measurement

Use &times; for multiplication, &minus; for subtraction. Use + and = from keyboard. En dash is acceptable as simple minus. Dimensions: 8.5″ × 14″ uses &times;.

**Foot and inch

Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

  • css-templates.md
  • html-entities.md

FAQ

What does the ui-typography skill do?

Typography rules for screen text: quote marks, dashes, entities, spacing, hierarchy and layout. Use when writing or reviewing visible UI text, fixing typography, or when ui-typography is named; in audits, flag violations with fixes. Em dashes follow ui-ux-system section 8a. For app/dashboard/product UI defer to ui-ux-system.

How do I install the ui-typography skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the ui-typography skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare ui-typography with