用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/theyoungastronauts/polaris --skill verify-flutter命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | verify-flutter |
| description | Flutter verification checklist — Riverpod, Freezed, Dio, pagination, contract alignment. |
| disable-model-invocation | true |
Systematic verification checklist for Flutter/Dart code following the conventions in flutter-patterns.md. Used by the reviewer agent after code execution.
Run through each section. Flag issues as PASS, WARN, or FAIL.
features/{name}/models|services|providers|screens|widgetscore/ (api, error, router, theme, providers, utils, widgets)snake_case.dart convention.freezed.dart, .g.dart next to source)json_serializable — @freezed class with _$ mixinconst Model._() private constructor for custom gettersfactory Model.fromJson() and generated toJson()@JsonKey(name: ...) for snake_case API fields@JsonKey(includeToJson: false) for server-managed fields (id, created_at)factory Model.empty() for form initializationbool get exists for create-vs-update logicbuild_runner build produces no changes)abstract class {Feature}Service){Feature}ServiceDjango implements {Feature}Service)save() combines create + update using model.existsEither/fpdart — errors thrown as typed Failure@riverpod codegen used everywhere (no hand-written providers)@riverpod (lowercase, auto-dispose) for reads — detail, service binding@Riverpod(keepAlive: true) for forms and auth stateAsyncNotifier for stateful operations (forms, paginated lists)AsyncValue.guard() wraps async callsref.invalidate() called on related providers after mutationsTextEditingControllers and GlobalKey<FormState>BaseScreenroute() method returns the path stringref.watch() in body() for reactive data, ref.read() for actionsAsyncValue.when() handles loading/error/data statescontext.mounted checked after async operations before navigationwidgets/const constructors with all final fieldsBaseScreen)ConsumerWidget only when the widget needs refDio instance (no per-request construction)connectTimeout, receiveTimeout)LogInterceptor gated behind kDebugModeprint() statementsDioException caught and mapped to typed Failureflutter_secure_storage for token persistence (not SharedPreferences)keepAlive: trueAsyncValue<User?> — null means logged outFailure class hierarchy (not generic Exception)ServerFailure, NetworkFailure, AuthFailure, ValidationFailureValidationFailure carries fieldErrors mapAsyncValue.errorref.listen() or AsyncValue.when() to display errorsAsyncNotifier with keepAlive: trueload(Model) populates controllers from existing datareset() clears state and controllerssubmit() validates form, calls service, invalidates related providersGlobalKey<FormState> for validationConsumerWidget with ref.read() for notifier, ref.watch() for stateAsyncNotifier with page controlsPagingController from infinite_scroll_paginationPaginatedResponse<T> model with canLoadMore getterRefreshIndicator for pull-to-refreshflutter test passes with no failuresmocktail for mocking (not mockito)ProviderScope + MaterialAppdart analyze passes with no issuesprint() statementsrequire_trailing_commas lint enabled and followedProduce a verification-report.md:
# Verification Report: [Feature/Phase]
Date: [date]
Reviewer: Claude (automated)
## Summary: [PASS/WARN/FAIL]
## Details
### Project Structure: [PASS/WARN/FAIL]
- [notes]
### Models: [PASS/WARN/FAIL]
- [notes]
### Services: [PASS/WARN/FAIL]
- [notes]
...
## Issues Found
1. [FAIL] Description + suggested fix
2. [WARN] Description + recommendation
## Recommended Actions
- [ ] Fix: ...
- [ ] Consider: ...
基于 SOC 职业分类