- Home
- Skills
- Testing & Debugging
- Flutter Code Review and Best Practices
Works with the AI Agents you already use
Flutter Code Review and Best Practices
by Saizul Amin
Audit Flutter apps for performance jank, state management consistency, and security vulnerabilities.
$6
Flutter Code Review and Best Practices
Example session with this skill installed
Run the Flutter Code Review and Best Practices skill on my project and give me a prioritised list of what to fix, with exact changes.
- Read your context and instructions
- Compiled the flutter code review
Here is what the Flutter Code Review and Best Practices skill produced.
Demo: real, unedited output of the skill's bundled script on a sample input from its test suite.
Output
MEDIUM [deps.any] pubspec.yaml flutter_bloc: flutter_bloc: any (unpinned)
-> use a caret range, e.g. flutter_bloc: ^x.y.z
MEDIUM [lints.package_missing] pubspec.yaml dev_dependencies: no lint package
-> add flutter_lints (or very_good_analysis) to dev_dependencies
MEDIUM [lints.no_include] analysis_options.yaml: does not include a lint set
-> include: package:flutter_lints/flutter.yaml
MEDIUM [build.future_in_build] lib/screens/home.dart:12: FutureBuilder future created inline: it restarts on every rebuild
-> create the Future once (initState, a provider, or a late final field) and pass the variable
MEDIUM [security.token_in_prefs] lib/screens/home.dart:25: secret stored in SharedPreferences (plain text on disk, included in backups)
-> use flutter_secure_storage (Keychain / Android Keystore)
LOW [deps.git_no_ref] pubspec.yaml charts_lib: git dependency charts_lib without ref
-> pin a tag or commit with ref:
LOW [deps.overrides] pubspec.yaml: dependency_overrides: intl
-> remove overrides before release or document why each is needed
LOW [state.mixed] pubspec.yaml: several state management approaches: bloc, getx, provider
-> pick one for app state; see references/state-management.md
LOW [sdk.old] pubspec.yaml environment: Dart SDK constraint >=2.17.0 <3.0.0
-> move to Dart 3 (sdk: ^3.x) for sound null safety, records and patterns
LOW [lints.safety_disabled] analysis_options.yaml: use_build_context_synchronously is disabled
-> fix the code instead of silencing the lint
LOW [code.print] lib/screens/home.dart:10: print() in app code
-> use debugPrint or a logger (package:logging); avoid logging personal data
LOW [perf.listview_children] lib/screens/home.dart:14: ListView(children: ...) builds every item up front
-> use ListView.builder / ListView.separated for long or dynamic lists
LOW [net.plain_http] lib/screens/home.dart:30: plain HTTP URL (blocked by default on Android 9+ and iOS ATS)
-> use HTTPS
INFO [lints.strict_off] analysis_options.yaml: not enabled: strict-casts, strict-inference, strict-raw-types
-> under analyzer: language: set them to true
INFO [perf.mediaquery_of] lib/screens/home.dart:9: MediaQuery.of(context).x rebuilds on any MediaQuery change
-> use MediaQuery.sizeOf(context) / paddingOf / viewInsetsOf (Flutter 3.10+)
INFO [perf.shrinkwrap] lib/screens/home.dart:15: shrinkWrap lays out every child
-> prefer slivers (CustomScrollView) or a bounded height for long lists
16 finding(s)
What you do next
- Fix the highest-severity items first.
- Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
- Keep the skill installed and re-run it whenever the project changes.
Connects securely to your tools. The creator never sees your data.
About this skill
Flutter development suffers when messy state management, expensive rebuilds, and weak linting rules lead to jank and technical debt. This skill provides a systematic audit and remediation path for Flutter projects, moving them toward production-ready standards without arbitrary refactoring.
What it does
- Static code audit identifies unpinned dependencies, insecure storage, and improper
FutureBuilderusage. - State management selection provides a decision framework for choosing between Riverpod, Bloc, Provider, or signals based on team size and app scale.
- Performance optimization targets jank,
MediaQuery.ofrebuild storms, non-lazyListViews, and futures created inside build methods. - Security hardening checks for plain HTTP usage, tokens in
SharedPreferences, and hardcoded secrets. - Linting enforcement configures strict analyzer modes including
strict-casts,inference, andraw-types.
How it works
- Analyze the current environment using official
flutter analyzeandpub outdatedcommands. - Audit the codebase using the
flutter_audit.pyscript to find line-based heuristics for performance and security issues. - Propose a prioritized list of findings categorized by severity (Correctness, Performance, Style).
- Implement approved changes, such as applying
dart fixor migrating state management, and verify via DevTools.
Frameworks & tools
This skill supports Flutter 3.x and Dart 3.x projects. It uses flutter_lints, very_good_analysis, flutter_secure_storage, and standard Dart CLI tools.
Why this beats prompting it yourself
Generic prompts often miss the subtle Flutter-specific performance traps like shrinkWrap: true in long lists or the nuances of Riverpod vs. Bloc. This skill uses a Python-based static auditor to find concrete issues that LLMs might overlook in a massive file dump.
Use cases
- Auditing a legacy Flutter codebase before a major feature push.
- Fixing "rebuild storms" and jank in complex UI screens.
- Standardizing state management across a team using multiple conflicting patterns.
- Preparing an app for a production release by hardening security and lints.
Known limitations
The Python audit script is a static pre-check; Flutter DevTools and the official analyzer remain the final authority. It does not handle React Native or native iOS/Android permission strings.
Open source: saizul/mobile-app-skills on GitHub (MIT licence, by Saizul Amin).
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.
Static pre-check only. Requires Python 3.8+. Does not replace Flutter DevTools for runtime profiling. Limited to Flutter/Dart files.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 day ago
- Software
Python 3.8+