Add flutter-app-runtime Agent Skill for runtime interaction and proactive hot reload - #221
Add flutter-app-runtime Agent Skill for runtime interaction and proactive hot reload#221jwren wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the flutter-app-runtime skill, which enables interaction with running Dart and Flutter applications via the Dart MCP server for features like hot reload, hot restart, widget inspection, and error fetching. The changes add the skill to the README, the main configuration file, and create a detailed markdown guide. The review feedback suggests adding the missing example prompt in both the README and the YAML configuration for consistency, as well as correcting the flutter pub add command syntax in the documentation to use the standard --sdk flag.
| | [flutter-add-integration-test](skills/flutter-add-integration-test/SKILL.md) | 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 | | ||
| | [flutter-add-widget-preview](skills/flutter-add-widget-preview/SKILL.md) | 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 | | ||
| | [flutter-add-widget-test](skills/flutter-add-widget-test/SKILL.md) | 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 | | ||
| | [flutter-app-runtime](skills/flutter-app-runtime/SKILL.md) | Interacts with running Dart and Flutter applications via the Dart MCP server to enable hot reload, hot restart, widget inspection, and error fetching. Use when modifying UI widgets, debugging errors, inspecting running apps, or proactively hot reloading whenever changes are made to Flutter UI widgets. | | |
There was a problem hiding this comment.
The example prompt column is currently empty for the flutter-app-runtime skill. Please add a representative example prompt to match the other skills in the table.
| | [flutter-app-runtime](skills/flutter-app-runtime/SKILL.md) | Interacts with running Dart and Flutter applications via the Dart MCP server to enable hot reload, hot restart, widget inspection, and error fetching. Use when modifying UI widgets, debugging errors, inspecting running apps, or proactively hot reloading whenever changes are made to Flutter UI widgets. | | | |
| | [flutter-app-runtime](skills/flutter-app-runtime/SKILL.md) | Interacts with running Dart and Flutter applications via the Dart MCP server to enable hot reload, hot restart, widget inspection, and error fetching. Use when modifying UI widgets, debugging errors, inspecting running apps, or proactively hot reloading whenever changes are made to Flutter UI widgets. | Hot reload the running application to show the new button style | |
| - name: flutter-app-runtime | ||
| description: Interacts with running Dart and Flutter applications via the | ||
| Dart MCP server to enable hot reload, hot restart, widget inspection, and | ||
| error fetching. Use when modifying UI widgets, debugging errors, inspecting | ||
| running apps, or proactively hot reloading whenever changes are made to | ||
| Flutter UI widgets. |
There was a problem hiding this comment.
The examplePrompt field is missing for the flutter-app-runtime skill. Adding it ensures consistency with other skills and allows automated tools to populate the README correctly.
- name: flutter-app-runtime
description: Interacts with running Dart and Flutter applications via the
Dart MCP server to enable hot reload, hot restart, widget inspection, and
error fetching. Use when modifying UI widgets, debugging errors, inspecting
running apps, or proactively hot reloading whenever changes are made to
Flutter UI widgets.
examplePrompt: "Hot reload the running application to show the new button style"|
|
||
| To drive a running Flutter app (take screenshots, tap buttons, enter text), the app must be instrumented with `flutter_driver`. | ||
|
|
||
| - [ ] 1. Verify `flutter_driver` is in `pubspec.yaml`. If not, run `flutter pub add "flutter_driver:{sdk: flutter}"`. |
There was a problem hiding this comment.
The command flutter pub add "flutter_driver:{sdk: flutter}" uses invalid JSON descriptor syntax (keys and values must be double-quoted in JSON, e.g., {"sdk":"flutter"}). To avoid syntax errors and shell quoting issues, it is highly recommended to use the standard --sdk flag instead.
| - [ ] 1. Verify `flutter_driver` is in `pubspec.yaml`. If not, run `flutter pub add "flutter_driver:{sdk: flutter}"`. | |
| - [ ] 1. Verify `flutter_driver` is in `pubspec.yaml`. If not, run `flutter pub add flutter_driver --sdk=flutter`. |
…ot reload - Add the `flutter-app-runtime` skill definition to `resources/flutter_skills.yaml`. - Generate `skills/flutter-app-runtime/SKILL.md` to guide agents in discovering running applications via DTD/MCP, proactively hot reloading on widget changes, and diagnosing runtime errors. - Update `README.md` with the new skill entry.
40c35e4 to
bb2d719
Compare
Adds the
flutter-app-runtimeskill to teach AI agents how to discover running Dart/Flutter applications via the Dart Tooling Daemon (DTD) and Dart MCP server, proactively execute hot reload/restart, and diagnose runtime errors.resources/flutter_skills.yaml): Added theflutter-app-runtimeentry with reference docs and prompt examples.skills/flutter-app-runtime/SKILL.md): Comprehensive procedural workflows for:vm_service.get_runtime_errorsandwidget_inspector.flutter_drivercommands.README.md): Addedflutter-app-runtimeto the Available Skills table.Ref: dart-lang/ai#498
Related: #220