@buivietphi/skill-mobile-mt 1.0.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.
- package/AGENTS.md +392 -0
- package/README.md +224 -0
- package/SKILL.md +1048 -0
- package/android/android-native.md +208 -0
- package/bin/install.mjs +199 -0
- package/flutter/flutter.md +246 -0
- package/ios/ios-native.md +182 -0
- package/package.json +50 -0
- package/react-native/react-native.md +743 -0
- package/shared/agent-rules-template.md +343 -0
- package/shared/anti-patterns.md +407 -0
- package/shared/bug-detection.md +71 -0
- package/shared/claude-md-template.md +125 -0
- package/shared/code-review.md +121 -0
- package/shared/common-pitfalls.md +117 -0
- package/shared/document-analysis.md +167 -0
- package/shared/error-recovery.md +467 -0
- package/shared/observability.md +688 -0
- package/shared/performance-prediction.md +210 -0
- package/shared/platform-excellence.md +159 -0
- package/shared/prompt-engineering.md +677 -0
- package/shared/release-checklist.md +82 -0
- package/shared/version-management.md +509 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
# Skill Mobile MT — Agent Rules
|
|
2
|
+
|
|
3
|
+
> Multi-agent compatibility layer for Claude Code, Codex, Gemini CLI, Kimi, Cursor, Copilot, Windsurf, Antigravity, and all Agent Skills-compatible tools.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Agent Compatibility Matrix
|
|
8
|
+
|
|
9
|
+
| Agent | Skill Path | Invocation | Think Block |
|
|
10
|
+
|-------|-----------|------------|-------------|
|
|
11
|
+
| Claude Code | `~/.claude/skills/skill-mobile-mt/` | `@skill-mobile-mt` or `@skill-mobile-mt project` | `<think>...</think>` |
|
|
12
|
+
| Codex | `~/.codex/skills/skill-mobile-mt/` | `@skill-mobile-mt` or load as context | `<think>...</think>` |
|
|
13
|
+
| Gemini CLI | `~/.gemini/skills/skill-mobile-mt/` | Load as context | `## Thinking:` block |
|
|
14
|
+
| Kimi | `~/.kimi/skills/skill-mobile-mt/` | Load as context | `【思考】` or markdown |
|
|
15
|
+
| Cursor | `~/.cursor/skills/skill-mobile-mt/` | Auto-loaded in Composer | Inline reasoning |
|
|
16
|
+
| Copilot | `~/.copilot/skills/skill-mobile-mt/` | Loaded via workspace | `// PLAN:` comments |
|
|
17
|
+
| Windsurf | `~/.windsurf/skills/skill-mobile-mt/` | Auto-loaded | Inline reasoning |
|
|
18
|
+
| Antigravity | `~/.agents/skills/skill-mobile-mt/` | Loaded by orchestrator | Agent-native format |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Full File Structure
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
skill-mobile-mt/
|
|
26
|
+
├── SKILL.md ← Entry point. Always load first.
|
|
27
|
+
├── AGENTS.md ← This file. Multi-agent config.
|
|
28
|
+
│
|
|
29
|
+
├── react-native/
|
|
30
|
+
│ └── react-native.md ← RN + Expo patterns (5,108 tokens)
|
|
31
|
+
│
|
|
32
|
+
├── flutter/
|
|
33
|
+
│ └── flutter.md ← Flutter + Dart patterns (1,617 tokens)
|
|
34
|
+
│
|
|
35
|
+
├── ios/
|
|
36
|
+
│ └── ios-native.md ← Swift + UIKit/SwiftUI patterns (1,452 tokens)
|
|
37
|
+
│
|
|
38
|
+
├── android/
|
|
39
|
+
│ └── android-native.md ← Kotlin + Compose patterns (1,659 tokens)
|
|
40
|
+
│
|
|
41
|
+
└── shared/
|
|
42
|
+
│
|
|
43
|
+
├── ── CORE (always load) ──────────────────────────────────
|
|
44
|
+
├── code-review.md ← Senior review checklist (865 tokens)
|
|
45
|
+
├── bug-detection.md ← Auto bug scanner (499 tokens)
|
|
46
|
+
├── prompt-engineering.md ← Auto-think + XML templates (3,927 tokens)
|
|
47
|
+
│
|
|
48
|
+
├── ── ON-DEMAND (load by task) ────────────────────────────
|
|
49
|
+
├── error-recovery.md ← 16 build/runtime error fixes (2,435 tokens)
|
|
50
|
+
├── document-analysis.md ← Parse images/PDFs/DOCX → code (1,200 tokens)
|
|
51
|
+
├── anti-patterns.md ← PII, cardinality, payload detection (2,800 tokens)
|
|
52
|
+
├── performance-prediction.md ← Frame budget, FPS prediction (1,500 tokens)
|
|
53
|
+
├── platform-excellence.md ← iOS 18+ vs Android 15+ UX (1,500 tokens)
|
|
54
|
+
├── version-management.md ← SDK compat matrix + release testing (3,500 tokens)
|
|
55
|
+
├── observability.md ← Sessions as 4th pillar (3,000 tokens)
|
|
56
|
+
├── common-pitfalls.md ← Known issue patterns (1,160 tokens)
|
|
57
|
+
├── release-checklist.md ← App Store/Play Store checklist (587 tokens)
|
|
58
|
+
│
|
|
59
|
+
├── ── TEMPLATES (copy to your project) ────────────────────
|
|
60
|
+
├── claude-md-template.md ← CLAUDE.md for Claude Code (copy to project root)
|
|
61
|
+
└── agent-rules-template.md ← Rules for ALL agents: Cursor/.cursorrules, Windsurf/.windsurfrules, Copilot/.github/copilot-instructions.md, Codex/AGENTS.md, Gemini/GEMINI.md, Antigravity YAML
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Token totals:**
|
|
65
|
+
- Smart load (1 platform + core shared): **~14,200 tokens** (11.1% of 128K)
|
|
66
|
+
- Full load (all files): **~41,700 tokens** (32.6% of 128K)
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## When Smart Load vs Full Load
|
|
71
|
+
|
|
72
|
+
### Smart Load (default — always used)
|
|
73
|
+
|
|
74
|
+
**Triggered by:** `@skill-mobile-mt` or `@skill-mobile-mt project`
|
|
75
|
+
|
|
76
|
+
**Loads automatically:**
|
|
77
|
+
```
|
|
78
|
+
SKILL.md (6,100 tokens)
|
|
79
|
+
+ 1 platform file (~1,600–5,100 tokens depending on platform)
|
|
80
|
+
+ shared/code-review.md (865 tokens)
|
|
81
|
+
+ shared/bug-detection.md (499 tokens)
|
|
82
|
+
+ shared/prompt-engineering.md (3,927 tokens)
|
|
83
|
+
─────────────────────────────────────────────────
|
|
84
|
+
≈ 14,200 tokens total
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Use case:** Regular coding, new features, code review. Covers 90% of daily work.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### On-Demand Load (triggered automatically by task type)
|
|
92
|
+
|
|
93
|
+
The agent reads the task, then decides which extra file to load:
|
|
94
|
+
|
|
95
|
+
| Task the user asks for | File loaded |
|
|
96
|
+
|------------------------|-------------|
|
|
97
|
+
| "Fix this crash / build error" | `shared/error-recovery.md` |
|
|
98
|
+
| "Read this screenshot / PDF / DOCX" | `shared/document-analysis.md` |
|
|
99
|
+
| "Add analytics / logging / crash tracking" | `shared/anti-patterns.md` + `shared/observability.md` |
|
|
100
|
+
| "Build a FlatList / animation" | `shared/performance-prediction.md` |
|
|
101
|
+
| "Make it feel native on iOS/Android" | `shared/platform-excellence.md` |
|
|
102
|
+
| "Install this package / upgrade SDK" | `shared/version-management.md` |
|
|
103
|
+
| "Prepare for App Store / Play Store" | `shared/release-checklist.md` |
|
|
104
|
+
| "Weird issue, not sure why" | `shared/common-pitfalls.md` |
|
|
105
|
+
|
|
106
|
+
**Load cost:** +500 to +3,500 tokens per on-demand file.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
### Full Load (never automatic — AI reads all files)
|
|
111
|
+
|
|
112
|
+
**No automatic trigger.** Full load happens when the AI reads every file without being selective — either because it's over-eager, or because the user explicitly asks for it.
|
|
113
|
+
|
|
114
|
+
**Total:** ~41,700 tokens (32.6% of 128K, 20.9% of 200K)
|
|
115
|
+
|
|
116
|
+
**How it actually works:**
|
|
117
|
+
- `@skill-mobile-mt` only injects SKILL.md into context
|
|
118
|
+
- From there, the AI uses the `Read` tool to open additional files
|
|
119
|
+
- Smart load = AI reads selectively (only what the task needs)
|
|
120
|
+
- Full load = AI reads every file in shared/ + all platform files
|
|
121
|
+
|
|
122
|
+
**When full load makes sense:**
|
|
123
|
+
- User says "load everything" or "give me a full audit"
|
|
124
|
+
- New project setup where all patterns are relevant simultaneously
|
|
125
|
+
- Cross-platform (iOS + Android + RN) with all shared patterns needed
|
|
126
|
+
- Antigravity agent configured to load all files upfront
|
|
127
|
+
|
|
128
|
+
**When it's wasteful:**
|
|
129
|
+
- Single focused task ("fix this bug", "add this screen") — loads 3x more tokens than needed
|
|
130
|
+
- Single-platform projects — loading all 4 platform files is waste
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Antigravity Configuration
|
|
135
|
+
|
|
136
|
+
```yaml
|
|
137
|
+
skill:
|
|
138
|
+
name: skill-mobile-mt
|
|
139
|
+
version: "1.0.0"
|
|
140
|
+
author: buivietphi
|
|
141
|
+
category: engineering
|
|
142
|
+
tags:
|
|
143
|
+
- mobile
|
|
144
|
+
- react-native
|
|
145
|
+
- flutter
|
|
146
|
+
- ios
|
|
147
|
+
- android
|
|
148
|
+
- clean-architecture
|
|
149
|
+
- code-review
|
|
150
|
+
- senior
|
|
151
|
+
|
|
152
|
+
modes:
|
|
153
|
+
default:
|
|
154
|
+
description: "Use pre-built production patterns from 18 real mobile apps"
|
|
155
|
+
loads:
|
|
156
|
+
# Core — always
|
|
157
|
+
- SKILL.md
|
|
158
|
+
- "{detected-platform}/{platform}.md"
|
|
159
|
+
- shared/code-review.md
|
|
160
|
+
- shared/bug-detection.md
|
|
161
|
+
- shared/prompt-engineering.md
|
|
162
|
+
# On-demand — add based on task
|
|
163
|
+
# - shared/error-recovery.md
|
|
164
|
+
# - shared/anti-patterns.md
|
|
165
|
+
# - shared/performance-prediction.md
|
|
166
|
+
# - shared/platform-excellence.md
|
|
167
|
+
# - shared/version-management.md
|
|
168
|
+
# - shared/observability.md
|
|
169
|
+
# - shared/document-analysis.md
|
|
170
|
+
# - shared/release-checklist.md
|
|
171
|
+
# - shared/common-pitfalls.md
|
|
172
|
+
|
|
173
|
+
project:
|
|
174
|
+
description: "Read current project, adapt to its framework and conventions"
|
|
175
|
+
argument: "project"
|
|
176
|
+
loads:
|
|
177
|
+
- SKILL.md (Section: Project Adaptation)
|
|
178
|
+
- "{detected-platform}/{platform}.md"
|
|
179
|
+
- shared/code-review.md
|
|
180
|
+
- shared/bug-detection.md
|
|
181
|
+
- shared/prompt-engineering.md
|
|
182
|
+
|
|
183
|
+
platform_detection:
|
|
184
|
+
react-native:
|
|
185
|
+
detect: "package.json contains 'react-native' or 'expo'"
|
|
186
|
+
load: "react-native/react-native.md"
|
|
187
|
+
flutter:
|
|
188
|
+
detect: "pubspec.yaml exists"
|
|
189
|
+
load: "flutter/flutter.md"
|
|
190
|
+
ios:
|
|
191
|
+
detect: "*.xcodeproj or *.xcworkspace exists (without pubspec.yaml)"
|
|
192
|
+
load: "ios/ios-native.md"
|
|
193
|
+
android:
|
|
194
|
+
detect: "build.gradle exists (without package.json or pubspec.yaml)"
|
|
195
|
+
load: "android/android-native.md"
|
|
196
|
+
|
|
197
|
+
language_detection:
|
|
198
|
+
typescript: ".tsx/.ts files in src/"
|
|
199
|
+
javascript: ".jsx/.js files in src/"
|
|
200
|
+
dart: ".dart files in lib/"
|
|
201
|
+
swift: ".swift files"
|
|
202
|
+
kotlin: ".kt files"
|
|
203
|
+
java: ".java files in app/src/"
|
|
204
|
+
|
|
205
|
+
context_budget:
|
|
206
|
+
max_tokens: 41700
|
|
207
|
+
smart_load_tokens: 14200
|
|
208
|
+
savings: "~66%"
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## File Loading Rules for All Agents
|
|
214
|
+
|
|
215
|
+
### Smart Loading Protocol
|
|
216
|
+
|
|
217
|
+
Every agent MUST follow this loading sequence:
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
1. ALWAYS load: SKILL.md (entry point, auto-detect, universal principles)
|
|
221
|
+
|
|
222
|
+
2. AUTO-DETECT project:
|
|
223
|
+
- Framework (React Native / Flutter / iOS / Android)
|
|
224
|
+
- Language (TypeScript / JavaScript / Dart / Swift / Kotlin / Java)
|
|
225
|
+
- Package manager (yarn / npm / pnpm / bun / flutter pub / pod)
|
|
226
|
+
- State management
|
|
227
|
+
- Navigation
|
|
228
|
+
|
|
229
|
+
3. LOAD the matching platform subfolder:
|
|
230
|
+
- react-native/react-native.md (only if RN/Expo)
|
|
231
|
+
- flutter/flutter.md (only if Flutter)
|
|
232
|
+
- ios/ios-native.md (only if iOS native)
|
|
233
|
+
- android/android-native.md (only if Android native)
|
|
234
|
+
|
|
235
|
+
4. Cross-platform? Load multiple:
|
|
236
|
+
- Flutter → also load ios/ + android/ (native modules)
|
|
237
|
+
- React Native → also load ios/ + android/ (native modules)
|
|
238
|
+
|
|
239
|
+
5. ALWAYS load shared/ (core):
|
|
240
|
+
- shared/code-review.md
|
|
241
|
+
- shared/bug-detection.md
|
|
242
|
+
- shared/prompt-engineering.md
|
|
243
|
+
|
|
244
|
+
6. LOAD shared/ (on-demand, based on task):
|
|
245
|
+
- shared/error-recovery.md (when debugging build/runtime errors)
|
|
246
|
+
- shared/document-analysis.md (when reading images, PDFs, DOCX)
|
|
247
|
+
- shared/anti-patterns.md (when reviewing or writing observability code)
|
|
248
|
+
- shared/performance-prediction.md (when building lists, animations, heavy screens)
|
|
249
|
+
- shared/platform-excellence.md (when implementing platform-specific UX)
|
|
250
|
+
- shared/version-management.md (when installing packages or upgrading SDK)
|
|
251
|
+
- shared/observability.md (when adding logging, analytics, crash tracking)
|
|
252
|
+
- shared/common-pitfalls.md (when encountering unfamiliar errors)
|
|
253
|
+
- shared/release-checklist.md (when preparing for App Store/Play Store submission)
|
|
254
|
+
|
|
255
|
+
7. SKIP non-matching platform subfolders (saves ~66% context)
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Loading Priority
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
Priority 1 (CRITICAL): SKILL.md — Auto-detect, mode selection, principles
|
|
262
|
+
Priority 2 (HIGH): {platform}/{platform}.md — Framework-specific patterns
|
|
263
|
+
Priority 3 (MEDIUM): shared/code-review.md — Review checklist
|
|
264
|
+
Priority 4 (MEDIUM): shared/bug-detection.md — Auto-scanner
|
|
265
|
+
Priority 5 (MEDIUM): shared/prompt-engineering.md — Auto-think templates
|
|
266
|
+
Priority 6 (ON-DEMAND): shared/error-recovery.md — Build/runtime error fixes
|
|
267
|
+
Priority 6 (ON-DEMAND): shared/anti-patterns.md — PII, cardinality, payload detection
|
|
268
|
+
Priority 6 (ON-DEMAND): shared/performance-prediction.md — Frame budget calculations
|
|
269
|
+
Priority 6 (ON-DEMAND): shared/platform-excellence.md — iOS 18+ vs Android 15+ UX
|
|
270
|
+
Priority 6 (ON-DEMAND): shared/version-management.md — SDK compatibility matrix
|
|
271
|
+
Priority 6 (ON-DEMAND): shared/observability.md — Sessions as 4th pillar
|
|
272
|
+
Priority 6 (ON-DEMAND): shared/document-analysis.md — Parse images/PDFs → code
|
|
273
|
+
Priority 6 (ON-DEMAND): shared/release-checklist.md — Pre-release verification
|
|
274
|
+
Priority 6 (ON-DEMAND): shared/common-pitfalls.md — Known issue patterns
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Agent-Specific Behavior
|
|
280
|
+
|
|
281
|
+
### Claude Code
|
|
282
|
+
- Supports `$ARGUMENTS` — use `project` to trigger project mode
|
|
283
|
+
- Can invoke sub-files via Read tool from subfolders
|
|
284
|
+
- Full tool access for project scanning and auto-detect
|
|
285
|
+
|
|
286
|
+
### Codex
|
|
287
|
+
- Load SKILL.md as system context or prepend to conversation
|
|
288
|
+
- Reference subfolder files with Read tool when needed
|
|
289
|
+
- Use `project` keyword to trigger project adaptation mode
|
|
290
|
+
|
|
291
|
+
### Gemini CLI
|
|
292
|
+
- Load SKILL.md as system context
|
|
293
|
+
- Parse mode from user prompt ("use project mode" or default)
|
|
294
|
+
- Reference subfolder files as needed
|
|
295
|
+
|
|
296
|
+
### Kimi
|
|
297
|
+
- Load SKILL.md as knowledge base
|
|
298
|
+
- Supports both Chinese and English prompts
|
|
299
|
+
- Think blocks use `【思考】` format
|
|
300
|
+
|
|
301
|
+
### Cursor / Copilot / Windsurf
|
|
302
|
+
- Auto-loaded when skill directory detected in workspace
|
|
303
|
+
- Mode determined by presence of project files in workspace
|
|
304
|
+
- Think blocks embedded as comments before code
|
|
305
|
+
|
|
306
|
+
### Antigravity
|
|
307
|
+
- Orchestrator loads based on detected project type
|
|
308
|
+
- Follows `platform_detection` rules above
|
|
309
|
+
- Respects `context_budget` limits
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Project-Level Rules (Auto-Loaded Per Agent)
|
|
314
|
+
|
|
315
|
+
Each agent reads a specific file from the **user's project root** every session.
|
|
316
|
+
These are separate from the skill files — they go in the user's project, not in skill-mobile-mt/.
|
|
317
|
+
|
|
318
|
+
| Agent | File | Location |
|
|
319
|
+
|-------|------|----------|
|
|
320
|
+
| Claude Code | `CLAUDE.md` | Project root |
|
|
321
|
+
| Cursor | `.cursorrules` | Project root |
|
|
322
|
+
| Windsurf | `.windsurfrules` | Project root |
|
|
323
|
+
| GitHub Copilot | `.github/copilot-instructions.md` | `.github/` folder |
|
|
324
|
+
| Codex | `AGENTS.md` | Project root |
|
|
325
|
+
| Gemini CLI | `GEMINI.md` | Project root |
|
|
326
|
+
| Kimi | No auto-load — paste as context | — |
|
|
327
|
+
| Antigravity | YAML `context.rules` field | Antigravity config |
|
|
328
|
+
|
|
329
|
+
**Templates for all agents:** `shared/agent-rules-template.md`
|
|
330
|
+
Copy the relevant section to your project to enable auto-check rules in every session.
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
# After installing skill-mobile-mt, find the templates at:
|
|
334
|
+
~/.claude/skills/skill-mobile-mt/shared/agent-rules-template.md
|
|
335
|
+
~/.claude/skills/skill-mobile-mt/shared/claude-md-template.md
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Installation Paths
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
# Claude Code (global)
|
|
344
|
+
~/.claude/skills/skill-mobile-mt/
|
|
345
|
+
|
|
346
|
+
# Claude Code (project-local)
|
|
347
|
+
.claude/skills/skill-mobile-mt/
|
|
348
|
+
|
|
349
|
+
# Codex
|
|
350
|
+
~/.codex/skills/skill-mobile-mt/
|
|
351
|
+
|
|
352
|
+
# Gemini CLI
|
|
353
|
+
~/.gemini/skills/skill-mobile-mt/
|
|
354
|
+
|
|
355
|
+
# Kimi
|
|
356
|
+
~/.kimi/skills/skill-mobile-mt/
|
|
357
|
+
|
|
358
|
+
# Cursor
|
|
359
|
+
~/.cursor/skills/skill-mobile-mt/
|
|
360
|
+
|
|
361
|
+
# Windsurf
|
|
362
|
+
~/.windsurf/skills/skill-mobile-mt/
|
|
363
|
+
|
|
364
|
+
# Copilot
|
|
365
|
+
~/.copilot/skills/skill-mobile-mt/
|
|
366
|
+
|
|
367
|
+
# Antigravity (shared agent directory)
|
|
368
|
+
~/.agents/skills/skill-mobile-mt/
|
|
369
|
+
|
|
370
|
+
# Custom path
|
|
371
|
+
npx @buivietphi/skill-mobile-mt --path /your/custom/path
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## Metadata
|
|
377
|
+
|
|
378
|
+
```json
|
|
379
|
+
{
|
|
380
|
+
"id": "skill-mobile-mt",
|
|
381
|
+
"name": "skill-mobile-mt",
|
|
382
|
+
"version": "1.0.0",
|
|
383
|
+
"author": "buivietphi",
|
|
384
|
+
"category": "engineering",
|
|
385
|
+
"description": "Master Senior Mobile Engineer. Pre-built patterns from 18 production apps + project adaptation. Auto-detects language and framework. React Native, Flutter, iOS, Android.",
|
|
386
|
+
"risk": "low",
|
|
387
|
+
"source": "buivietphi (MIT)",
|
|
388
|
+
"platforms": ["react-native", "flutter", "ios", "android"],
|
|
389
|
+
"languages": ["typescript", "javascript", "dart", "swift", "kotlin", "java"],
|
|
390
|
+
"agents": ["claude-code", "codex", "gemini", "kimi", "cursor", "copilot", "windsurf", "antigravity"]
|
|
391
|
+
}
|
|
392
|
+
```
|
package/README.md
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# @buivietphi/skill-mobile-mt
|
|
2
|
+
|
|
3
|
+
**Master Senior Mobile Engineer** — AI skill for Claude Code, Codex, Gemini CLI, Kimi, Cursor, Copilot, Windsurf, and Antigravity.
|
|
4
|
+
|
|
5
|
+
Pre-built architecture patterns from **18 production mobile apps + 4 production open-source skills** + auto-adaptation to your current project.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @buivietphi/skill-mobile-mt
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Interactive mode — detects which AI agents are installed and prompts you.
|
|
14
|
+
|
|
15
|
+
### Install to specific agents
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx @buivietphi/skill-mobile-mt --claude # Claude Code only
|
|
19
|
+
npx @buivietphi/skill-mobile-mt --codex # Codex only
|
|
20
|
+
npx @buivietphi/skill-mobile-mt --gemini # Gemini CLI only
|
|
21
|
+
npx @buivietphi/skill-mobile-mt --kimi # Kimi only
|
|
22
|
+
npx @buivietphi/skill-mobile-mt --antigravity # Antigravity only
|
|
23
|
+
npx @buivietphi/skill-mobile-mt --all # All detected agents
|
|
24
|
+
npx @buivietphi/skill-mobile-mt --path ./dir # Custom directory
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
### Mode 1: Pre-Built Architecture (default)
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
@skill-mobile-mt
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Uses battle-tested patterns extracted from real production apps:
|
|
36
|
+
- **10 React Native apps** — Redux, MobX, Apollo/GraphQL, React Navigation
|
|
37
|
+
- **3 Flutter apps** — Riverpod, Clean Architecture, Dio, GoRouter
|
|
38
|
+
- **4 Android Native apps** — Multi-module Gradle, Hilt, Compose, Room
|
|
39
|
+
- **1 iOS Native app** — Swift, MVVM, CocoaPods, Combine
|
|
40
|
+
|
|
41
|
+
### Mode 2: Adapt to Your Project (project)
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
@skill-mobile-mt project
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Reads your current project first, then follows **your** conventions:
|
|
48
|
+
- Detects framework, language, package manager, state management, navigation
|
|
49
|
+
- Matches your naming, imports, file structure, patterns
|
|
50
|
+
- Never suggests migrations or imposes different architecture
|
|
51
|
+
|
|
52
|
+
## Auto-Detect
|
|
53
|
+
|
|
54
|
+
The skill automatically detects before any action:
|
|
55
|
+
|
|
56
|
+
| What | How |
|
|
57
|
+
|------|-----|
|
|
58
|
+
| **Framework** | `pubspec.yaml` → Flutter, `package.json` with `react-native` → RN, `*.xcodeproj` → iOS, `build.gradle` → Android |
|
|
59
|
+
| **Language** | `.dart` → Dart, `.tsx/.ts` → TypeScript, `.swift` → Swift, `.kt` → Kotlin |
|
|
60
|
+
| **Package Manager** | `yarn.lock` → yarn, `pnpm-lock.yaml` → pnpm, `package-lock.json` → npm, `pubspec.lock` → flutter pub |
|
|
61
|
+
| **State Management** | Redux / MobX / Zustand / Riverpod / BLoC / StateFlow / Combine |
|
|
62
|
+
| **Navigation** | React Navigation / Expo Router / GoRouter / NavigationStack |
|
|
63
|
+
|
|
64
|
+
## Smart Loading
|
|
65
|
+
|
|
66
|
+
Only loads the relevant platform docs — saves **~60% context tokens**.
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Flutter project?
|
|
70
|
+
→ Load: flutter/flutter.md + ios/ + android/ + shared/
|
|
71
|
+
→ Skip: react-native/
|
|
72
|
+
|
|
73
|
+
React Native project?
|
|
74
|
+
→ Load: react-native/react-native.md + ios/ + android/ + shared/
|
|
75
|
+
→ Skip: flutter/
|
|
76
|
+
|
|
77
|
+
iOS only?
|
|
78
|
+
→ Load: ios/ios-native.md + shared/
|
|
79
|
+
→ Skip: flutter/ + react-native/ + android/
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Context Cost
|
|
83
|
+
|
|
84
|
+
| Scenario | Tokens | % of 128K | % of 200K |
|
|
85
|
+
|----------|-------:|----------:|----------:|
|
|
86
|
+
| SKILL.md only | ~6,100 | 4.8% | 3.1% |
|
|
87
|
+
| + 1 platform + core shared/ | ~14,200 | 11.1% | 7.1% |
|
|
88
|
+
| Cross-platform (RN/Flutter + iOS + Android) | ~18,200 | 14.2% | 9.1% |
|
|
89
|
+
| All files loaded | ~41,700 | 32.6% | 20.9% |
|
|
90
|
+
| **Smart load (recommended)** | **~14,200** | **11.1%** | **7.1%** |
|
|
91
|
+
|
|
92
|
+
### Per-file token breakdown
|
|
93
|
+
|
|
94
|
+
| File | Tokens |
|
|
95
|
+
|------|-------:|
|
|
96
|
+
| `SKILL.md` | 6,100 |
|
|
97
|
+
| `AGENTS.md` | 1,541 |
|
|
98
|
+
| `react-native/react-native.md` | 5,108 |
|
|
99
|
+
| `flutter/flutter.md` | 1,617 |
|
|
100
|
+
| `ios/ios-native.md` | 1,452 |
|
|
101
|
+
| `android/android-native.md` | 1,659 |
|
|
102
|
+
| `shared/code-review.md` | 865 |
|
|
103
|
+
| `shared/bug-detection.md` | 499 |
|
|
104
|
+
| `shared/prompt-engineering.md` | 3,927 |
|
|
105
|
+
| `shared/common-pitfalls.md` | 1,160 |
|
|
106
|
+
| `shared/error-recovery.md` | 2,435 |
|
|
107
|
+
| `shared/document-analysis.md` | 1,200 |
|
|
108
|
+
| `shared/release-checklist.md` | 587 |
|
|
109
|
+
| `shared/anti-patterns.md` | 2,800 |
|
|
110
|
+
| `shared/performance-prediction.md` | 1,500 |
|
|
111
|
+
| `shared/platform-excellence.md` | 1,500 |
|
|
112
|
+
| `shared/version-management.md` | 3,500 |
|
|
113
|
+
| `shared/observability.md` | 3,000 |
|
|
114
|
+
| **Total** | **~41,700** |
|
|
115
|
+
|
|
116
|
+
## Installed Structure
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
~/.claude/skills/ (or ~/.gemini/skills/, ~/.agents/skills/, etc.)
|
|
120
|
+
└── skill-mobile-mt/
|
|
121
|
+
├── SKILL.md Entry point + auto-detect
|
|
122
|
+
├── AGENTS.md Multi-agent compatibility
|
|
123
|
+
├── react-native/
|
|
124
|
+
│ └── react-native.md React Native patterns
|
|
125
|
+
├── flutter/
|
|
126
|
+
│ └── flutter.md Flutter patterns
|
|
127
|
+
├── ios/
|
|
128
|
+
│ └── ios-native.md iOS Swift patterns
|
|
129
|
+
├── android/
|
|
130
|
+
│ └── android-native.md Android Kotlin patterns
|
|
131
|
+
└── shared/
|
|
132
|
+
├── code-review.md Senior review checklist
|
|
133
|
+
├── bug-detection.md Auto bug scanner
|
|
134
|
+
├── prompt-engineering.md Intelligent prompt generation
|
|
135
|
+
├── common-pitfalls.md Problem → Symptoms → Solution
|
|
136
|
+
├── error-recovery.md Fix build/runtime errors
|
|
137
|
+
├── document-analysis.md Parse docs/images → code
|
|
138
|
+
├── anti-patterns.md PII, cardinality, payload detection
|
|
139
|
+
├── performance-prediction.md Predict FPS/memory BEFORE shipping
|
|
140
|
+
├── platform-excellence.md iOS 18+ vs Android 15+ guidelines
|
|
141
|
+
├── version-management.md SDK compatibility matrix + release testing
|
|
142
|
+
├── observability.md Sessions as 4th pillar, context-rich events
|
|
143
|
+
└── release-checklist.md Pre-release verification
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## What's Included
|
|
147
|
+
|
|
148
|
+
### Clean Architecture & SOLID
|
|
149
|
+
- Dependencies flow inward (UI → Domain → Data)
|
|
150
|
+
- Single responsibility per file (max 300 lines)
|
|
151
|
+
- Dependency injection, no hardcoded singletons
|
|
152
|
+
|
|
153
|
+
### Code Review Protocol
|
|
154
|
+
- Architecture, correctness, performance, security, platform checklists
|
|
155
|
+
- Severity levels: Critical / High / Medium / Low
|
|
156
|
+
- Auto-fail patterns (console.log in production, hardcoded secrets, empty catch blocks)
|
|
157
|
+
|
|
158
|
+
### Bug Detection Scanner
|
|
159
|
+
- Crash risks, memory leaks, race conditions
|
|
160
|
+
- Security vulnerabilities, performance issues, UX problems
|
|
161
|
+
- Platform-specific detection rules
|
|
162
|
+
|
|
163
|
+
### Advanced AI Patterns (from Windsurf, Cursor, Devin, Cline)
|
|
164
|
+
- **Status Update Pattern**: Brief progress notes before tool use (no monologues)
|
|
165
|
+
- **Execution Modes**: Discovery → Implementation → Completion (prevents thrashing)
|
|
166
|
+
- **Pre-Action Validation**: Think blocks verify parameters before acting
|
|
167
|
+
- **Error Recovery Protocol**: Max 3 attempts with fallbacks, then ask user
|
|
168
|
+
- **Mobile Context Capture**: Platform, SDK, device, native modules, permissions
|
|
169
|
+
- **Build & Deploy Gates**: Platform-specific pre-completion checklists
|
|
170
|
+
- **Mobile Anti-Patterns**: Common mistakes from AI tools (and how to avoid them)
|
|
171
|
+
|
|
172
|
+
### Intelligent Prompt Engineering
|
|
173
|
+
- XML tag structure for clarity (`<task>`, `<context>`, `<instructions>`, `<constraints>`)
|
|
174
|
+
- Enhanced auto-think templates with pre-action validation
|
|
175
|
+
- Progressive context loading (5 levels: overview → pattern → files → docs → expert)
|
|
176
|
+
- Just-in-time file reading (grep first, read only needed)
|
|
177
|
+
- Reference pattern system (clone existing instead of reading docs)
|
|
178
|
+
- Multi-AI format support (Claude, Gemini, Kimi, Cursor, Copilot, Windsurf)
|
|
179
|
+
|
|
180
|
+
### Document Analysis
|
|
181
|
+
- Parse images (mockups, wireframes), PDFs (requirements), DOCX, XML, JSON
|
|
182
|
+
- UI Analysis: extract layout, components, styling, states from screenshots
|
|
183
|
+
- Requirements Extraction: user stories, screen flows, data models, business rules
|
|
184
|
+
- Document → Code pipeline: read → extract → map features → scaffold
|
|
185
|
+
|
|
186
|
+
### Production Patterns (from Senaiverse, Mhuxain, VoltAgent, Nexus)
|
|
187
|
+
|
|
188
|
+
- **Anti-Pattern Detection** (`anti-patterns.md`): Detect PII leaks (CRITICAL), high cardinality tags, unbounded payloads, unstructured logs, sync telemetry on main thread — with auto-fix suggestions
|
|
189
|
+
- **Performance Prediction** (`performance-prediction.md`): Calculate frame budget, FlatList bridge calls, and memory usage BEFORE writing code. Example: `50 items × 3 bridge calls × 0.3ms = 45ms/frame → 22 FPS ❌ JANK`
|
|
190
|
+
- **Platform Excellence** (`platform-excellence.md`): iOS 18+ vs Android 15+ native UX standards — navigation patterns, typography, icons, gesture handling, performance targets (cold start < 1s iOS, < 1.5s Android)
|
|
191
|
+
- **Version Management** (`version-management.md`): Full SDK compatibility matrix for RN 0.73-0.76, Expo 50-52, Flutter 3.22-3.27, iOS 16-18, Android 13-15. Check SDK compat BEFORE `npm install`. Release-mode testing protocol.
|
|
192
|
+
- **Observability** (`observability.md`): Sessions as the 4th pillar (Metrics + Logs + Traces + **Sessions**). Session lifecycle, enrichment API, unified instrumentation stack, correlation queries. Every event carries `session_id` for full user journey reconstruction.
|
|
193
|
+
|
|
194
|
+
### Error Recovery
|
|
195
|
+
- 16 common build/runtime errors with concrete fixes
|
|
196
|
+
- Platform-specific solutions (RN CLI, Expo, Flutter, iOS, Android)
|
|
197
|
+
- General recovery protocol for systematic debugging
|
|
198
|
+
|
|
199
|
+
### Release & Review
|
|
200
|
+
- Pre-release checklist for App Store and Play Store submissions
|
|
201
|
+
- Common pitfalls with Problem → Symptoms → Solution format
|
|
202
|
+
- Security audit patterns
|
|
203
|
+
|
|
204
|
+
### Security Non-Negotiables
|
|
205
|
+
- No hardcoded secrets
|
|
206
|
+
- Secure token storage (Keychain / EncryptedSharedPreferences / SecureStore)
|
|
207
|
+
- Deep link validation, HTTPS only
|
|
208
|
+
|
|
209
|
+
## Supported Agents
|
|
210
|
+
|
|
211
|
+
| Agent | Install Path | Status |
|
|
212
|
+
|-------|-------------|--------|
|
|
213
|
+
| Claude Code | `~/.claude/skills/skill-mobile-mt/` | Full support |
|
|
214
|
+
| Codex | `~/.codex/skills/skill-mobile-mt/` | Full support |
|
|
215
|
+
| Gemini CLI | `~/.gemini/skills/skill-mobile-mt/` | Full support |
|
|
216
|
+
| Kimi | `~/.kimi/skills/skill-mobile-mt/` | Full support |
|
|
217
|
+
| Cursor | `~/.cursor/skills/skill-mobile-mt/` | Full support |
|
|
218
|
+
| Copilot | `~/.copilot/skills/skill-mobile-mt/` | Full support |
|
|
219
|
+
| Windsurf | `~/.windsurf/skills/skill-mobile-mt/` | Full support |
|
|
220
|
+
| Antigravity | `~/.agents/skills/skill-mobile-mt/` | Full support |
|
|
221
|
+
|
|
222
|
+
## License
|
|
223
|
+
|
|
224
|
+
MIT — by [buivietphi](https://github.com/buivietphi)
|