> dart-best-practices

Dart code quality conventions: naming, const/final/var hierarchy, single quotes, trailing commas, collection idioms, tear-offs, and import organization. Use when writing new Dart code or reviewing for style violations — wrong import style, global variables, var misuse, anonymous lambdas where tear-offs fit, or missing trailing commas. (triggers: **/*.dart, naming, convention, trailing comma, import, tear-off)

fetch
$curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/dart-best-practices?format=md"
SKILL.mddart-best-practices

Dart Best Practices

Priority: P1 (OPERATIONAL)

Best practices for writing clean, maintainable Dart code.

  • 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.
import 'models/user.dart'; // Good
import 'package:app/models/user.dart'; // Avoid local absolute

Anti-Patterns

  • var result = fetchOrders() — use final or an explicit type; var only for locally obvious types in short scopes
  • import 'package:myapp/features/orders/order_model.dart' within the same package — use relative imports for intra-package files
  • ❌ Top-level mutable List<Order> cachedOrders = [] — no global mutable state; use DI or encapsulate in a class
  • list.forEach((item) => doSomething(item)) — prefer tear-offs: list.forEach(doSomething)

> related_skills --same-repo

> common-store-changelog

Generate user-facing release notes for the Apple App Store and Google Play Store by collecting git history, triaging user-impacting changes, and drafting store-compliant changelogs. Enforces character limits (App Store ≤4000, Google Play ≤500), tone, and bullet format. Use when generating release notes, app store changelog, play store release, what's new, or version release notes for any mobile app. (triggers: generate changelog, app store notes, play store release, what's new, release notes, ve

> golang-tooling

Go developer toolchain — gopls LSP diagnostics, linting, formatting, and vet. Use when setting up Go tooling, running linters, or integrating gopls with Claude Code. (triggers: gopls, golangci-lint, golangci.yml, go vet, goimports, staticcheck, go tooling, go lint)

> common-ui-design

Design distinctive, production-grade frontend UI with bold aesthetic choices. Use when building web components, pages, interfaces, dashboards, or applications in any framework (React, Next.js, Angular, Vue, HTML/CSS). (triggers: build a page, create a component, design a dashboard, landing page, UI for, build a layout, make it look good, improve the design, build UI, create interface, design screen)

> common-owasp

OWASP Top 10 audit checklist for Web Applications (2021) and APIs (2023). Load during any security review, PR review, or codebase audit touching web, mobile backend, or API code. (triggers: security review, OWASP, broken access control, IDOR, BOLA, injection, broken auth, API review, authorization, access control)

┌ stats

installs/wk0
░░░░░░░░░░
github stars452
██████████
first seenMar 17, 2026
└────────────

┌ repo

HoangNguyen0403/agent-skills-standard
by HoangNguyen0403
└────────────