flutter-fvm
Skill0 starsChanged 50 days agoMITView on GitHub
States the rule that every flutter/dart command in this repo must be prefixed with fvm, maps common commands to their fvm equivalents, and covers first-time setup and monorepo/workspace behavior; load whenever you are about to run flutter run, build, test, analyze, format, or any pub command.
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- bootstrap-projectSkill
- choose-data-stackSkill
- code-reviewSkill
- conventional-commitsSkill
- data-providerSkill
- domain-modelingSkill
- error-handlingSkill
- flavors-and-flagsSkill
- localizationSkill
- new-featureSkill
- quality-gateSkill
- routingSkill
- state-managementSkill
- testingSkill
- themingSkill
- ui-screenSkill
- bootstrap-projectSkill
- choose-data-stackSkill
- code-reviewSkill
- conventional-commitsSkill
- data-providerSkill
- domain-modelingSkill
- error-handlingSkill
- flavors-and-flagsSkill
- flutter-fvmSkill
- flutter_fvmSkill
- localizationSkill
- new-featureSkill
- quality-gateSkill
- routingSkill
- state-managementSkill
- testingSkill
- themingSkill
- ui-screenSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 124
If they disagree, re-run fvm install.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flutter version management (FVM)
Prime directive
Every flutter or dart command runs through fvm. No exceptions.
# Wrong
flutter pub get
dart format .
# Right
fvm flutter pub get
fvm dart format -l 100 .This repo pins its Flutter SDK in .fvmrc:
{
"flutter": "3.44.7"
}A bare flutter/dart invocation uses whatever SDK happens to be first
on PATH — which may not exist, may be a different channel, or may be a
different version entirely from 3.44.7. That mismatch is how you get
analyzer/lint differences, generated-code drift, and "works on my
machine" bugs that have nothing to do with the actual change being made.
fvm flutter/fvm dart always resolve to the exact pinned SDK, so the
whole team (and every agent) builds against the same toolchain as CI.
Command mapping
| Bare command | Run instead |
flutter run | fvm flutter run |
flutter pub get | fvm flutter pub get |
flutter pub add <pkg> | fvm flutter pub add <pkg> |
flutter test | fvm flutter test |
flutter analyze | fvm flutter analyze --fatal-infos |
flutter build ... | fvm flutter build ... |
flutter gen-l10n | fvm flutter gen-l10n |
dart format . | fvm dart format -l 100 . |
dart fix --apply | fvm dart fix --apply |
dart test | fvm dart test |
dart run <script> | fvm dart run <script> |
The -l 100 on dart format matters — this repo formats at 100 columns,
not dart format's 80-column default (see analysis_options.yaml's note
on lines_longer_than_80_chars). Dropping the flag produces a diff that
reformats the whole file back to 80 columns.
See root AGENTS.md section 17 for the full command table, including
fvm dart run tool/quality_gate.dart and
fvm dart run tool/check_architecture.dart.
First-time setup
- Install FVM itself once per machine (not per project) — see
fvm.app for your platform's install method. This
skill assumes
fvmis already onPATH; installing FVM itself is a one-time machine setup step, not something to redo per repo. From the repo root, run:
fvm installThis reads
.fvmrcand downloads Flutter3.44.7into FVM's cache if it isn't already there. It's safe to run even if the version is already installed — it's a no-op in that case.Confirm the pin matches what you expect before doing anything else:
cat .fvmrc fvm flutter --versionThe second command should report
3.44.7. If it doesn't,fvm usewas probably run against a different version at some point — re-runfvm installand check.fvmrcwasn't accidentally edited.
Monorepo / pub workspace awareness
This repo is a Dart pub workspace (pubspec.yaml's workspace: key
lists packages/domain, packages/data, packages/ui). That changes
where "get dependencies" should normally be run:
fvm flutter pub getat the repo root resolves dependencies for the root app and all three member packages together, in one pass — this is the normal entry point. Run it here after pulling changes that touch anypubspec.yamlin the workspace, or after adding a dependency to any package.- Running
fvm flutter pub getinside a package subdirectory (packages/domain/,packages/data/,packages/ui/) also works — each package hasresolution: workspacein its ownpubspec.yaml, which tells pub to resolve it as part of the enclosing workspace rather than standalone. Useful when you only touched one package's dependencies and want a faster, narrower check, but it is not required — the root command already covers every package. fvm flutter pub add <pkg>run inside a package directory adds the dependency to that package'spubspec.yamlspecifically (e.g. run it insidepackages/data/to add a storage/network package there, not at the root — see rootAGENTS.mdsection 2's dependency-direction table for which package should own a given dependency).
Troubleshooting
fvm: command not found— FVM itself isn't installed on this machine. Do not fall back to a bareflutter/dartcommand as a workaround; that silently defeats the whole point of pinning the SDK. Install FVM (see "First-time setup" above), then retry.fvm flutter ...fails with "version not installed" or similar — runfvm installfrom the repo root to fetch the version pinned in.fvmrc, then retry the original command.- A command behaves differently than expected / uses an unexpected SDK
version — run
fvm flutter --versionand compare against.fvmrc. If they disagree, re-runfvm install; if they agree and the problem persists, it isn't an FVM issue. - Never "fix" an FVM error by dropping the
fvmprefix and running the bare command instead — that's the one failure mode this whole skill exists to prevent.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

