agentleFS
dafaalzdafaalz/agent-skills/skills/i18n/SKILL.md

i18n

Skill2 starsChanged 53 days agoMITView on GitHub

Use when implementing internationalization, localization, locale negotiation, date/number formatting, ICU messages, RTL/BiDi layouts, or text expansion resilience. Don't use for CSS styling (use frontend-design), UX copy review (use ui-ux-review), animation choreography (use ui-motion), React component profiling (use react), or multi-task execution plans (use agent-planning).

47 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use oss-pr, pr-automation and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • CES-LtdSkill

    oss-pr

    Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.

    Also in 3 projects that use this

  • CES-LtdSkill

    pr-automation

    PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".

    Also in 3 projects that use this

  • volovelySkill

    pr-fix

    This skill should be used when the user asks to "fix PR comments", "address PR feedback", "resolve PR comments", provides a GitHub PR URL with intent to fix, or says "pr-fix". It reads all review comments on a PR, decides which need code fixes vs. replies, makes the fixes, and posts replies — all with explicit user approval before any GitHub action.

    Also in 3 projects that use this

  • GitHubSkill

    state-management

    CoreAI Sandbox's TanStack Query + mock-JSON data layer. USE WHEN: editing data-fetching hooks (`app/hooks/use*.ts`), adding mock data in `app/data/`, or wiring a component to query state.

    Also in 4 projects that use this

  • xfstudioSkill

    graphql

    GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.

    Also in 3 projects that use this

  • MicrosoftSkill

    bump-version

    Bump the VoxelPic version to a user-specified value. USE FOR: setting or updating the project version across all files that embed it. Applies to requests like 'bump version to X.Y.Z', 'set version', or 'update version'.

    Also in 4 projects that use this

  • +2 more from CES-Ltd

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 38 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write-Target Boundary. Apply internationalization changes strictly to user-facing copy, translation catalogs, formatting helpers, and …

    line 11
  2. Distinctive:

    Do not modify database column names, internal event payloads, API route identifiers, system configuration keys, test assertions, or shell …

    line 12
  3. Distinctive:

    When target language set is ambiguous, ask user before implementing.

    line 36
  4. Distinctive:

    When operating in Audit mode, output findings table and halt.

    line 110
  5. Distinctive:

    Verify work against concrete criteria:

    line 128
  6. Distinctive:

    Run project build and automated test commands.

    line 129
  7. Distinctive:

    Keep database column names, internal event payloads, API route identifiers, and configuration keys in their original canonical English or …

    line 169

“Common” is measured: kept by at least 6 in 10 of the 38 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Internationalization (i18n)

Make a codebase correct outside a single locale. This skill audits and implements internationalization across nine domains documented in reference modules under references/.

<HARD-GATE> Write-Target Boundary. Apply internationalization changes strictly to user-facing copy, translation catalogs, formatting helpers, and layout styles. Do not modify database column names, internal event payloads, API route identifiers, system configuration keys, test assertions, or shell scripts. </HARD-GATE>

Modes

Declare the active operating mode before executing any steps:

  • Implementation mode (default): Ingest scope, load domain references, audit patterns, and implement localization changes. Run Steps 1 through 5 sequentially.
  • Audit mode (/i18n audit only): Scan codebase for unlocalized copy, date formatters, and physical CSS rules. Run Steps 1 through 3 only, emit .agents/state/i18n/audit-report.md, and halt without modifying files.

Scope contract

The user may narrow the work by naming aspects, languages, or both. Parse the request before modifying files:

RequestLanguages in scopeDomains in scope
Bare /i18nDetect from project, ask if ambiguousAll nine
/i18n languages en, esen, es onlyAll nine
/i18n dates onlyCurrent setintl-date-and-time-format.md only
/i18n add ArabicExisting plus arAll nine, RTL and BiDi prioritized
/i18n audit onlyDetect from projectAll nine, audit report without edits

Rules for narrowed requests:

  1. A narrowed language set narrows configuration, not code correctness. If only en and es are requested, use logical CSS properties, locale-aware formatting APIs, and ICU messages so future locales require only configuration changes.
  2. A narrowed domain set does not excuse breaking sibling domains. Note out-of-scope defects in findings without fixing them unless user expands scope.
  3. When target language set is ambiguous, ask user before implementing.

Reference quick routing

DomainReference moduleScope
Text expansionreferences/text-expansion-resilience.mdDynamic text expansion resilience & overflow handling
Language & negotiationreferences/intl-language.mdLanguage tags, BCP 47 vocabulary, & negotiation
Dates & timesreferences/intl-date-and-time-format.mdTimestamps, calendar systems, & time zone formatting
Numbers & currenciesreferences/intl-number-and-currency.mdCurrencies, units, percentages, & notation scales
Bidirectional & RTLreferences/intl-bidi.mdRTL mirroring, BiDi algorithms, & logical properties
Pluralization & ICUreferences/intl-pluralization.mdPlural rules, gender inflection, & ICU syntax
Collation & sortingreferences/intl-collation-and-sorting.mdLocale-sensitive string comparison & sorting
Unicode text processingreferences/intl-text-processing.mdSegmenter boundaries, grapheme clusters, & case folding
Content & catalogsreferences/intl-content-and-assets.mdTranslation catalog layout, formats, & asset localization
Testing & QAreferences/intl-testing-and-qa.mdPseudolocalization, visual verification, & test gates

Workflow

Step 1. Stack and inventory reconnaissance

Audit the repository to detect existing i18n tooling before adding dependencies:

head -n 60 package.json pyproject.toml composer.json Gemfile go.mod 2>/dev/null
grep -rIl --exclude-dir={node_modules,.git,dist,build,vendor} -E "i18next|react-intl|vue-i18n|next-intl|formatjs|gettext|babel|lingui|MessageFormat" . | head -n 30
find . -path ./node_modules -prune -o \( -name "*.po" -o -name "*.xliff" -o -name "*.arb" -o -name "*.ftl" -o -name "messages*.json" -o -name "locales" -o -name "i18n" \) -print 2>/dev/null | head -n 30

Record runtime capabilities, existing catalog locations, translation formats, and user locale persistence sources. Extend existing libraries instead of introducing competing frameworks.

Completion criterion. .agents/state/i18n/scope.json exists on disk with detected_libraries, catalog_paths, in_scope_languages, and mode.

Step 2. Progressive disclosure and domain module loading

Consult only reference modules relevant to scoped domains:

DomainReference moduleLoad condition
Language tags and locale negotiationreferences/intl-language.mdAlways loaded. Defines tag vocabulary and negotiation.
Dates, times, time zones, calendarsreferences/intl-date-and-time-format.mdTimestamps rendered, parsed, or stored.
Numbers, currencies, unitsreferences/intl-number-and-currency.mdMoney, counts, percentages, or measurements displayed.
Bidirectional text and RTL layoutreferences/intl-bidi.mdRTL language in scope or physical CSS directions found.
Pluralization, gender, ICU messagesreferences/intl-pluralization.mdStrings interpolate counts or variables.
Collation, sorting, comparisonreferences/intl-collation-and-sorting.mdLists sorted, searched, or deduplicated.
Unicode text processingreferences/intl-text-processing.mdStrings truncated, sliced, or case-folded.
Content, catalogs, assetsreferences/intl-content-and-assets.mdAlways loaded. Governs catalog layouts and expansion.
Localization testing and QAreferences/intl-testing-and-qa.mdAlways loaded. Verifies pseudolocales and gates.

Completion criterion. Session context contains all relevant domain reference files based on user scope.

Step 3. Audit and severity classification

Scan for locale-hardcoded patterns and catalog findings:

grep -rn --exclude-dir={node_modules,.git,dist,build,vendor} -E "toLocaleDateString\(\)|toLocaleString\(\)|new Date\(.*\)\.getDate\(\)" . | head -n 100
grep -rn --exclude-dir={node_modules,.git,dist,build,vendor} -E "\.toUpperCase\(\)|\.toLowerCase\(\)" . | head -n 100
grep -rn --exclude-dir={node_modules,.git,dist,build,vendor} -E "=== *1|=== *0|count *[<>=]+ *1|\$\{count\}" . | head -n 100
grep -rn --exclude-dir={node_modules,.git,dist,build,vendor} -E "margin-left|margin-right|padding-left|padding-right|text-align:\s*(left|right)|left:|right:" . | head -n 100
grep -rn --exclude-dir={node_modules,.git,dist,build,vendor} -E "\.sort\(\)|ORDER BY" . | head -n 100

Classify each finding by impact:

SeverityDefinitionExamples
CriticalCorrupts data or alters calculation valuesStoring local wall-clock time as UTC instant, parsing localized currency with parseFloat, slicing strings across grapheme boundaries
HighVisibly broken UI or grammar for target localeHardcoded count === 1 plural checks, code-unit string sorting, unlocalized dates rendered in server timezone
MediumPrevents subsequent locale onboardingPhysical CSS margins and padding, concatenated sentence fragments, fixed date format strings
LowCompleteness and polish gapsMissing inline lang tags, absent pseudolocale testing builds in CI

Completion criterion. .agents/state/i18n/audit-report.md exists on disk with file locations, line numbers, defect categories, and planned remediation.

When operating in Audit mode, output findings table and halt. Do not proceed to Step 4.

Step 4. Ordered implementation

Execute changes in strict architectural sequence:

  1. Locale model. Define how locales are negotiated, stored, and resolved across boundaries.
  2. Catalog structure. Establish message files, keying conventions, and interpolation tokens.
  3. String extraction. Replace hardcoded copy with catalog keys and named parameters.
  4. Formatting. Replace ad-hoc date and number formatters with standard platform APIs or library formatters.
  5. Plurals and grammar. Convert count-dependent logic to ICU plural messages with CLDR categories.
  6. Layout and BiDi. Switch physical CSS properties to logical equivalents, and set dir attributes on root containers.
  7. Collation. Replace code-unit comparisons with locale-aware collator calls.
  8. Testing infrastructure. Add pseudolocale pipelines, lint rules, and matrix test fixtures.

Completion criterion. Code modifications apply in sequence matching repository conventions without unused abstractions.

Step 5. Verification

Verify work against concrete criteria:

  1. Run project build and automated test commands. Detect package manager and test runner from lockfiles:
LockfileBuild commandTest command
pnpm-lock.yamlpnpm run buildpnpm test
yarn.lockyarn buildyarn test
bun.lockbbun run buildbun test
package-lock.jsonnpm run buildnpm test
poetry.lock(n/a)poetry run pytest
uv.lock(n/a)uv run pytest
Pipfile.lock(n/a)pipenv run pytest
composer.lockcomposer build (or project script)vendor/bin/phpunit

Record the resolved command in .agents/state/i18n/verification-commands.txt before running. 2. Audited views render all in-scope locales without falling back to default language keys. 3. User-facing paths contain zero raw toLocaleDateString() or new Date().toString() calls without explicit locale options. 4. Numeric conditionals like count === 1 are replaced with ICU plural syntax. 5. String comparisons use Intl.Collator or case folding rather than raw toLowerCase(). 6. Layouts employ CSS logical properties (margin-inline-start, padding-inline-end). 7. Pseudolocale tests show zero unextracted raw strings and zero truncated containers.

Completion criterion. Project build and test commands exit with code 0 and raw output is recorded in .agents/state/i18n/verification.txt with zero unresolved audit items.

Anti-patterns

IDTitlePattern descriptionWhy it failsConcrete fix
I18N-1Duplicate stackAdds a new i18n library without checking repoColliding i18n architectures and duplicate keysAudit dependencies first; extend existing tools
I18N-2Hardcoded pluralWrites count === 1 ? 'item' : 'items'Fails in languages with multiple plural formsUse ICU plural with standard CLDR categories
I18N-3Naive number parseUses parseFloat(localizedNumber)German 1.234,56 parses as 1.234Use locale-aware numeric parsing or raw numeric storage
I18N-4Unspecified localeCalls formatters without passing resolved localeFalls back to server OS locale in productionPass explicit resolved locale to formatter
I18N-5Floating instantStores local wall-clock time as a UTC instantDaylight saving shifts alter timestamps by an hourStore UTC instant with separate IANA timezone ID
I18N-6Physical stylesUses margin-left or right: 0 for layoutsLayout fails to mirror in RTL localesUse margin-inline-start and logical properties
I18N-7Code-unit sortUses default .sort() on user-facing listsSorts accented and non-ASCII characters incorrectlyUse Intl.Collator(locale).compare
I18N-8Sentence stitchingConcatenates phrases with + into sentencesBreaks under varying grammatical word ordersUse single message templates with named placeholders
I18N-9Grapheme slicingUses .substring() across Unicode textCorrupts surrogate pairs, emoji, and Indic scriptsUse Intl.Segmenter with grapheme granularity

Boundary isolation

Apply internationalization changes strictly to user-facing strings, formatting calls, and layout directives:

  • Keep database column names, internal event payloads, API route identifiers, and configuration keys in their original canonical English or system format.
  • Protect code syntax, CLI commands, and test assertion primitives from translation or localized casing alterations.

Quick audit checklist

Review this table before completing internationalization changes:

CheckPassing condition
String extractionUser-facing copy loaded from catalogs, zero hardcoded UI strings
Locale formattingDate and number formatters pass explicit locale and time zone
PluralsPluralization logic uses ICU syntax with CLDR categories
Bidirectional layoutLayout uses CSS logical properties and root dir attributes
Anti-patternsAnti-pattern table adheres to 5-column schema with stable IDs
Boundary isolationSystem keys, column names, and APIs remain in canonical format

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.