agentleFS
jggomezjggomez/expert-ai-developer-skills/skills/flutter-upgrade-migration/SKILL.md

flutter-upgrade-migration

Skill30 starsChanged 4 days agoApache-2.0View on GitHub

Use when upgrading the Flutter/Dart SDK, bumping dependencies across major versions, or clearing deprecation warnings across a codebase. Covers project-scale framework migration — the ordered upgrade sweep, deprecation triage, and dependency major-bump strategy — that the official dart fix / dart-resolve-package-conflicts skills do not, while deferring pub-conflict resolution to them.

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Automatic single-file lint fixes: Use dart fix or dart-run-static-analysis for local automated fixes.

    line 20
  2. Distinctive:

    One Axis at a Time: Never bundle an SDK upgrade, major dependency upgrades, and linter rule changes into a single PR.

    line 36
  3. Very specific:

    Pin Before Starting: Commit a green pubspec.lock and record the baseline Flutter version (flutter --version / .fvmrc).

    line 37
  4. Distinctive:

    Tests as Safety Net: Ensure test suites pass before touching dependencies.

    line 38
  5. Very specific:

    Verify analyzer status: dart analyze returns zero issues.

    line 70
  6. Very specific:

    Run full test suite: flutter test and critical journey integration tests.

    line 71
  7. Very specific:

    Verify native release builds per flutter-release-engineering matrix (Gradle/AGP, Xcode, Impeller).

    line 72
  8. Very specific:

    Google Antigravity: Run upgrade and analysis commands via terminal or coordinate via flutter-feature-orchestrator.

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Flutter Upgrade & Migration

Overview

The Flutter Upgrade & Migration skill establishes an ordered, risk-mitigated strategy for upgrading Flutter and Dart SDK versions, migrating breaking dependency majors, and systematically clearing codebase-wide deprecation warnings. Working across Claude Code and Google Antigravity, this skill structures major migrations into isolated, reviewable commits—preventing long-running broken branches and untangling dependency solver deadlocks.

When to Use

Trigger Scenarios

  • Upgrading to a new Flutter stable milestone (e.g., 3.24 → 3.27 → 3.29).
  • Bumping core dependencies across major breaking versions (e.g., GoRouter, Riverpod, Dio).
  • Clearing accumulated deprecation warnings across a large multi-module codebase.
  • Resolving transitive package version dependency conflicts during flutter pub get.

When NOT to Use

  • Automatic single-file lint fixes: Use dart fix or dart-run-static-analysis for local automated fixes.
  • Trivial patch version updates: Routine minor bug fix dependency bumps (^1.2.3 to ^1.2.4) should proceed without full migration planning.
  • Python or backend upgrades: For Python version transitions or library upgrades, use python-expert or managing-python-dependencies.

Process

flowchart TD
    A[Migration Plan Initiated] --> B[Step 1: SDK Bump & Pin Baseline]
    B --> C[Step 2: Automated dart fix & Deprecation Triage]
    C --> D[Step 3: Dependency Major Version Bumps]
    D --> E[Step 4: Release Matrix & Integration Verification]
    E --> F[Update .fvmrc & Lockfile]

1. Upgrade Principles

  • One Axis at a Time: Never bundle an SDK upgrade, major dependency upgrades, and linter rule changes into a single PR.
  • Pin Before Starting: Commit a green pubspec.lock and record the baseline Flutter version (flutter --version / .fvmrc).
  • Tests as Safety Net: Ensure test suites pass before touching dependencies.

2. Step 1 — SDK Upgrade Sweep

git switch -c chore/flutter-<version>
flutter --version
flutter upgrade
flutter pub get
dart analyze
flutter test
  • Review official Flutter and Dart release notes for breaking API changes.
  • Apply minimal fixes required to achieve a clean compilation and passing test suite.

3. Step 2 — Mechanical Deprecation Fixes

dart fix --dry-run
dart fix --apply
dart format .
dart analyze
  • Categorize remaining deprecations:
    • Few warnings: Fix immediately within the upgrade PR.
    • Dozens on one API: Fix in a single dedicated follow-up PR.
    • Hundreds across multiple APIs: Create tracked migration tickets and address progressively.

4. Step 3 — Dependency Major Bumps

  • Audit outdated packages: flutter pub outdated.
  • Upgrade dependencies individually by blast radius (e.g., authentication or state libraries before utility packages).
  • Resolve package constraint conflicts using dart-resolve-package-conflicts.

5. Step 4 — Verification Sweep

  • Verify analyzer status: dart analyze returns zero issues.
  • Run full test suite: flutter test and critical journey integration tests.
  • Verify native release builds per flutter-release-engineering matrix (Gradle/AGP, Xcode, Impeller).

Usage

Migration Commands

Review outdated dependencies:

flutter pub outdated

Perform automated codemods:

dart fix --dry-run
dart fix --apply

Execute static verification and tests:

dart analyze
flutter test

Example Prompts

"Plan and execute the migration of our Flutter project to Flutter 3.29, isolating the SDK upgrade from Riverpod 3 breaking changes."
"Triage deprecation warnings across our Flutter app and run automated dart fix repairs."

Host Execution Instructions

  • Claude Code: Invoke via /skill flutter-upgrade-migration or prompt for Flutter SDK/dependency migration.
  • Google Antigravity: Run upgrade and analysis commands via terminal or coordinate via flutter-feature-orchestrator.

Red Flags

  • Bundling an SDK upgrade, multiple major dependency bumps, and linter migrations into a single massive PR.
  • Upgrading Flutter or dependencies on a branch with existing failing tests.
  • Blindly editing version constraints in pubspec.yaml with any instead of resolving dependency trees properly.
  • Ignoring native build breakage (Android Gradle Plugin, CocoaPods, Xcode signing) until release day.
  • Suppressing deprecation warnings globally instead of addressing or ticketing them.

Verification

  • Baseline Flutter version recorded and pubspec.lock committed prior to upgrade.
  • SDK upgrade isolated in a dedicated commit or PR.
  • Automated dart fix --apply executed and results formatted with dart format.
  • flutter pub outdated reviewed and major dependency bumps handled in isolation.
  • dart analyze and flutter test pass with zero failures.
  • Release builds verified across Android and iOS target matrices.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.