fonts-config-plugin — Claude Code rule: what it does, how to install
fonts-config-plugin is a Claude Code rule that embeds Expo fonts at build time. It directs the assistant to configure the expo-font plugin instead of runtime loaders.
AGPL-3.0 ★ 88 updated 2026-11-17
.claude/rules/fonts-config-plugin.mdWhat fonts-config-plugin does
This rule guides the coding agent to declare font assets inside app.json via the expo-font configuration plugin. Embedding files into the native package eliminates runtime calls like useFonts or Font.loadAsync, removing the need for loading screens or display guards in React Native views.
Applying these asset changes requires running npx expo prebuild followed by a fresh native compilation. Native binaries will miss the linked font files if the prebuild command is omitted.
What it helps with
- embed custom font files into native Expo builds
- eliminate font loading state guards in components
- configure the expo-font entry in app.json
- replace useFonts and Font.loadAsync implementations
Example prompts for the agent
- Configure our custom font in app.json using the expo-font plugin
- Switch font handling from useFonts to build-time embedding
- Clean up font loading checks from the main App component
How to install fonts-config-plugin
Manually: put the files in place
.claude/rules/fonts-config-plugin.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/fonts-config-plugin.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/fonts-config-plugin.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/fonts-config-plugin.mdManually: put the files in place
.clinerules/fonts-config-plugin.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about fonts-config-plugin
How to install fonts-config-plugin in Claude Code?
Save the rule configuration file to .claude/rules/fonts-config-plugin.md in the root of your project.
What does fonts-config-plugin change in a project?
It directs the agent to embed typography assets into native packages using Expo config plugins rather than loading them asynchronously inside UI components.
What command is required after editing app.json?
Run npx expo prebuild in your terminal and rebuild the native application.