| name | setup-flutter-environment |
| description | Prepare a deterministic Flutter development environment with SDK/tooling verification and baseline validation commands. |
Setup Flutter Environment
Use this skill when a project needs a clean, reproducible Flutter setup before implementation, testing, or release work.
Workflow
- Detect repository toolchain wrappers first:
- if the repository pins Flutter/Dart through a local wrapper or version manager, use that entrypoint for all project-local commands
- if
melos.yaml exists, note workspace boundaries before running package-specific checks
- Check installed toolchain versions:
flutter --version or the repository-managed Flutter command
dart --version or the repository-managed Dart command
java -version when Android work is in scope
xcodebuild -version when iOS/macOS work is in scope
- Run environment diagnostics:
flutter doctor -v or the repository-managed Flutter doctor command
- Resolve blocking setup gaps:
- Android licenses (
flutter doctor --android-licenses) when Android is required.
- Xcode CLI tools/simulator notes when iOS/macOS is required.
- Ensure repository-level bootstrap files are present and coherent:
pubspec.yaml
- platform folders or workspace files required by the task (
android/, ios/, melos.yaml, .fvm/fvm_config.json)
- Run baseline repository validation commands with the repository-selected toolchain:
flutter pub get or the repository-managed equivalent
flutter analyze or the repository-managed equivalent
- targeted tests or smoke checks relevant to the requested scope
Guardrails
- Do not claim setup is complete while
flutter doctor still has unresolved blockers for requested target platforms.
- Keep setup changes minimal and reversible; avoid unrelated dependency upgrades.
- If a required platform is out of scope (for example iOS on a non-iOS task), report it explicitly instead of forcing changes.
- Do not say
done/completed without command evidence.
Required output
- Detected Flutter/Dart versions.
- Whether the repo uses global Flutter, repository-managed Flutter tooling, or workspace tooling.
flutter doctor summary with unresolved blockers.
- Repository bootstrap/readiness summary.
- Commands executed and pass/fail status.
- Next actions required from the user (if any manual steps remain).