SuperAPI AI Directory

flutter-skills

Coding & development

View repository

Updated 10-16 01:19

About this skill

Flutter Skills

Task Objectives

  • This Skill is used to: provide a complete guide to modern Flutter development, covering architecture design, testing workflows, troubleshooting, and code generation
  • Capabilities include: Clean Architecture specification, TDD workflow, BLoC state management, fault diagnosis, code generation scripts, intelligent assistant
  • Trigger conditions: the user asks about Flutter architecture design, TDD testing, state management, project structure, code generation, troubleshooting, or third-party library selection

Prerequisites

  • Dependency notes: no additional dependencies
  • Project environment: Flutter SDK 3.x, Dart SDK 3.x

Quick Navigation

📚 Documentation Index

  • Quick Search:INDEX.md - Quick index of all resources
  • Scenario Mapping:SCENARIOS.md - Mapping of user intents to resources

🤖 Intelligent Assistant Triggers

Trigger Methods Agent
"Please help me implement with TDD" TDD Coach
"Please review this code" Code Reviewer
"Write tests" Test Writer
"Review the architecture" Architecture Reviewer

Operation Steps

Standard Process

  1. Architecture Design and Planning

  2. Feature Module Generation (Script)

    python scripts/generate_feature.py --feature-name <name>
    python scripts/generate_model.py --model-name <name> --fields <spec>
    python scripts/generate_bloc.py --bloc-name <name> --feature <feature>
    python scripts/generate_test.py --source <file_path>
    
  3. TDD Development Workflow (Agent + Guidance)

    • Trigger the TDD Coach Agent
    • Refer to testing-guide.md
    • Trigger the Test Writer Agent to generate tests
  4. Code Quality Assurance (Agent)

    • Trigger the Code Reviewer Agent to review code
    • Trigger the Architecture Reviewer Agent to audit the architecture
  5. Troubleshooting (Diagnosis)

Decision Process

Use SCENARIOS.md to quickly locate with the decision tree:

用户请求
├─ 创建/生成 → scripts/ + commands-guide.md
├─ TDD 开发 → agents/tdd-coach.md + testing-guide.md
├─ 审查代码 → agents/code-reviewer.md
├─ 审查架构 → agents/architecture-reviewer.md
├─ 编写测试 → agents/test-writer.md
└─ 故障排除 → references/diagnostic/

Resource Index

Script Tools (scripts/)

Script Function
generate_feature.py Generate Feature structure
generate_model.py Generate Freezed model
generate_bloc.py Generate BLoC structure
generate_test.py Generate test template

Core Reference Documentation

Detailed Skill Documentation (references/skills/)

  • Architecture(5): bloc-architecture, clean-architecture, dependency-injection, error-handling, feature-structure
  • Testing(5): bloc-testing, mocking-patterns, tdd-workflow, unit-testing, widget-testing
  • Generation(1): screen

Detailed Command Documentation (references/commands/)

  • Code generation: generate-bloc, generate-feature, generate-model, generate-test
  • Build tools: build-runner, clean-rebuild
  • Testing tools: flutter-test, flutter-coverage
  • Code quality: flutter-lint

Diagnostic Guide (references/diagnostic/)

Intelligent assistants (references/agents/)

Overview of five capability categories

1. Discipline-Enforcing Skills (enforced workflows)

Enforced development standards and processes.

2. Reference Skills (reference guides)

Comprehensive technical reference documentation.

3. Diagnostic Skills (troubleshooting)

Systematic problem diagnosis and troubleshooting methods.

4. Commands (command scripts)

Rapid automation operations and scaffolding tools.

  • scripts/generate_feature.py
  • scripts/generate_model.py
  • scripts/generate_bloc.py
  • scripts/generate_test.py

5. Agents (intelligent assistants)

Automated assistants triggered by natural language.

  • TDD Coach - Guide the TDD process
  • Code Reviewer - Review code quality
  • Test Writer - Generate test code
  • Architecture Reviewer - Audit architecture compliance

Usage examples

Example 1: Creating a user authentication feature (TDD process)

# 1. 生成结构
python scripts/generate_feature.py --feature-name auth
python scripts/generate_model.py --model-name user --fields id:String,email:String,name:String

# 2. 请求 TDD Coach:"请帮我用 TDD 实现用户登录功能"
#    → 智能体扮演 TDD Coach 指导 Red/Green/Refactor 循环

# 3. 请求 Code Reviewer 审查代码

# 4. 生成代码
dart run build_runner build --delete-conflicting-outputs

Example 2: Diagnosing a runtime error

用户: "应用崩溃了,帮我诊断"

智能体:
1. 查阅 [runtime-errors.md](references/diagnostic/runtime-errors.md)
2. 分析错误信息和堆栈跟踪
3. 提供修复建议和预防措施

Example 3: Code review

用户: "请审查这段代码"

智能体:
1. 触发 Code Reviewer Agent
2. 进行全面审查(架构、代码质量、安全性)
3. 提供问题列表和修复建议

Notes

  • Agent first: when encountering complex tasks, trigger the corresponding Agent first
  • Progressive loading: read the core guide first, then read detailed skills when needed
  • Scenario mapping: use SCENARIOS.md to quickly locate resources
  • Quick index: use INDEX.md to find specific topics
  • Context retention: maintain context within the same session to avoid repeated reading

Tech stack versions

Project statistics

  • Total documents: 26+
  • Script tools: 4
  • Intelligent assistants: 4
  • Detailed skill documents: 11
  • Detailed command documents: 9
  • Diagnostic guides: 4
  • Libraries covered: 40+