一键导入
source-command-flutter-build
Fix Dart analyzer errors and Flutter build failures incrementally. Invokes the dart-build-resolver agent for minimal, surgical fixes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Fix Dart analyzer errors and Flutter build failures incrementally. Invokes the dart-build-resolver agent for minimal, surgical fixes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs.
Django testing strategies with pytest-django, TDD methodology, factory_boy, mocking, coverage, and testing Django REST Framework APIs.
Spring Security best practices for authn/authz, validation, CSRF, secrets, headers, rate limiting, and dependency security in Java Spring Boot services.
为网页应用快速接入 OpenClaw 通道配置,自动输出可直接复制的 Webhook URL 与 Token。用于用户说“帮我配置 OpenClaw 通道”“给我 Webhook 和 Token”“一键生成接入参数”“OpenClaw 对话接入配置”这类场景,支持外部网页与本地网页两种模式,减少手工查配置和复制错误。
基于 AI 自动生成高质量 PPT 图片和视频,支持智能转场和交互式播放。
Enforce TDD workflow for Kotlin. Write Kotest tests first, then implement. Verify 80%+ coverage with Kover.
基于 SOC 职业分类
| name | source-command-flutter-build |
| description | Fix Dart analyzer errors and Flutter build failures incrementally. Invokes the dart-build-resolver agent for minimal, surgical fixes. |
Use this skill when the user asks to run the migrated source command flutter-build.
This command invokes the dart-build-resolver agent to incrementally fix Dart/Flutter build errors with minimal changes.
flutter analyze, flutter pub getUse /flutter-build when:
flutter analyze reports errorsflutter build fails for any platformdart pub get / flutter pub get fails with version conflictsbuild_runner fails to generate code# Analysis
flutter analyze 2>&1
# Dependencies
flutter pub get 2>&1
# Code generation (if project uses build_runner)
dart run build_runner build --delete-conflicting-outputs 2>&1
# Platform builds
flutter build apk 2>&1
flutter build web 2>&1
User: /flutter-build
Agent:
# Flutter Build Resolution
## Initial Diagnostics
```
$ flutter analyze
Analyzing project...
error • lib/features/user/data/user_repository_impl.dart:34:16 •
A value of type 'String?' can't be assigned to a variable of type 'String'. •
invalid_assignment
error • lib/features/cart/presentation/cart_page.dart:58:5 •
The method 'add' isn't defined for the type 'List<Item>'.
Try correcting the name to the name of an existing method, or defining a method named 'add'. •
undefined_method
2 errors found.
```
## Fix 1: Null Safety
File: lib/features/user/data/user_repository_impl.dart:34
Error: A value of type 'String?' can't be assigned to type 'String'
Changed:
```dart
final id = response.id;
```
To:
```dart
final id = response.id ?? '';
```
```
$ flutter analyze
1 error found.
```
## Fix 2: Immutable List
File: lib/features/cart/presentation/cart_page.dart:58
Error: The method 'add' isn't defined for the type 'List<Item>'
Cause: State holds an unmodifiable list; mutation goes through Cubit
Changed:
```dart
state.items.add(item);
```
To:
```dart
context.read<CartCubit>().addItem(item);
// Note: Cubit exposes named methods (addItem, removeItem);
// .add(event) is the BLoC event API — don't mix them.
```
```
$ flutter analyze
No issues found!
```
## Final Verification
```
$ flutter test
All tests passed.
```
## Summary
| Metric | Count |
|--------|-------|
| Analysis errors fixed | 2 |
| Files modified | 2 |
| Remaining issues | 0 |
Build Status: PASS ✓
| Error | Typical Fix |
|---|---|
A value of type 'X?' can't be assigned to 'X' | Add ?? default or null guard |
The name 'X' isn't defined | Add import or fix typo |
Non-nullable instance field must be initialized | Add initializer or late |
Version solving failed | Adjust version constraints in pubspec.yaml |
Missing concrete implementation of 'X' | Implement missing interface method |
build_runner: Part of X expected | Delete stale .g.dart and rebuild |
The agent will stop and report if:
/flutter-test — Run tests after build succeeds/flutter-review — Review code quality/verify — Full verification loopagents/dart-build-resolver.mdskills/flutter-dart-code-review/