upgrade-flutter-gemma
Manages the upgrade process for the flutter_gemma package.
Install
mkdir -p .claude/skills/upgrade-flutter-gemma && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14749" && unzip -o skill.zip -d .claude/skills/upgrade-flutter-gemma && rm skill.zipInstalls to .claude/skills/upgrade-flutter-gemma
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Upgrade flutter_gemma dependency — discover API changes, fix compilation, support new features, update tests, bump versionKey capabilities
- →Identify available flutter_gemma versions
- →Update flutter_gemma dependency in pubspec.yaml
- →Fix compilation errors after dependency upgrade
- →Support new features from the CHANGELOG
- →Update existing tests for changed behavior
- →Bump version and update CHANGELOG.md
How it works
This skill follows a five-phase process to upgrade the flutter_gemma dependency, starting with reconnaissance and ending with finalizing the version bump and documentation updates.
Inputs & outputs
When to use upgrade-flutter-gemma
- →Upgrade flutter_gemma
- →Fix API changes
- →Update model implementations
About this skill
Upgrade flutter_gemma dependency
Follow these 5 phases sequentially. Do not skip phases. Ask the user before making decisions about new features (Phase 3).
Phase 1: Reconnaissance
- Run
dart pub outdatedto identify the available flutter_gemma version - Update
flutter_gemmaversion in both:pubspec.yamlexample/pubspec.yaml
- Run
flutter pub get - Read the new version's CHANGELOG from pub cache:
Then read the CHANGELOG.md from the latest version directory.find ~/.pub-cache/hosted/pub.dev -maxdepth 1 -name "flutter_gemma-*" | sort - Summarize for the user:
- Breaking changes (removed/renamed APIs, changed signatures)
- New APIs (new parameters, methods, enums, classes)
- Bug fixes
- Deprecations
Phase 2: Fix Compilation
-
Run
dart analyze -
Fix all compilation errors. These typically appear in:
Checklist of files that depend on flutter_gemma API:
-
lib/src/flutter_gemma_runtime.dart—FlutterGemma.getActiveModel(),FlutterGemma.getActiveEmbedder()signatures -
lib/src/flutter_gemma_model.dart—InferenceModel.createChat()signature,ModelResponsepattern matching,InferenceChatmethods -
lib/src/flutter_gemma_embedder.dart—EmbeddingModel.generateEmbeddings()signature,PreferredBackendenum -
lib/src/converters/request_converter.dart—Messageconstructors (.withImage,.withAudio,.toolCall,.toolResponse) -
lib/src/converters/response_converter.dart—ModelResponsesubtypes (TextResponse,FunctionCallResponse,ParallelFunctionCallResponse,ThinkingResponse) -
lib/src/converters/tool_converter.dart—Toolconstructor -
lib/src/flutter_gemma_plugin.dart—ModelType,ModelFileTypeenums -
test/src/fake_runtime.dart—FakeInferenceModel,FakeInferenceChat,FakeEmbeddingModelmust match upstream abstract class signatures
-
-
Repeat
dart analyzeuntil clean (0 issues)
Phase 3: Support New Features
Based on the CHANGELOG from Phase 1, decide with the user which new APIs to support.
For each new feature, the typical integration points are:
New parameter in createChat() or createSession()
- Add field to
$FlutterGemmaModelOptionsinlib/src/flutter_gemma_options.dart - Manually update
lib/src/flutter_gemma_options.g.dart:- Constructor parameter
- Field declaration with
@override fromJsonparsingtoJsonserializationjsonSchema()property entry
- Extract from config and pass in
lib/src/flutter_gemma_model.dart(_executeGeneration) - Update
FakeInferenceModel.createChat()intest/src/fake_runtime.dart— add parameter, store inlast*field for test assertions
New enum value (e.g. ModelFileType)
- Update comments in
lib/src/flutter_gemma_plugin.dart(FlutterGemmaModelConfig.fileType)
New method on InferenceChat or InferenceModel
- Add override in
FakeInferenceChatorFakeInferenceModelintest/src/fake_runtime.dart
Changed model capabilities
- Update
supportsmap inlib/src/flutter_gemma_plugin.dart(list()method, ~line 123)
Changed message handling
- Update converters in
lib/src/converters/ - Update
extractSystemInstruction()if system message handling changed
IMPORTANT: The .g.dart file is manually maintained (build_runner is broken). Always update it by hand when changing the schema.
Phase 4: Tests and Review
- Update existing tests that verify old behavior which has changed
- Add new tests for each new feature integrated in Phase 3
- Run
flutter test— all tests must pass - Run
/pr-review-toolkit:review-prfor comprehensive review - Fix any issues found by the review agents
Phase 5: Finalize
- Bump version in
pubspec.yaml:- Minor bump (e.g.
0.1.1→0.2.0) if there are breaking behavioral changes - Patch bump (e.g.
0.1.1→0.1.2) if only bug fixes / non-breaking additions
- Minor bump (e.g.
- Update
CHANGELOG.md— add new version section at the top with:- Breaking changes (prefixed with
**Breaking**:) - New features
- Bug fixes
- Breaking changes (prefixed with
- Update
README.md:- Options table if new config fields were added
- Known Limitations section if capabilities changed
- Quick Start / examples if API usage changed
- Verify everything:
All must pass cleanly.dart analyze flutter test dart pub publish --dry-run - Commit on a feature branch (e.g.
feature/flutter-gemma-X.Y.Z)
When not to use it
- →When the task is not related to upgrading the flutter_gemma dependency
- →When the project is not a Flutter project
- →When the user does not want to follow a phased upgrade process
Limitations
- →The skill is specific to the flutter_gemma dependency
- →The .g.dart file is manually maintained
- →Build_runner is broken for .g.dart file
How it compares
This skill provides a structured, phased approach to dependency upgrades, including specific steps for identifying changes and fixing compilation, unlike a manual upgrade process.
Compared to similar skills
upgrade-flutter-gemma side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| upgrade-flutter-gemma (this skill) | 0 | 4mo | Review | Advanced |
| flutter-development | 1,555 | 5mo | No flags | Intermediate |
| flutter-expert | 73 | 4mo | No flags | Advanced |
| mobile-games | 11 | 6mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
flutter-expert
sickn33
Master Flutter development with Dart 3, advanced widgets, and multi-platform deployment. Handles state management, animations, testing, and performance optimization for mobile, web, desktop, and embedded platforms. Use PROACTIVELY for Flutter architecture, UI implementation, or cross-platform features.
mobile-games
davila7
Mobile game development principles. Touch input, battery, performance, app stores.
flutter
alinaqi
Flutter development with Riverpod state management, Freezed, go_router, and mocktail testing
mobile-developer
sickn33
Develop React Native, Flutter, or native mobile apps with modern architecture patterns. Masters cross-platform development, native integrations, offline sync, and app store optimization. Use PROACTIVELY for mobile features, cross-platform code, or app optimization.
webf-native-plugin-dev
openwebf
Develop custom WebF native plugins based on Flutter packages. Create reusable plugins that wrap Flutter/platform capabilities as JavaScript APIs. Use when building plugins for native features like camera, payments, sensors, file access, or wrapping existing Flutter packages.