elmm-programing/opencode/dart-optimization
Claude Code and agent skill by elmm-programing/opencode
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Master Dart/Flutter performance optimization including efficient code patterns, data structure selection, and compilation benefits.
Install
npx vskill@latest install elmm-programing/opencode/dart-optimizationSKILL.md
The same SKILL.md was published earlier as elmm-programing/opencode/dart-optimization.
Optimization
Performance in Dart goes beyond UI rendering; it's about efficient execution and smart resource utilization.
Dart Performance Patterns
- Standardize Types: Avoid
dynamic. Use explicit types orObject?. Statically typed code allows the compiler to perform far better optimizations. - Efficient Collections:
- Use
Setfor average O(1) containment checks. - Use
Listfor ordered indexing. - Prefer
Iterablemethods (map,where) for readability, but useforloops in performance-critical hot paths. - Inlining: Small getters and trivial functions are often inlined by the VM/AOT, but keeping them simple ensures this optimization happens.
Compile-Time Optimizations
- Final & Const: Declare variables as
finalwhenever possible. Useconstconstructors for widgets and data models to enable compile-time allocation and reduce runtime garbage collection pressure. - Ternary vs If-Else: In Dart, they are generally equivalent, but prioritize readability. Use
switchexpressions (Dart 3+) for exhaustive and efficient pattern matching.
Hot Paths & Loops
- Minimize Work in Loops: Extract calculations and object creations outside of loops.
- Collection Literals: Use literal syntax
[]or{}instead of constructors likeList()for brevity and minor performance gains.
Profiling
- DevTools CPU Profiler: Identify hot paths and "heavy" functions.
- Benchmarking: Use
package:benchmark_harnessfor scientific performance measurement of non-UI logic.
Security
- Security scanPassed, 95 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 repositoryCheckingskills/dart-optimization/SKILL.md
Popularity
- 7-day trend score
- 5
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/elmm-programing/opencode/dart-optimization)