Lingui Skills

This repository contains Agent Skills for Lingui, a lightweight internationalization (i18n) framework for JavaScript and TypeScript.
What are Agent Skills?
Skills are reusable capabilities for AI coding agents. They provide procedural knowledge and best practices that help AI agents implement features correctly and efficiently.
Installation
Install all Lingui skills with a single command:
npx skills add lingui/skills
This gives your AI coding agent access to comprehensive Lingui knowledge including best practices, common pitfalls, and configuration patterns.
Claude Code Plugin
Alternatively, install the skills as a Claude Code plugin. In Claude Code, run:
/plugin marketplace add lingui/skills
/plugin install lingui@lingui-skills
All skills load automatically. Every commit to main is a new plugin version, so newly added skills reach you as soon as the plugin updates. Turn on auto-update once (run /plugin, open the Marketplaces tab, select lingui-skills, choose Enable auto-update), or update by hand:
/plugin update lingui@lingui-skills
/reload-plugins
Where the /plugin panel is not available, such as in IDE extensions, run claude plugin update lingui@lingui-skills in a terminal instead. A running session keeps the version it started with, so new skills appear after /reload-plugins or a restart. Note that /plugin marketplace update only refreshes the catalog and does not update the installed plugin.
Other Agent Tools (Plugin Install)
The repo is also installable as a plugin via the plugins CLI, which auto-detects your installed agent tools (Claude Code, Cursor, Codex, Grok Build, Kimi Code, GitHub Copilot CLI, VS Code) and installs through each tool's native plugin system:
npx plugins add lingui/skills
Gemini CLI
The repo is a Gemini CLI extension — install it with:
gemini extensions install https://github.com/lingui/skills
GitHub CLI
The GitHub CLI (v2.90+) can install the skills for GitHub Copilot or any other supported agent:
gh skill install lingui/skills --all
Use --agent <name> (e.g. --agent cursor) to target a specific tool, and gh skill update to pull newer versions.
Available Skills
lingui-best-practices
Comprehensive guide for implementing internationalization with Lingui in React and JavaScript applications.
What it covers:
- Choosing the right macro (
Trans, t, msg, Plural) for each situation
- Setting up Lingui with
I18nProvider
- Using
Trans macro for JSX translations
- Using
useLingui() for non-JSX translations
- Pluralization with
Plural component
- Naming placeholders with
ph() instead of positional {0}, and JSX tags (<link> instead of <0>) with macro.jsxPlaceholderDefaults
- App-wide placeholder values (product name, version) with default variables (
i18n.setVariables, Lingui 6.10+)
- Code with no build step (Node.js scripts, serverless functions, test runners) via the experimental runtime macro (
@lingui/core/runtime-macro, Lingui 6.10+)
- Date and number formatting, and custom formatters that translations call (
i18n.setFormatters, Lingui 6.12+)
- Message extraction and compilation workflow
- Catalog hygiene: build-script integration, gitignore rules, CI checks with
lingui check sync / lingui check missing
- Single-sourced locale metadata (direction, display names, fallback resolution)
- Configuration patterns and Lingui 6 upgrade notes (ESM-only, Node ≥ 22.19)
- Common mistakes and how to avoid them
Use when:
- Adding internationalization to a new or existing project
- Translating React components
- Working with message catalogs
- Setting up or modifying
lingui.config.js
- Debugging i18n issues
lingui-framework-setup
Framework-native Lingui setup recipes for the five major React stacks — Next.js App Router (RSC), Vite SPA, React Router 7 framework mode, Remix v2, and TanStack Start — and Vue 3 on Vite.
What it covers:
- Detection-first setup: identify the framework, compiler (SWC vs Babel), and router before recommending anything
- Server-side locale resolution under SSR (cookie +
Accept-Language) and why browser detection breaks there
- Per-request/per-locale i18n instances — avoiding cross-request locale bleed
- The native macro transform in
@lingui/vite-plugin as the Vite default; the @vitejs/plugin-react v6 trap and SWC plugin pinning for the Babel/SWC fallbacks
- Locale-prefixed URL strategies, middleware/proxy handling (including the Next 16 rename),
next/root-params on Next 16.3+, language switchers per stack
- A verification sequence that proves the macro transform actually ran
Use when: