Handles the full Flutter l10n workflow: setting up gen-l10n, managing ARB files, wiring AppLocalizations into MaterialApp, and replacing hardcoded strings with generated getters. It knows when to use gen-l10n versus legacy intl_translation, validates placeholder metadata and plural forms, and won't add the deprecated synthetic-package flag. The skill inspects your existing setup before making changes, so it adapts to whatever l10n.yaml config or custom paths you already have. Useful when you're adding new locales, fixing "package:flutter_gen" import errors, or dealing with plural/select messages and locale-specific formatting. Author is Stanislav Chernyshev, currently at version 2.0.
npx -y skills add madteacher/mad-agents-skills --skill flutter-internationalization --agent claude-codeInstalls into .claude/skills of the current project.
You are a Flutter localization implementer. Make localized apps build, generate, and read naturally across target locales.
Generated localization code must match the current Flutter project and SDK. Do
not copy stale package:flutter_gen imports or enable synthetic-package; use
source-generated AppLocalizations imports unless the project proves it is on an
older pinned Flutter workflow.
gen-l10n for new work, most migrations, ARB management, plural/select
messages, generated AppLocalizations, and Material/Cupertino apps.intl_translation only when the project already uses
Intl.message() plus generated messages_all.dart, or the user explicitly
asks to keep that workflow. Confirm intl_translation is a dependency before
running its generators.pubspec.yaml, l10n.yaml, existing *.arb files, generated imports,
MaterialApp/CupertinoApp setup, and current translation usage.gen-l10n, legacy intl_translation, or a
custom fallback. Prefer the smallest change that fits the existing project.flutter_localizations and intl:any when missing;flutter: generate: true;l10n.yaml;AppLocalizations into MaterialApp or CupertinoApp;flutter gen-l10n. Then run the narrowest relevant
project check, usually flutter analyze or affected tests.| Task | Read or use | Why |
|---|---|---|
Configure or debug l10n.yaml, generated output paths, nullable getters, deferred loading, or untranslated tracking | references/l10n-config.md | Current gen-l10n options and safe defaults |
| Create or repair ARB messages, placeholders, plurals, selects, escaping, or metadata | references/arb-format.md | ARB schema patterns and translator context rules |
| Add number, currency, percent, or date/time formatting | references/number-date-formats.md | Supported NumberFormat and DateFormat values |
| Bootstrap a new gen-l10n setup or run a smoke fixture | assets/l10n.yaml, assets/app_en.arb | Reusable minimal templates |
For new gen-l10n setup, the minimum current configuration is:
flutter:
generate: true
arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
Use source imports that match the generated location, commonly:
import 'l10n/app_localizations.dart';
Prefer generated lists when possible:
localizationsDelegates: AppLocalizations.localizationsDelegates,
supportedLocales: AppLocalizations.supportedLocales,
If generated files are written to a custom output-dir, update imports to that
directory. Do not import package:flutter_gen/gen_l10n/app_localizations.dart
unless the local project is intentionally pinned to an older Flutter workflow.
When preserving Intl.message():
intl_translation in dev dependencies before extraction/generation;Typical commands:
dart run intl_translation:extract_to_arb --output-dir=lib/l10n lib/main.dart
dart run intl_translation:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/main.dart lib/l10n/intl_*.arb
If this workflow is not already present, explain why gen-l10n is the safer
default.
synthetic-package: true; current Flutter marks synthetic package
generation as deprecated and unavailable.nullable-getter: false only when the project accepts non-null generated
getter behavior. Otherwise keep the project default and use the required null
handling in code.Always validate a completed localization change:
flutter gen-l10n succeeds with the project's l10n.yaml;other;references/number-date-formats.md;flutter analyze or tests pass, or blockers are reported.For skill maintenance, also check YAML frontmatter, local markdown links, JSON
validity for ARB assets, YAML validity for l10n.yaml, resource routing, and
layer coherence between SKILL.md, references, and assets.
sickn33/antigravity-awesome-skills
wshobson/agents
kotlin/kotlin-agent-skills