Why Use This
This skill provides specialized capabilities for HoangNguyen0403's codebase.
Use Cases
- Developing new features in the HoangNguyen0403 repository
- Refactoring existing code to follow HoangNguyen0403 standards
- Understanding and working with HoangNguyen0403's codebase structure
Install Guide
2 steps - 1
- 2
Install inside Ananke
Click Install Skill, paste the link below, then press Install.
https://github.com/HoangNguyen0403/agent-skills-standard/tree/develop/skills/dart/best-practices
Skill Snapshot
Auto scan of skill assets. Informational only.
Valid SKILL.md
Checks against SKILL.md specification
Source & Community
Updated At Jan 18, 2026, 04:24 AM
Skill Stats
SKILL.md 36 Lines
Total Files 1
Total Size 0 B
License NOASSERTION
---
name: Dart Best Practices
description: General purity standards for Dart development.
metadata:
labels: [dart, clean-code]
triggers:
files: ['**/*.dart']
keywords: [import, final, const, var, global]
---
# 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](https://dart.dev/guides/language/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.
```dart
import 'models/user.dart'; // Good
import 'package:app/models/user.dart'; // Avoid local absolute
```