返回 Skill 列表
extension
分类: 开发与工程无需 API Key

flutter-code-review

审查Flutter应用的PR,包括检查错误、用户体验问题、性能回退、缺少的测试和可读性;涵盖应用代码、包/插件以及CI配置。当被要求审查一个Flutter PR、进行Flutter代码审查或在Flutter仓库中查找错误时使用。

person作者: jakexiaohubgithub

Flutter Code Review

Overview

Provide structured PR reviews for Flutter apps with prioritized findings. Focus on bugs first, then UX, performance, tests, and readability, and report issues as bullet points with file/line references.

Workflow

  1. Identify scope: review the diff and list touched files (Flutter app code, package/plugin code, CI files).
  2. Bugs/regressions: check state management, async flows, widget lifecycle, null safety, error handling, navigation, permissions, and data persistence.
  3. UX issues: verify loading/empty/error states, accessibility, layout on small screens, and gesture conflicts.
  4. Performance: watch for rebuild hotspots, unnecessary setState, large lists without virtualization, expensive work on UI thread, and image caching.
  5. Tests: ensure new logic is covered; suggest or run flutter test and flutter analyze as appropriate.
  6. Report findings ordered by severity with short rationales and precise file/line references.

Output Format

Use bullets only:

  • Findings first, ordered by severity, each with path:line and a brief rationale.
  • Then questions/assumptions if clarification is needed.
  • Then a short change summary if helpful.

Example bullet:

  • lib/screens/home_screen.dart:120 Potential NPE when currentSong is null; guard before accessing fields.