add-react-i18n

add-react-i18n is a skill for Claude Code from landim32/awesome-ai-skills. It costs 52 tokens per session (3,182 once invoked), scanned A, original, MIT.

A procedure for adding multiple-language support to a React component library, a reusable package of interface components. It uses react-i18next with a separate translation setup so the library does not conflict with the application using it.

In plain words
What is it for?
Use it to add or change library translations, select a default language, add other languages, and allow users of the library to customize translations.
Why use it?
It provides the translation files and provider changes needed to support more languages without taking over the host application's language settings.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { createI18nInstance } from '../i18n';.

Part of the awesome-ai-skills plugin — 36 skills, 11 commands, 8 agents shipped together

Good fit Use it to add or change library translations, select a default language, add other languages, and allow users of the library to customize translations.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/landim32/awesome-ai-skills
agentmods
npx agentmods add skills/landim32/awesome-ai-skills/add-react-i18n

Made for: Claude Code.

Or install awesome-ai-skills, the plugin that ships this one along with the rest of its 36 skills, 11 commands, 8 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-react-i18n

README.md
[![agentmods](https://agentmods.dev/badge/skills/landim32/awesome-ai-skills/add-react-i18n/github.svg)](https://agentmods.dev/skills/landim32/awesome-ai-skills/add-react-i18n)
Your own site
<a href="https://agentmods.dev/skills/landim32/awesome-ai-skills/add-react-i18n"><img src="https://agentmods.dev/badge/skills/landim32/awesome-ai-skills/add-react-i18n/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-react-i18n

Your own site · 80×15
<a href="https://agentmods.dev/skills/landim32/awesome-ai-skills/add-react-i18n"><img src="https://agentmods.dev/badge/skills/landim32/awesome-ai-skills/add-react-i18n.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,182 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.03182
Opus 5 $0.00026 $0.01591
Sonnet 5 $0.00010 $0.00636
Haiku 4.5 $0.00005 $0.00318

Measured 11d ago against content hash 395b0c6c2940, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

add-react-i18n scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/add-react-i18n/SKILL.md · 430 lines

How it starts

The opening of the file, as written. The whole thing — 430 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add react-i18next to a React NPM Library Package

This skill adds internationalization (i18n) to a React NPM library package using react-i18next with an isolated i18n instance pattern that avoids conflicts with the consuming application's own i18n setup.

Arguments

  • default-language (optional): The default language code (e.g., en, pt). Defaults to en.
  • additional-languages (optional): Space-separated additional language codes to create translation files for (e.g., pt es fr).

Overview

The implementation follows these principles:

  1. Isolated i18n instance — Uses i18next.createInstance() instead of the global instance to prevent conflicts with the consuming app
  2. Dedicated namespace — All library translations live under a unique namespace (derived from the package name) to avoid key collisions
  3. Consumer customization — The library's Provider accepts language and translations props so consumers can override/extend translations
  4. Synchronous init — Uses initImmediate: false so translations are available immediately without async loading
  5. Dynamic Zod schemas — Zod validation schemas are wrapped in factory functions + useMemo to re-evaluate when language changes
  6. Utility function i18n — Utility functions accept an optional t parameter with English hardcoded fallback

Step-by-Step Instructions

Step 1: Analyze the Project

Before making any changes, thoroughly analyze the project structure:

  1. Find the entry point — Read package.json to find the main/module field, then read the entry file (usually src/index.ts) to understand all public exports.

  2. Find the Provider/Context — Search for React Context providers. Look for patterns like:

    Glob: src/**/Context*.tsx, src/**/Provider*.tsx, src/contexts/**
    Grep: createContext, Provider
    
  3. Find all components with hardcoded strings — Search for visible text:

    Grep patterns: placeholder=", label, >.*</,  title=", aria-label="
    

    Read each component and catalog all hardcoded strings (labels, placeholders, error messages, validation messages, button text, titles, etc.).

Read the full file on GitHub · 430 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 430 lines · 0 tokens per session scan A 395b0c6c2940

Subscribe to this mod's changes

add-react-i18n is a skill published in the GitHub repository landim32/awesome-ai-skills (1 stars, last pushed 2mo ago), licensed MIT. It adds 52 tokens to every session and 3,182 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

react-expert

Use when building React 18+ applications in .jsx or .tsx files, Next.js App Router projects, or create-react-app setups. Creates components, implements custom hooks, debugs rendering issues, migrates class components to functional, and implements state management. Invoke for Server Components, Suspense boundaries…

Jeffallan/claude-skills · 79 tokens

react-native-expert

Builds, optimizes, and debugs cross-platform mobile applications with React Native and Expo. Implements navigation hierarchies (tabs, stacks, drawers), configures native modules, optimizes FlatList rendering with memo and useCallback, and handles platform-specific code for iOS and Android. Use when building a React…

Jeffallan/claude-skills · 99 tokens

extract-source-sample

Given the path to a finished content-goose ad-run folder, extract everything that defines that ad — recipe shot list, VO script, characters, voices, world, atom-skills, master mp4 — and emit a source-sample.json in the exact shape the upload-ad-sample skill writes to the Goose Ads library. Also links every character…

gooseworks-ai/goose-skills · 160 tokens

react-i18n

Use when implementing translations in a React app (not Next.js) with react-i18next — useTranslation, namespaces, pluralization, Suspense.

fusengine/agents · 35 tokens

lingui-best-practices

Implement internationalization with Lingui in React and JavaScript applications. Use when adding i18n, translating UI, working with Trans/useLingui/Plural, extracting messages, compiling catalogs, or when the user mentions Lingui, internationalization, i18n, translations, locales, message extraction, ICU…

lingui/skills · 78 tokens

migrate-i18next-to-lingui

Migrate i18next/react-i18next projects to Lingui. Use when the user wants to replace i18next, react-i18next, useTranslation, i18n.t(), Trans i18nKey, or i18next JSON catalogs with Lingui equivalents. Covers package installation, config setup, code transformation patterns, plural migration, namespace handling, and…

lingui/skills · 86 tokens