
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 interfaces or legacy code, flag violations and provide fixes. Trigger on: any HTML/CSS/React artifact creation, "build a landing page", "create a component", "design a UI", "fix the typography", "make this look professional", "review this layout", web design, presentation design, dashboard creation, document generation, or any task producing visible text for humans. Even if the user doesn't mention typography, apply these rules whenever generating UI output.
- Installs
- 3.9K
- Last 24h
- +18
- Trending rank
- #6220
- Security
- Warn
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/bencium/bencium-marketplace --skill ui-typography- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads ui-typography automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
Security audits
Independent scans of the skill's instructions and bundled files.
SKILL.md
The instructions your agent reads when the skill is triggered.
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.
ENFORCEMENT (default): When generating ANY UI with visible text, apply every rule automatically. Use correct HTML entities, proper CSS. Do not ask permission. Do not explain. Just produce correct typography.
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 featuresreferences/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):
-
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 */} -
JSX expression with string literal: Wrap in curly braces so the JS engine interprets the escape.
<p>Don{'\u2019'}t do this</p> -
HTML entity (HTML files only): Use
’— 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) | – | Ranges (1–10), connections (Sarbanes–Oxley Act) |
| — (em dash) | — | Sentence breaks—like this |
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   if crushed.
No slash where en dash belongs. Hyphenate phrasal adjectives (five-dollar bills). No hyphen after -ly adverbs.
Ellipses — One Character
Use … (…), not three periods. Spaces before and after; use on the text-adjacent side.
For interrupted dialogue, prefer em dash over ellipsis.
Math and Measurement
Use × for multiplication, − for subtraction. Use + and = from keyboard.
En dash is acceptable as simple minus. Dimensions: 8.5″ × 14″ uses ×.
Foot and inch marks — the ONE exception to curly quotes. Must be STRAIGHT: ' for foot,
" for inch. Use between values: 6' 10".
Trademark and Copyright
Use real symbols: © ™ ®, never (c) (TM) (R). ™/® are superscripts, no space before.
© is inline, followed by then year. "Copyright ©" is redundant — word OR symbol, not both.
Paragraph and Section Marks
§ (§) and ¶ (¶) always followed by : § 1782. Spell out at sentence start.
Double for plurals: §§.
Accented Characters
Proper names: accents are MANDATORY (François Truffaut, Plácido Domingo). Loanwords: check dictionary — some naturalized (naive), some not (cause célèbre).
Other Punctuation
- Semicolons join independent clauses. Colons introduce completion. Don't mix them
- Question marks: underused — simplify topic sentences with them
- Exclamation points: overused — budget ONE per long document. Never multiple in a row
- Ampersands: correct in proper names only. Write "and" in body text
- Parentheses/brackets: do NOT adopt formatting of surrounded material
- Emoticons/emoji: OK in email/Slack. Never in formal documents or professional UI copy
Spacing
One Space After Punctuation — Always
Exactly one space after any punctuation. Never two. Not debatable. Two spaces create rivers and disrupt text balance. The period already contains visual white space.
Nonbreaking Spaces
prevents line break. Use before numeric refs (§ 42, Fig. 3), after ©
(© 2025), after honorifics (Dr. Smith), between foot/inch values.
White-Space Characters
| Need | Tool |
|---|---|
| Space between words | One word space (spacebar) |
| Prevent line break | |
| New line, same paragraph | <br> |
| New paragraph | <p> tags |
| New page (print) | page-break-before: always |
| Suggest hyphenation point | ­ |
Never hold spacebar. Never double carriage returns for spacing. Never tabs for indentation in output.
HTML collapses all whitespace to single space (except ).
Text Formatting
Bold and Italic
Rule 1: Bold OR italic. Mutually exclusive. Never combine. Rule 2: Use as little as possible. If everything is emphasized, nothing is.
Serif: italic for gentle, bold for strong. Sans serif: bold only — italic sans barely stands out. Never bold entire paragraphs. Never use quotation marks for emphasis.
Underlining — Never
Never underline in a document or UI. Typewriter workaround. Use bold or italic. For web links,
use subtle styling: text-decoration-thickness: 1px; text-underline-offset: 2px.
All Caps — Less Than One Line, Always Letterspaced
Caps are harder to read (homogeneous rectangles vs varied lowercase contour). Suitable for short
headings, labels, captions. ALWAYS add 5–12% letterspacing. ALWAYS ensure kerning is on.
NEVER capitalize whole paragraphs. letter-spacing: 0.06em in CSS.
Small Caps — Real Only
Never fake (scaled-down regular caps). Use font-variant-caps: small-caps with fonts that have
real small caps (OpenType smcp). System fonts lack them. Add letterspacing + kerning.
Point Size
Print: 10–12pt. Web: 15–25px. The 12pt default is a typewriter relic. Half-point differences
matter. Use smallest increment for emphasis. Use clamp() for fluid web sizing.
Letterspacing
5–12% extra on ALL CAPS and small caps. Nothing on lowercase. Never spread so far apart that
letters could fit in the gaps. CSS: letter-spacing: 0.05em to 0.12em.
Kerning — Always On
No exceptions. font-feature-settings: "kern" 1; text-rendering: optimizeLegibility;
Ligatures
Mandatory only when fi/fl visually collide. Check bold and italic too. Otherwise optional.
CSS: font-feature-settings: "liga" 1.
Alternate Figures
Tabular ("tnum") for data tables. Oldstyle ("onum") for body text. Default figures are fine
for most uses. font-variant-numeric: tabular-nums lining-nums for numeric tables.
Font Selection
- No goofy fonts (novelty, script, handwriting, circus) in professional work
- No monospaced for body text — code only (and Courier is the worst monospaced)
- Print body: strongly prefer serif
- Web body: serif or sans both fine on modern screens
- Metrics spacing in InDesign, never optical (optical mangles kerning)
Mixing Fonts
Max 2 fonts. Each gets a consistent role. Can mix serif+serif or sans+sans. Rarely mix within a paragraph. Lower contrast often more effective than high contrast.
Page Layout
Body Text First
Set body text BEFORE anything else. Four decisions determine everything: font, point size, line spacing, line length. All other elements calibrate against these.
Line Length — 45–90 Characters
The #1 readability factor designers get wrong. The #1 flaw in responsive web layouts.
Measure in characters, not inches. Alphabet test: fit 2–3 lowercase alphabets per line.
CSS: max-width: 65ch on text containers.
Line Spacing — 120–145% of Point Size
line-height: 1.2 to 1.45. Single-spaced (~117%) is too tight. Double (~233%) is too loose.
Word processor "Single" and "Double" both miss the optimal range.
Page Margins
One inch is not enough for proportional fonts. Print: 1.5–2.0″ at 12pt. Web: max-width on
text containers plus padding. Don't fear white space — generous margins look professional.
Text Alignment
Left-align for web (default). Justified requires hyphens: auto — browser engines are crude.
Centered: sparingly, only for short titles (< 1 line). Never center whole text blocks.
Paragraph Separation — Indent OR Space, Never Both
First-line indent: 1–4× point size. text-indent: 1.5em. Optional on first paragraph.
Space between: 50–100% of font size. margin-bottom: 0.75em. Never double <br> tags.
Headings — Max 3 Levels
- Don't all-caps headings (unless very short + letterspaced)
- Don't underline headings
- Don't center headings (rare exceptions)
- Emphasize with space above and below — subtle and effective
- Use bold, not italic — stands out better
- Smallest point-size increment needed (body 11pt → heading 13pt, not 18pt)
hyphens: noneon headings- Space above > space below (heading relates to text that follows)
- Keep heading with next paragraph (
page-break-after: avoid) - Tiered numbers (1.1, 2.1) over roman numerals (I.A.1.a.i)
Block Quotations
Reduce size + line spacing slightly. Indent 2–5em. No quotation marks (indent signals the quote). Keep line length readable. Use sparingly — long block quotes signal lazy writing.
Lists
Semantic markup (<ul>, <ol>), never manual bullets. Prefer hollow bullets. Asterisks are too
small for bullets. Don't over-indent.
Tables — Remove Borders, Add Padding
Data creates an implied grid. Borders add clutter. Keep only thin rule under header row.
padding: 0.5em 1em. Tabular figures for numeric columns. Right-align numbers.
Rules and Borders
Try space above and below first. Border thickness: 0.5–1pt. No patterned borders. Thick lines are chartjunk.
Flow Control
Widows (last line alone at top of page) and orphans (first line alone at bottom). CSS print:
orphans: 2; widows: 2. Headings: page-break-after: avoid. Soft hyphens ­ for
words that confuse hyphenation engines.
Columns and Grids
Print columns: 2–3 on letter paper, never 4. Web columns: awkward (indefinite bottom edge). Grids guide, not guarantee — simpler grids enforce more consistency. Aligning ugly to a grid still produces ugly.
Responsive Web Typography
The rules don't change with screen size. Same line length, line spacing, hierarchy.
- Scale
font-sizeand containerwidthtogether - Always
max-widthon text containers — never edge-to-edge text - Don't use
chunit for exact measurement (only measures zero width) clamp()for fluid scaling:font-size: clamp(16px, 2.5vw, 20px)- Mobile minimum:
padding: 0 1remon text containers - The common failure: images/nav scale carefully, body text ignored
Screen Considerations
Modern screens render type nearly as well as print. "Sans serif for screens" was true for 72dpi and is now obsolete. Serif fonts work fine on modern screens. Dark mode: reduce weight slightly. Test on macOS and Windows (antialiasing differs).
Maxims of Page Layout
- Body text first — its 4 properties determine everything
- Foreground vs background — don't let chrome upstage body text
- Smallest visible increments — half-points matter
- When in doubt, try both — make samples, don't theorize
- Consistency — same things look the same
- Relate new to existing — each element constrains the next
- Keep it simple — 3 colors and 5 fonts? Think again
- Imitate what you like — emulate good typography from the wild
FAQ
What does the ui-typography skill do?
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 interfaces or legacy code, flag violations and provide fixes. Trigger on: any HTML/CSS/React artifact creation, "build a landing page", "create a component", "design a UI", "fix the typography", "make this look professional", "review this layout", web design, presentation design, dashboard creation, document generation, or any task producing visible text for humans. Even if the user doesn't mention typography, apply these rules whenever generating UI output.
How do I install ui-typography?
Run npx skills add https://github.com/bencium/bencium-marketplace --skill ui-typography in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/ui-typography/ (personal) or .claude/skills/ui-typography/ (project).
Which AI agents can use ui-typography?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is ui-typography safe to install?
Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk passed; Runlayer flagged items to review; ZeroLeaks passed. As with any skill, read the SKILL.md and bundled scripts before installing.
Who maintains ui-typography?
It is published by bencium in bencium/bencium-marketplace. It has 3,895 recorded installs.
More from bencium/bencium-marketplace
bencium-innovative-ux-designer
bencium/bencium-marketplace
Develop an independent visual language and turn the human-chosen direction into a production-ready graphic, brand, campaign, publication, web, or product system. Use when originality and differentiation matter enough to escape generic AI and Big Tech aesthetics. Guides a minimum-evidence start, ten isolated typography-led HTML design directions made only from type, color, and space, visual-first human judgement, explicit commitment, and concrete Round 2 production. Do not use for routine UI fixes, small components, or applying an existing design system.
bencium-impact-designer
bencium/bencium-marketplace
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics. Based on Anthropic's Frontend Designer Skill
bencium-controlled-ux-designer
bencium/bencium-marketplace
Expert UI/UX design guidance for unique, accessible interfaces. Use for visual decisions, colors, typography, layouts. Always ask before making design decisions. Use this skill when the user asks to build web components, pages, or applications.
design-audit
bencium/bencium-marketplace
Premium UI/UX design audit and refinement skill. Conducts systematic visual audits of existing apps and produces phased, implementation-ready design plans. Use this skill whenever the user asks to audit a UI, improve an app's visual design, make an interface feel more polished or premium, review design consistency, fix visual hierarchy, or refine spacing/typography/color. Also trigger when the user says "design review", "make it look better", "UI polish", "visual refinement", "design pass", "audit the design", or references making an app feel more professional. This skill is purely visual — it does not touch functionality, logic, or features. It elevates what exists.
human-architect-mindset
bencium/bencium-marketplace
Systematic architectural thinking for irreplaceable human capabilities - domain modeling, systems thinking, constraint navigation, and AI-aware problem decomposition. Use proactively when detecting architectural decisions, system design discussions, or multi-component planning.
bencium-aeo
bencium/bencium-marketplace
Generate AEO-optimized content (Answer Engine Optimization) for AI search visibility - ChatGPT, Claude, Gemini, AI Overviews. Use when optimizing websites for AI citations, creating FAQ schemas, evidence panels, or analyzing content for LLM extraction readiness.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.