api-review

от flutter

Проверяет указанный код на соответствие каноническим рекомендациям по проектированию API. Используйте этот навык, когда пользователь запрашивает ревью API или проверку кода на соответствие API design…

npx skills add https://github.com/flutter/agent-plugins --skill api-review

API review skill

This skill reviews code against the canonical API Design guidelines.

Instructions

  1. Load Guidelines: Read the API design guidelines from references/canonical_api_design.md to ensure they are fully available in the context.
  2. Identify Target: Identify the code to review.
    • If the user specified files (e.g., "review main.dart"), use those.
    • If the user has an open file in their context, assume that is the target.
    • If neither, ask the user to specify the target files.
  3. Analyze: For each target file, perform a deep analysis against the "Foundations of Canonical API Design Principles" (loaded in step 1), specifically looking for:
    • Contract-First: Is the interface clear and decoupled from implementation?
    • KISS/YAGNI: Are there unnecessary parameters or over-generalized features?
    • Ergonomics: Are names intent-revealing? Do they follow the Principle of Least Astonishment?
    • CQS: Are commands and queries separated?
    • Safety: Are types used strictly (Enums vs Strings)? Is validation visible?
    • Explicit Configuration: Are dependencies explicitly injected rather than implicitly resolved via global state, registries, or environment variables?
  4. Report: Generate a structured report:
    • Score: Give a letter grade (A-F) based on alignment.
    • Critical Issues: Violations that must be fixed (e.g., severe strictness or safety issues).
    • Suggestions: Ergonomic improvements (renaming, rearranging).
    • Code Examples: Provide before vs after code blocks for the suggested improvements.
    • Save the report as a markdown artifact in the conversation artifacts directory (e.g., <appDataDir>/brain/<conversation-id>/api_review_results.md).

Больше skills от flutter

dart-modern-features
flutter
Для поиска кандидатов на модернизацию:
flutter-fix-layout-issues
flutter
Исправляет ошибки макета Flutter (переполнения, неограниченные ограничения) с помощью Dart и инструментов Flutter MCP. Используйте при устранении «RenderFlex overflowed», «Vertical…
adding-release-notes
flutter
Добавляет описания изменений, видимых пользователю, в примечания к выпуску DevTools. Используйте при документировании улучшений, исправлений или новых функций в файле NEXT_RELEASE_NOTES.md.
reviewing-devtools-prs
flutter
Специфичный для репозитория DevTools процесс ревью PR, обеспечивающий соблюдение стилевых рекомендаций DevTools и общих паттернов ревью. Используйте при ревью пул-реквестов в…
dart-use-primary-constructors
flutter
Помогите пользователям писать синтаксически и семантически корректные первичные конструкторы в Dart, а также мигрировать и использовать новый синтаксис конструкторов, синтаксис с пустым телом и точкой с запятой,…
code-documentation
flutter
Руководство по написанию эффективной документации кода, включая docstrings, JSDoc, dartdoc и комментарии к реализации. Используйте этот навык при написании нового кода, добавлении…
flutter-accessibility
flutter
We need to translate the given text from English to Russian, preserving the name "flutter-accessibility" if it appears. The text is a description of an agent skill. The instruction says: "Translate only the text inside <text>. Do not include the name unless it appears in the source text." The name "flutter-accessibility" does not appear in the source text provided. So we just translate the text. The text: "Implement WCAG 2 and EN 301 549 accessibility standards and adaptive layouts in Flutter apps. Enforces semantic annotations, tap target sizes (48x48 dp minimum), and text contrast ratios (4.5:1 for small text, 3:1 for large) across mobile, web, and desktop platforms Provides decision logic for web semantics initialization, interactive widget wrapping, screen-size-based layout switching, and keyboard/mouse input handling Includes focus traversal management via FocusTraversalGroup and..." We need to translate accurately, preserving technical terms like WCAG 2, EN 301 549, Flutter, dp, ratios, FocusTraversalGroup,
flutter-accessibility-audit
flutter
Запускает проверку доступности через widget_inspector и автоматически добавляет виджеты Semantics или недостающие метки в исходный код.