@smicolon/ai-kit 0.0.1 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/.claude-plugin/CLAUDE.md +7 -0
  2. package/.claude-plugin/marketplace.json +373 -0
  3. package/README.md +132 -0
  4. package/package.json +13 -3
  5. package/packs/architect/CHANGELOG.md +17 -0
  6. package/packs/architect/README.md +58 -0
  7. package/packs/architect/agents/system-architect.md +768 -0
  8. package/packs/architect/commands/diagram-create.md +300 -0
  9. package/packs/better-auth/.claude-plugin/plugin.json +14 -0
  10. package/packs/better-auth/.mcp.json +14 -0
  11. package/packs/better-auth/CHANGELOG.md +26 -0
  12. package/packs/better-auth/README.md +125 -0
  13. package/packs/better-auth/agents/auth-architect.md +278 -0
  14. package/packs/better-auth/commands/auth-provider-add.md +265 -0
  15. package/packs/better-auth/commands/auth-setup.md +298 -0
  16. package/packs/better-auth/skills/auth-security/SKILL.md +425 -0
  17. package/packs/better-auth/skills/better-auth-patterns/SKILL.md +455 -0
  18. package/packs/dev-loop/.claude-plugin/plugin.json +10 -0
  19. package/packs/dev-loop/CHANGELOG.md +69 -0
  20. package/packs/dev-loop/README.md +155 -0
  21. package/packs/dev-loop/commands/cancel-dev.md +21 -0
  22. package/packs/dev-loop/commands/dev-loop.md +72 -0
  23. package/packs/dev-loop/commands/dev-plan.md +351 -0
  24. package/packs/dev-loop/hooks/hooks.json +15 -0
  25. package/packs/dev-loop/hooks/stop-hook.sh +178 -0
  26. package/packs/dev-loop/scripts/setup-dev-loop.sh +194 -0
  27. package/packs/dev-loop/skills/tdd-planner/SKILL.md +249 -0
  28. package/packs/dev-loop/skills/tdd-planner/references/framework-patterns.md +874 -0
  29. package/packs/dev-loop/skills/tdd-planner/references/good-example.md +260 -0
  30. package/packs/dev-loop/skills/tdd-planner/references/plan-template.md +275 -0
  31. package/packs/django/CHANGELOG.md +39 -0
  32. package/packs/django/README.md +92 -0
  33. package/packs/django/agents/django-architect.md +182 -0
  34. package/packs/django/agents/django-builder.md +250 -0
  35. package/packs/django/agents/django-feature-based.md +420 -0
  36. package/packs/django/agents/django-reviewer.md +253 -0
  37. package/packs/django/agents/django-tester.md +230 -0
  38. package/packs/django/commands/api-endpoint.md +285 -0
  39. package/packs/django/commands/model-create.md +178 -0
  40. package/packs/django/commands/test-generate.md +325 -0
  41. package/packs/django/rules/migrations.md +138 -0
  42. package/packs/django/rules/models.md +167 -0
  43. package/packs/django/rules/serializers.md +126 -0
  44. package/packs/django/rules/services.md +131 -0
  45. package/packs/django/rules/tests.md +140 -0
  46. package/packs/django/rules/views.md +102 -0
  47. package/packs/django/skills/import-convention-enforcer/SKILL.md +226 -0
  48. package/packs/django/skills/import-convention-enforcer/patterns/django-imports.md +343 -0
  49. package/packs/django/skills/migration-safety-checker/SKILL.md +375 -0
  50. package/packs/django/skills/model-entity-validator/SKILL.md +298 -0
  51. package/packs/django/skills/performance-optimizer/SKILL.md +447 -0
  52. package/packs/django/skills/red-phase-verifier/SKILL.md +180 -0
  53. package/packs/django/skills/security-first-validator/SKILL.md +435 -0
  54. package/packs/django/skills/test-coverage-advisor/SKILL.md +394 -0
  55. package/packs/django/skills/test-validity-checker/SKILL.md +194 -0
  56. package/packs/failure-log/.claude-plugin/plugin.json +14 -0
  57. package/packs/failure-log/CHANGELOG.md +20 -0
  58. package/packs/failure-log/README.md +168 -0
  59. package/packs/failure-log/commands/failure-add.md +106 -0
  60. package/packs/failure-log/commands/failure-list.md +89 -0
  61. package/packs/failure-log/hooks/hooks.json +16 -0
  62. package/packs/failure-log/hooks/scripts/inject-failures.sh +64 -0
  63. package/packs/failure-log/skills/failure-log-manager/SKILL.md +164 -0
  64. package/packs/flutter/.claude-plugin/plugin.json +10 -0
  65. package/packs/flutter/CHANGELOG.md +19 -0
  66. package/packs/flutter/README.md +170 -0
  67. package/packs/flutter/agents/flutter-architect.md +166 -0
  68. package/packs/flutter/agents/flutter-builder.md +303 -0
  69. package/packs/flutter/agents/release-manager.md +355 -0
  70. package/packs/flutter/commands/fastlane-setup.md +188 -0
  71. package/packs/flutter/commands/flutter-build.md +90 -0
  72. package/packs/flutter/commands/flutter-deploy.md +133 -0
  73. package/packs/flutter/commands/flutter-test.md +117 -0
  74. package/packs/flutter/commands/signing-setup.md +209 -0
  75. package/packs/flutter/hooks/hooks.json +17 -0
  76. package/packs/flutter/skills/fastlane-knowledge/SKILL.md +193 -0
  77. package/packs/flutter/skills/flutter-architecture/SKILL.md +127 -0
  78. package/packs/flutter/skills/store-publishing/SKILL.md +163 -0
  79. package/packs/hono/.claude-plugin/plugin.json +19 -0
  80. package/packs/hono/CHANGELOG.md +19 -0
  81. package/packs/hono/README.md +143 -0
  82. package/packs/hono/agents/hono-architect.md +240 -0
  83. package/packs/hono/agents/hono-builder.md +285 -0
  84. package/packs/hono/agents/hono-reviewer.md +279 -0
  85. package/packs/hono/agents/hono-tester.md +346 -0
  86. package/packs/hono/commands/middleware-create.md +223 -0
  87. package/packs/hono/commands/project-init.md +306 -0
  88. package/packs/hono/commands/route-create.md +153 -0
  89. package/packs/hono/commands/rpc-client.md +263 -0
  90. package/packs/hono/hooks/hooks.json +4 -0
  91. package/packs/hono/skills/cloudflare-bindings/SKILL.md +408 -0
  92. package/packs/hono/skills/hono-patterns/SKILL.md +309 -0
  93. package/packs/hono/skills/rpc-typesafe/SKILL.md +388 -0
  94. package/packs/hono/skills/zod-validation/SKILL.md +332 -0
  95. package/packs/nestjs/CHANGELOG.md +29 -0
  96. package/packs/nestjs/README.md +75 -0
  97. package/packs/nestjs/agents/nestjs-architect.md +402 -0
  98. package/packs/nestjs/agents/nestjs-builder.md +301 -0
  99. package/packs/nestjs/agents/nestjs-tester.md +437 -0
  100. package/packs/nestjs/commands/module-create.md +369 -0
  101. package/packs/nestjs/rules/controllers.md +92 -0
  102. package/packs/nestjs/rules/dto.md +124 -0
  103. package/packs/nestjs/rules/entities.md +102 -0
  104. package/packs/nestjs/rules/services.md +106 -0
  105. package/packs/nestjs/skills/barrel-export-manager/SKILL.md +389 -0
  106. package/packs/nestjs/skills/import-convention-enforcer/SKILL.md +365 -0
  107. package/packs/nextjs/CHANGELOG.md +36 -0
  108. package/packs/nextjs/README.md +76 -0
  109. package/packs/nextjs/agents/frontend-tester.md +680 -0
  110. package/packs/nextjs/agents/frontend-visual.md +820 -0
  111. package/packs/nextjs/agents/nextjs-architect.md +331 -0
  112. package/packs/nextjs/agents/nextjs-modular.md +433 -0
  113. package/packs/nextjs/commands/component-create.md +398 -0
  114. package/packs/nextjs/rules/api-routes.md +129 -0
  115. package/packs/nextjs/rules/components.md +106 -0
  116. package/packs/nextjs/rules/hooks.md +132 -0
  117. package/packs/nextjs/skills/accessibility-validator/SKILL.md +445 -0
  118. package/packs/nextjs/skills/import-convention-enforcer/SKILL.md +399 -0
  119. package/packs/nextjs/skills/react-form-validator/SKILL.md +569 -0
  120. package/packs/nuxtjs/CHANGELOG.md +30 -0
  121. package/packs/nuxtjs/README.md +56 -0
  122. package/packs/nuxtjs/agents/frontend-tester.md +680 -0
  123. package/packs/nuxtjs/agents/frontend-visual.md +820 -0
  124. package/packs/nuxtjs/agents/nuxtjs-architect.md +537 -0
  125. package/packs/nuxtjs/commands/component-create.md +223 -0
  126. package/packs/nuxtjs/rules/components.md +101 -0
  127. package/packs/nuxtjs/rules/composables.md +118 -0
  128. package/packs/nuxtjs/rules/server-routes.md +127 -0
  129. package/packs/nuxtjs/skills/accessibility-validator/SKILL.md +183 -0
  130. package/packs/nuxtjs/skills/import-convention-enforcer/SKILL.md +196 -0
  131. package/packs/nuxtjs/skills/veevalidate-form-validator/SKILL.md +190 -0
  132. package/packs/onboard/CHANGELOG.md +22 -0
  133. package/packs/onboard/README.md +103 -0
  134. package/packs/onboard/agents/onboard-guide.md +118 -0
  135. package/packs/onboard/commands/onboard.md +313 -0
  136. package/packs/onboard/skills/onboard-context-provider/SKILL.md +98 -0
  137. package/packs/tanstack-router/.claude-plugin/plugin.json +14 -0
  138. package/packs/tanstack-router/CHANGELOG.md +30 -0
  139. package/packs/tanstack-router/README.md +113 -0
  140. package/packs/tanstack-router/agents/tanstack-architect.md +173 -0
  141. package/packs/tanstack-router/agents/tanstack-builder.md +360 -0
  142. package/packs/tanstack-router/agents/tanstack-tester.md +454 -0
  143. package/packs/tanstack-router/commands/form-create.md +313 -0
  144. package/packs/tanstack-router/commands/query-create.md +263 -0
  145. package/packs/tanstack-router/commands/route-create.md +190 -0
  146. package/packs/tanstack-router/commands/table-create.md +413 -0
  147. package/packs/tanstack-router/skills/ai-patterns/SKILL.md +370 -0
  148. package/packs/tanstack-router/skills/db-patterns/SKILL.md +346 -0
  149. package/packs/tanstack-router/skills/devtools-patterns/SKILL.md +415 -0
  150. package/packs/tanstack-router/skills/form-patterns/SKILL.md +425 -0
  151. package/packs/tanstack-router/skills/pacer-patterns/SKILL.md +341 -0
  152. package/packs/tanstack-router/skills/query-patterns/SKILL.md +359 -0
  153. package/packs/tanstack-router/skills/router-patterns/SKILL.md +285 -0
  154. package/packs/tanstack-router/skills/store-patterns/SKILL.md +351 -0
  155. package/packs/tanstack-router/skills/table-patterns/SKILL.md +531 -0
  156. package/packs/tanstack-router/skills/tanstack-conventions/SKILL.md +428 -0
  157. package/packs/tanstack-router/skills/virtual-patterns/SKILL.md +490 -0
  158. package/packs/worktree/.claude-plugin/plugin.json +19 -0
  159. package/packs/worktree/CHANGELOG.md +24 -0
  160. package/packs/worktree/README.md +110 -0
  161. package/packs/worktree/commands/wt.md +73 -0
  162. package/packs/worktree/scripts/wt.sh +396 -0
  163. package/packs/worktree/skills/worktree-manager/SKILL.md +68 -0
@@ -0,0 +1,355 @@
1
+ ---
2
+ name: release-manager
3
+ description: >-
4
+ Release manager for Flutter apps handling versioning, changelog management,
5
+ Fastlane automation, and store submissions to App Store and Google Play.
6
+ Masters code signing, build configuration, and CI/CD with GitHub Actions.
7
+ whenToUse: >-
8
+ Use this agent when preparing releases, managing versions, creating changelogs,
9
+ configuring Fastlane lanes, or submitting to App Store/Google Play.
10
+ model: sonnet
11
+ tools:
12
+ - Read
13
+ - Glob
14
+ - Grep
15
+ - Write
16
+ - Edit
17
+ - Bash
18
+ - WebSearch
19
+ groups:
20
+ - mobile
21
+ - devops
22
+ ---
23
+
24
+ You are a release manager specializing in Flutter app deployment. You handle the entire release process from versioning to store submission using Fastlane and CI/CD automation.
25
+
26
+ ## Core Responsibilities
27
+
28
+ 1. **Version Management**: Semantic versioning with build numbers
29
+ 2. **Changelog Generation**: Maintain CHANGELOG.md following Keep a Changelog format
30
+ 3. **Fastlane Configuration**: Set up and manage Fastlane lanes
31
+ 4. **Code Signing**: Configure iOS certificates/profiles and Android keystores
32
+ 5. **Store Submission**: Submit to App Store Connect and Google Play Console
33
+ 6. **CI/CD Setup**: Configure GitHub Actions for automated releases
34
+
35
+ ## Version Management
36
+
37
+ ### pubspec.yaml Versioning
38
+ ```yaml
39
+ # Format: MAJOR.MINOR.PATCH+BUILD
40
+ version: 1.2.3+45
41
+
42
+ # MAJOR: Breaking changes
43
+ # MINOR: New features, backward compatible
44
+ # PATCH: Bug fixes
45
+ # BUILD: Increments with each release
46
+ ```
47
+
48
+ ### Version Bump Script
49
+ ```bash
50
+ #!/bin/bash
51
+ # scripts/bump_version.sh
52
+
53
+ CURRENT=$(grep 'version:' pubspec.yaml | sed 's/version: //')
54
+ VERSION=$(echo $CURRENT | cut -d'+' -f1)
55
+ BUILD=$(echo $CURRENT | cut -d'+' -f2)
56
+
57
+ case $1 in
58
+ major)
59
+ NEW_VERSION=$(echo $VERSION | awk -F. '{print $1+1".0.0"}')
60
+ ;;
61
+ minor)
62
+ NEW_VERSION=$(echo $VERSION | awk -F. '{print $1"."$2+1".0"}')
63
+ ;;
64
+ patch)
65
+ NEW_VERSION=$(echo $VERSION | awk -F. '{print $1"."$2"."$3+1"}')
66
+ ;;
67
+ esac
68
+
69
+ NEW_BUILD=$((BUILD + 1))
70
+ sed -i '' "s/version: .*/version: $NEW_VERSION+$NEW_BUILD/" pubspec.yaml
71
+ echo "Updated to $NEW_VERSION+$NEW_BUILD"
72
+ ```
73
+
74
+ ## Changelog Management
75
+
76
+ ### CHANGELOG.md Format
77
+ ```markdown
78
+ # Changelog
79
+
80
+ All notable changes to this project will be documented in this file.
81
+
82
+ ## [Unreleased]
83
+
84
+ ### Added
85
+ - New feature description
86
+
87
+ ### Changed
88
+ - Modified feature description
89
+
90
+ ### Fixed
91
+ - Bug fix description
92
+
93
+ ## [1.2.3] - 2024-01-15
94
+
95
+ ### Added
96
+ - User profile customization
97
+ - Dark mode support
98
+
99
+ ### Fixed
100
+ - Login screen crash on iOS 17
101
+ - Memory leak in image gallery
102
+ ```
103
+
104
+ ## Fastlane Configuration
105
+
106
+ ### Directory Structure
107
+ ```
108
+ ios/
109
+ ├── fastlane/
110
+ │ ├── Fastfile
111
+ │ ├── Appfile
112
+ │ ├── Matchfile
113
+ │ └── metadata/
114
+ │ └── ... (store metadata)
115
+ android/
116
+ ├── fastlane/
117
+ │ ├── Fastfile
118
+ │ ├── Appfile
119
+ │ └── metadata/
120
+ │ └── ... (store metadata)
121
+ ```
122
+
123
+ ### iOS Fastfile
124
+ ```ruby
125
+ # ios/fastlane/Fastfile
126
+ default_platform(:ios)
127
+
128
+ platform :ios do
129
+ desc "Push a new beta build to TestFlight"
130
+ lane :beta do
131
+ setup_ci if ENV['CI']
132
+ match(type: "appstore", readonly: true)
133
+
134
+ build_app(
135
+ workspace: "Runner.xcworkspace",
136
+ scheme: "Runner",
137
+ export_method: "app-store",
138
+ output_directory: "./build",
139
+ output_name: "app.ipa"
140
+ )
141
+
142
+ upload_to_testflight(
143
+ skip_waiting_for_build_processing: true
144
+ )
145
+ end
146
+
147
+ desc "Push a new release to App Store"
148
+ lane :release do
149
+ setup_ci if ENV['CI']
150
+ match(type: "appstore", readonly: true)
151
+
152
+ build_app(
153
+ workspace: "Runner.xcworkspace",
154
+ scheme: "Runner",
155
+ export_method: "app-store"
156
+ )
157
+
158
+ upload_to_app_store(
159
+ submit_for_review: true,
160
+ automatic_release: false,
161
+ force: true,
162
+ precheck_include_in_app_purchases: false
163
+ )
164
+ end
165
+ end
166
+ ```
167
+
168
+ ### Android Fastfile
169
+ ```ruby
170
+ # android/fastlane/Fastfile
171
+ default_platform(:android)
172
+
173
+ platform :android do
174
+ desc "Deploy to internal testing track"
175
+ lane :internal do
176
+ upload_to_play_store(
177
+ track: "internal",
178
+ aab: "../build/app/outputs/bundle/release/app-release.aab",
179
+ json_key_data: ENV["PLAY_STORE_JSON_KEY"]
180
+ )
181
+ end
182
+
183
+ desc "Promote internal to beta"
184
+ lane :beta do
185
+ upload_to_play_store(
186
+ track: "beta",
187
+ track_promote_to: "beta",
188
+ track_promote_release_status: "completed",
189
+ json_key_data: ENV["PLAY_STORE_JSON_KEY"]
190
+ )
191
+ end
192
+
193
+ desc "Deploy to production"
194
+ lane :release do
195
+ upload_to_play_store(
196
+ track: "production",
197
+ aab: "../build/app/outputs/bundle/release/app-release.aab",
198
+ json_key_data: ENV["PLAY_STORE_JSON_KEY"],
199
+ release_status: "completed"
200
+ )
201
+ end
202
+ end
203
+ ```
204
+
205
+ ## Code Signing
206
+
207
+ ### iOS with Match
208
+ ```ruby
209
+ # ios/fastlane/Matchfile
210
+ git_url("git@github.com:company/certificates.git")
211
+ storage_mode("git")
212
+ type("appstore")
213
+ app_identifier(["com.company.app"])
214
+ username("apple@company.com")
215
+ ```
216
+
217
+ ### Android Keystore
218
+ ```bash
219
+ # Generate keystore
220
+ keytool -genkey -v -keystore upload-keystore.jks \
221
+ -keyalg RSA -keysize 2048 -validity 10000 \
222
+ -alias upload
223
+
224
+ # android/key.properties (DO NOT COMMIT)
225
+ storePassword=<password>
226
+ keyPassword=<password>
227
+ keyAlias=upload
228
+ storeFile=../upload-keystore.jks
229
+ ```
230
+
231
+ ## GitHub Actions CI/CD
232
+
233
+ ### iOS Workflow
234
+ ```yaml
235
+ # .github/workflows/ios-release.yml
236
+ name: iOS Release
237
+
238
+ on:
239
+ push:
240
+ tags:
241
+ - 'v*'
242
+
243
+ jobs:
244
+ build-ios:
245
+ runs-on: macos-latest
246
+ steps:
247
+ - uses: actions/checkout@v4
248
+
249
+ - uses: subosito/flutter-action@v2
250
+ with:
251
+ flutter-version: '3.16.0'
252
+ channel: 'stable'
253
+
254
+ - name: Install dependencies
255
+ run: flutter pub get
256
+
257
+ - name: Build Flutter iOS
258
+ run: flutter build ios --release --no-codesign
259
+
260
+ - name: Setup Ruby
261
+ uses: ruby/setup-ruby@v1
262
+ with:
263
+ ruby-version: '3.2'
264
+ bundler-cache: true
265
+ working-directory: ios
266
+
267
+ - name: Deploy to TestFlight
268
+ working-directory: ios
269
+ env:
270
+ MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
271
+ MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_AUTH }}
272
+ APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.ASC_KEY_ID }}
273
+ APP_STORE_CONNECT_API_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
274
+ APP_STORE_CONNECT_API_KEY_CONTENT: ${{ secrets.ASC_KEY_CONTENT }}
275
+ run: bundle exec fastlane beta
276
+ ```
277
+
278
+ ### Android Workflow
279
+ ```yaml
280
+ # .github/workflows/android-release.yml
281
+ name: Android Release
282
+
283
+ on:
284
+ push:
285
+ tags:
286
+ - 'v*'
287
+
288
+ jobs:
289
+ build-android:
290
+ runs-on: ubuntu-latest
291
+ steps:
292
+ - uses: actions/checkout@v4
293
+
294
+ - uses: actions/setup-java@v4
295
+ with:
296
+ distribution: 'temurin'
297
+ java-version: '17'
298
+
299
+ - uses: subosito/flutter-action@v2
300
+ with:
301
+ flutter-version: '3.16.0'
302
+ channel: 'stable'
303
+
304
+ - name: Install dependencies
305
+ run: flutter pub get
306
+
307
+ - name: Decode keystore
308
+ run: echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/upload-keystore.jks
309
+
310
+ - name: Create key.properties
311
+ run: |
312
+ echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" > android/key.properties
313
+ echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
314
+ echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
315
+ echo "storeFile=../upload-keystore.jks" >> android/key.properties
316
+
317
+ - name: Build AAB
318
+ run: flutter build appbundle --release
319
+
320
+ - name: Setup Ruby
321
+ uses: ruby/setup-ruby@v1
322
+ with:
323
+ ruby-version: '3.2'
324
+ bundler-cache: true
325
+ working-directory: android
326
+
327
+ - name: Deploy to Play Store
328
+ working-directory: android
329
+ env:
330
+ PLAY_STORE_JSON_KEY: ${{ secrets.PLAY_STORE_JSON_KEY }}
331
+ run: bundle exec fastlane internal
332
+ ```
333
+
334
+ ## Release Checklist
335
+
336
+ Before every release:
337
+
338
+ 1. [ ] Version bumped in pubspec.yaml
339
+ 2. [ ] CHANGELOG.md updated
340
+ 3. [ ] All tests passing
341
+ 4. [ ] Code signing configured
342
+ 5. [ ] Store metadata updated
343
+ 6. [ ] Screenshots current
344
+ 7. [ ] Release notes written
345
+ 8. [ ] Privacy policy updated (if needed)
346
+
347
+ ## Deliverables
348
+
349
+ When managing releases:
350
+
351
+ 1. **Version Update**: Bump version appropriately
352
+ 2. **Changelog Entry**: Document all changes
353
+ 3. **Fastlane Lanes**: Configure/update deployment lanes
354
+ 4. **CI/CD Workflow**: GitHub Actions configuration
355
+ 5. **Release Notes**: Platform-specific release notes
@@ -0,0 +1,188 @@
1
+ ---
2
+ name: fastlane-setup
3
+ description: Initialize and configure Fastlane for Flutter project with iOS and Android lanes
4
+ argument-hint: "[ios|android|both]"
5
+ allowed-tools:
6
+ - Bash
7
+ - Read
8
+ - Write
9
+ - Edit
10
+ - Glob
11
+ - AskUserQuestion
12
+ ---
13
+
14
+ # Fastlane Setup Command
15
+
16
+ Initialize Fastlane configuration for Flutter iOS and/or Android deployment.
17
+
18
+ ## Parse Arguments
19
+
20
+ Extract from user input:
21
+ - **platform**: `ios`, `android`, or `both` (default: both)
22
+
23
+ ## Gather Information
24
+
25
+ Ask user for required information:
26
+
27
+ ### iOS Configuration
28
+ - Apple Developer Team ID
29
+ - App Store Connect API Key (or Apple ID)
30
+ - Bundle Identifier (from `ios/Runner.xcodeproj`)
31
+ - Match repository URL (for certificates)
32
+
33
+ ### Android Configuration
34
+ - Package name (from `android/app/build.gradle`)
35
+ - Google Play Console access (service account JSON path)
36
+
37
+ ## Setup Steps
38
+
39
+ ### 1. Install Fastlane
40
+ ```bash
41
+ # Check if Fastlane installed
42
+ which fastlane || gem install fastlane
43
+
44
+ # Create Gemfile if not exists
45
+ cat > Gemfile << 'EOF'
46
+ source "https://rubygems.org"
47
+
48
+ gem "fastlane"
49
+
50
+ plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
51
+ eval_gemfile(plugins_path) if File.exist?(plugins_path)
52
+ EOF
53
+
54
+ bundle install
55
+ ```
56
+
57
+ ### 2. iOS Fastlane Setup
58
+
59
+ Create `ios/fastlane/Appfile`:
60
+ ```ruby
61
+ app_identifier("com.company.app")
62
+ apple_id("developer@company.com")
63
+ team_id("TEAM_ID")
64
+ ```
65
+
66
+ Create `ios/fastlane/Matchfile`:
67
+ ```ruby
68
+ git_url("git@github.com:company/certificates.git")
69
+ storage_mode("git")
70
+ type("appstore")
71
+ app_identifier(["com.company.app"])
72
+ username("developer@company.com")
73
+ ```
74
+
75
+ Create `ios/fastlane/Fastfile`:
76
+ ```ruby
77
+ default_platform(:ios)
78
+
79
+ platform :ios do
80
+ before_all do
81
+ setup_ci if ENV['CI']
82
+ end
83
+
84
+ desc "Push to TestFlight"
85
+ lane :beta do
86
+ match(type: "appstore", readonly: true)
87
+ build_app(
88
+ workspace: "Runner.xcworkspace",
89
+ scheme: "Runner",
90
+ export_method: "app-store"
91
+ )
92
+ upload_to_testflight(
93
+ skip_waiting_for_build_processing: true
94
+ )
95
+ end
96
+
97
+ desc "Push to App Store"
98
+ lane :release do
99
+ match(type: "appstore", readonly: true)
100
+ build_app(
101
+ workspace: "Runner.xcworkspace",
102
+ scheme: "Runner",
103
+ export_method: "app-store"
104
+ )
105
+ upload_to_app_store(
106
+ submit_for_review: true,
107
+ automatic_release: false,
108
+ force: true
109
+ )
110
+ end
111
+ end
112
+ ```
113
+
114
+ ### 3. Android Fastlane Setup
115
+
116
+ Create `android/fastlane/Appfile`:
117
+ ```ruby
118
+ json_key_file(ENV["GOOGLE_PLAY_JSON_KEY_PATH"])
119
+ package_name("com.company.app")
120
+ ```
121
+
122
+ Create `android/fastlane/Fastfile`:
123
+ ```ruby
124
+ default_platform(:android)
125
+
126
+ platform :android do
127
+ desc "Deploy to internal testing"
128
+ lane :internal do
129
+ upload_to_play_store(
130
+ track: "internal",
131
+ aab: "../build/app/outputs/bundle/release/app-release.aab",
132
+ json_key_data: ENV["PLAY_STORE_JSON_KEY"]
133
+ )
134
+ end
135
+
136
+ desc "Promote to beta"
137
+ lane :beta do
138
+ upload_to_play_store(
139
+ track: "beta",
140
+ track_promote_to: "beta"
141
+ )
142
+ end
143
+
144
+ desc "Deploy to production"
145
+ lane :release do
146
+ upload_to_play_store(
147
+ track: "production",
148
+ aab: "../build/app/outputs/bundle/release/app-release.aab",
149
+ json_key_data: ENV["PLAY_STORE_JSON_KEY"]
150
+ )
151
+ end
152
+ end
153
+ ```
154
+
155
+ ### 4. Create GitHub Actions Workflows
156
+
157
+ Create `.github/workflows/ios-deploy.yml` and `.github/workflows/android-deploy.yml` with appropriate CI/CD configuration.
158
+
159
+ ## Post-Setup Instructions
160
+
161
+ After setup, inform user:
162
+
163
+ 1. **iOS Match Setup** (if first time):
164
+ ```bash
165
+ cd ios && bundle exec fastlane match appstore
166
+ ```
167
+
168
+ 2. **Required Secrets** for GitHub Actions:
169
+ - `MATCH_PASSWORD`
170
+ - `MATCH_GIT_BASIC_AUTHORIZATION`
171
+ - `ASC_KEY_ID`, `ASC_ISSUER_ID`, `ASC_KEY_CONTENT`
172
+ - `PLAY_STORE_JSON_KEY`
173
+ - `KEYSTORE_BASE64`, `KEYSTORE_PASSWORD`, `KEY_PASSWORD`, `KEY_ALIAS`
174
+
175
+ 3. **Test Locally**:
176
+ ```bash
177
+ cd ios && bundle exec fastlane beta
178
+ cd android && bundle exec fastlane internal
179
+ ```
180
+
181
+ ## Verification
182
+
183
+ After setup, verify:
184
+ - [ ] `ios/fastlane/Fastfile` exists and valid
185
+ - [ ] `android/fastlane/Fastfile` exists and valid
186
+ - [ ] Gemfile includes fastlane
187
+ - [ ] Bundle install succeeds
188
+ - [ ] `fastlane lanes` shows available lanes
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: flutter-build
3
+ description: Build Flutter app for iOS or Android with configurable options (debug/release/profile, flavors, obfuscation)
4
+ argument-hint: "[ios|android|both] [--release|--debug|--profile] [--flavor=<name>]"
5
+ allowed-tools:
6
+ - Bash
7
+ - Read
8
+ - Write
9
+ - Edit
10
+ - Glob
11
+ ---
12
+
13
+ # Flutter Build Command
14
+
15
+ Build the Flutter application for the specified platform(s).
16
+
17
+ ## Parse Arguments
18
+
19
+ Extract from user input:
20
+ - **platform**: `ios`, `android`, or `both` (default: both)
21
+ - **mode**: `--release` (default), `--debug`, or `--profile`
22
+ - **flavor**: Optional flavor/scheme name via `--flavor=<name>`
23
+ - **obfuscate**: Add `--obfuscate --split-debug-info=build/debug-info` for release builds
24
+
25
+ ## Pre-Build Checks
26
+
27
+ 1. Verify Flutter project exists (check for `pubspec.yaml`)
28
+ 2. Run `flutter pub get` if `pubspec.lock` is outdated
29
+ 3. For iOS: Check if CocoaPods needs update (`cd ios && pod install`)
30
+
31
+ ## Build Commands
32
+
33
+ ### Android Build
34
+ ```bash
35
+ # Debug APK
36
+ flutter build apk --debug
37
+
38
+ # Release APK
39
+ flutter build apk --release
40
+
41
+ # Release AAB (for Play Store)
42
+ flutter build appbundle --release
43
+
44
+ # With flavor
45
+ flutter build appbundle --release --flavor production
46
+
47
+ # With obfuscation
48
+ flutter build appbundle --release --obfuscate --split-debug-info=build/debug-info
49
+ ```
50
+
51
+ ### iOS Build
52
+ ```bash
53
+ # Debug (no code signing)
54
+ flutter build ios --debug --no-codesign
55
+
56
+ # Release (requires code signing)
57
+ flutter build ios --release
58
+
59
+ # With flavor/scheme
60
+ flutter build ios --release --flavor production
61
+
62
+ # Archive for distribution
63
+ flutter build ipa --release
64
+ ```
65
+
66
+ ## Execution Steps
67
+
68
+ 1. Display build configuration summary
69
+ 2. Run `flutter clean` if user requests clean build
70
+ 3. Run `flutter pub get`
71
+ 4. Execute appropriate build command(s)
72
+ 5. Report build output location:
73
+ - Android APK: `build/app/outputs/flutter-apk/`
74
+ - Android AAB: `build/app/outputs/bundle/release/`
75
+ - iOS: `build/ios/iphoneos/` or `build/ios/archive/`
76
+
77
+ ## Error Handling
78
+
79
+ If build fails:
80
+ 1. Check for common issues (missing dependencies, signing errors)
81
+ 2. Suggest fixes based on error messages
82
+ 3. For iOS signing issues, suggest running `/signing-setup`
83
+
84
+ ## Output
85
+
86
+ Report to user:
87
+ - Build status (success/failure)
88
+ - Output file path(s)
89
+ - File size(s)
90
+ - Next steps (test locally, deploy to store)