@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,133 @@
1
+ ---
2
+ name: flutter-deploy
3
+ description: Deploy Flutter app to App Store or Google Play using Fastlane
4
+ argument-hint: "[ios|android] [testflight|appstore|internal|beta|production]"
5
+ allowed-tools:
6
+ - Bash
7
+ - Read
8
+ - Write
9
+ - Glob
10
+ - Grep
11
+ ---
12
+
13
+ # Flutter Deploy Command
14
+
15
+ Deploy the Flutter application to app stores using Fastlane.
16
+
17
+ ## Parse Arguments
18
+
19
+ Extract from user input:
20
+ - **platform**: `ios` or `android` (required)
21
+ - **target**:
22
+ - iOS: `testflight` (default) or `appstore`
23
+ - Android: `internal` (default), `beta`, or `production`
24
+
25
+ ## Pre-Deploy Validation
26
+
27
+ Before deploying, verify:
28
+
29
+ 1. **Version Check**: Confirm version bumped in `pubspec.yaml`
30
+ 2. **Changelog**: Verify CHANGELOG.md updated
31
+ 3. **Tests**: Run `flutter test` and ensure passing
32
+ 4. **Fastlane Setup**: Verify Fastlane configured (`ios/fastlane/` or `android/fastlane/`)
33
+ 5. **Code Signing**:
34
+ - iOS: Match configured and certificates valid
35
+ - Android: Keystore configured in `key.properties`
36
+
37
+ ## iOS Deployment
38
+
39
+ ### TestFlight
40
+ ```bash
41
+ # Build Flutter
42
+ flutter build ios --release
43
+
44
+ # Deploy via Fastlane
45
+ cd ios && bundle exec fastlane beta
46
+ ```
47
+
48
+ ### App Store
49
+ ```bash
50
+ # Build Flutter
51
+ flutter build ipa --release
52
+
53
+ # Deploy via Fastlane
54
+ cd ios && bundle exec fastlane release
55
+ ```
56
+
57
+ ## Android Deployment
58
+
59
+ ### Internal Testing
60
+ ```bash
61
+ # Build AAB
62
+ flutter build appbundle --release
63
+
64
+ # Deploy via Fastlane
65
+ cd android && bundle exec fastlane internal
66
+ ```
67
+
68
+ ### Beta Track
69
+ ```bash
70
+ cd android && bundle exec fastlane beta
71
+ ```
72
+
73
+ ### Production
74
+ ```bash
75
+ cd android && bundle exec fastlane release
76
+ ```
77
+
78
+ ## Execution Steps
79
+
80
+ 1. **Validate Prerequisites**
81
+ - Check Fastlane installation
82
+ - Verify credentials/secrets configured
83
+ - Confirm version and changelog
84
+
85
+ 2. **Build Application**
86
+ - Run appropriate `flutter build` command
87
+ - Verify build succeeds
88
+
89
+ 3. **Execute Fastlane Lane**
90
+ - Navigate to platform directory
91
+ - Run `bundle exec fastlane <lane>`
92
+ - Monitor upload progress
93
+
94
+ 4. **Post-Deploy Actions**
95
+ - Report deployment status
96
+ - Provide store console links
97
+ - Suggest next steps (submit for review, promote track)
98
+
99
+ ## Environment Variables Required
100
+
101
+ ### iOS (App Store Connect)
102
+ - `MATCH_PASSWORD`
103
+ - `APP_STORE_CONNECT_API_KEY_ID`
104
+ - `APP_STORE_CONNECT_API_ISSUER_ID`
105
+ - `APP_STORE_CONNECT_API_KEY_CONTENT`
106
+
107
+ ### Android (Google Play)
108
+ - `PLAY_STORE_JSON_KEY`
109
+
110
+ ## Error Handling
111
+
112
+ Common issues and fixes:
113
+ - **Code signing failed**: Run `/signing-setup`
114
+ - **Version already exists**: Bump version in `pubspec.yaml`
115
+ - **Missing metadata**: Update store metadata in `fastlane/metadata/`
116
+ - **API credentials invalid**: Check environment variables
117
+
118
+ ## Output
119
+
120
+ Report to user:
121
+ - Deployment status
122
+ - Build number uploaded
123
+ - Store console URL
124
+ - Estimated review time (if applicable)
125
+ - Next steps
126
+
127
+ ## Post-Deploy Checklist
128
+
129
+ - [ ] Verify build appears in store console
130
+ - [ ] Check release notes are correct
131
+ - [ ] Monitor for processing completion
132
+ - [ ] Submit for review (if App Store)
133
+ - [ ] Promote to wider audience (if Play Store)
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: flutter-test
3
+ description: Run Flutter tests with coverage reporting (unit, widget, integration)
4
+ argument-hint: "[unit|widget|integration|all] [--coverage] [--update-goldens]"
5
+ allowed-tools:
6
+ - Bash
7
+ - Read
8
+ - Glob
9
+ - Grep
10
+ ---
11
+
12
+ # Flutter Test Command
13
+
14
+ Run Flutter tests with optional coverage reporting.
15
+
16
+ ## Parse Arguments
17
+
18
+ Extract from user input:
19
+ - **type**: `unit`, `widget`, `integration`, or `all` (default: all)
20
+ - **coverage**: Include `--coverage` flag
21
+ - **update-goldens**: Include `--update-goldens` for golden tests
22
+ - **filter**: Optional test file pattern
23
+
24
+ ## Test Discovery
25
+
26
+ Locate tests based on type:
27
+ - **unit**: `test/unit/**/*_test.dart` or `test/**/*_test.dart` (excluding integration)
28
+ - **widget**: `test/widget/**/*_test.dart` or tests with `testWidgets`
29
+ - **integration**: `integration_test/**/*_test.dart`
30
+
31
+ ## Test Commands
32
+
33
+ ### Run All Tests
34
+ ```bash
35
+ flutter test
36
+ ```
37
+
38
+ ### Run with Coverage
39
+ ```bash
40
+ flutter test --coverage
41
+ ```
42
+
43
+ ### Run Specific Test File
44
+ ```bash
45
+ flutter test test/unit/auth_test.dart
46
+ ```
47
+
48
+ ### Run Integration Tests
49
+ ```bash
50
+ flutter test integration_test/app_test.dart
51
+ ```
52
+
53
+ ### Update Golden Files
54
+ ```bash
55
+ flutter test --update-goldens
56
+ ```
57
+
58
+ ## Coverage Report
59
+
60
+ When `--coverage` is requested:
61
+
62
+ 1. Run tests with coverage:
63
+ ```bash
64
+ flutter test --coverage
65
+ ```
66
+
67
+ 2. Generate HTML report (if lcov installed):
68
+ ```bash
69
+ genhtml coverage/lcov.info -o coverage/html
70
+ ```
71
+
72
+ 3. Report coverage summary:
73
+ ```bash
74
+ lcov --summary coverage/lcov.info
75
+ ```
76
+
77
+ ## Execution Steps
78
+
79
+ 1. Display test configuration
80
+ 2. Run `flutter pub get` if needed
81
+ 3. Execute test command(s)
82
+ 4. Parse and display results:
83
+ - Total tests run
84
+ - Passed/Failed/Skipped counts
85
+ - Failed test details
86
+ - Coverage percentage (if enabled)
87
+
88
+ ## Coverage Analysis
89
+
90
+ If coverage enabled, analyze:
91
+ - Overall line coverage percentage
92
+ - Files with low coverage (<80%)
93
+ - Uncovered critical paths
94
+
95
+ ## Error Handling
96
+
97
+ If tests fail:
98
+ 1. Show failed test names and locations
99
+ 2. Display assertion messages
100
+ 3. Suggest fixes if patterns detected
101
+
102
+ ## Output Format
103
+
104
+ ```
105
+ Flutter Tests Summary
106
+ =====================
107
+ Total: 150
108
+ Passed: 145
109
+ Failed: 3
110
+ Skipped: 2
111
+
112
+ Failed Tests:
113
+ - test/unit/auth_service_test.dart: 'should handle invalid credentials'
114
+ - test/widget/login_form_test.dart: 'shows error on empty email'
115
+
116
+ Coverage: 87.3% (target: 80%)
117
+ ```
@@ -0,0 +1,209 @@
1
+ ---
2
+ name: signing-setup
3
+ description: Configure code signing for iOS (certificates/profiles with Match) and Android (keystore)
4
+ argument-hint: "[ios|android|both]"
5
+ allowed-tools:
6
+ - Bash
7
+ - Read
8
+ - Write
9
+ - Edit
10
+ - AskUserQuestion
11
+ ---
12
+
13
+ # Code Signing Setup Command
14
+
15
+ Configure code signing for iOS and/or Android deployment.
16
+
17
+ ## Parse Arguments
18
+
19
+ Extract from user input:
20
+ - **platform**: `ios`, `android`, or `both` (default: both)
21
+
22
+ ## iOS Code Signing with Match
23
+
24
+ ### Prerequisites
25
+ - Apple Developer Program membership
26
+ - Private Git repository for certificates
27
+ - App Store Connect API Key (recommended) or Apple ID
28
+
29
+ ### Setup Steps
30
+
31
+ 1. **Initialize Match**
32
+ ```bash
33
+ cd ios
34
+ bundle exec fastlane match init
35
+ ```
36
+
37
+ 2. **Create Matchfile**
38
+ ```ruby
39
+ # ios/fastlane/Matchfile
40
+ git_url("git@github.com:company/certificates.git")
41
+ storage_mode("git")
42
+ type("appstore")
43
+ app_identifier(["com.company.app"])
44
+ username("developer@company.com")
45
+ team_id("TEAM_ID")
46
+ ```
47
+
48
+ 3. **Generate Certificates and Profiles**
49
+ ```bash
50
+ # Development
51
+ bundle exec fastlane match development
52
+
53
+ # App Store distribution
54
+ bundle exec fastlane match appstore
55
+
56
+ # Ad Hoc (for TestFlight alternatives)
57
+ bundle exec fastlane match adhoc
58
+ ```
59
+
60
+ 4. **Configure Xcode Project**
61
+
62
+ Update `ios/Runner.xcodeproj/project.pbxproj`:
63
+ - Set "Signing Style" to "Manual"
64
+ - Select Match-generated provisioning profiles
65
+ - Set correct Team ID
66
+
67
+ 5. **CI Environment Variables**
68
+ ```bash
69
+ # For GitHub Actions
70
+ MATCH_PASSWORD=<encryption-password>
71
+ MATCH_GIT_BASIC_AUTHORIZATION=<base64-encoded-credentials>
72
+
73
+ # App Store Connect API (preferred for CI)
74
+ APP_STORE_CONNECT_API_KEY_ID=<key-id>
75
+ APP_STORE_CONNECT_API_ISSUER_ID=<issuer-id>
76
+ APP_STORE_CONNECT_API_KEY_CONTENT=<key-content>
77
+ ```
78
+
79
+ ### Match Commands Reference
80
+ ```bash
81
+ # Create new certificates (first time)
82
+ fastlane match appstore
83
+
84
+ # Use existing certificates (CI, readonly)
85
+ fastlane match appstore --readonly
86
+
87
+ # Revoke and regenerate (use with caution)
88
+ fastlane match nuke distribution
89
+ fastlane match appstore
90
+ ```
91
+
92
+ ## Android Code Signing
93
+
94
+ ### Setup Steps
95
+
96
+ 1. **Generate Upload Keystore**
97
+ ```bash
98
+ keytool -genkey -v -keystore android/upload-keystore.jks \
99
+ -keyalg RSA -keysize 2048 -validity 10000 \
100
+ -alias upload \
101
+ -dname "CN=Company Name, OU=Mobile, O=Company, L=City, ST=State, C=US"
102
+ ```
103
+
104
+ 2. **Create key.properties**
105
+ ```properties
106
+ # android/key.properties (DO NOT COMMIT)
107
+ storePassword=<keystore-password>
108
+ keyPassword=<key-password>
109
+ keyAlias=upload
110
+ storeFile=../upload-keystore.jks
111
+ ```
112
+
113
+ 3. **Update build.gradle**
114
+
115
+ Edit `android/app/build.gradle`:
116
+ ```groovy
117
+ def keystoreProperties = new Properties()
118
+ def keystorePropertiesFile = rootProject.file('key.properties')
119
+ if (keystorePropertiesFile.exists()) {
120
+ keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
121
+ }
122
+
123
+ android {
124
+ ...
125
+ signingConfigs {
126
+ release {
127
+ keyAlias keystoreProperties['keyAlias']
128
+ keyPassword keystoreProperties['keyPassword']
129
+ storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
130
+ storePassword keystoreProperties['storePassword']
131
+ }
132
+ }
133
+ buildTypes {
134
+ release {
135
+ signingConfig signingConfigs.release
136
+ ...
137
+ }
138
+ }
139
+ }
140
+ ```
141
+
142
+ 4. **Add to .gitignore**
143
+ ```
144
+ # Android signing
145
+ android/key.properties
146
+ android/*.jks
147
+ android/*.keystore
148
+ ```
149
+
150
+ 5. **CI Environment Setup**
151
+
152
+ Encode keystore for CI:
153
+ ```bash
154
+ base64 -i android/upload-keystore.jks | pbcopy
155
+ ```
156
+
157
+ GitHub Secrets:
158
+ - `KEYSTORE_BASE64` - Base64 encoded keystore
159
+ - `KEYSTORE_PASSWORD` - Keystore password
160
+ - `KEY_PASSWORD` - Key password
161
+ - `KEY_ALIAS` - Key alias (usually "upload")
162
+
163
+ ### Play App Signing (Recommended)
164
+
165
+ Enable Play App Signing in Google Play Console:
166
+ 1. Upload your upload key (not signing key)
167
+ 2. Google manages the actual signing key
168
+ 3. More secure - signing key never leaves Google
169
+
170
+ ## Verification
171
+
172
+ ### iOS
173
+ ```bash
174
+ # List installed certificates
175
+ security find-identity -v -p codesigning
176
+
177
+ # Verify Match setup
178
+ cd ios && bundle exec fastlane match appstore --readonly
179
+ ```
180
+
181
+ ### Android
182
+ ```bash
183
+ # Verify keystore
184
+ keytool -list -v -keystore android/upload-keystore.jks
185
+
186
+ # Test release build
187
+ flutter build appbundle --release
188
+ ```
189
+
190
+ ## Security Best Practices
191
+
192
+ 1. **Never commit** signing credentials to Git
193
+ 2. **Use environment variables** for CI/CD
194
+ 3. **Rotate keys** periodically
195
+ 4. **Enable Play App Signing** for Android
196
+ 5. **Use Match** for iOS team certificate management
197
+ 6. **Store secrets** in secure vault (GitHub Secrets, 1Password, etc.)
198
+
199
+ ## Troubleshooting
200
+
201
+ ### iOS Issues
202
+ - **"No signing certificate"**: Run `fastlane match appstore`
203
+ - **"Profile doesn't include signing certificate"**: Run `fastlane match nuke` then regenerate
204
+ - **Team ID mismatch**: Check Matchfile and Xcode project settings
205
+
206
+ ### Android Issues
207
+ - **"Keystore was tampered with"**: Wrong password
208
+ - **"Cannot recover key"**: Key password != store password
209
+ - **Release build unsigned**: Check key.properties path
@@ -0,0 +1,17 @@
1
+ {
2
+ "description": "Flutter deployment validation hooks",
3
+ "hooks": {
4
+ "PreToolUse": [
5
+ {
6
+ "matcher": "Bash",
7
+ "pattern": "fastlane.*(?:beta|release|internal|production)",
8
+ "hooks": [
9
+ {
10
+ "type": "prompt",
11
+ "prompt": "Before deploying to stores, verify:\n\n1. **Version Check**: Has the version been bumped in pubspec.yaml?\n2. **Changelog**: Is CHANGELOG.md updated with release notes?\n3. **Tests**: Have all tests passed?\n4. **Code Signing**: Is signing properly configured?\n\nIf any of these are not done, stop and help the user complete them before proceeding with deployment.\n\nCheck pubspec.yaml for current version. Check CHANGELOG.md for recent entries. If issues found, explain what needs to be done."
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
17
+ }
@@ -0,0 +1,193 @@
1
+ ---
2
+ name: fastlane-knowledge
3
+ description: >-
4
+ Provides Fastlane configuration patterns for Flutter apps including iOS and Android lanes,
5
+ code signing with match, CI/CD integration with GitHub Actions, and environment management.
6
+ Use when user asks about Fastlane setup, deployment automation, code signing, or CI/CD for mobile.
7
+ version: 1.0.0
8
+ ---
9
+
10
+ # Fastlane for Flutter
11
+
12
+ Configure and use Fastlane for automated Flutter app deployment.
13
+
14
+ ## Directory Structure
15
+
16
+ ```
17
+ project/
18
+ ├── ios/
19
+ │ └── fastlane/
20
+ │ ├── Fastfile # iOS lanes
21
+ │ ├── Appfile # App identifier config
22
+ │ ├── Matchfile # Code signing config
23
+ │ └── metadata/ # App Store metadata
24
+ ├── android/
25
+ │ └── fastlane/
26
+ │ ├── Fastfile # Android lanes
27
+ │ ├── Appfile # Package name config
28
+ │ └── metadata/ # Play Store metadata
29
+ └── Gemfile # Ruby dependencies
30
+ ```
31
+
32
+ ## Setup Commands
33
+
34
+ ```bash
35
+ # Install Fastlane
36
+ gem install fastlane
37
+
38
+ # Initialize for iOS
39
+ cd ios && fastlane init
40
+
41
+ # Initialize for Android
42
+ cd android && fastlane init
43
+
44
+ # Initialize match (iOS code signing)
45
+ cd ios && fastlane match init
46
+ ```
47
+
48
+ ## iOS Fastfile Template
49
+
50
+ ```ruby
51
+ default_platform(:ios)
52
+
53
+ platform :ios do
54
+ before_all do
55
+ setup_ci if ENV['CI']
56
+ end
57
+
58
+ desc "Build and upload to TestFlight"
59
+ lane :beta do
60
+ match(type: "appstore", readonly: true)
61
+
62
+ build_app(
63
+ workspace: "Runner.xcworkspace",
64
+ scheme: "Runner",
65
+ export_method: "app-store",
66
+ output_directory: "./build"
67
+ )
68
+
69
+ upload_to_testflight(
70
+ skip_waiting_for_build_processing: true
71
+ )
72
+ end
73
+
74
+ desc "Deploy to App Store"
75
+ lane :release do
76
+ match(type: "appstore", readonly: true)
77
+
78
+ build_app(
79
+ workspace: "Runner.xcworkspace",
80
+ scheme: "Runner",
81
+ export_method: "app-store"
82
+ )
83
+
84
+ upload_to_app_store(
85
+ submit_for_review: true,
86
+ automatic_release: false,
87
+ force: true
88
+ )
89
+ end
90
+ end
91
+ ```
92
+
93
+ ## Android Fastfile Template
94
+
95
+ ```ruby
96
+ default_platform(:android)
97
+
98
+ platform :android do
99
+ desc "Deploy to internal testing"
100
+ lane :internal do
101
+ upload_to_play_store(
102
+ track: "internal",
103
+ aab: "../build/app/outputs/bundle/release/app-release.aab",
104
+ json_key_data: ENV["PLAY_STORE_JSON_KEY"]
105
+ )
106
+ end
107
+
108
+ desc "Promote to beta"
109
+ lane :beta do
110
+ upload_to_play_store(
111
+ track: "beta",
112
+ track_promote_to: "beta"
113
+ )
114
+ end
115
+
116
+ desc "Deploy to production"
117
+ lane :release do
118
+ upload_to_play_store(
119
+ track: "production",
120
+ aab: "../build/app/outputs/bundle/release/app-release.aab",
121
+ json_key_data: ENV["PLAY_STORE_JSON_KEY"]
122
+ )
123
+ end
124
+ end
125
+ ```
126
+
127
+ ## Code Signing
128
+
129
+ ### iOS with Match
130
+ ```ruby
131
+ # Matchfile
132
+ git_url("git@github.com:company/certificates.git")
133
+ storage_mode("git")
134
+ type("appstore")
135
+ app_identifier(["com.company.app"])
136
+ ```
137
+
138
+ ### Match Commands
139
+ ```bash
140
+ # Create new certificates/profiles
141
+ fastlane match appstore
142
+ fastlane match development
143
+ fastlane match adhoc
144
+
145
+ # Use existing (CI)
146
+ fastlane match appstore --readonly
147
+ ```
148
+
149
+ ### Android Keystore
150
+ ```bash
151
+ # Generate upload keystore
152
+ keytool -genkey -v -keystore upload-keystore.jks \
153
+ -keyalg RSA -keysize 2048 -validity 10000 -alias upload
154
+ ```
155
+
156
+ ## GitHub Actions Integration
157
+
158
+ ### Required Secrets
159
+ - `MATCH_PASSWORD` - Match encryption password
160
+ - `MATCH_GIT_AUTH` - Base64 encoded Git credentials
161
+ - `ASC_KEY_ID` - App Store Connect API Key ID
162
+ - `ASC_ISSUER_ID` - App Store Connect Issuer ID
163
+ - `ASC_KEY_CONTENT` - App Store Connect API Key content
164
+ - `PLAY_STORE_JSON_KEY` - Google Play service account JSON
165
+ - `KEYSTORE_BASE64` - Base64 encoded Android keystore
166
+ - `KEYSTORE_PASSWORD` - Android keystore password
167
+ - `KEY_PASSWORD` - Android key password
168
+ - `KEY_ALIAS` - Android key alias
169
+
170
+ ## Common Lanes
171
+
172
+ | Lane | Platform | Description |
173
+ |------|----------|-------------|
174
+ | `beta` | iOS | TestFlight upload |
175
+ | `release` | iOS | App Store submission |
176
+ | `internal` | Android | Internal testing track |
177
+ | `beta` | Android | Beta track |
178
+ | `release` | Android | Production release |
179
+
180
+ ## Environment Variables
181
+
182
+ ```bash
183
+ # iOS
184
+ export MATCH_PASSWORD="your-match-password"
185
+ export APP_STORE_CONNECT_API_KEY_ID="your-key-id"
186
+ export APP_STORE_CONNECT_API_ISSUER_ID="your-issuer-id"
187
+ export APP_STORE_CONNECT_API_KEY_CONTENT="-----BEGIN PRIVATE KEY-----\n..."
188
+
189
+ # Android
190
+ export PLAY_STORE_JSON_KEY='{"type":"service_account",...}'
191
+ ```
192
+
193
+ For complete Fastlane configuration, use the `/fastlane-setup` command.