Agent skill
flutter-performance-antoineschaller-cortex-skills
Flutter performance: DevTools profiling, widget optimization, memory management, const widgets. Use when optimizing render performance or debugging jank.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/flutter-performance-antoineschaller-cortex-skills
SKILL.md
Flutter Performance
Commands
flutter run --profile # Required for profiling
flutter pub global run devtools
Targets
| Target | Threshold |
|---|---|
| 60 FPS | 16.67ms/frame |
| Cold start | < 2s |
Widget Optimization
Const Constructors
// GOOD
const Column(children: [Text('Static'), Icon(Icons.star)])
Extract Widgets
// GOOD: Only counter rebuilds
Column(
children: [
const ExpensiveWidget(), // no rebuild
_Counter(), // isolated state
],
)
RepaintBoundary
RepaintBoundary(child: AnimatedWidget())
Build Optimization
// BAD: compute in build
final sorted = items..sort();
// GOOD: compute once
late List<Item> _sorted;
void initState() { _sorted = items..sort(); }
Memory Management
@override
void dispose() {
_animController.dispose();
_textController.dispose();
_subscription?.cancel();
super.dispose();
}
// Check mounted
if (!mounted) return;
setState(() => _data = data);
Lists
// Use builder
ListView.builder(itemCount: items.length, itemBuilder: ...)
// Fixed extent
ListView.builder(itemExtent: 72, ...)
// Keys
ValueKey(item.id)
Images
CachedNetworkImage(
imageUrl: url,
memCacheWidth: 200,
memCacheHeight: 200,
)
Checklist
- Profiled in profile mode
- No expensive ops in build()
- Const constructors used
- ListView.builder for lists
- Controllers disposed
- Check mounted before setState
Related Skills
- flutter-animations: Animation performance
- flutter-code-quality: Static analysis
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?