用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill flutter-internationalization命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | flutter-internationalization |
| description | >- Use when this capability is needed. |
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.
Source: gabrielmoreira/agent-skills-mirror — distributed by TomeVault.