elmm-programing/opencode/dart-logic-patterns

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.

Best practices for implementing efficient business logic on mobile using appropriate algorithms and data structures.

Install

npx vskill@latest install elmm-programing/opencode/dart-logic-patterns

SKILL.md

The same SKILL.md was published earlier as elmm-programing/opencode/dart-logic-patterns.

Algorithms & Logic

The efficiency of your business logic directly impacts battery life and responsiveness.

Complexity Analysis

  • Big O Awareness: Understand the cost of your operations. Avoid O(n²) or higher on the main thread for datasets larger than a few hundred items.
  • Data Structure Selection:
  • Map: Fast key-based lookups.
  • Set: Fast unique item management.
  • List: Fast indexing and sequential access.
  • LinkedHashSet/Map: Preserves insertion order while providing fast lookups.

Logic Patterns

  • Debouncing: Delay execution until a user stops interacting (e.g., search-as-you-type).
  • Throttling: Limit execution to at most once every interval (e.g., scrolling events).
  • Memoization: Cache the results of expensive pure functions based on their arguments. Use package:memoize or custom implementations.

Search & Sort

  • Binary Search: Use for sorted lists to transform O(n) searches into O(log n).
  • Efficient Sorting: Use Dart's built-in list.sort(), which uses highly optimized algorithms. Provide targeted Comparable implementations for custom objects.

Business Logic Organization

  • Pure Functions: Keep business logic in pure, testable functions outside of UI classes.
  • Fail Fast: Use guard clauses to handle edge cases and invalid states early.
  • Validation Logic: Keep complex validation in a separate domain layer, reusable across different screens.

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/elmm-programing/opencode/dart-logic-patterns/badge)](https://verified-skill.com/skills/elmm-programing/opencode/dart-logic-patterns)

Something wrong with this skill or its page? Tell us.