dart-best-practices

Installation
SKILL.md

Dart Best Practices

Priority: P1 (OPERATIONAL)

  • Scoping:
  • No global variables.
  • Private globals (if required) must start with _.
  • Immutability: Use const > final > var.
  • Config: Use --dart-define for secrets. Never hardcode API keys.
  • Naming: Follow effective-dart (PascalCase classes, camelCase members).
  • Strings: Prefer single quotes; use double quotes only for interpolation needs.
  • Trailing Commas: Always use trailing commas for multi-line literals/params.
  • Expression Bodies: Prefer => for single-expression functions/getters.
  • Collections:
  • Use .map, .where, .fold, .any over manual loops when clarity improves.
  • Type empty collections (<String>[], <String, User>{}) to avoid dynamic.
  • Use collection if/for and spread operators for composable lists/maps.
  • Async: Always await futures unless intentionally fire-and-forget.
Installs
3
GitHub Stars
521
First Seen
May 19, 2026
dart-best-practices — hoangnguyen0403/agent-skills-standard