# Intlayer preact

> Intlayer preact is an open-source agent skill for developer tools. Adds Intlayer i18n to Preact apps with per-component translated content files. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/aymericzip/intlayer/tree/main/.agents/skills/intlayer-preact
- **Repository:** https://github.com/aymericzip/intlayer
- **GitHub stars:** 869
- **License:** Apache-2.0
- **Skill name:** intlayer-preact
- **Collection:** https://github.com/aymericzip/intlayer
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill guides an agent through internationalizing a Preact application with Intlayer. Instead of one large global translation file, it sets up content declarations that live next to each component, so a component's strings sit in their own dictionary file.

The workflow has two parts: a content file that declares translated text for each supported locale using the t() helper, and a Preact component that reads that dictionary through the useIntlayer hook from preact-intlayer. The skill also points to reference notes for setting up Vite with Preact or Astro with Preact, handling variants, collections, formatters and the Intlayer compiler, which can extract content keys from components via a CLI command.

It expects a Preact project using the intlayer and preact-intlayer packages. It also recommends reading content fields by name rather than indexing them at runtime, so the build can trim unused dictionary entries.

## When your agent uses it

> Integrates Intlayer internationalization with Preact applications. Use when the user asks to "setup Preact i18n", create a new translated component, use the "useIntlayer" hook in Preact, or configure providers.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/aymericzip/intlayer/tree/HEAD/.agents/skills/intlayer-preact)
- [License: Apache-2.0](https://github.com/aymericzip/intlayer/tree/HEAD/.agents/skills/intlayer-preact)

## Features

- **Component-level content files:** Shows how to declare translated strings in a content file placed beside each component.
- **useIntlayer hook usage:** Explains how a Preact component reads its dictionary through the useIntlayer hook.
- **Vite and Preact setup:** Points to reference notes for configuring Intlayer in a Vite-based Preact project.
- **Astro and Preact setup:** Includes a reference note for using Intlayer with Astro and Preact together.
- **Compiler key extraction:** Covers extracting content keys from components with a CLI command or at build time.
- **Bundle optimization rules:** Advises on access patterns that let the build purge and minify unused dictionary content.

## Good for

- Set up Preact internationalization with Intlayer
- Create a translated Preact component with its own content file
- Add a useIntlayer hook to an existing Preact component
- Configure Intlayer providers in a Preact app
- Extract content keys from Preact components

## Install

### Claude Code

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

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

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

### Codex

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

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

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

### Cursor

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

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

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

### Gemini CLI

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

```sh
gemini skills install https://github.com/aymericzip/intlayer.git --path .agents/skills/intlayer-preact
```

Or copy the folder to `~/.gemini/skills/intlayer-preact` yourself.

### VS Code

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

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

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

### Other agents

Get the folder:

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

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

## FAQ

### When does Intlayer preact trigger?

It applies when the user asks to set up Preact i18n, create a new translated component, use the useIntlayer hook in Preact, or configure providers.

### What does a translated component need?

Two files: a content file declaring the dictionary with t() for each locale, and a Preact component that calls useIntlayer with the dictionary key.

### Does Intlayer preact run any scripts?

No scripts are included with this skill.

### How do I install Intlayer preact in Claude Code?

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

### Does Intlayer preact 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 preact?

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 preact?

The closest alternatives to Intlayer preact are Intlayer react, Intlayer svelte, Intlayer lit, Intlayer usage and Intlayer vanilla.

## Where this comes from

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

## Alternatives

- [Intlayer react](https://ai-powered.com/skills/intlayer-react): Intlayer react is an open-source agent skill for developer tools.
- [Intlayer svelte](https://ai-powered.com/skills/intlayer-svelte): Intlayer svelte is an open-source agent skill for developer tools.
- [Intlayer lit](https://ai-powered.com/skills/intlayer-lit): Intlayer lit is an open-source agent skill for developer tools.
- [Intlayer usage](https://ai-powered.com/skills/intlayer-usage): Intlayer usage is an open-source agent skill for developer tools.
- [Intlayer vanilla](https://ai-powered.com/skills/intlayer-vanilla): Intlayer vanilla is an open-source agent skill for developer tools.
- [Intlayer angular](https://ai-powered.com/skills/intlayer-angular): Intlayer angular is an open-source agent skill for developer tools.
- [Intlayer solid](https://ai-powered.com/skills/intlayer-solid): Intlayer solid is an open-source agent skill for developer tools.
- [Intlayer compiler](https://ai-powered.com/skills/intlayer-compiler): Intlayer compiler is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/intlayer-preact
