flutter-android-performance
Skill2 starsChanged 4 months agoApache-2.0View on GitHub
Diagnose, measure, and optimize Android performance in Flutter applications across startup, frame rendering and jank, CPU, memory, network, assets, package size, platform channels, Gradle, and energy behavior. Use when a Flutter Android app feels slow, drops frames, starts slowly, consumes excessive resources, produces an oversized build, regresses after a change, or needs a measurement-backed performance review and implementation.
In this repository11 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- android-verifySkill
- app-store-listing-creatorSkill
- expo-android-performanceSkill
- expo-interactive-designSkill
- flutter-interactive-designSkill
- release-checkSkill
- reproduce-firstSkill
- seo-geo-optimizerSkill
- ship-smallSkill
- toris-flutter-play-store-releaseSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 9 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Read execution defaults and select execute, review, or plan.
- Distinctive: line 18
leave a repeatable regression check and a concise evidence handoff.
- Distinctive: line 23
Never use debug behavior to prove production performance.
- Distinctive: line 25
Prefer current official Flutter, Dart, Android, and dependency documentation for version-specific commands or architecture claims.
- Very specific: line 26
Do not add a package, change Gradle/R8/signing, remove resources, or alter product behavior without explaining impact and staying within …
- Distinctive: line 27
Read evidence and verification before reporting gains.
- Distinctive: line 35
If no scenario exists, create the smallest representative one before profiling.
- Distinctive: line 53
Run repeated controlled trials.
- Very specific: line 71
Do not apply folklore optimizations such as adding const everywhere, arbitrary caching, blanket repaint boundaries, disabling animations, …
- Distinctive: line 75
Use the same device class, build, data, scenario, cache/launch state, and measurement method.
- Distinctive: line 77
If results are noisy or unfavorable, report them and revert or refine the hypothesis.
- Distinctive: line 90
Do not claim improvement where no comparable before/after evidence exists.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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 Android Performance
Find the limiting resource before changing code. Optimize correctness-preserving release behavior on representative Android hardware and prove outcomes with comparable measurements.
Quick start
Read execution defaults and select execute, review, or plan. In the default execute mode:
- inspect the Flutter/Android project, dirty state, versions, build configuration, dependencies, and reported scenario;
- make the scenario reproducible and capture a profile/release baseline on the best available representative device;
- localize the bottleneck with evidence and implement the smallest coherent fix;
- rerun the same scenario and compare raw samples, median/range, correctness, and side effects;
- leave a repeatable regression check and a concise evidence handoff.
Operating rules
- Distinguish audit/diagnosis from implementation. Do not edit when the user asked only for analysis.
- Never use debug behavior to prove production performance; choose profile or release mode appropriate to the measurement.
- Preserve correctness, accessibility, lifecycle behavior, analytics, and unrelated user changes.
- Prefer current official Flutter, Dart, Android, and dependency documentation for version-specific commands or architecture claims.
- Do not add a package, change Gradle/R8/signing, remove resources, or alter product behavior without explaining impact and staying within authorization.
- Read evidence and verification before reporting gains.
Workflow
1. Define a reproducible scenario
Capture the user-visible symptom and a precise sequence: install/state, launch type, account/data, route, gesture, network condition, duration, and expected behavior. Identify target devices, minimum/typical Android versions, and whether low-end coverage matters.
If no scenario exists, create the smallest representative one before profiling.
2. Detect the project and runtime
Inspect rather than assume:
- Flutter and Dart versions, channel/constraints, Android compile/min/target configuration, and build flavors;
- rendering backend and relevant flags actually active for the target build;
- state management, navigation, image/media, database/network, plugins, platform channels, and background work involved in the scenario;
- build mode, ABI, obfuscation/minification/resource shrinking, split strategy, and artifact under test;
- physical device model, chipset/RAM, OS, thermal/battery state, refresh rate, and connection method.
Record local modifications and preserve them.
3. Capture a baseline
Read measurement playbook. Select metrics that match the symptom rather than collecting everything. Possible surfaces include cold/warm startup, frame build/raster timing and jank, rebuild scope, CPU, allocations and retained memory, garbage collection, I/O, network latency/payload, image decode/upload, shader work, platform-channel latency, package/download/install size, energy, and thermal behavior.
Run repeated controlled trials. Save raw evidence or reproducible commands and report median plus range when values vary.
4. Localize the bottleneck
Trace the slow interval across layers:
- Dart/UI: synchronous work, repeated parsing/formatting, broad rebuilds, layout/intrinsic passes, list construction, animation ownership, isolates, timers, and disposal.
- Raster/GPU: overdraw, clipping/saveLayer effects, large images, shader compilation/work, custom paint, texture/video, and scene complexity.
- Data/I/O: request waterfalls, oversized payloads, caching, serialization, database queries, file access, and main-isolate work.
- Native boundary: chatty platform channels, plugin initialization, Android lifecycle, services, and blocking native work.
- Build/artifact: unused assets/code, native libraries/ABIs, compression, symbols, shrinking, and dependency weight.
For every suspected cause, state the evidence that supports it and the experiment that could falsify it. Rank by expected user impact, confidence, risk, and effort.
5. Implement the smallest coherent change
When authorized, change one causal area at a time where practical. Examples may include moving proven CPU work off the main isolate, narrowing rebuilds, virtualizing or lazily constructing content, sizing/caching images appropriately, batching native calls, reducing request waterfalls, deferring noncritical initialization, or correcting artifact configuration.
Do not apply folklore optimizations such as adding const everywhere, arbitrary caching, blanket repaint boundaries, disabling animations, or changing the renderer without evidence and a regression plan.
6. Re-measure and protect regressions
Use the same device class, build, data, scenario, cache/launch state, and measurement method. Compare raw samples, median, range, user-visible correctness, accessibility, crashes, memory peaks, energy/thermal side effects, and artifact differences.
If results are noisy or unfavorable, report them and revert or refine the hypothesis; do not select only favorable runs. Add a benchmark, performance trace, budget, or repeatable manual protocol appropriate to the project.
Deliverable
Provide:
- scenario and environment sheet;
- baseline table with units and raw evidence location;
- ranked bottleneck hypotheses;
- changes made or recommended, with risks;
- comparable before/after table and correctness gates;
- unverified areas and a regression-monitoring plan.
Do not claim improvement where no comparable before/after evidence exists.
Definition of done
- The symptom has a reproducible scenario with recorded device, build, and runtime conditions.
- The bottleneck is supported by profiler, trace, artifact, or source evidence rather than folklore.
- The smallest authorized fix is implemented without unrelated restructuring.
- Comparable before/after measurements and correctness/accessibility checks are recorded.
- Negative, noisy, or unavailable measurements are reported honestly.
- The handoff identifies changed files, verification, remaining device coverage, and any user-only release action.
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.

