← スキル一覧に戻る

code-review-flutterdart
by tsiresymila1
⭐ 5🍴 2📅 2026年1月16日
SKILL.md
name: Code Review (Flutter/Dart) description: Comprehensive guidelines for reviewing Flutter code in the YouDown project, focusing on Bloc, performance, and best practices.
Code Review Guidelines for YouDown Mobile
Use this skill when asked to review code or before finalizing significant changes. Focus on the following areas to ensure high quality, stability, and maintainability.
1. Architecture & State Management (BLoC)
- Event/State Immutability: Ensure all Bloc Events and States are immutable (
@immutableor usingFreezed). - Logic Separation: UI widgets should only dispatch events and listen to states. Business logic must reside in Blocs or Repositories.
- Bloc Usage:
- Use
BlocBuilderfor rebuilding UI part. - Use
BlocListenerfor side effects (navigation, toasts, dialogs). - Avoid overly complex logic inside
build()methods.
- Use
- HydratedBloc: Verify that state persistence logic (
fromJson/toJson) handles nulls and data migration gracefully.
2. Resource Management & Performance
- Disposal: Check that all
Controllers(VideoPlayer, Chewie, TextEditing, Animation),Timers, andStreamsare properly disposed indispose(). - Media Players: Ensure
video_playerandjust_audioinstances are stopped/paused before disposal to prevent background audio leaks. - Build Method: Avoid expensive computations or object instantiations inside
build(). Uselate finalorinitStatewhere appropriate. - const Constructors: Use
constfor widgets and values wherever possible to optimize rebuilds.
3. Error Handling & Stability
- Network Requests: All
Diorequests must be wrapped in try/catch blocks handlingDioException. - FFmpeg: Check for FFmpeg session return codes. Handle cases where merging or conversion fails.
- Permissions: Verify that permission requests (
manageExternalStorage,photos, etc.) check the Android SDK version correctly (SDK 30+ vs older). - Null Safety: strictly avoid force unwrapping (
!) unless absolutely certain. Use?.and??defaults.
4. User Interface & UX
- Material 3: Ensure components follow Material 3 design guidelines (use
ColorScheme, proper typography). - Responsiveness: UI should handle different screen sizes and orientations gracefully.
- Dark Mode: Verify correct color usage for both Light and Dark themes (use
Theme.of(context).colorScheme). - Localization: All user-facing text must use
easy_localizationkeys (e.g.,"key".tr()). No hardcoded strings.
5. Specific Project patterns
- Background Service: Ensure tasks intended for background execution properly communicate with
FlutterForegroundTask. - Navigation: Use
GoRouterfor all navigation. AvoidNavigator.pushunless working with dialogs/overlays that require it.
6. Security
- Input Validation: Validate all user inputs (especially YouTube URLs).
- File System: Be careful with file path manipulations. Use
path_providerand validate paths before writing.
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です