flutter-code-review
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
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)
More from desquared/agents-rules-skills
shared-bug-investigation
Scientific method expert for systematic bug investigation and root cause analysis. Use when users report bugs, crashes, unexpected behavior, or debugging requests. Applies hypothesis-driven investigation, controlled experiments, and rigorous validation across any programming language or platform.
23android-performance-profiler
Identifies potential performance bottlenecks in Jetpack Compose code including expensive recompositions, unnecessary redraws, and memory issues. Use when code involves lists, animations, complex UI, or when the user asks about performance optimization.
19ios-swiftui-architecture-review
Analyze SwiftUI view hierarchies and suggest MVVM or other architectural improvements. Use when **reviewing existing SwiftUI code**, creating new SwiftUI components, analyzing view structure, or when the user asks about SwiftUI architecture patterns. Best for code review and refactoring guidance.
13android-compose-architecture-review
Analyze Jetpack Compose UI hierarchies and suggest MVVM/MVI or other architectural improvements. Use when reviewing existing Compose code, creating new Compose components, analyzing composable structure, or when the user asks about Compose architecture patterns. Best for code review and refactoring guidance.
13android-accessibility-validator
Checks and suggests accessibility improvements for Jetpack Compose and Android Views including TalkBack labels, dynamic text support, and color contrast. Use when creating or modifying UI components, screens, or when the user asks about accessibility.
12android-kotlin-api-design-reviewer
Review function and class interfaces for Kotlin Coding Conventions compliance. Use when creating public APIs, reusable components, library interfaces, or when the user asks for API design review or Kotlin naming conventions.
11