Audit the web fonts in your repo with an agent skill

A free skill for coding agents. It scans your repo for web font loading problems, unused weights and licence flags, without uploading your code.

1. Install the skill

npx skills add ruzicic/fontalt-skills --skill webfont-audit

2. Connect the font catalogue (optional)

claude mcp add --transport http fontalternatives https://mcp.fontalt.com/mcp

Then ask your agent: "Audit this project's web fonts."

Free and MIT-licensed. The scan runs on your machine. The MCP server is sent font family names only.

Using Cursor, Codex or another agent?

Cursor

Install the skill

npx skills add ruzicic/fontalt-skills --skill webfont-audit -a cursor

Add to .cursor/mcp.json

{
  "mcpServers": {
    "fontalternatives": {
      "url": "https://mcp.fontalt.com/mcp"
    }
  }
}

Codex

Install the skill

npx skills add ruzicic/fontalt-skills --skill webfont-audit -a codex

Connect the MCP server

codex mcp add fontalternatives --url https://mcp.fontalt.com/mcp

Any other agent

  • Skill: copy skills/webfont-audit/ into the agent's skills folder. See docs/install.md on GitHub.
  • MCP: add an HTTP MCP server at https://mcp.fontalt.com/mcp. No key, no sign-in.

What the audit checks

  • font-display

    A missing, auto or block value that can hide text while the font loads.

    missing-font-display, font-display-block

  • Unused weights

    Weights you load but never use.

    unused-face-weight

  • Render-blocking Google Fonts CSS

    A stylesheet link or @import that holds up first paint.

    render-blocking-google-css

  • Subset mismatch

    next/font subsets that are missing or don't match.

    nextfont-subset-mismatch

  • Mixed CDN

    Fonts split across more than one origin.

    mixed-cdn

  • Licence and catalogue flags

    The licence on record, and weights, italics or axes the font doesn't have.

    with the MCP server

Further reading: font-display on MDN · Google's guide to stable font fallbacks · Chrome DevTools LCP skill · optimize-web-fonts · Font licence guide

Sample report

Sample report

Webfont Audit 1.0.0 · scan webfont-audit.scan/v1
families
17
findings
15
files scanned
11
  • missing-font-display

    css-fontface/styles/fonts.css:2 (Source Serif)

    5

    Fix: add "font-display: swap;" to this rule.

  • render-blocking-google-css

    google-link/styles.css:2

    3

    Fix: replace it with a <link rel="stylesheet"> in the HTML head after a preconnect to https://fonts.googleapis.com and https://fonts.gstatic.com, or self-host the fonts.

  • font-display-block

    next-font/app/layout.js:8 (Roboto Mono)

    2

    Fix: remove the display option (next/font defaults to "swap") or set display: "swap".

  • unused-face-weight

    next-font/app/layout.js:15 (Playfair Display)

    2

    Fix: remove this weight, unless something the scan cannot see applies it (styles set by scripts, CMS content).

  • nextfont-subset-mismatch

    next-font/app/layout.js:15 (Playfair Display)

    2

    Fix: add the subsets your text uses, for example subsets: ["latin"], or set preload: false.

  • mixed-cdn

    google-link/about.html:7

    1

    Fix: serve all web fonts from one origin, ideally your own.

Fonts found

  • Inter Declared 400, 600, 700, 900 Used - font-display missing/swap/unknown Via fontsource, google-fonts, next-font-google
  • Source Serif Declared 400, 700 Used 700 font-display auto/missing Via font-face
  • Roboto Mono Declared 400, 700 Used - font-display block Via next-font-google
  • Playfair Display Declared 800 Used - font-display swap Via next-font-google
  • Material Symbols Outlined Declared 100..700 Used - font-display block Via google-fonts

… 12 more families

Scanner output from a demo repo, 15 Nov 2026. This is the local scan only: catalogue and licence checks need the MCP server and are not part of this run.

How it works

  1. 1 Install

    Run the first command. It adds the skill, a short SKILL.md and one Node script with no dependencies, to your agent's skills folder.

  2. 2 Ask

    Ask your agent to audit your web fonts. The script reads CSS, HTML, JS and config files and lists each font, weight and loading method.

  3. 3 Report

    With the MCP server connected, the agent looks up each family in our catalogue, adds weight, italic, axis and licence checks, and writes the report.

MIT-licensed. Source: github.com/ruzicic/fontalt-skills.

FAQ

What does Webfont Audit send to FontAlternatives?

The skill sends nothing. Its scan script runs on your machine and makes no network request. If you connect the MCP server, your agent sends it the font family names found in your project, such as "Inter", to look them up in our catalogue. Repo files, file paths and URLs are never sent, and the server needs no account or API key.

Does it work without the MCP server?

Yes. Without it you still get the local findings: missing font-display, weights declared but never used, render-blocking Google Fonts CSS, next/font subset mismatches and fonts loaded from more than one CDN. The catalogue checks (weights, italics, axes and licence flags) are marked "not checked" in the report, and the agent prints the command to connect the server.

Which font-display value should I use?

Use swap by default and write it in every @font-face rule. It shows text straight away in a fallback font, which protects first paint and LCP. Pair it with a metric-matched fallback so the swap doesn't move the layout. Optional is fine if you would rather keep the fallback than swap late. Keep block for icon fonts, where the fallback isn't readable text. The audit flags a missing value, auto and block.

Can it tell me whether my font licence covers my project?

No. It reports the licence we have on record for a font, what that licence generally allows (commercial use, modification, redistribution) and a link to the official text. It doesn't judge your project and it isn't legal advice. For fonts where we hold no licence data, such as commercial typefaces, the report says so instead of guessing.

Which agents and frameworks does it support?

The skill uses the Agent Skills format, so npx skills add installs it into Claude Code, Cursor, Codex and other agents that read that format. The scanner reads CSS, SCSS, Less, HTML, JavaScript, TypeScript, Vue, Svelte and Astro files, Tailwind config, next/font and Fontsource imports. It needs Node.js 18 or later and nothing else.

What does the scan read?

Your source files, not a rendered page. It finds every @font-face rule, Google Fonts link and import, next/font call, Fontsource import and Tailwind font family, then compares what you declare with what your CSS uses. From the files alone it reports five things: a missing font-display, a weight you load but never use, Google Fonts CSS that blocks rendering, a next/font subset mismatch, and fonts split across more than one CDN.

What does the font catalogue add?

With the MCP server connected, the agent sends the family names to our catalogue in one request. The answer adds what the files can't show: a weight, italic or variable axis the font doesn't have (the browser then substitutes the nearest weight or synthesises one), the licence we have on record with its official text, and names that aren't in our data. A font we know nothing about is reported as not in our data, never as a problem.

What doesn't the audit do?

It stops where your files stop. It doesn't fetch a URL, render a page or measure LCP, and it never calls a project compliant or in breach of a licence. To measure loading in a real browser, use Chrome DevTools; to shrink the font files themselves, use the optimize-web-fonts skill from the same repo.

Free Twins: one premium font and its best free lookalikes, every Thursday.

Get the free font substitution kit now

Confirm by email and the kit is yours.

We'll email you a link to confirm. Unsubscribe in one click. No spam, no selling your address. Privacy

Search fonts

Esc Close Open as a page