agentleFS
ViviBeriViviBeri/webcraft-pro/skills/font-performance/SKILL.md

font-performance

Skill11 starsChanged 11 days agoMITView on GitHub

Improve typography loading when web fonts delay text rendering, increase transfer size or cause layout shifts.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when custom fonts affect first render, layout stability, bandwidth or text readability.

    line 8
  2. Distinctive:

    Remove unused families and weights.

    line 13
  3. Distinctive:

    Use efficient formats such as WOFF2 and subset only when language and glyph coverage remain correct.

    line 14
  4. Distinctive:

    Use unicode-range only when subsets are correctly generated and tested for all required scripts.

    line 18
  5. Distinctive:

    Do not preload every weight or every language subset.

    line 23
  6. Distinctive:

    Do not rely on a font-display setting to fix poor font selection or oversized files.

    line 24
  7. Distinctive:

    Consider metric-compatible fallbacks and font metric overrides to reduce layout shifts.

    line 25
  8. Distinctive:

    Verify diacritics, multilingual content, variable font axes and synthetic bold/italic behavior.

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Font Performance

Use this skill when custom fonts affect first render, layout stability, bandwidth or text readability.

Workflow

  1. Inventory font families, weights, styles, language coverage and actual usage.
  2. Remove unused families and weights. Prefer a small number of deliberate font files.
  3. Use efficient formats such as WOFF2 and subset only when language and glyph coverage remain correct.
  4. Define robust system fallback stacks and test line wrapping, weight and metrics before deployment.
  5. Choose font-display behavior deliberately. Use swap or optional based on product requirements and acceptable fallback behavior.
  6. Preload only a font file proven critical to above-the-fold rendering. Match its URL, type and crossorigin mode to the eventual request.
  7. Use unicode-range only when subsets are correctly generated and tested for all required scripts.
  8. Measure font transfer, request priority, text paint and layout shifts on mobile and desktop.

Engineering rules

  • Do not preload every weight or every language subset.
  • Do not rely on a font-display setting to fix poor font selection or oversized files.
  • Consider metric-compatible fallbacks and font metric overrides to reduce layout shifts.
  • Preserve readability when fonts fail or load slowly.
  • Verify diacritics, multilingual content, variable font axes and synthetic bold/italic behavior.
  • Respect font licensing and self-hosting requirements.

Deliverables

Provide font inventory, files removed or retained, preload rationale, fallback strategy, licensing notes and measured loading/layout impact.

Common AI failure mode

Failure: An agent swaps in a custom web font whose metrics differ substantially from the fallback, causing text blocks to reflow after the font loads.

Why it matters: Late changes in glyph widths and line metrics move headings, controls, and surrounding content, producing cumulative layout shift and disrupting reading position or interaction.

Symptoms:

  • Text wraps to different lines after the web font loads.
  • Headings or controls move vertically despite reserved image and media dimensions.
  • The selected fallback has visibly different width or line-height metrics from the final font.

Prevention: Choose a metric-compatible fallback and use supported font metric overrides where appropriate. Load only required WOFF2 subsets and weights, preload only a measured critical font, and choose font-display deliberately. Measure layout shift and text paint on representative devices and verify multilingual glyph coverage and readability when the custom font is unavailable.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.