FontOps1.3.0 Asset Store ↗
  1. FontOps
  2. Automate

AI skills and agent API

Let Unity AI Assistant, Claude Code, Cursor or any coding agent drive FontOps for you: search, install, audit, build palettes and apply roles through one JSON request and response.

New in 1.3
Available from FontOps 1.3.0. Everything on this page also works without an agent: the same JSON contract is a scriptable, dialog-free API for CI and editor tooling.

What ships in the package

FontOps bundles five SKILL.md files under Packages/dev.davgtz.fontops/AIAssistantSkills/. Each one teaches an agent when a task is a FontOps task and exactly which JSON request to send — no UI clicking, no guessing at asset paths.

Skill Teaches the agent to…
fontops-overviewRecognise a font/typography task, pick a transport, send a request, read the response (start here)
fontops-search-installSearch Google Fonts / Fontshare / Fontsource and install weights as .ttf + TMP SDF assets
fontops-audit-textsInventory every text component, audit against a palette, grade usage A–F, diff before/after
fontops-paletteCreate or edit a Font Palette (roles) from JSON
fontops-apply-roleApply a palette role to text components and verify the change

Point your agent at the skills

  1. Unity AI Assistant — discovers the folder automatically. Allow it under Edit → Preferences → AI → Assistant → Skills.
  2. Claude Code — press INSTALL AI SKILLS on the Ask an AI agent card of Get started. It copies the skills into .claude/skills/, where Claude Code loads them on its own.
  3. Cursor / Codex / Copilot — add one line to your rules file (.cursor/rules, AGENTS.md, .github/copilot-instructions.md): FontOps skills live in Packages/dev.davgtz.fontops/AIAssistantSkills/ — read the matching SKILL.md before any font task.
Inside FontOps, the last Get started step, Ask an AI agent, has INSTALL AI SKILLS and a prompt to copy. It ticks after the first successful request.
Then just ask in plain language: “Add Space Grotesk in regular and bold and give me the TMP asset paths” or “Which texts don’t follow our palette?”

The JSON contract

Every action is one flat JSON request and one JSON response. command is required; other fields are read only by the commands that need them. Paths are project-relative Unity asset paths with forward slashes.

Command Fields Result
help–Command list and file paths
configgoogleApiKey (optional; "-" clears)Providers, download folders, SDF settings (including staticAtlasCharset: ascii or latin1), tmpEssentialsImported
import-tmp-essentials–Imports TMP Essential Resources without the dialog, returns config
fetchforceRefreshRefreshes the catalogs (disk-cached otherwise)
searchquery, category, source, limitFamilies with variants, licence, specimen URL, installed (true when at least one style is at its FontOps install path)
installfamily, variants, source, createSdf, staticAtlas, charactersInstalled .ttf paths, sdfAssets, per-variant errors. staticAtlas bakes the Settings tab’s static character set (printable ASCII, or ASCII + Latin-1); characters bakes exactly that set instead. Fontsource installs also add the extra subsets chosen in Settings; the result doesn’t list them.
installed–Every font file / TMP asset in the project, by family
inspectpath (.ttf/.otf or TMP_FontAsset)Licence, copyright, designer, embedding permission, and metrics read from the font file itself
scanfolders (default ["Assets"])Every TMP and legacy text with font, size, style, hierarchy path
auditpalettePath, foldersCompliant / non-compliant / ignored per text, plus the closest role. complianceRate = compliant ÷ (compliant + non-compliant); ignored texts count on neither side.
usagefolders, palettePath (optional, applies its ignore list)Palette-less health grade A–F with flags; each flag has a Kind (Placeholder, Sprawl, UnusedFonts, NoPalette or Info). Texts with FontComplianceIgnore are skipped
palette-export / palette-savepalettePath, palettePalette roles as JSON, or the saved asset path. The window’s EXPORT / IMPORT use the same JSON.
applypalettePath, roleName, targets or fontFilter (+ folders), mode, propertiesBefore/after snapshot per target, the saved scenes/prefabs, and unsavedAssets (open scenes that already had unsaved edits: changed in memory, left for you to save)

Responses look like this:

{"ok": true,  "command": "install", "result": { ... }}
{"ok": false, "command": "apply",   "error": "Role 'Title' not in palette. Roles: Header, Body, Caption, Button"}

A warning field appears when a provider fetch failed but cached data was used, or when a scan skipped a scene it could not open.

Three ways to send a request

Editor closed — batch mode (CI, scripts)

"<UnityEditor>/Unity.exe" -batchmode -projectPath "<project>" -logFile - ^
  -executeMethod dev.davgtz.fontops.Editor.FontOpsCli.Run ^
  -fontopsRequest "<abs>/request.json" -fontopsOut "<abs>/response.json"

Exit codes: 0 ok, 1 command error, 2 missing request file, 3 timeout (300 s).

Do not pass -quit. Downloads finish asynchronously; FontOps waits for them and exits the editor itself.

Editor open — MCP script runner (fastest)

When the agent can run C# in the open editor (an MCP execute_code tool or similar), call FontOps directly. Script runners that compile a method body reject using directives, so fully qualify every type:

dev.davgtz.fontops.Editor.FontOpsCli.Execute("{\"command\":\"scan\"}",
    json => System.IO.File.WriteAllText("Temp/fontops-scan.json", json));

Then poll for the file you named. Use a different file per request so responses never overwrite each other.

From C#

FontOpsCli.Execute("{\"command\":\"scan\"}", json => Debug.Log(json));

// Strongly typed alternative
var texts = FontOpsAgent.ScanTexts(folders: new[] { "Assets/UI" });

A typical session

Six requests take a project from a placeholder font to a compliant screen. Each block is one request.

  1. Which providers are on, where fonts install, whether TMP essentials exist.
    {"command":"config"}
  2. Pick a family.
    {"command":"search","query":"grotesk","category":"sans-serif"}
  3. TTFs land in Assets/Fonts/<Provider>/Space Grotesk/ with SDF assets and a .fontops.json manifest that records the licence. Every install also drops the full OFL.txt / LICENSE.txt, Google Fonts included.
    {"command":"install","family":"Space Grotesk","variants":["regular","700"]}
  4. Point the Body role at the new SDF asset.
    {"command":"palette-save","palettePath":"Assets/Fonts/Palettes/Main.asset","palette":{ ... }}
  5. Every text still on the placeholder font gets a FontPaletteApplier for Body; the response lists each before/after.
    {"command":"apply","palettePath":"Assets/Fonts/Palettes/Main.asset","roleName":"Body","fontFilter":"LiberationSans"}
  6. Confirm nonCompliant dropped.
    {"command":"audit","palettePath":"Assets/Fonts/Palettes/Main.asset"}

Good to know

  • One request at a time. Requests queue; a second install sent mid-download waits and answers later.
  • Scans stay inside Assets/. Package scenes are never opened. Text-less scenes are detected from their YAML and skipped, so scans do not touch lighting data for them. Pass folders to skip vendor content such as TMP examples or SDK demo scenes.
  • Legacy UnityEngine.UI.Text is reported by scan/audit but apply only modifies TextMeshPro.
  • Open scenes follow palette edits. After palette-save, texts with a FontPaletteApplier in open scenes and the open prefab update by themselves; the scenes are left for you to save. Closed scenes and prefab assets don’t: rerun apply for them, or press Apply to Text Component on the applier.
  • Renaming a role through palette-save does not rebind texts. Their appliers keep the old name and show the role as missing. Rerun apply with the new roleName on those texts, or rename the role in the FontOps window, which rebinds texts in open scenes. A window IMPORT that renames roles has the same limit.
  • Compliance is font-only. audit checks which font a text uses; a text with the right font at the wrong size still counts as compliant. matchedRole is the text’s applier role when the palette has it, or else the closest role (by size and style) among those using its font. suggestedRole and its score tell you how close a non-compliant text is to a role.
  • No APPLY… command. The window’s APPLY… recognises each text’s role and shows a before/after render. The agent applies one role per apply request.
  • Same settings as the window. Download folders (saved per project), SDF atlas settings, and the Google Fonts key come from the FontOps Settings tab.
  • Commercial-safe stays on. Agents only ever see the OFL / Apache / MIT / UFL catalogs the window shows.

Troubleshooting

The agent doesn't use the skills

Unity AI Assistant needs them allowed under Edit → Preferences → AI → Assistant → Skills. Claude Code finds them after INSTALL AI SKILLS on Get started’s Ask an AI agent card copies them to .claude/skills/. Other agents need the one-line pointer in their rules file (see Point your agent at the skills).

Batch mode exits with code 3

The request timed out after 300 seconds. Code 2 means the request file wasn't found and 1 is a command error: read error in the response file. Don't pass -quit: FontOps waits for downloads and exits the editor itself.

A text with the wrong size counts as compliant

The agent's audit checks the font only. Use suggestedRole and its score to see how close a text is to a role, or the Text Auditor in the window, which also names size and style differences.

After a role rename, texts show the role as missing

A rename through palette-save doesn't rebind texts. Rerun apply with the new roleName on them, or rename the role in the FontOps window, which rebinds texts in open scenes.

FontOps 1.3.0 · Unity 2022.3 LTS and Unity 6Something wrong or missing? [email protected]