skills/flutter-slang-i18n/SKILL.md
Add and maintain Slang localization in Flutter projects. Use when Codex needs to introduce slang, slang_flutter, or slang_build_runner, migrate hardcoded Flutter UI strings into Slang translations, scan Dart code for user-visible strings, or review existing Slang keys for semantic fit.
npx skillsauth add hu-wentao/wyatt_skills flutter-slang-i18nInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Check project state before edits.
git status --short and follow the repository's change-safety policy before modifying files.pubspec.yaml..fvm/fvm_config.json exists, run Flutter and Dart commands through fvm.slang.yaml, build.yaml, lib/i18n, intl, ARB, easy_localization) before adding another system. If replacing an existing i18n stack, call out migration risk first.Add Slang using current package names.
slang, slang_flutter, and, when using build_runner, slang_build_runner plus build_runner.flutter_slang, verify the package name before using it; Slang's Flutter support package is normally slang_flutter.fvm flutter pub add slang slang_flutter
fvm flutter pub add flutter_localizations --sdk=flutter
fvm flutter pub add -d build_runner slang_build_runner
Drop fvm only when the project is not using FVM.lib/i18n/en.i18n.json and a peer locale such as lib/i18n/zh-CN.i18n.json when the product supports Chinese.slang.yaml for fvm dart run slang; use build.yaml for build_runner integration. Keep the generated output path consistent with the existing project style.translate_var: S instead of Slang's default t:
translate_var: S
For build_runner, put the same option under targets.$default.builders.slang_build_runner.options.t variable, changing translate_var to S is a breaking source change. Tell the user explicitly, then update every t.<key> call site or keep the existing variable name if the user does not want that break.fvm dart run slang or fvm dart run build_runner build -d, matching the chosen setup.Wire Flutter integration.
package:<app>/i18n/translations.g.dart.main, for example LocaleSettings.useDeviceLocale().TranslationProvider when using Slang locale handling.MaterialApp.locale, supportedLocales, and localizationsDelegates so Flutter framework strings also localize.final S = Translations.of(context) or the project's context extension style.Scan hardcoded strings, then confirm by context.
scripts/scan_dart_strings.py from this skill against the target Flutter project:
uv run python /path/to/flutter-slang-i18n/scripts/scan_dart_strings.py --root /path/to/flutter/project
If the target environment does not use uv, run the executable script directly.Text, labels, hints, tooltips, dialogs, snackbars, validation messages, empty states, errors shown to users, semantics labels, and accessibility copy.Key or ValueKey values.Replace strings with semantic Slang keys.
Audit existing Slang usage.
rg -n "\b(context\.)?[tS]\.|Translations\.of\(context\)" lib
title, text1, ok, or stale copied feature names when they no longer describe the UI intent.references/slang-review-guidelines.md for key naming and triage rules when the audit is non-trivial.Validate.
fvm dart run slang analyze when Slang CLI is configured, and fix missing or unused translations relevant to the change.fvm dart format on changed Dart files.fvm flutter test when the change spans shared UI.scripts/scan_dart_strings.py: Regex/lexer-based Dart scanner for likely hardcoded UI strings.references/slang-review-guidelines.md: Triage rules for hardcoded strings and semantic Slang key review.development
Proven patterns for building or refining Reflex admin dashboards, user portals, operations consoles, and classic sidebar-plus-content management UIs. Use when editing `.py` files that import `reflex as rx`, creating metric cards, left navigation sidebars, status panels, action forms, code or result blocks, or responsive dashboard pages. When bootstrapping a new Reflex app, prefer `reflex init --template dashboard` by default, and switch to `customer_data_app` or `api_admin_panel` only when the product shape matches those templates more closely.
development
Build, debug, and refactor Streamlit apps and widgets. Use when Codex works on Streamlit UI files, session_state behavior, rerun/callback bugs, st.data_editor or dataframe widgets, layout parameters, widget keys, Streamlit version compatibility, or deprecated/new parameters such as width="stretch" replacing older container-width patterns.
development
Create a Dart-based macOS background activity process managed by launchd. Use when Codex needs to scaffold or fix a LaunchAgent for a Dart program, generate the executable entrypoint, write the plist, or ensure App Background Activity shows the intended process name instead of a shell wrapper.
development
Merge a specified branch into the current branch with a merge commit. Use this when the user wants to merge one branch into the current branch, or when Codex should auto-detect the source branch that has commits after the current branch. The skill checks whether the source branch and target branch have uncommitted work in any active git worktree, and resolves merge conflicts autonomously by default.