From flutter-skills
Measures and optimizes the size of Flutter application bundles for deployment. Use when minimizing download size or meeting app store package constraints.
npx claudepluginhub gsmlg-dev/code-agent --plugin flutter-skillsThis skill uses the workspace's default tool permissions.
- [Core Concepts](#core-concepts)
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides MCP server integration in Claude Code plugins via .mcp.json or plugin.json configs for stdio, SSE, HTTP types, enabling external services as tools.
--analyze-size flag generates a *-code-size-analysis_*.json file detailing the byte size of packages, libraries, classes, and functions.Use this workflow to generate the raw data required for size analysis.
Task Progress:
--analyze-size flag.*-code-size-analysis_*.json file in the build/ directory.Conditional Logic:
flutter build apk --analyze-size or flutter build appbundle --analyze-size.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 for accurate iOS metrics.flutter build [windows|macos|linux] --analyze-size.Use this workflow to visualize and drill down into the Size Analysis JSON.
Task Progress:
dart devtools in the terminal.*-code-size-analysis_*.json file.Use this workflow to get an accurate projection of iOS download and installation sizes across different devices.
Task Progress:
pubspec.yaml.flutter build ipa --export-method development.build/ios/archive/*.xcarchive) in Xcode.App Thinning Size Report.txt file to evaluate projected sizes per device.Apply these strategies to actively reduce the compiled footprint of the application.
Task Progress:
pubspec.yaml and assets/ directory. Delete any images, fonts, or files not actively referenced in the codebase.pngquant, imageoptim, or WebP conversion before bundling them into the app.# Generate the size analysis JSON for an Android App Bundle
flutter build appbundle --analyze-size --target-platform=android-arm64
# Build an APK while stripping debug info to reduce binary size
flutter build apk --obfuscate --split-debug-info=build/app/outputs/symbols
When reviewing App Thinning Size Report.txt, look for the specific target device to understand the true impact on the user:
Variant: Runner-7433FC8E-1DF4-4299-A7E8-E00768671BEB.ipa
Supported variant descriptors: [device: iPhone12,1, os-version: 13.0]
App + On Demand Resources size: 5.4 MB compressed, 13.7 MB uncompressed
App size: 5.4 MB compressed, 13.7 MB uncompressed
Interpretation: The end-user download size (compressed) is 5.4 MB, and the on-device footprint (uncompressed) is 13.7 MB.