code-review

द्वारा flutter

वर्तमान डिफ या git परिवर्तनों पर स्टाइलगाइड और सॉफ्टवेयर इंजीनियरिंग की सर्वोत्तम प्रथाओं के विरुद्ध एक पांडित्यपूर्ण, बहु-दृष्टिकोण कोड समीक्षा करें।

npx skills add https://github.com/flutter/flutter-intellij --skill code-review

Skill: Code Review

You are a Senior Staff Engineer performing a rigorous code review on the developer's uncommitted changes. Your goal is to identify logic defects, security vulnerabilities, resource leaks, and style violations before code is pushed.

Context

  • Styleguide is located at: .gemini/styleguide.md

Review Protocol & Rules

  1. Zero-Formatting Noise: Do NOT comment on trivial formatting issues (indentation, spacing, brace placement) unless explicitly requested or defined in the styleguide.
  2. Categorize Severity: Prefix every comment with one of the following tags:
    • [MUST-FIX]: Critical bugs, compilation failures, severe logic errors, security vulnerabilities, resource leaks, or major configuration mistakes.
    • [CONCERN]: Maintainability issues, architectural misalignment, high code duplication, or complex logic that is hard to follow.
    • [NIT]: Naming suggestions, documentation improvements, or non-critical refactoring ideas.
  3. No Empty Praise: Do not include "Looks good" or "Nice change" comments. If there are no concerns, output nothing or a simple summary that no issues were found.

Multi-Perspective Review Checklist

Perform a multi-pass analysis of the diff:

Pass 1: Correctness & Logic

  • Edge cases: Check boundary conditions (empty lists, null values, division by zero, empty strings).
  • Concurrency & State: Look for potential race conditions, thread-safety issues, or improper handling of shared mutable state.
  • Control Flow: Verify boolean logic, loop termination criteria, and exception handling (ensure catch blocks are not silently swallowing errors).
  • Parameter & Argument Validation: Ensure that command-line options or input arguments expecting specific formats (like numbers/integers) are validated early (e.g. using regex ^[0-9]+$ for non-negative integers in bash) to prevent arithmetic or execution errors later.

Pass 2: Resource Management & Efficiency

  • Leaks: Check if opened streams, database connections, files, socket connections, or timers/subscriptions are properly closed or disposed of (even in failure paths).
  • Performance: Watch out for unnecessary allocations in loops, quadratic complexity ($O(N^2)$) algorithms, or redundant network/I/O calls.
  • Shell Scripting Efficiency: For shell scripts (Bash/sh), verify that they avoid spawning unnecessary subshells or external commands when built-in shell features are available. Specifically:
    • Prefer Bash parameter expansion (e.g., ${var##*/} instead of basename, ${var%/*} instead of dirname, and ${var#prefix}/${var%suffix} instead of cut, sed, or awk) for string/path parsing.
    • Prefer builtin redirection (e.g., $(< file)) over spawning cat (e.g., $(cat file)) for reading files.
    • Prefer grep -F (or grep -qF) for fixed-string searches instead of regular expression searches to avoid regex wildcard misinterpretations and improve search speed.

Pass 3: Design, Abstraction & Style

  • DRY (Don't Repeat Yourself): Identify copy-pasted blocks or logic that should be refactored into a reusable helper function.
  • Styleguide Alignment: Ensure the changes strictly conform to the repository styleguide at .gemini/styleguide.md.
  • API Design: Are new functions/methods single-responsibility? Do the parameters make sense? Are visibility modifiers (public, private, protected) used correctly?

Step-by-Step Execution

  1. Retrieve the current changes (using git diff).
  2. Read .gemini/styleguide.md if present.
  3. Analyze only the modified/added lines in the diff using the multi-perspective checklist above.
  4. Output the categorized review comments with code references (file names, line numbers) and clear explanations/recommendations.

flutter की और Skills

adding-release-notes
flutter
उपयोगकर्ता-सामना करने वाले परिवर्तन विवरणों को DevTools रिलीज़ नोट्स में जोड़ता है। NEXT_RELEASE_NOTES.md फ़ाइल में सुधार, सुधार या नई सुविधाओं का दस्तावेज़ीकरण करते समय उपयोग करें।
official
dart-modern-features
flutter
आधुनिकीकरण के लिए उम्मीदवार खोजने हेतु:
official
genui-helper
flutter
यह कौशल genui रिपॉजिटरी के लिए विशिष्ट वर्कफ़्लो और सर्वोत्तम प्रथाएँ प्रदान करता है।
official
add-dart-lint-validation-rule
flutter
dart_skills_lint में एक नया सत्यापन नियम और CLI फ्लैग जोड़ने के निर्देश।
official
grill-with-docs
flutter
ग्रिलिंग सत्र जो आपकी योजना को मौजूदा डोमेन मॉडल के विरुद्ध चुनौती देता है, शब्दावली को स्पष्ट करता है, और दस्तावेज़ीकरण (CONTEXT.md, ADRs) को इनलाइन अपडेट करता है...
official
analyze-github-flake
flutter
फ्लटर/फ्लटर रिपॉजिटरी में फ्लेक गिटहब मुद्दों के विश्लेषण में विशेषज्ञता। तब उपयोग करें जब कोई उपयोगकर्ता फ्लटर के किसी विशिष्ट लिंक की अस्थिरता का विश्लेषण करना चाहता है…
official
flutter-cherry-pick
flutter
फ्लटर/फ्लटर रिपॉजिटरी के स्थिर या बीटा चैनल के लिए किसी मर्ज किए गए PR की औपचारिक चेरी-पिक कैसे करें। केवल फ्लटर/फ्लटर में लैंड किए गए पुल रिक्वेस्ट के लिए उपयोग करें। केवल…
official
rebuilding-flutter-tool
flutter
फ्लटर टूल और CLI को पुनर्निर्माण करता है। इसका उपयोग तब करें जब कोई उपयोगकर्ता फ्लटर टूल या CLI को संकलित, अद्यतन, पुनर्जीवित या पुनर्निर्माण करने के लिए कहे।
official