This skill may not reflect the latest upstream change
Next.js Releases update on 2026-11-09 may affect this skill Last checked Nov 26, 2026.
Dart Best Practices
Dart code quality conventions: naming, const/final/var hierarchy, single quotes, trailing commas, collection idioms, tear-offs, and import organization. Use only for Dart style-focused changes or reviews; never activate for configuration-only lint setup, unrelated feature work, or widget tests.
Unsigned, install at your own risk
UnverifiedThis skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.
Install this skill
No account required. Pick your tool, or use the command that detects it for you.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install multi-language-standards-dart-best-practicesManual setup by platform
Claude Code
~/.claude/skills/multi-language-standards-dart-best-practices/SKILL.md
Instructions
Dart Best Practices
Priority: P1 (HIGH)
- Scoping:
- No global variables.
- Private globals (if required) must start with
_. - Immutability: Use
const>final>var. - Config: Use
--dart-definefor 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,.anyover manual loops when clarity improves. - Type empty collections (
<String>[],<String, User>{}) to avoiddynamic. - Use collection
if/forand spread operators for composable lists/maps. - Async: Always
awaitfutures unless intentionally fire-and-forget.
import 'models/user.dart'; // Good
import 'package:app/models/user.dart'; // Avoid local absolute
Anti-Patterns
- No var for non-obvious types: Use
finalor explicit type;varonly for locally-obvious short scopes. - No package imports within same package: Use relative imports for intra-package files.
- No top-level mutable state: Encapsulate in class or inject via DI.
- No anonymous lambdas for tear-offs: Prefer
list.forEach(doSomething)over anonymous form.
Security
Reviews (0)
Related skills
Browse all →More from Multi-Language Standards
View source →More Build skills
Browse category →Frequently asked questions about dart-best-practices
What does the dart-best-practices skill do?
Dart code quality conventions: naming, const/final/var hierarchy, single quotes, trailing commas, collection idioms, tear-offs, and import organization. Use only for Dart style-focused changes or reviews; never activate for configuration-only lint setup, unrelated feature work, or widget tests. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the dart-best-practices skill?
Run `npx @skills-hub-ai/cli install multi-language-standards-dart-best-practices` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/multi-language-standards-dart-best-practices/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does dart-best-practices work with?
dart-best-practices runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the dart-best-practices skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use dart-best-practices after installing it?
In Claude Code, type `/multi-language-standards-dart-best-practices` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the dart-best-practices skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.