Skip to content
Skill

Intlayer bundle optimization

Shrinks Intlayer translation dictionaries in production builds by purging and minifying

Intlayer bundle optimization is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
869
Last commit
License
Apache-2.0
Listing updated

Similar skills

About Intlayer bundle optimization

This skill guides an agent through reducing the size of Intlayer i18n dictionaries that end up in production bundles. It walks through the build options for purging unused fields, minifying keys, and choosing import modes such as dynamic loading, and explains how each one interacts with the optimize flag and the editor.

The core of the guidance is writing code that static analysis can follow. The skill shows how reading fields by name or destructuring keeps optimization working, how to replace dynamic key lookups with select, enu, cond or gender helpers, and how to avoid passing or spreading the whole content object. It also explains the common build warnings about dictionaries that cannot be purged or minified, and when keeping a dictionary whole is acceptable, such as for framework loaders that need the content as a value.

It expects an Intlayer project with an intlayer.config file and a bundler where the agent can run the build. Examples are in TypeScript and JSX. The skill points to a bundler analyzer such as rollup-plugin-visualizer or webpack-bundle-analyzer to confirm which dictionaries are heavy.

When your agent uses it

Keeps Intlayer dictionaries small in production bundles (purge, minify, import modes). Use when the user asks to "reduce bundle size", "optimize dictionaries", fix "cannot be purged or minified" / "Opaque field" build warnings, or configure `build.optimize`, `build.purge`, `build.minify` or `importMode`.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 5 files (160 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/intlayer-bundle-optimization to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aymericzip/intlayer.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/intlayer-bundle-optimization &&
cp -R "$tmp/.agents/skills/intlayer-bundle-optimization" ~/.claude/skills/intlayer-bundle-optimization &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/intlayer-bundle-optimization inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/intlayer-bundle-optimization to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aymericzip/intlayer.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/intlayer-bundle-optimization &&
cp -R "$tmp/.agents/skills/intlayer-bundle-optimization" ~/.agents/skills/intlayer-bundle-optimization &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/intlayer-bundle-optimization inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/intlayer-bundle-optimization to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aymericzip/intlayer.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/intlayer-bundle-optimization &&
cp -R "$tmp/.agents/skills/intlayer-bundle-optimization" ~/.cursor/skills/intlayer-bundle-optimization &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/intlayer-bundle-optimization inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/aymericzip/intlayer.git --path .agents/skills/intlayer-bundle-optimization

Or copy the folder to ~/.gemini/skills/intlayer-bundle-optimization yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/intlayer-bundle-optimization:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/aymericzip/intlayer.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/intlayer-bundle-optimization &&
cp -R "$tmp/.agents/skills/intlayer-bundle-optimization" ~/.copilot/skills/intlayer-bundle-optimization &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/intlayer-bundle-optimization inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/aymericzip/intlayer.git

Then copy intlayer/.agents/skills/intlayer-bundle-optimization into your agent's skills folder as intlayer-bundle-optimization. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Purge unused fields
Configures removal of dictionary fields that the source code never reads.
Minify dictionary keys
Renames field keys to short aliases to reduce the size of shipped content.
Import mode selection
Covers static, dynamic and fetch loading so only the needed locale is shipped.
Analyzer-friendly code patterns
Shows how to read fields by name and avoid dynamic keys that block optimization.
Build warning fixes
Explains the cannot be purged and opaque field warnings and how to resolve them.
Bundle size inspection
Points to bundler analyzers for finding heavy dictionaries.

Good for

  • Reduce the bundle size of my Intlayer translations
  • Fix the Opaque field warning in my production build
  • Switch my dictionaries to dynamic import mode
  • Refactor a component so its dictionary can be purged
  • Configure build.purge and build.minify in intlayer.config

Intlayer bundle optimization FAQ

When does Intlayer bundle optimization trigger?

It applies when the user asks to reduce bundle size or optimize dictionaries, mentions the cannot be purged or Opaque field warnings, or asks to configure build.optimize, build.purge, build.minify or importMode.

Does purge or minify work when optimize is false?

No. Purge and minify do nothing when optimize is set to false.

Does minify apply to every dictionary?

No. Key renaming is skipped while editor.enabled is true and for dictionaries using importMode fetch.

What code patterns prevent optimization?

Spreading the content object, iterating over it, passing it to helpers, passing it as a prop, and reading fields with dynamic keys all keep fields or whole dictionaries unoptimized.

What does the skill need to run?

It needs no scripts. It works with an Intlayer project and a bundler that can run builds and optionally an analyzer plugin.

How do I install Intlayer bundle optimization in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/intlayer-bundle-optimization to use it in all your projects, or to .claude/skills/intlayer-bundle-optimization in one project.

Does Intlayer bundle optimization run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Intlayer bundle optimization?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Intlayer bundle optimization?

The closest alternatives to Intlayer bundle optimization are Intlayer vanilla, Intlayer usage, Intlayer svelte, Intlayer CLI and Intlayer compiler.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from aymericzip/intlayer

  1. Adds Intlayer i18n to Angular apps with per-component content files

    • Open source
    • 869 GitHub stars
    • Developer tools
  2. Adds Intlayer internationalization to Astro sites with server-side translated content

    • Open source
    • 869 GitHub stars
    • Developer tools
  3. Adds Intlayer i18n to Node.js and Bun backends so API responses follow the request locale

    • Open source
    • 869 GitHub stars
    • Developer tools
  4. Lets your agent run Intlayer CLI commands to build, audit, sync and manage i18n

    • Open source
    • 869 GitHub stars
    • Developer tools
  5. Migrates an existing i18n library to Intlayer while keeping its original API

    • Open source
    • 869 GitHub stars
    • Developer tools
  6. Sets up Intlayer to extract translatable strings from components automatically

    • Open source
    • 869 GitHub stars
    • Developer tools