yelmuratoff/agent_sync
Overview
This skill helps diagnose and fix Flutter performance problems by guiding measurement, reducing UI work, optimizing lists and painting, and moving heavy work off the UI thread. It focuses on practical steps you can apply quickly to eliminate jank, shrink rebuild cost, and stabilize rendering under load.
How this skill works
Start by measuring with Flutter DevTools (frame chart, CPU profiler, memory inspector) and define a simple before/after metric such as 99th percentile frame time while scrolling. Inspect rebuilds, paint/compose times, and memory churn. Apply targeted mitigations: minimize rebuild cost, convert lists to lazy builders, isolate frequent repainters with RepaintBoundary where justified, and run heavy computation in isolates or compute.
When to use it
- You see dropped frames or jank during scrolling, animations, or transitions.
- App startup or screen open times feel slow or memory usage is high.
- Large lists or images cause stutters during interaction.
- Heavy parsing, sorting, or formatting runs on the UI thread.
- You need reliable before/after metrics to validate optimizations.
Best practices
- Measure first—profile frame, CPU, and memory to find the real bottleneck.
- Keep widget state minimal and prefer const widgets to reduce rebuild cost.
- Use ListView.builder or other lazy builders; give item widgets stable keys when order changes.
- Avoid patterns that force expensive compositing (unnecessary Opacity, Clip, saveLayer).
- Wrap only hot repainting subtrees with RepaintBoundary after profiling.
- Move heavy parsing or computation to isolates and keep logic testable and pure.
Example use cases
- Reduce jank in a chat app that stutters while new messages stream in by profiling and isolating repainting widgets.
- Speed up onboarding by moving large JSON parsing into an isolate and measuring startup frame times.
- Optimize a product list by switching to ListView.builder with stable keys and trimming widget rebuilds.
- Fix a CPU-bound animation by profiling, identifying repaint propagation, and applying RepaintBoundary selectively.
- Refactor formatting logic into pure functions so you can unit test and benchmark performance changes.
FAQ
Use it when profiling shows a subtree repaints at high frequency and those repaints propagate to large parents; avoid wrapping everything because it increases GPU memory.
How do I know if work must move off the UI thread?
If CPU profiling shows long synchronous tasks (parsing, sorting, heavy mapping) on the UI isolate causing frame spikes, move that work to an isolate or compute.
12 skills
This skill helps you diagnose performance issues in Flutter apps, then optimize rendering, lists, and heavy work off the UI thread.
This skill helps you implement reliable API calls, robust parsing, and tests by enforcing layered data handling and explicit error mapping.
This skill helps manage local data persistence and secrets securely across Drift, SharedPreferences, and flutter_secure_storage with clear patterns.
This skill enforces feature-first Clean Architecture guidelines for DTOs, domains, and data layers to improve maintainability and correct dependency direction.
This skill helps you write meaningful, concise code comments by emphasizing intent, readability, and correct scope across APIs and internal logic.
This skill helps you implement robust Flutter navigation with GoRouter, enabling nested routes, deep links, and type-safe arguments across screens.
This skill guides authors and reviewers through a structured code-review workflow to improve correctness, maintainability, and security.
This skill helps you implement Flutter localization with gen-l10n by configuring arb keys, plural rules, and wiring strings into widgets.
This skill helps enforce secure handling of secrets, auth data, and PII in Flutter apps by guiding storage, testing, and threat mitigation.
This skill helps you create and optimize Flutter/Dart CI/CD pipelines for fast feedback, stable releases, and deterministic builds.
This skill helps you create immutable Dart DTOs and manage custom mappings without freezed or json_serializable, ensuring reliable serialization.
This skill helps manage pub.dev dependencies for Flutter/Dart projects by validating necessity, evaluating candidates, and documenting decisions to preserve