More screenshots
Works with the AI Agents you already use
Localization Contract Repair
Localization Contract Repair is a bounded ToolForge Labs workflow.
$1
Localization Contract Repair
Example session with this skill installed
I have a Next.js/TypeScript SaaS using next-intl with English, German, French, and Polish catalogs. The English source has 1,284 keys, German is missing 47, and French contains 63 keys no longer referenced. Some components use billing.invoice_count with {count}, while one locale expects {total}. Polish plural messages use only one/other, server rendering falls back to English while the client falls back to German, and a lazy-loaded settings namespace sometimes renders raw keys after navigation. Date and currency helpers also use different locale tags than routing. Files include message catalogs, route middleware, locale config, format helpers, loaders, extraction scripts, tests, fixtures, docs, and runbooks. Repair locally. Do not translate copy, choose product language policy, contact translation services, access production data, run migrations, or deploy.
- Read your context and instructions
- Compiled the localization contract repair
1. Repair decision
Decision: CROSS-LAYER LOCALIZATION CONTRACT DRIFT FOUND — SAFE LOCAL PATCH AVAILABLE; translation quality and deployed locale behavior remain unverified.
2. Scope and boundary
Reviewed: next-intl config, English/German/French/Polish catalogs, route middleware, format helpers, namespace loaders, extraction scripts, tests, fixtures, docs, and runbook.
Not accessed: production users, translation vendors, live localization platforms, deployed catalog state, analytics, or deployment systems.
3. Localization contract source register
| Source | Current behavior | Status |
|---|---|---|
| English catalog | 1,284 keys | Candidate source population |
| German catalog | 47 keys missing | Coverage drift |
| French catalog | 63 unreferenced keys | Stale candidates |
| invoice message | {count} vs {total} | Placeholder drift |
| Polish plurals | affected messages use one/other | Branch gap |
| SSR fallback | English | Fallback drift |
| client fallback | German | Fallback drift |
| settings namespace | raw keys after navigation | Load-order gap |
| route/format tags | disagree | Locale identity drift |
4. Canonical repository contract
Fallback precedence, source-locale authority, stale-key deletion, and supported aliases are
OWNER DECISION REQUIRED.
Safe structure
- one locale registry defines canonical tags and accepted aliases;
- one message-schema extractor records key, namespace, placeholders, ICU argument types, plural/select branches, and rich-text slots;
- catalogs are validated against that schema without judging translation quality;
- SSR and client use one fallback resolver;
- namespace loading is explicit for first render and navigation;
- formatting helpers consume canonical locale identity;
- stale-key detection reports candidates rather than deleting them automatically.
5. Drift findings
F1 — Catalog population drift
German is missing 47 keys and French contains 63 keys outside the current reference population.
Repair: add parity checks that report missing and extra keys by namespace. Do not auto-fill German text or delete French entries.
F2 — Placeholder mismatch
billing.invoice_count uses {count} in code while one locale expects {total}.
Repair: compare placeholder signatures across locales and fail validation on mismatches. Do not rewrite translated prose.
F3 — Polish plural coverage
Affected Polish messages expose only one/other.
Repair: parse ICU plural branches and validate structural coverage against the runtime’s locale categories. Do not generate translations for missing branches.
F4 — Fallback divergence
SSR falls back to English while the browser falls back to German.
Repair: centralize fallback resolution in a shared module. Keep the actual fallback order as owner-approved configuration.
F5 — Lazy namespace race
settings can render before its namespace loads.
Repair: make namespace dependencies explicit at route boundaries and require readiness before localized rendering. Add cold- and warm-navigation tests.
F6 — Locale identity drift
Routing and formatting helpers use different locale tags.
Repair: normalize aliases once, then pass the canonical tag to routing, Intl formatting, SSR, and tests. Preserve the originally requested tag separately if needed.
6. Safe patch plan
| Area | Change |
|---|---|
| Locale registry | canonical tags + aliases |
| Catalog schema | key/placeholder/ICU signatures |
| Validation | missing/extra/placeholder checks |
| Fallback | shared server/client resolver |
| Namespaces | explicit route loading |
| Plurals | ICU branch validation |
| Formatting | canonical locale in helpers |
| Tests/docs | parity, navigation, hydration coverage |
No translation generation, live catalog mutation, migration, or deployment.
7. Deterministic test matrix
- Required namespaces report missing keys by locale.
- Extra keys are reported separately.
{count}versus{total}fails signature validation.- Matching placeholders pass regardless of translated word order.
- Polish plural fixtures cover runtime-required categories represented by the selected ICU library.
- Server and client resolve the same fallback chain.
- Cold navigation to
settingswaits for its namespace. - Warm navigation does not render raw keys.
- Locale aliases normalize consistently.
- Date, number, and currency helpers use the canonical locale.
- SSR and hydration use the same namespace set.
- Tests call no live translation services.
8. Verification steps
Run
npm test -- localization-contractnpm test -- locale-routingnpm test -- namespace-loadingnpm run typechecknpm run lintnpm run build
Run the local catalog validator and inspect missing keys, extras, placeholder signatures, plural/select branches, unresolved aliases, and SSR/client namespace differences.
9. Production boundary
Unknown: deployed catalog versions, translation-management state, CDN caching, legacy locale URLs, old browser bundles, and whether missing German or stale French keys are intentional.
Production work needs separate translation review, compatibility review, rollout, monitoring, and rollback.
10. Human approval request
Safe now: locale registry structure, schema extraction, parity checks, placeholder validation, shared fallback plumbing, namespace readiness, formatting alignment, tests, and docs.
Decisions required: source locale, fallback order, supported aliases, stale-key deletion, intentionally untranslated content, Polish message updates, legacy compatibility, and rollout.
Status: PATCH READY FOR LOCAL REVIEW — TRANSLATION CONTENT, PRODUCT LANGUAGE POLICY, LIVE CATALOGS, AND DEPLOYED LOCALE BEHAVIOR NOT VERIFIED
11. Suggested commit message
fix(i18n): align catalog schema and locale resolution
Connects securely to your tools. The creator never sees your data.
About this skill
Localization Contract Repair is a bounded ToolForge Labs workflow. Repair localization drift in a repository using Cursor. Compare keys, namespaces, locale tags, ICU placeholders, plurals, selects, interpolation, fallbacks, lazy loading, server/client rendering, formatting, tests, and docs. Detect missing keys, placeholder mismatch, plural bugs, fallback leaks, stale catalogs, hydration drift, broken locale routes, and false coverage; prepare bounded patches and tests without translating copy, choosing language policy, live services, migrations, or deployment. The skill works from supplied repository files or partial evidence, separates verified facts from assumptions, avoids invented execution claims, and provides concrete next steps plus deterministic validation where possible.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
No machine translation or linguistic review. Cannot access live TMS platforms, production CDNs, or user databases. Requires repository-local catalog files and configuration.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 2 months ago