MCP 助手
- 作者仓库星标 0
- 作者仓库 skills-registry
Flutter MCP CLI Runtime Validation
Use this skill when you need agent-style runtime validation through flutter-mcp-toolkit with minimal operator steps.
Two-Step Flow
- Launch the Flutter app in debug mode.
- Run one CLI command:
dart run mcp_server_dart/bin/flutter_mcp_toolkit.dart --save-images --output-dir .flutter_mcp/runtime_validation validate-runtime \
--target ws://127.0.0.1:8181/<token>/ws \
--timeout-ms 10000 \
--post-reload-delay-ms 500 \
--after-reload
Optional skill install in the same command:
dart run mcp_server_dart/bin/flutter_mcp_toolkit.dart validate-runtime \
--target ws://127.0.0.1:8181/<token>/ws \
--install-skill
Permission behavior for this flow:
validate-runtimestays read/write only for visual capture and defaults toauto_request_once.doctorremains read-only.- On macOS, Screen Recording permission belongs to the host process running
flutter-mcp-toolkit. - On web,
flutter_layeris the only supported truth path and no OS permission prompt is expected. - If the first
capture_ui_snapshotattempt uses hostdesktop_windowand fails (common on macOS when the window is not foregrounded, or for iOS Simulator),validate-runtimeautomatically retries once withflutter_layer. - You may pass the VM URI as global
--vm-service-uriinstead ofvalidate-runtime --targetwhen only one URI is needed.
What validate-runtime Must Prove
- Doctor preflight passes critical checks.
- Required toolkit extensions exist:
ext.mcp.toolkit.app_errorsext.mcp.toolkit.view_detailsext.mcp.toolkit.view_screenshotsext.mcp.toolkit.inspect_widget_at_point
- Screenshot capture works.
- View details (layout metadata) are available.
- App errors are retrievable.
- If
--after-reloadis enabled, post-reload screenshot also works.
Output Handling
- Use
data.summaryas pass/fail status for automation. - Use
data.summary.captureFallbackUsedto see whether theflutter_layerretry succeeded after a faileddesktop_windowattempt. - Use
data.stepsfor per-step evidence and retries. - Use
data.doctor.checksto explain setup blockers. - Use
data.summary.screenshotFilesfor saved screenshot paths when--save-imagesis enabled. - When
--save-imagesis enabled, read screenshot file URLs from step data. - For visual debugging reports, also run:
exec --name capture_ui_snapshot --args '{"errorsCount":4,"compress":true,"includeViewDetails":true,"includeErrors":true}'exec --name inspect_widget_at_point --args '{"x":<int>,"y":<int>}'
Failure Rules
- If toolkit extensions are missing, stop and report instrumentation gap with exact fix:
- add
mcp_toolkitto app dependencies - ensure
MCPToolkitBinding.instance.bootstrapFlutter(...)or equivalent manual initialization runs beforerunApp - hot restart or rerun the app
- add
- If first explicit URI connect fails, retry is automatic for retryable connection errors.
- If screenshots are blank, verify app window is visible and retry.
- If macOS visual capture is denied, use:
dart run mcp_server_dart/bin/flutter_mcp_toolkit.dart permissions statusdart run mcp_server_dart/bin/flutter_mcp_toolkit.dart permissions requestdart run mcp_server_dart/bin/flutter_mcp_toolkit.dart permissions open-settings
- If app cannot be instrumented, do not claim screenshot/layout/error inspection success.
Visual QA + Source Mapping Rules
- Always compare before/after screenshot evidence around changes.
- For each reported visual issue, provide coordinate +
inspect_widget_at_pointoutput. - Map defects to source using
get_app_errorstop stack frame (file,line,column) when available. - Do not use
debug_dump_*unless explicitly requested.
Challenge Cases (Always Call Out Explicitly)
- No running debug app:
doctorcritical failure onvm_target_reachable; request app launch before continuing. - Wrong target URI/token: treat as connection mismatch and retry with exact
app.debugPort.wsUri. - Toolkit added but still missing extensions: hot reload is often insufficient, require hot restart/full rerun.
- Non-modifiable app (cannot add toolkit): report inspection as unavailable instead of guessing.
<!-- tomevault:4.0:skill_md:2026-05-22 -->Source: Arenukvern/mcp_flutter — distributed by TomeVault.
- 流狐分类
- AI 智能
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 需简单配置
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Launch the Flutter app in debug mode. Run one CLI command: Optional skill install in the same command:
Doctor preflight passes critical checks. Required toolkit extensions exist: ext.mcp.toolkit.apperrors
Use data.summary as pass/fail status for automation. Use data.summary.captureFallbackUsed to see whether the flutterlayer retry succeeded after a failed desktopwindow attempt. Use data.steps for per-step evidence and retries.
If toolkit extensions are missing, stop and report instrumentation gap with exact fix: add mcptoolkit to app dependencies ensure MCPToolkitBinding.instance.bootstrapFlutter(...) or equivalent manual initialization runs before runApp
Always compare before/after screenshot evidence around changes. For each reported visual issue, provide coordinate + inspectwidgetatpoint output. Map defects to source using getapperrors top stack frame (file, line, column) when available.
No running debug app: doctor critical failure on vmtargetreachable; request app launch before continuing. Wrong target URI/token: treat as connection mismatch and retry with exact app.debugPort.wsUri. Toolkit added but still missing extensions: hot reload is…
<!-- @FMT_MODE_PRELUDE -->
# Flutter MCP CLI Runtime Validation
Use this skill when you need agent-style runtime validation through `flutter-mcp-toolkit` with minimal operator steps.
## Two-Step Flow
1. Launch the Flutter app in debug mode.
2. Run one CLI command:
```bash
dart run mcp_server_dart/bin/flutter_mcp_toolkit.dart --save-images --output-dir .flutter_mcp/runtime_validation validate-runtime \
--target ws://127.0.0.1:8181/<token>/ws \
--timeout-ms 10000 \
--post-reload-delay-ms 500 \
--after-reload
```
Optional skill install in the same command:
```bash
dart run mcp_server_dart/bin/flutter_mcp_toolkit.dart validate-runtime \
--target ws://127.0.0.1:8181/<token>/ws \
--install-skill
```
Permission behavior for this flow:
- `validate-runtime` stays read/write only for visual capture and defaults to `auto_request_once`.
- `doctor` remains read-only.
- On macOS, Screen Recording permission belongs to the host process running `flutter-mcp-toolkit`.
- On web, `flutter_layer` is the only supported truth path and no OS permission prompt is expected.
- If the first `capture_ui_snapshot` attempt uses host `desktop_window` and fails (common on macOS when the window is not foregrounded, or for iOS Simulator), `validate-runtime` automatically retries once with `flutter_layer`.
- You may pass the VM URI as global `--vm-service-uri` instead of `validate-runtime --target` when only one URI is needed.
## What `validate-runtime` Must Prove
- Doctor preflight passes critical checks.
- Required toolkit extensions exist:
- `ext.mcp.toolkit.app_errors`
- `ext.mcp.toolkit.view_details`
- `ext.mcp.toolkit.view_screenshots`
- `ext.mcp.toolkit.inspect_widget_at_point`
- Screenshot capture works.
- View details (layout metadata) are available.
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Two-Step Flow → What validate-runtime Must Prove → Output Handling → Failure Rules → Visual QA + Source Mapping Rules → Challenge Cases (Always Call Out Explicitly)
要点 -> Use this skill when you need agent-style runtime validation through flutter-mcp-toolkit with minimal operator steps. · 1. Launch the Flutter app in debug mode. · - validate-runtime stays read/write only for visual capture and defaults to autorequestonce. · - Doctor preflight passes critical checks. · - Use data.summary as pass/fail status for automation. · - Always compare before/after screenshot evidence around changes. · - No running debug app: doctor critical failure on vmtargetreachable; request app launch before continuing. · --- > Source: [Arenukvern/mcpflutter](https://github.com/Arenukvern/mcpflutter) — distributed by [TomeVault](https://tomevault.io).
文件/命令 -> flutter-mcp-toolkit · validate-runtime · autorequestonce · doctor · flutterlayer · captureuisnapshot · desktopwindow · --vm-service-uri
内容 SHA-256 -> 0ae8ff54917a
方法与流程
适用与边界
原文中的明确线索
flutter-mcp-toolkit、validate-runtime、autorequestonce、doctor、flutterlayer、captureuisnapshot、desktopwindow、--vm-service-uri