关于 flutter-subagent-dev
flutter-subagent-dev 是按计划执行 Flutter 开发任务的技能,每项任务交由新的子 Agent 处理。它要求先审查规格符合性,再审查代码质量,全部任务完成后转入 flutter-finishing。
主要功能
- 01从计划整理任务清单
- 02每项任务使用新的子 Agent
- 03先审查规格符合性
- 04随后进行代码质量审查
- 05修复问题并复审后再继续
适用场景
- 01执行包含多个独立任务的 Flutter 计划
- 02逐项核对实现是否符合要求
- 03完成 Flutter 项目前进行分阶段审查
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ vp-k/ flutter-craft --skill flutter-subagent-dev安装后在 Claude Code 中输入/flutter-subagent-dev确认已加载。
详细介绍
Flutter 子 Agent 驱动开发
通过为每项任务分派新的子 Agent 来执行计划,每项任务完成后进行两阶段审查:先审查规范符合情况,再审查代码质量。
核心原则: 每项任务使用新的子 Agent + 两阶段审查 = 高质量 Flutter 代码,快速迭代
开始时宣布:“我正在使用 flutter-subagent-dev 技能来执行此计划。”
适用场景
Have implementation plan?
├─ NO → Use flutter-brainstorming first
└─ YES → Tasks mostly independent?
├─ NO → Tightly coupled → Use flutter-executing instead
└─ YES → Stay in this session?
├─ YES → Use flutter-subagent-dev (this skill)
└─ NO → Use flutter-executing (parallel session)
与 Flutter Executing(批处理模式)相比:
- 使用同一会话(无需切换上下文)
- 每项任务使用新的子 Agent(避免上下文污染)
- 每项任务完成后进行两阶段审查
- 迭代更快
流程
1. Read plan, extract all tasks, create todo entries (task tracking tool)
↓
2. For each task:
├─ Dispatch implementer subagent
├─ Implementer asks questions? → Answer, then proceed
├─ Implementer implements, runs flutter analyze, commits
├─ Dispatch spec reviewer subagent
├─ Spec compliant?
│ ├─ NO → Implementer fixes, re-review
│ └─ YES → Continue
├─ Dispatch code quality reviewer subagent
├─ Quality approved?
│ ├─ NO → Implementer fixes, re-review
│ └─ YES → Mark task complete
└─ Next task
↓
3. After all tasks:
├─ Dispatch final code reviewer
└─ Use flutter-finishing skill
子 Agent 提示词模板
实施子 Agent
使用 subagent_type: "flutter-craft:flutter-dart-specialist" 分派——其
Agent 定义包含 Flutter/Dart 实施规范(Riverpod
模式、Widget 原则、性能、推荐的软件包),因此无需将这些内容复制到提示词中。
You are implementing Task N: [task name]
## Task Description
[Full task text from plan - copy exactly]
## Context
- Project: Flutter app using [BLoC/Provider/Riverpod]
- Architecture: Clean Architecture
- This task is part of: [feature name]
- Previous tasks completed: [list]
- Dependencies: [what this task depends on]
## Layer
[Domain / Data / Presentation / Test]
## Before You Begin
If you have questions about:
- Clean Architecture placement
- State management approach
- Widget composition
- Test strategy
Ask before implementing.
## Your Job
1. Implement exactly as specified in task
2. Run `flutter analyze` - must show no issues
3. Commit with conventional commit message
4. Self-review: Check against task requirements
5. Report what you implemented
## Verification
After implementation:
$ flutter analyze lib/features/<feature>/
Expected: No issues found!
规范审查子 Agent
You are reviewing whether an implementation matches its specification.
## What Was Requested
[Full task requirements from plan]
## What Implementer Claims They Built
[From implementer's report]
## CRITICAL: Do Not Trust the Report
Verify everything independently by reading actual code.
**DO NOT:**
- Take their word for what they implemented
- Trust claims about completeness
- Accept their interpretation of requirements
**DO:**
- Read the actual code they wrote
- Compare actual implementation to requirements line by line
- Check for missing pieces
- Look for extra features not in spec
## Your Job
Read the implementation code and verify:
**Missing requirements:**
- Did they implement everything requested?
- Are there requirements they skipped?
**Extra/unneeded work:**
- Did they build things not requested?
- Did they add "nice to haves" not in spec?
**Flutter-Specific Checks:**
- Is the layer correct (Domain/Data/Presentation)?
- Does Clean Architecture structure match?
- Are dependencies pointing correct direction?
**Report:**
- ✅ Spec compliant (everything matches after code inspection)
- ❌ Issues found: [list specifically what's missing or extra, with file:line references]
代码质量审查子 Agent
使用 subagent_type: "flutter-craft:flutter-code-reviewer" 分派——完整的
质量检查清单(整洁架构、状态管理、Widget 质量、Dart 风格、按优先级划分的测试覆盖率)保存在该 Agent 定义中,是唯一可信来源。不要将检查清单复制到提示词中。
You are reviewing Flutter code quality after spec compliance is confirmed.
## What Was Implemented
[Description]
## Git Range to Review
Base: {BASE_SHA}
Head: {HEAD_SHA}
Apply your full review checklist. Additionally verify that tests actually
test logic (not just mocks).
## Output Format
### Strengths
[What's well done?]
### Issues
#### Critical (Must Fix)
[Bugs, security issues, broken functionality]
#### Important (Should Fix)
[Architecture problems, missing features, test gaps]
#### Minor (Nice to Have)
[Style, optimization]
### Assessment
**Ready to proceed?** [Yes/No/With fixes]
工作流示例
You: I'm using Flutter Subagent-Driven Development to execute this plan.
[Read plan: docs/plans/auth-plan.md]
[Extract all 5 tasks with context]
[Create todo entries for all tasks]
Task 1: User Entity (Domain Layer)
[Dispatch implementer subagent with full task text]
Implementer: "Implementing User entity in domain layer..."
- Created lib/features/auth/domain/entities/user.dart
- flutter analyze: No issues found!
- Committed: "feat(auth): add User entity"
[Dispatch spec reviewer]
Spec reviewer: ✅ Spec compliant - User entity matches requirements
[Dispatch code quality reviewer]
Code reviewer:
Strengths: Clean entity, proper const constructor
Issues: None
Assessment: Approved
[Mark Task 1 complete]
Task 2: AuthRepository Interface (Domain Layer)
[Dispatch implementer subagent]
Implementer: "Question: Should login return Either<Failure, User> or just User?"
You: "Use Either<Failure, User> pattern with fpdart package"
Implementer: "Got it. Implementing..."
- Created auth_repository.dart with Either return types
- flutter analyze: No issues found!
- Committed
[Dispatch spec reviewer]
Spec reviewer: ❌ Issues:
- Missing: logout() method specified in plan
- Extra: Added refreshToken() not in spec
[Implementer fixes]
Implementer: Added logout(), removed refreshToken()
[Spec reviewer reviews again]
Spec reviewer: ✅ Spec compliant
[Dispatch code quality reviewer]
Code reviewer: ✅ Approved
[Mark Task 2 complete]
... (continue for remaining tasks)
[After all tasks]
[Dispatch final code reviewer for entire feature]
[Use flutter-finishing skill]
注意事项
切勿:
- 跳过审查(规范符合情况或代码质量)
- 带着未修复的问题继续
- 在规范符合情况审查之前开始代码质量审查 ✅
- 让实施者跳过
flutter analyze - 忽略子 Agent 的问题
如果子 Agent 提出问题:
- 清楚说明整洁架构中的位置安排
- 澄清状态管理方案
- 提供有关现有模式的背景信息
如果审查者发现问题:
- 由实施者修复
- 由审查者再次审查
- 重复以上步骤,直到获批
必需的子技能
所有任务完成后: → flutter-craft:flutter-finishing(提供完成选项)
评论
支持 Markdown