Flutter code review
Skill Desquared/agents-rules-skills/skills/flutter-code-review
Use when reviewing Flutter code for correctness, architecture compliance, design system usage, linting, or testing coverage. Also use before merging a PR or when the user asks for a code review of Dart or Flutter files.From its SKILL.md
npx -y skills add Desquared/agents-rules-skills --skill flutter-code-reviewAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.9 KB, as published. Nobody here has run it
Code Review Skill
7 Criteria
1. Functionality (π΄ Blocker)
- Logic errors, missing error handling, null safety violations
2. Readability (π Major)
- Clear naming, proper comments, no dead code
3. Optimization (π Major)
- Unnecessary rebuilds, N+1 queries, missing const
4. Architecture (π Major)
- data/domain/view pattern, repository pattern, @injectable DI
5. Design System (π Major)
- ColorPalette, Spacing, Project Design System Widgets (no hardcoded)
6. Linting (π΄ Blocker)
flutter analyzemust pass (zero errors)
7. Testing (Optional)
- 90%+ unit, 50%+ widget coverage (suggest, don't block)
Quick Checks
// β Hardcoded color
Text('Hi', style: TextStyle(color: Colors.red))
// β
Use ColorPalette
Text('Hi', style: TextStyle(
color: ColorPalette.coloursBasicText.platformBrightnessColor(context),
))
// β Business logic in widget
final total = items.fold(0, (s, i) => s + i.price);
// β
Logic in Bloc/Cubit
@injectable class MyBloc { ... }
// β No error handling
Future<Data> fetch() async {
return await api.call();
}
// β
Try-catch
Future<Data> fetch() async {
try {
return await api.call();
} catch (e) {
throw NetworkException(e.toString());
}
}
Severity
- π΄ Blocker: Must fix (functionality, security, linting)
- π Major: Should fix (performance, architecture, design system)
- π’ Minor: Nice to fix (naming, comments)
Process
flutter analyze(must pass)- Check file structure (data/domain/view)
- Verify design system usage
- Check state management (@injectable)
- Verify error handling
- Check tests (suggest improvements)