wishtohear/bucket-water-oms/flutter-reducing-app-size
Claude Code and agent skill by wishtohear/bucket-water-oms
- community
Checking that the SKILL.md file is still in the repository.
Measures and optimizes the size of Flutter application bundles for deployment. Use when minimizing download size or meeting app store package constraints.
Install
npx vskill@latest install wishtohear/bucket-water-oms/flutter-reducing-app-sizeSKILL.md
Reducing Flutter App Size
Contents
- Core Concepts
- Workflow: Generating Size Analysis Files
- Workflow: Analyzing Size Data in DevTools
- Workflow: Estimating iOS Download Size
- Workflow: Implementing Size Reduction Strategies
- Examples
Core Concepts
- Debug vs. Release: Never use debug builds to measure app size. Debug builds include VM overhead and lack Ahead-Of-Time (AOT) compilation and tree-shaking.
- Upload vs. Download Size: The size of an upload package (APK, AAB, IPA) does not represent the end-user download size. App stores filter redundant native library architectures and asset densities based on the target device.
- AOT Tree-Shaking: The Dart AOT compiler automatically removes unused or unreachable code in profile and release modes.
- Size Analysis JSON: The
--analyze-sizeflag generates a*-code-size-analysis_*.jsonfile detailing the byte size of packages, libraries, classes, and functions.
Workflow: Generating Size Analysis Files
Use this workflow to generate the raw data required for size analysis.
Task Progress:
- [ ] Determine the target platform (apk, appbundle, ios, linux, macos, windows).
- [ ] Run the Flutter build command with the
--analyze-sizeflag. - [ ] Locate the generated
*-code-size-analysis_*.jsonfile in thebuild/directory.
Conditional Logic:
- If targeting Android: Run
flutter build apk --analyze-sizeorflutter build appbundle --analyze-size. - If targeting iOS: Run
flutter build ios --analyze-size. Note: This creates a `.app` file useful for relative content sizing, but not for estimating final App Store download size. Use the [Estimating iOS Download Size](#workflow-estimating-ios-download-size) workflow for accurate iOS metrics. - If targeting Desktop: Run
flutter build [windows|macos|linux] --analyze-size.
Workflow: Analyzing Size Data in DevTools
Use this workflow to visualize and drill down into the Size Analysis JSON.
Task Progress:
- [ ] Launch DevTools by running
dart devtoolsin the terminal. - [ ] Select "Open app size tool" from the DevTools landing page.
- [ ] Upload the generated
*-code-size-analysis_*.jsonfile. - [ ] Inspect the treemap or tree view to identify large packages, libraries, or assets.
- [ ] Feedback Loop:
- Identify the largest contributors to app size.
- Determine if the dependency or asset is strictly necessary.
- Remove, replace, or optimize the identified component.
- Regenerate the Size Analysis JSON and compare the new build against the old build using the DevTools "Diff" tab.
Workflow: Estimating iOS Download Size
Use this workflow to get an accurate projection of iOS download and installation sizes across different devices.
Task Progress:
- [ ] Configure the app version and build number in
pubspec.yaml. - [ ] Generate an Xcode archive by running
flutter build ipa --export-method development. - [ ] Open the generated archive (
build/ios/archive/*.xcarchive) in Xcode. - [ ] Click Distribute App and select Development.
- [ ] In the App Thinning configuration, select All compatible device variants.
- [ ] Check the option to Strip Swift symbols.
- [ ] Sign and export the IPA.
- [ ] Open the exported directory and review the
App Thinning Size Report.txtfile to evaluate projected sizes per device.
Workflow: Implementing Size Reduction Strategies
Apply these strategies to actively reduce the compiled footprint of the application.
Task Progress:
- [ ] Split Debug Info: Strip debug symbols from the compiled binary and store them in separate files.
- [ ] Remove Unused Resources: Audit the
pubspec.yamlandassets/directory. Delete any images, fonts, or files not actively referenced in the codebase. - [ ] Minimize Library Resources: Review third-party packages. If a package imports massive resource files (e.g., large icon sets or localization files) but only a fraction is used, consider alternative packages or custom implementations.
- [ ] Compress Media: Compress all PNG and JPEG assets using tools like
pngquant,imageoptim, or WebP conversion before bundling them into the app.
Examples
Generating Size Analysis (Android)
Splitting Debug Info (Release Build)
Reading the iOS App Thinning Size Report
When reviewing App Thinning Size Report.txt, look for the specific target device to understand the true impact on the user:
Interpretation: The end-user download size (compressed) is 5.4 MB, and the on-device footprint (uncompressed) is 13.7 MB.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingbucket-water-oms-admin-mobile/skills/flutter-reducing-app-size/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/wishtohear/bucket-water-oms/flutter-reducing-app-size)