Dart Tooling
ASecuritySet up `lefthook` so every commit runs formatting first and analysis second. That blocks unformatted or analyzer-broken Dart code before it ever reaches a PR. Example `lefthook.yml`: ```yaml pre-commit: parallel: false commands: dart-format: run: dart format . --line-length 80 flutter-analyze: run: flutter analyze --fatal-infos --fatal-warnings ``` Why this shape is good: - `dart format . --line-length 80` enforces the project formatting standard automatically. - `flutter analyze --fatal-info...
- 584 stars
- 0 votes
- 0 copies
- 3 views
- Added September 5, 2026
Security analysis
100/100Pro scans all 12 files and shows the line behind each finding
npx -y skills add HoangNguyen0403/agent-skills-standard --skill dart-tooling --agent claude-codeAre you the author of Dart Tooling?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-dart-tooling-df5efede)Set up `lefthook` so every commit runs formatting first and analysis second. That blocks unformatted or analyzer-broken Dart code before it ever reaches a PR.
Example `lefthook.yml`:
```yaml
pre-commit:
parallel: false
commands:
dart-format:
run: dart format . --line-length 80
flutter-analyze:
run: flutter analyze --fatal-infos --fatal-warnings
```
Why this shape is good:
- `dart format . --line-length 80` enforces the project formatting standard automatically.
- `flutter analyze --fatal-infos --fatal-warnings` turns warnings and infos into commit-blocking failures, which keeps CI surprises low.
- Running format before analyze ensures the analyzer sees the final formatted source.
- `parallel: false` keeps the sequence deterministic and easier to debug.
Recommended follow-through:
- Keep the hook commands aligned with CI so local behavior matches pull-request enforcement.
- If the repo also uses `dart_code_metrics`, add it to the same hook rather than letting complexity checks exist only in CI.
For example:
```yaml
dcm:
run: dart run dart_code_metrics:metrics analyze lib
```
With this in place, contributors do not have to remember formatting and analysis manually; the hook enforces both consistently on every commit.
Files in this skill
- eval-1.baseline.md
- eval-1.with-skill.md
- eval-2.baseline.md
- eval-2.with-skill.md
- eval-3.baseline.md
- eval-3.with-skill.md
- trigger-1.md
- trigger-2.md
- trigger-3.md
- trigger-4.md
- trigger-5.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.