flutter-init
npx skills add https://github.com/bear2u/my-skills --skill flutter-init
Agent 安装分布
Skill 文档
Flutter Init Skill
ëë©ì¸ ê¸°ë° Flutter íë¡ì í¸ë¥¼ ìì±íê³ íëì ì¸ ìí¤í ì²ë¡ ìë ì¤ì í©ëë¤. Todo, Habit, Note, Expense ëë Custom ëë©ì¸ì ì ííì¬ Clean Architecture 기ë°ì ìì í CRUD ì±ì ì¦ì ìì±í ì ììµëë¤.
Quick Start
ì¤í¬ ì¤í ì ë¤ì ì 보를 ì ë ¥ë°ìµëë¤:
- í´ëëª (ì: my_habit_app)
- íë¡ì í¸ëª /í¨í¤ì§ëª (ì: habit_app)
- ëë©ì¸ ì í (Todo/Habit/Note/Expense/Custom)
- ì¤í í리ì (Minimal/Essential/Full Stack/Custom)
ê·¸ í ìëì¼ë¡ ë¤ì ë¨ê³ê° ì¤íë©ëë¤:
# 1. íë¡ì í¸ ìì± (Android/Kotlin, iOS/Swift)
flutter create --platforms android,ios --android-language kotlin --org com.example [í´ëëª
]
# 2. í¨í¤ì§ ì¤ì¹
flutter pub get
# 3. ëë©ì¸ë³ Clean Architecture ì½ë ìë ìì±
# - domain/entities/[domain].dart (Freezed ìí°í°)
# - data/datasources/local/app_database.dart (Drift í
ì´ë¸)
# - data/repositories/[domain]_repository_impl.dart (Repository 구í)
# - presentation/providers/[domain]_providers.dart (Riverpod 3.0)
# - presentation/screens/* (List/Detail/Form íë©´)
# 4. ì½ë ìì± (Freezed, Drift, JSON Serializable)
dart run build_runner build --delete-conflicting-outputs
# 5. ì½ë ê²ì¦ ë° ì¤ë¥ ìë ìì (íì)
flutter analyze
# 6. ì± ì¤í
flutter run
Task Instructions
IMPORTANT: ì´ ì¤í¬ì ëííì¼ë¡ ì§íë©ëë¤.
Step 1: ëë©ì¸ ë° íë¡ì í¸ ì¤ì ì§ë¬¸
먼ì ì¬ì©ììê² ì´ë ê² ë¬¼ì´ë³´ì¸ì:
“Flutter ì±ì ìì±í©ëë¤. ë¤ì ì 보를 ìë ¤ì£¼ì¸ì:
1. ëë©ì¸(ìí°í°) ì í
ì´ë¤ ëë©ì¸ì ì±ì ë§ëìê² ìµëê¹?
A) Todo (í ì¼ ê´ë¦¬)
- íë: title, description, isCompleted, createdAt, completedAt
- 기ë¥: CRUD, íí°ë§(ì ì²´/ì§íì¤/ìë£), ì²´í¬ë°ì¤ í ê¸
B) Habit (ìµê´ í¸ë커)
- íë: name, description, frequency(daily/weekly/monthly), streak, lastCompletedAt, goal, isActive
- 기ë¥: CRUD, ì°ì ê¸°ë¡ ì¶ì , 목í ë¬ì±ë¥ , ìë£ ì²´í¬
C) Note (ë©ëª¨)
- íë: title, content, tags, isPinned, createdAt, updatedAt
- 기ë¥: CRUD, íê·¸ íí°ë§, ê³ ì ë©ëª¨, ê²ì
D) Expense (ì§ì¶ ê´ë¦¬)
- íë: amount, category, description, date, paymentMethod
- 기ë¥: CRUD, ì¹´í ê³ ë¦¬ë³ ì§ê³, ìë³ íµê³, íí°ë§
E) Custom (ì§ì ì ì)
- ìí°í°ëª ê³¼ íë를 ì§ì ì ë ¥
2. íë¡ì í¸ ì ë³´
- í´ëëª
: íë¡ì í¸ë¥¼ ìì±í í´ë ì´ë¦ (기본ê°: [ëë©ì¸]_app, ì: habit_app)
- ì´ í´ëì Flutter íë¡ì í¸ê° ìì±ë©ëë¤
- íë¡ì í¸ëª
(í¨í¤ì§ëª
): Flutter í¨í¤ì§ ì´ë¦ (기본ê°: í´ëëª
ê³¼ ëì¼)
- pubspec.yamlì name íëì ì¬ì©ë©ëë¤
- import 문ì ì¬ì©ë©ëë¤ (ì: package:habit_app/…)
- ì¡°ì§ëª
: (기본ê°: com.example)
- Android/iOS í¨í¤ì§ ìë³ìì ì¬ì©ë©ëë¤ (ì: com.example.habit_app)
3. ì¤í í리ì ì í
ë¤ì ì¤ íë를 ì íí´ì£¼ì¸ì:
A) Essential (ê¶ì¥)
- â GoRouter (íì ìì í ë¼ì°í )
- â SharedPreferences (ë¡ì»¬ ì¤ì ì ì¥)
- â FPDart (í¨ìí ìë¬ í¸ë¤ë§)
- â Google Fonts
- â FluentUI Icons
- â Auth ìì¤í ì ì¸
- â Responsive Utils ì ì¸
B) Minimal (ê°ì¥ ë¨ì)
- â GoRouter (기본 Navigator ì¬ì©)
- â SharedPreferences
- â FPDart ì ì¸
- â Google Fonts ì ì¸
- â 기본 FluentUI Icons
- â Auth ìì¤í ì ì¸
- â Responsive Utils ì ì¸
C) Full Stack (모ë 기ë¥)
- â GoRouter
- â SharedPreferences
- â FPDart (í¨ìí ìë¬ í¸ë¤ë§)
- â Google Fonts
- â Responsive Utils
- â FluentUI Icons
- â Auth ìì¤í (Login/Register) – ì í ëë©ì¸ì ë°ë¼
D) Custom (ì§ì ì í)
- ê° ê¸°ë¥ì ê°ë³ì ì¼ë¡ ì í
ì´ë¤ ëë©ì¸ê³¼ í리ì ì ì ííìê² ìµëê¹? (ëë©ì¸: A/B/C/D/E, í리ì : A/B/C/D)”
Step 2: Custom ì í ì ì¶ê° ì§ë¬¸
2-1. Custom ëë©ì¸ (E) ì í ì:
- ìí°í°ëª : ìí°í° ì´ë¦ì ì ë ¥íì¸ì (ì: Task, Event, Book)
- íë ì ì: ê° íë를 ì
ë ¥íì¸ì (íì: íëëª
:íì
, ì: title:String, amount:double, isActive:bool)
- ì§ì íì : String, int, double, bool, DateTime
- createdAt, updatedAtì ìë ì¶ê°ë¨
- 주ì 기ë¥: íí°ë§/ì ë ¬ 기ì¤ì´ ë íë를 ì ííì¸ì
2-2. Custom ì¤í í리ì (D) ì í ì:
ë¤ì ì§ë¬¸ë¤ì ìì°¨ì ì¼ë¡ íì¸ì:
- ë¤ë¹ê²ì´ì : GoRouter를 ì¬ì©íìê² ìµëê¹? (ì/ìëì¤)
- ìë¬ í¸ë¤ë§: FPDart를 ì¬ì©íìê² ìµëê¹? (ì/ìëì¤)
- UI: Google Fonts를 ì¬ì©íìê² ìµëê¹? (ì/ìëì¤)
- ë°ìí: Responsive Utils를 í¬í¨íìê² ìµëê¹? (ì/ìëì¤)
- ì¸ì¦ ìì¤í : Auth ìì¤í ì í¬í¨íìê² ìµëê¹? (ì/ìëì¤)
Step 3: ì íë ëë©ì¸ê³¼ ì¤íì ë°ë¼ íë¡ì í¸ ìì±
-
Flutter íë¡ì í¸ ìì±:
- ì¬ì©ìê° ì§ì í í´ëëª ì¼ë¡ íë¡ì í¸ ìì±
- ëª
ë ¹ì´:
flutter create --platforms android,ios --android-language kotlin --org [ì¡°ì§ëª ] [í´ëëª ] - ì:
flutter create --platforms android,ios --android-language kotlin --org com.example my_habit_app - í´ëëª
ê³¼ íë¡ì í¸ëª
(í¨í¤ì§ëª
)ì´ ë¤ë¥¸ ê²½ì°, ìì± í pubspec.yamlì
nameíë를 ìì
-
Kotlin DSL íì¸ (ìµì Flutterë ìëì¼ë¡ Kotlin DSL ì¬ì©)
-
ì íë í¨í¤ì§ ì¤ì¹:
pubspec.yamlì ë°ì´í¸ íflutter pub get -
í´ë 구조 ìì±: Clean Architecture (core, data, domain, presentation)
-
ëë©ì¸ë³ ë³´ì¼ë¬íë ì´í¸ ìì±:
A) Todo: title, description, isCompleted, createdAt, completedAt
- Repository: getTodos, createTodo, updateTodo, toggleCompletion, deleteTodo
- Providers: filteredTodosProvider (all/pending/completed)
- UI: TodoListScreen (íí°ë§), TodoDetailScreen, TodoFormDialog
B) Habit: name, description, frequency, streak, lastCompletedAt, goal, isActive
- Repository: getHabits, createHabit, updateHabit, completeHabit, deleteHabit
- Providers: filteredHabitsProvider (active/inactive), habitStatsProvider
- UI: HabitListScreen (íµê³), HabitDetailScreen, HabitFormDialog
C) Note: title, content, tags, isPinned, createdAt, updatedAt
- Repository: getNotes, createNote, updateNote, togglePin, deleteNote
- Providers: filteredNotesProvider (pinned/all/byTag), searchProvider
- UI: NoteListScreen (ê²ì/íê·¸), NoteDetailScreen, NoteFormDialog
D) Expense: amount, category, description, date, paymentMethod
- Repository: getExpenses, createExpense, updateExpense, deleteExpense
- Providers: expensesByCategory, monthlyStats, filteredExpenses
- UI: ExpenseListScreen (íµê³), ExpenseDetailScreen, ExpenseFormDialog
E) Custom: ì¬ì©ì ì ì íë
- Repository: 기본 CRUD ë©ìë
- Providers: 기본 list provider
- UI: 기본 List/Detail/Form íë©´
-
ì¤ì íì¼ ìì± (ë¼ì°í , ì¤í 리ì§, ë¤êµì´ ë±)
-
Android ì¤ì ì ë°ì´í¸ (CRITICAL for flutter_local_notifications):
android/app/build.gradle.ktsì core library desugaring íì±í:android { compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 isCoreLibraryDesugaringEnabled = true // ì¶ê° } } dependencies { coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4") // ì¶ê° }
-
ì½ë ìì±:
dart run build_runner build --delete-conflicting-outputs -
ì½ë ê²ì¦ ë° ì¤ë¥ ìì :
a.
flutter analyzeì¤íb. ë°ê²¬ë ì¤ë¥ ìì :
- Freezed 3.0 í¸íì± (CRITICAL): 모ë Freezed ìí°í°ë
sealed classì¬ì©- â
class User with _$User - â
sealed class User with _$User
- â
- í
ë§ ì¤ì :
CardThemeâCardThemeDataì¬ì© (deprecated) - API Client Map íì
:
Map<String, dynamic>ë°í ì ìì± ì½ë ê²ì¦- retrofit_generatorê° ìì±í
dynamic.fromJsonìë¬ ë°ì ì ìì íì
- retrofit_generatorê° ìì±í
- import ê²½ë¡ ìì : 모ë ìë ê²½ë¡ë¥¼
package:íìì¼ë¡ ë³ê²½- ì:
import '../../domain/entities/todo.dart';âimport 'package:todo_app/domain/entities/todo.dart';
- ì:
- í¨í¤ì§ ìì¡´ì± íì¸: ëë½ë í¨í¤ì§ ì¶ê° (ì:
shared_preferences) - Riverpod 3.0 í¸íì±:
StateNotifierâNotifier,StateProviderâNotifierProvider - FluentUI ìì´ì½ ì´ë¦ íì¸: ì¡´ì¬íì§ ìë ìì´ì½ì ëì²´
- íì ìì ì±: switch expression ì¬ì©, null safety ì¤ì
c. ì¬ê²ì¦: 모ë error ë 벨 ì¤ë¥ê° ìì ëê¹ì§ ë°ë³µ
d. 목í:
flutter analyzeê²°ê³¼ê° “0-1 issues found” (info ë ë²¨ë§ íì©)â CRITICAL: ì´ ë¨ê³ë íìì ëë¤. 모ë error를 ì ê±°í´ì¼ ë¤ì ë¨ê³ë¡ ì§íí ì ììµëë¤.
- Freezed 3.0 í¸íì± (CRITICAL): 모ë Freezed ìí°í°ë
Step 4: ìµì¢ ê²ì¦ ë° ìë´
â CRITICAL: ì´ ë¨ê³ë íë¡ì í¸ ìë£ì íì ì¡°ê±´ì ëë¤.
-
ìµì¢ ë¶ì ì¤í:
flutter analyze -
ì±ê³µ 기ì¤:
-
â ì±ê³µ ìì:
Analyzing todo_app... No issues found!ëë
Analyzing todo_app... 1 issue found. (ran in 2.3s) info ⢠Prefer using lowerCamelCase for constant names ⢠lib/core/constants.dart:5:7 ⢠constant_identifier_names -
â ì¤í¨ ìì (errorê° ìì¼ë©´ ë°ëì ìì ):
error ⢠Target of URI doesn't exist: 'package:...' ⢠lib/main.dart:5:8 ⢠uri_does_not_exist error ⢠The getter 'xyz' isn't defined for the type 'ABC' ⢠lib/presentation/screens/home.dart:42:15
-
-
ê²ì¦ ê²°ê³¼ ìì½ (ì±ê³µ ì):
â Flutter íë¡ì í¸ ìì± ìë£! â ì½ë ìì± ìë£ (Freezed, Drift, JSON Serializable) â Flutter analyze íµê³¼ (0-1 issues found, info ë 벨ë§) â 모ë í¨í¤ì§ ì¤ì¹ ìë£ -
íë¡ì í¸ ì ë³´ ì ê³µ:
- í´ëëª : [ì¬ì©ì ì ë ¥ê°] (ì: my_habit_app)
- íë¡ì í¸ëª (í¨í¤ì§ëª ): [ì¬ì©ì ì ë ¥ê°] (ì: habit_app)
- ì¡°ì§ëª : [ì¬ì©ì ì ë ¥ê°] (ì: com.example)
- ëë©ì¸: [ì íë ëë©ì¸] (Todo/Habit/Note/Expense/Custom)
- ì íë ì¤í: [í리ì ëª ] (GoRouter, Drift, FPDart ë±)
- 주ì 기ë¥: [ëë©ì¸] CRUD, ë¤êµì´ ì§ì, ë¡ì»¬ ì ì¥ì ë±
- ìì±ë íì¼: XXê° Dart íì¼ (core, data, domain, presentation)
-
ì¤í ë°©ë² ìë´:
cd [í´ëëª ] flutter run -
ë¤ì ë¨ê³ ì ì (ì íì¬í, ëë©ì¸ë³):
- Todo: í목 ì¶ê°/ìì /ìì , íí°ë§(ì ì²´/ì§íì¤/ìë£), ìë£ í ê¸
- Habit: ìµê´ 기ë¡, ì°ì ê¸°ë¡ íì¸, 목í ë¬ì±ë¥ , íµê³ íì¸
- Note: ë©ëª¨ ìì±/í¸ì§, íê·¸ ì¶ê°, ê³ ì ë©ëª¨, ê²ì
- Expense: ì§ì¶ 기ë¡, ì¹´í ê³ ë¦¬ë³ íµê³, ìë³ ì§ê³, íí°ë§
- ê³µíµ: ì¸ì´ ì í (ìì´ â íêµì´), ë¤í¬/ë¼ì´í¸ í ë§ ì í
Core Principles
- Repository í¨í´: ë°ì´í° ë ì´ì´ì ëë©ì¸ ë ì´ì´ ë¶ë¦¬
- ìì¡´ì± ì£¼ì : Riverpod 3.x를 íµí ìì¡´ì± ê´ë¦¬
- ë¶ë³ì±: Freezedë¡ ë¶ë³ ëª¨ë¸ ìì±
- ë¤êµì´ ì§ì: Easy Localizationì¼ë¡ i18n
- 모ë UI: FluentUI Icons ì¬ì©
Reference Files
references/setup-guide.md – ìì í ê°ì´ë
- 기본 ì ì (ëë©ì¸ë³ CRUD, ë¤êµì´, FluentUI Icons)
- ì í ìµì : GoRouter, Auth, FPDart, Google Fonts, Responsive Utils, í¨í¤ì§ ì ë°ì´í¸
Notes
- ëíí ì¤í¬: ì¬ì©ììê² ëë©ì¸ê³¼ í리ì ì íì íµí´ ë§ì¶¤í ì± êµ¬ì±
- ëë©ì¸ ì§ì: Todo, Habit, Note, Expense, Custom (ì¬ì©ì ì ì)
- í리ì ì ê³µ: Full Stack, Essential, Minimal, Custom
- ì í ê°ë¥ 기ë¥: GoRouter, Auth, FPDart, Google Fonts, Responsive Utils
- 기본 í¬í¨: Riverpod 3.x, Easy Localization, FluentUI Icons, Drift, Dio, SharedPreferences
- ë¤êµì´: ìì´/íêµì´ (íì¥ ê°ë¥)
- íë«í¼: Android/Kotlin, iOS/Swift (ì¹/ìëì°/리ë ì¤ ì ì¸)
- íì§ ë³´ì¦:
- 모ë íë¡ì í¸ë
flutter analyzeíµê³¼ íì - package: imports ì¤íì¼ ì¤ì
- íì ìì ì± ë³´ì¥
- ì½ë ìì± ìëí
- ëë©ì¸ë³ ìµì íë UI/UX
- 모ë íë¡ì í¸ë