Skill library

Agent skill UI design

Better Typography

Refine font sizes, line height, wrapping and numeric alignment so text reads clearly across screen sizes.

  • Typography
  • Font pairing
  • Readability

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add jakubkrehel/skills --skill better-typography --agent claude-code --yes

Check this file in your project.claude/skills/better-typography/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add jakubkrehel/skills --skill better-typography

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Bring the route, real strings, and the fonts and styles the project already loads. A browser preview lets you check computed styles and wrapping.

View operation manual

What this skill helps with

  • Define a consistent type scale and assign styles by text role.
  • Tune leading, tracking and line breaks for headings and long text.
  • Use font features such as tabular numerals where alignment matters.

Good for

  • Editorial websites
  • Pricing tables and text-heavy interfaces
Typography scope
Text roles, loaded font faces, line-height, wrapping, and numeric features.
Source of styles
Put fixes in the project’s CSS, utility classes, or existing type tokens.
Verification
Compare declared and computed styles. Resize using real content and report any checks you could not run.
Skill name
better-typography

Describe what makes the text hard to read or compare

A request the assistant cannot measure

Make the typography feel more premium.

There is no target page, text role, or example showing where the current layout fails.

Give it one visible problem and a way to check it

  1. Share a route and a real heading, paragraph, or price that shows the problem.
  2. Ask for computed values and the token or style that produces each finding.
  3. Compare the same strings and states at narrow and wide widths.

Better Typography operation manual

Improve article readability or steady the prices on a plan comparison. Replace the bracketed inputs with real project details.

Start with a real article that exposes awkward wraps or an overly wide measure. Define a small fix, then check the same content.

  1. Measure how the current article reads

    Inspect the rendered title, section headings, body and captions on the same page at phone and desktop widths.

    Prompt · Step 1
    Use the better-typography Skill to audit [article route or component] with [representative article and languages]. If the route or examples are missing, ask for them. Identify the loaded font faces and the styles for the title, section headings, body and captions.
    
    If a browser is available, compare the article at 375px and 1440px. Record the computed size, weight and line-height for each role. Check the body measure on desktop and use real long strings to find awkward wraps or overflow. Also check clipping at 320 CSS pixels and 200% browser zoom where supported. Save the baseline measurements for the later comparison. Cite source locations where possible. Keep the audit read-only and mark observations you could not verify.
  2. Apply the approved type and wrap fixes

    Make the corrections in the current styling system, using separate rules for short headlines and long text.

    Prompt · Step 2
    Use better-typography to apply [approved typography findings] to [article route or component]. Ask for the scope if it is missing. Keep the current typeface, copy, links, and semantic heading levels. Reuse existing role styles and loaded font weights when they fit.
    
    Use unitless line-height and size long-form text with rem. For English body copy, check the skill’s 60–75 character measure on a wide screen and verify other scripts with representative text. Cap the measure without forcing a minimum width on phones. Consider text-wrap: balance for short headings and text-wrap: pretty for prose where supported. Check long links separately and keep the text readable if the browser ignores either style.
  3. Verify real content at both widths

    Compare the original article and a long localized headline under the same conditions.

    • Typography roles still match the existing document structure.
    • Long localized text and links fit the article on a narrow screen.
    • Multiple lines of body text remain easy to follow at desktop width.
    Prompt · Step 3
    Use better-typography to verify [article route or component] with [article and longest localized headline]. Compare the same content at 375px and 1440px and also check clipping at 320 CSS pixels and 200% browser zoom where supported. Wait for fonts to settle. Check computed sizes and line-height, then use the browser’s rendered-font inspection to identify the face actually used, including fallback. Check the intended weight against the faces available in the project. For pages in different scripts or directions, verify the applicable lang and dir values. Check that titles, paragraphs, links and captions remain readable and selectable. If the browser cannot be opened, report the source checks you did and leave rendering checks marked unverified.
    
    Compare with the saved baseline and report any missing before measurements as unverified. For each remaining wrap or fallback issue, give the severity, affected location, current behavior and the proposed fix. Keep the scope of the fix to the approved article styles.

Look up the rule behind a text problem

Use these references from the installed Skill to narrow the review.

Body text gets crowded when a caption wrapsLine-height
Command or reference
spacing-and-sizing.md
Examples
Compare the unitless line-height and computed styles with a real multi-line caption.
Headlines, links or localized strings wrap awkwardlyWrapping
Command or reference
wrapping-and-punctuation.md
Examples
Check a short title, a long body link and a translated title separately.
Price digits shift when values changeNumeric features
Command or reference
font-variant-numeric: tabular-nums;
Examples
Apply it to the changing value with a supported font and compare equal-digit samples.

Troubleshooting and FAQ

Does the Skill install a font or change my copy?

The installer adds the Skill instructions. The workflow uses the project’s existing styles and faces by default. Ask explicitly if changing the typeface or copy is part of the project brief.

Why do prices still move with tabular numerals?

First verify that the rendered font supports tabular figures. Equal digit widths still leave differences from the number of digits, currency signs, and separate billing labels.

What can be checked without a browser?

Review declared styles, loaded face definitions and truncation rules against known strings. Record computed values and visual checks as unverified until you can open the actual page.