packwise-skills 1.0.0 → 1.2.0

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 (53) hide show
  1. package/.cursorrules +23 -23
  2. package/CLAUDE.md +25 -25
  3. package/LICENSE +21 -0
  4. package/README.md +404 -295
  5. package/audit.md +224 -224
  6. package/bin/packwise.js +322 -155
  7. package/install.sh +123 -0
  8. package/package.json +32 -31
  9. package/skill.md +944 -719
  10. package/sub-skills/ai/local-llm.md +183 -183
  11. package/sub-skills/ai/python-ml.md +164 -164
  12. package/sub-skills/backend/go-server.md +184 -184
  13. package/sub-skills/backend/java-spring.md +241 -241
  14. package/sub-skills/backend/node-server.md +164 -164
  15. package/sub-skills/backend/php-laravel.md +175 -175
  16. package/sub-skills/backend/python-server.md +164 -164
  17. package/sub-skills/backend/rust-backend.md +118 -118
  18. package/sub-skills/cli/python-cli.md +236 -236
  19. package/sub-skills/cli/sdk-library.md +497 -497
  20. package/sub-skills/cloud/ci-cd-pipelines.md +350 -350
  21. package/sub-skills/cloud/docker.md +191 -191
  22. package/sub-skills/cloud/kubernetes.md +277 -277
  23. package/sub-skills/cloud/payment-integration.md +307 -307
  24. package/sub-skills/cross-platform/multiplatform.md +252 -252
  25. package/sub-skills/desktop/electron.md +783 -783
  26. package/sub-skills/desktop/game-dev.md +443 -443
  27. package/sub-skills/desktop/native-app.md +123 -123
  28. package/sub-skills/desktop/scenarios.md +443 -443
  29. package/sub-skills/desktop/smart-platforms.md +324 -324
  30. package/sub-skills/desktop/tauri.md +428 -428
  31. package/sub-skills/desktop/vr-ar.md +252 -252
  32. package/sub-skills/desktop/web-to-desktop.md +153 -153
  33. package/sub-skills/embedded/car-infotainment.md +129 -129
  34. package/sub-skills/embedded/esp32.md +184 -184
  35. package/sub-skills/embedded/ros.md +150 -150
  36. package/sub-skills/embedded/stm32.md +160 -160
  37. package/sub-skills/mobile/android.md +322 -322
  38. package/sub-skills/mobile/capacitor.md +232 -232
  39. package/sub-skills/mobile/flutter-mobile.md +138 -138
  40. package/sub-skills/mobile/harmonyos.md +150 -150
  41. package/sub-skills/mobile/ios.md +245 -245
  42. package/sub-skills/mobile/react-native.md +443 -443
  43. package/sub-skills/mobile/wearables.md +230 -230
  44. package/sub-skills/plugins/browser-extension.md +308 -308
  45. package/sub-skills/plugins/jetbrains-plugin.md +226 -226
  46. package/sub-skills/plugins/vscode-extension.md +204 -204
  47. package/sub-skills/security/security-tools.md +174 -174
  48. package/sub-skills/web/monorepo.md +274 -274
  49. package/sub-skills/web/pwa.md +220 -220
  50. package/sub-skills/web/serverless-edge.md +295 -295
  51. package/sub-skills/web/spa.md +266 -266
  52. package/sub-skills/web/ssr.md +228 -228
  53. package/sub-skills/web/wasm.md +243 -243
@@ -1,232 +1,232 @@
1
- # Capacitor Mobile Build Sub-Skill
2
-
3
- Package web applications as native mobile apps using Capacitor.
4
-
5
- **Current version**: Capacitor 8.x / Capacitor CLI 8.x (2025-2026)
6
-
7
- > ⚠️ **Breaking changes since Capacitor 6**:
8
- > - **Node.js 22+ required** (was 18+). **JDK 21 required** (was 17). **iOS deployment target 15.0** (was 13.0). **Android minSdk 24** (was 22). **Android compileSdk/targetSdk 36** (was 34).
9
- > - `android.adjustMarginsForEdgeToEdge` config removed (v8) — use System Bars plugin with CSS `env()` variables.
10
- > - `bridge_layout_main.xml` renamed to `capacitor_bridge_layout_main.xml` (v8).
11
- > - Gradle property syntax requires `=` (e.g., `namespace = "com.example"`).
12
- > - iOS now defaults to SPM (Swift Package Manager) for new projects (v8).
13
- > - Plugin type aliases removed in v7 (e.g., `AppRestoredResult` → `RestoredListenerEvent`).
14
- > - Run `npx cap migrate` for automated migration.
15
- > - See [capacitorjs.com/docs/updating/8-0](https://capacitorjs.com/docs/updating/8-0).
16
-
17
- ## When to Use
18
-
19
- - Have an existing web app (React, Vue, Svelte, Angular, vanilla JS)
20
- - Need native device access (camera, GPS, filesystem, push notifications)
21
- - Want a single codebase for web + iOS + Android
22
- - Don't need deep native UI customization
23
-
24
- ## Key Features
25
-
26
- - **WebView-based** — web app runs inside a native WebView container
27
- - **Native plugin ecosystem** — camera, geolocation, filesystem, push, biometrics, etc.
28
- - **Live Updates** — push web content updates without app store review (via `@capacitor/live-updates`)
29
- - **Progressive adoption** — add Capacitor to existing web projects incrementally
30
- - **Platform APIs** — access native features via TypeScript-friendly plugin APIs
31
-
32
- ## Prerequisites
33
-
34
- ```bash
35
- # Node.js 22+ (REQUIRED for Capacitor 8)
36
- # For Android: Android Studio (2025.2.1+) + JDK 21
37
- # For iOS: Xcode 26+ (macOS only), iOS deployment target 15.0+
38
- # CocoaPods or SPM (SPM is default for new Capacitor 8 iOS projects)
39
- ```
40
-
41
- ## Project Setup
42
-
43
- ```bash
44
- # Install Capacitor
45
- npm install @capacitor/core @capacitor/cli
46
-
47
- # Initialize (interactive — sets appName, appId, webDir)
48
- npx cap init
49
-
50
- # Add platforms
51
- npx cap add android
52
- npx cap add ios
53
-
54
- # Install common plugins
55
- npm install @capacitor/camera @capacitor/geolocation @capacitor/push-notifications
56
- npm install @capacitor/filesystem @capacitor/haptics @capacitor/share
57
- npm install @capacitor/local-notifications @capacitor/biometric
58
- ```
59
-
60
- ## Configuration
61
-
62
- ```typescript
63
- // capacitor.config.ts
64
- import type { CapacitorConfig } from '@capacitor/cli';
65
-
66
- const config: CapacitorConfig = {
67
- appId: 'com.example.myapp',
68
- appName: 'MyApp',
69
- webDir: 'dist', // must match your framework's build output directory
70
- server: {
71
- androidScheme: 'https', // required for modern WebView features
72
- // url: 'http://192.168.1.100:5173', // dev mode: live reload from dev server
73
- // cleartext: true, // dev mode: allow HTTP
74
- },
75
- android: {
76
- buildOptions: {
77
- keystorePath: undefined, // set for release signing
78
- keystoreAlias: undefined,
79
- },
80
- },
81
- ios: {
82
- scheme: 'MyApp', // Xcode scheme name
83
- contentInset: 'automatic',
84
- },
85
- plugins: {
86
- PushNotifications: {
87
- presentationOptions: ['badge', 'sound', 'alert'],
88
- },
89
- },
90
- };
91
-
92
- export default config;
93
- ```
94
-
95
- ## Build Workflow
96
-
97
- ```bash
98
- # 1. Build your web app first
99
- npm run build # outputs to dist/
100
-
101
- # 2. Copy web assets to native projects
102
- npx cap copy android
103
- npx cap copy ios
104
-
105
- # 3. Sync (copy + update native dependencies)
106
- npx cap sync android
107
- npx cap sync ios
108
-
109
- # 4. Open in native IDE for final build
110
- npx cap open android # Android Studio
111
- npx cap open ios # Xcode
112
- ```
113
-
114
- ## Android Release Build
115
-
116
- ```bash
117
- # Generate signing keystore (first time)
118
- keytool -genkey -v -keystore android/app/my-release-key.jks \
119
- -keyalg RSA -keysize 2048 -validity 10000 -alias my-key
120
-
121
- # build.gradle.kts signing config
122
- signingConfigs {
123
- create("release") {
124
- storeFile = file("my-release-key.jks")
125
- storePassword = System.getenv("KEYSTORE_PASSWORD")
126
- keyAlias = "my-key"
127
- keyPassword = System.getenv("KEY_PASSWORD")
128
- }
129
- }
130
-
131
- # Build AAB (Play Store)
132
- cd android && ./gradlew bundleRelease
133
- # Output: android/app/build/outputs/bundle/release/app-release.aab
134
-
135
- # Build APK (direct distribution)
136
- cd android && ./gradlew assembleRelease
137
- # Output: android/app/build/outputs/apk/release/app-release-unsigned.apk
138
- ```
139
-
140
- ## iOS Release Build
141
-
142
- ```bash
143
- # Open Xcode project
144
- npx cap open ios
145
-
146
- # In Xcode:
147
- # 1. Select "Any iOS Device" as target
148
- # 2. Product → Archive
149
- # 3. Distribute App → App Store Connect / Ad Hoc / Enterprise
150
-
151
- # Command line (requires fastlane)
152
- sudo gem install fastlane
153
- cd ios/App && fastlane beta # TestFlight
154
- ```
155
-
156
- ## Common Pitfalls
157
-
158
- | Issue | Fix |
159
- |-------|-----|
160
- | White screen after build | Check `webDir` in capacitor.config.ts matches framework output dir (dist/build/www) |
161
- | Resources not synced | Always run `npx cap copy` or `npx cap sync` AFTER `npm run build` |
162
- | Plugin not working | Run `npx cap sync` after installing new plugins; check plugin supports your platform |
163
- | Android build fails | Check JDK version (**21 required for v8**); invalidate caches in Android Studio |
164
- | iOS build fails | Run `cd ios/App && pod install` after adding plugins; iOS target must be **15.0+** |
165
- | CORS errors in dev | Set `server.url` to dev server and `server.cleartext: true` in config |
166
- | Keyboard overlaps input | Install `@capacitor/keyboard` and configure `resize` mode |
167
- | Status bar issues | Use `@capacitor/status-bar` to configure appearance |
168
- | Push notifications not received | Verify Google Services (Android) / APNs (iOS) certificates configured correctly |
169
- | `capacitor.config.ts` not found | Ensure file is in project root; Capacitor 6 requires `.ts` or `.json` |
170
- | Native module crashes on startup | Check Android `minSdkVersion` (**24+ for v8**) / iOS deployment target (**15.0+ for v8**) |
171
- | App rejected by Play Store | Ensure `androidScheme: 'https'`; Play Store requires HTTPS in WebView |
172
- | `bridge_layout_main.xml` not found (v8) | Renamed to `capacitor_bridge_layout_main.xml` |
173
- | Gradle syntax warning | Use `=` syntax: `namespace = "com.example"` not `namespace "com.example"` |
174
- | Plugin type not found (v7+) | Type aliases removed: `AppRestoredResult` → `RestoredListenerEvent`, etc. |
175
-
176
- ## Plugin Management
177
-
178
- ```bash
179
- # List installed plugins
180
- npx cap ls
181
-
182
- # Update plugins to latest
183
- npx cap update android
184
- npx cap update ios
185
-
186
- # Remove a plugin
187
- npm uninstall @capacitor/camera
188
- npx cap sync
189
- ```
190
-
191
- ## CI/CD — GitHub Actions (Android)
192
-
193
- ```yaml
194
- # .github/workflows/capacitor-android.yml
195
- name: Capacitor Android
196
- on:
197
- push:
198
- branches: [main]
199
-
200
- jobs:
201
- build:
202
- runs-on: ubuntu-latest
203
- steps:
204
- - uses: actions/checkout@v4
205
- - uses: actions/setup-node@v4
206
- with:
207
- node-version: '22'
208
- - run: npm ci
209
- - run: npm run build
210
- - run: npx cap sync android
211
- - uses: actions/setup-java@v4
212
- with:
213
- distribution: 'temurin'
214
- java-version: '17'
215
- - run: cd android && chmod +x gradlew && ./gradlew assembleRelease
216
- - uses: actions/upload-artifact@v4
217
- with:
218
- name: apk
219
- path: android/app/build/outputs/apk/release/*.apk
220
- ```
221
-
222
- ## Capacitor vs Cordova vs PWA
223
-
224
- | Feature | Capacitor 6 | Cordova | PWA |
225
- |---------|------------|---------|-----|
226
- | Architecture | Modern WebView + native bridge | Legacy WebView bridge | Browser APIs only |
227
- | Plugin API | TypeScript-first, Promise-based | Callback-based | Service Worker + Web APIs |
228
- | Native UI | Yes (custom native views) | Limited | No |
229
- | Live Updates | Yes (@capacitor/live-updates) | No (without plugin) | Yes (Service Worker) |
230
- | Web target | Direct (same codebase) | Requires wrapper | Native |
231
- | Maintenance | Active (Ionic team) | Community | Browser vendors |
232
- | Learning curve | Low | Low | Lowest |
1
+ # Capacitor Mobile Build Sub-Skill
2
+
3
+ Package web applications as native mobile apps using Capacitor.
4
+
5
+ **Current version**: Capacitor 8.x / Capacitor CLI 8.x (2025-2026)
6
+
7
+ > ⚠️ **Breaking changes since Capacitor 6**:
8
+ > - **Node.js 22+ required** (was 18+). **JDK 21 required** (was 17). **iOS deployment target 15.0** (was 13.0). **Android minSdk 24** (was 22). **Android compileSdk/targetSdk 36** (was 34).
9
+ > - `android.adjustMarginsForEdgeToEdge` config removed (v8) — use System Bars plugin with CSS `env()` variables.
10
+ > - `bridge_layout_main.xml` renamed to `capacitor_bridge_layout_main.xml` (v8).
11
+ > - Gradle property syntax requires `=` (e.g., `namespace = "com.example"`).
12
+ > - iOS now defaults to SPM (Swift Package Manager) for new projects (v8).
13
+ > - Plugin type aliases removed in v7 (e.g., `AppRestoredResult` → `RestoredListenerEvent`).
14
+ > - Run `npx cap migrate` for automated migration.
15
+ > - See [capacitorjs.com/docs/updating/8-0](https://capacitorjs.com/docs/updating/8-0).
16
+
17
+ ## When to Use
18
+
19
+ - Have an existing web app (React, Vue, Svelte, Angular, vanilla JS)
20
+ - Need native device access (camera, GPS, filesystem, push notifications)
21
+ - Want a single codebase for web + iOS + Android
22
+ - Don't need deep native UI customization
23
+
24
+ ## Key Features
25
+
26
+ - **WebView-based** — web app runs inside a native WebView container
27
+ - **Native plugin ecosystem** — camera, geolocation, filesystem, push, biometrics, etc.
28
+ - **Live Updates** — push web content updates without app store review (via `@capacitor/live-updates`)
29
+ - **Progressive adoption** — add Capacitor to existing web projects incrementally
30
+ - **Platform APIs** — access native features via TypeScript-friendly plugin APIs
31
+
32
+ ## Prerequisites
33
+
34
+ ```bash
35
+ # Node.js 22+ (REQUIRED for Capacitor 8)
36
+ # For Android: Android Studio (2025.2.1+) + JDK 21
37
+ # For iOS: Xcode 26+ (macOS only), iOS deployment target 15.0+
38
+ # CocoaPods or SPM (SPM is default for new Capacitor 8 iOS projects)
39
+ ```
40
+
41
+ ## Project Setup
42
+
43
+ ```bash
44
+ # Install Capacitor
45
+ npm install @capacitor/core @capacitor/cli
46
+
47
+ # Initialize (interactive — sets appName, appId, webDir)
48
+ npx cap init
49
+
50
+ # Add platforms
51
+ npx cap add android
52
+ npx cap add ios
53
+
54
+ # Install common plugins
55
+ npm install @capacitor/camera @capacitor/geolocation @capacitor/push-notifications
56
+ npm install @capacitor/filesystem @capacitor/haptics @capacitor/share
57
+ npm install @capacitor/local-notifications @capacitor/biometric
58
+ ```
59
+
60
+ ## Configuration
61
+
62
+ ```typescript
63
+ // capacitor.config.ts
64
+ import type { CapacitorConfig } from '@capacitor/cli';
65
+
66
+ const config: CapacitorConfig = {
67
+ appId: 'com.example.myapp',
68
+ appName: 'MyApp',
69
+ webDir: 'dist', // must match your framework's build output directory
70
+ server: {
71
+ androidScheme: 'https', // required for modern WebView features
72
+ // url: 'http://192.168.1.100:5173', // dev mode: live reload from dev server
73
+ // cleartext: true, // dev mode: allow HTTP
74
+ },
75
+ android: {
76
+ buildOptions: {
77
+ keystorePath: undefined, // set for release signing
78
+ keystoreAlias: undefined,
79
+ },
80
+ },
81
+ ios: {
82
+ scheme: 'MyApp', // Xcode scheme name
83
+ contentInset: 'automatic',
84
+ },
85
+ plugins: {
86
+ PushNotifications: {
87
+ presentationOptions: ['badge', 'sound', 'alert'],
88
+ },
89
+ },
90
+ };
91
+
92
+ export default config;
93
+ ```
94
+
95
+ ## Build Workflow
96
+
97
+ ```bash
98
+ # 1. Build your web app first
99
+ npm run build # outputs to dist/
100
+
101
+ # 2. Copy web assets to native projects
102
+ npx cap copy android
103
+ npx cap copy ios
104
+
105
+ # 3. Sync (copy + update native dependencies)
106
+ npx cap sync android
107
+ npx cap sync ios
108
+
109
+ # 4. Open in native IDE for final build
110
+ npx cap open android # Android Studio
111
+ npx cap open ios # Xcode
112
+ ```
113
+
114
+ ## Android Release Build
115
+
116
+ ```bash
117
+ # Generate signing keystore (first time)
118
+ keytool -genkey -v -keystore android/app/my-release-key.jks \
119
+ -keyalg RSA -keysize 2048 -validity 10000 -alias my-key
120
+
121
+ # build.gradle.kts signing config
122
+ signingConfigs {
123
+ create("release") {
124
+ storeFile = file("my-release-key.jks")
125
+ storePassword = System.getenv("KEYSTORE_PASSWORD")
126
+ keyAlias = "my-key"
127
+ keyPassword = System.getenv("KEY_PASSWORD")
128
+ }
129
+ }
130
+
131
+ # Build AAB (Play Store)
132
+ cd android && ./gradlew bundleRelease
133
+ # Output: android/app/build/outputs/bundle/release/app-release.aab
134
+
135
+ # Build APK (direct distribution)
136
+ cd android && ./gradlew assembleRelease
137
+ # Output: android/app/build/outputs/apk/release/app-release-unsigned.apk
138
+ ```
139
+
140
+ ## iOS Release Build
141
+
142
+ ```bash
143
+ # Open Xcode project
144
+ npx cap open ios
145
+
146
+ # In Xcode:
147
+ # 1. Select "Any iOS Device" as target
148
+ # 2. Product → Archive
149
+ # 3. Distribute App → App Store Connect / Ad Hoc / Enterprise
150
+
151
+ # Command line (requires fastlane)
152
+ sudo gem install fastlane
153
+ cd ios/App && fastlane beta # TestFlight
154
+ ```
155
+
156
+ ## Common Pitfalls
157
+
158
+ | Issue | Fix |
159
+ |-------|-----|
160
+ | White screen after build | Check `webDir` in capacitor.config.ts matches framework output dir (dist/build/www) |
161
+ | Resources not synced | Always run `npx cap copy` or `npx cap sync` AFTER `npm run build` |
162
+ | Plugin not working | Run `npx cap sync` after installing new plugins; check plugin supports your platform |
163
+ | Android build fails | Check JDK version (**21 required for v8**); invalidate caches in Android Studio |
164
+ | iOS build fails | Run `cd ios/App && pod install` after adding plugins; iOS target must be **15.0+** |
165
+ | CORS errors in dev | Set `server.url` to dev server and `server.cleartext: true` in config |
166
+ | Keyboard overlaps input | Install `@capacitor/keyboard` and configure `resize` mode |
167
+ | Status bar issues | Use `@capacitor/status-bar` to configure appearance |
168
+ | Push notifications not received | Verify Google Services (Android) / APNs (iOS) certificates configured correctly |
169
+ | `capacitor.config.ts` not found | Ensure file is in project root; Capacitor 6 requires `.ts` or `.json` |
170
+ | Native module crashes on startup | Check Android `minSdkVersion` (**24+ for v8**) / iOS deployment target (**15.0+ for v8**) |
171
+ | App rejected by Play Store | Ensure `androidScheme: 'https'`; Play Store requires HTTPS in WebView |
172
+ | `bridge_layout_main.xml` not found (v8) | Renamed to `capacitor_bridge_layout_main.xml` |
173
+ | Gradle syntax warning | Use `=` syntax: `namespace = "com.example"` not `namespace "com.example"` |
174
+ | Plugin type not found (v7+) | Type aliases removed: `AppRestoredResult` → `RestoredListenerEvent`, etc. |
175
+
176
+ ## Plugin Management
177
+
178
+ ```bash
179
+ # List installed plugins
180
+ npx cap ls
181
+
182
+ # Update plugins to latest
183
+ npx cap update android
184
+ npx cap update ios
185
+
186
+ # Remove a plugin
187
+ npm uninstall @capacitor/camera
188
+ npx cap sync
189
+ ```
190
+
191
+ ## CI/CD — GitHub Actions (Android)
192
+
193
+ ```yaml
194
+ # .github/workflows/capacitor-android.yml
195
+ name: Capacitor Android
196
+ on:
197
+ push:
198
+ branches: [main]
199
+
200
+ jobs:
201
+ build:
202
+ runs-on: ubuntu-latest
203
+ steps:
204
+ - uses: actions/checkout@v4
205
+ - uses: actions/setup-node@v4
206
+ with:
207
+ node-version: '22'
208
+ - run: npm ci
209
+ - run: npm run build
210
+ - run: npx cap sync android
211
+ - uses: actions/setup-java@v4
212
+ with:
213
+ distribution: 'temurin'
214
+ java-version: '17'
215
+ - run: cd android && chmod +x gradlew && ./gradlew assembleRelease
216
+ - uses: actions/upload-artifact@v4
217
+ with:
218
+ name: apk
219
+ path: android/app/build/outputs/apk/release/*.apk
220
+ ```
221
+
222
+ ## Capacitor vs Cordova vs PWA
223
+
224
+ | Feature | Capacitor 6 | Cordova | PWA |
225
+ |---------|------------|---------|-----|
226
+ | Architecture | Modern WebView + native bridge | Legacy WebView bridge | Browser APIs only |
227
+ | Plugin API | TypeScript-first, Promise-based | Callback-based | Service Worker + Web APIs |
228
+ | Native UI | Yes (custom native views) | Limited | No |
229
+ | Live Updates | Yes (@capacitor/live-updates) | No (without plugin) | Yes (Service Worker) |
230
+ | Web target | Direct (same codebase) | Requires wrapper | Native |
231
+ | Maintenance | Active (Ionic team) | Community | Browser vendors |
232
+ | Learning curve | Low | Low | Lowest |