Skip to content

Add flutter-app-runtime Agent Skill for runtime interaction and proactive hot reload - #221

Open
jwren wants to merge 1 commit into
mainfrom
new-skill-flutter-app-runtime
Open

Add flutter-app-runtime Agent Skill for runtime interaction and proactive hot reload#221
jwren wants to merge 1 commit into
mainfrom
new-skill-flutter-app-runtime

Conversation

@jwren

@jwren jwren commented Aug 17, 2026

Copy link
Copy Markdown
Member

Adds the flutter-app-runtime skill 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.

  1. Skill Definition (resources/flutter_skills.yaml): Added the flutter-app-runtime entry with reference docs and prompt examples.
  2. Skill Instructions (skills/flutter-app-runtime/SKILL.md): Comprehensive procedural workflows for:
    • Application discovery and connection via DTD / vm_service.
    • UI modification and proactive hot reload / hot restart cycles.
    • Live runtime error diagnostics via get_runtime_errors and widget_inspector.
    • UI interaction via flutter_driver commands.
  3. Documentation (README.md): Added flutter-app-runtime to the Available Skills table.

Ref: dart-lang/ai#498

Related: #220

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread README.md
| [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. | |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
| [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 |

Comment on lines +435 to +440
- 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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}"`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
- [ ] 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.
@jwren
jwren force-pushed the new-skill-flutter-app-runtime branch from 40c35e4 to bb2d719 Compare August 17, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant