Reviews the specified code against the canonical API Design guidelines. Use this skill when the user asks for an API review or to check code against API design principles.
This skill reviews code against the canonical API Design guidelines.
Instructions
Load Guidelines: Read the API design guidelines from references/canonical_api_design.md to ensure they are fully available in the context.
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.
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?
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).
Agent plugins for Flutter, maintained by the Flutter team.
A collection of plugins designed to extend AI agent capabilities for Flutter development. These plugins bundle together skills, MCP server configuration, and rules to provide tailored workflows and instructions for happy path Flutter development. By giving the agent domain expertise and repeatable workflows, you drastically reduce mistakes and ensure agents reliably complete tasks following best practices.
Plugins can package various customizations together. A key component of these plugins is Agent Skills, which are simple folders of files that can be seen as complementary to MCP: where MCP gives an agent access to specialized tools, a Skill teaches the agent “how” to use tools for a specific task.
You can also install the Dart skills for Dart tasks.
Installation
Refer to Get started developing with AI for detailed instructions on how to install the plugins for your preferred agent.
Configures Flutter Driver for app interaction and converts MCP actions into permanent integration tests. Use when adding integration testing to a project, exploring UI components via MCP, or automating user flows with the integration_test package.
Add an integration test that validates the checkout experience
Adds interactive widget previews to the project using the previews.dart system. Use when creating new UI components or updating existing screens to ensure consistent design and interactive testing.
Create a preview for the ProductCard widget with different price states
Implement a component-level test using WidgetTester to verify UI rendering and user interactions (tapping, scrolling, entering text). Use when validating that a specific widget displays correct data and responds to events as expected.
Add a widget test for the CustomButton to verify the onTap callback is called
Architects a Flutter application using the recommended layered approach (UI, Logic, Data). Use when structuring a new project or refactoring for scalability.
Refactor the authentication flow to follow the recommended layered architecture
Use LayoutBuilder, MediaQuery, or Expanded/Flexible to create a layout that adapts to different screen sizes. Use when you need the UI to look good on both mobile and tablet/desktop form factors.
Make the home screen responsive so it displays a grid on tablets and a list on phones
Fixes Flutter layout errors (overflows, unbounded constraints) using Dart and Flutter MCP tools. Use when addressing "RenderFlex overflowed", "Vertical viewport was given unbounded height", or similar layout issues.
Fix the overflow error on the profile page when the keyboard is visible
Create model classes with fromJson and toJson methods using dart:convert. Use when manually mapping JSON keys to class properties for simple data structures.
Implement JSON serialization for the User model class
Configure MaterialApp.router using a package like go_router for advanced URL-based navigation. Use when developing web applications or mobile apps that require specific deep linking and browser history support.
Set up GoRouter with paths for home, details, and settings
Add flutter_localizations and intl dependencies, enable "generate true" in pubspec.yaml, and create an l10n.yaml configuration file. Use when initializing localization support for a new Flutter project.
Setup localization and add English and Spanish translations