@buivietphi/skill-mobile-mt 1.2.0 → 1.4.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 +88 -34
- package/README.md +146 -32
- package/SKILL.md +345 -8
- package/android/android-native.md +50 -0
- package/bin/install.mjs +320 -25
- package/flutter/flutter.md +58 -0
- package/humanizer/humanizer-mobile.md +295 -0
- package/package.json +3 -2
- package/shared/code-review.md +12 -0
- package/shared/offline-first.md +377 -0
- package/shared/on-device-ai.md +175 -0
- package/shared/platform-excellence.md +85 -0
- package/shared/prompt-engineering.md +28 -0
- package/shared/version-management.md +17 -0
package/AGENTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Skill Mobile MT — Agent Rules
|
|
2
2
|
|
|
3
|
-
> Multi-agent compatibility layer for Claude Code, Codex, Gemini CLI, Kimi,
|
|
3
|
+
> Multi-agent compatibility layer for Claude Code, Cline, Roo Code, Cursor, Windsurf, Copilot, Codex, Gemini CLI, Kimi, Kilo Code, Kiro, Antigravity, and all Agent Skills-compatible tools.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -9,12 +9,16 @@
|
|
|
9
9
|
| Agent | How it loads rules | Setup | Think Block |
|
|
10
10
|
|-------|-------------------|-------|-------------|
|
|
11
11
|
| Claude Code | `~/.claude/skills/` (auto) | `npx skill-mobile-mt --claude` | `<think>...</think>` |
|
|
12
|
+
| **Cline** | **`.clinerules/` in project root** | **`npx skill-mobile-mt --init cline`** | Inline reasoning |
|
|
13
|
+
| **Roo Code** | **`.roo/rules/` in project root** | **`npx skill-mobile-mt --init roocode`** | Inline reasoning |
|
|
14
|
+
| **Cursor** | **`.cursorrules` in project root** | **`npx skill-mobile-mt --init cursor`** | Inline reasoning |
|
|
15
|
+
| **Windsurf** | **`.windsurfrules` in project root** | **`npx skill-mobile-mt --init windsurf`** | Inline reasoning |
|
|
16
|
+
| **Copilot** | **`.github/copilot-instructions.md`** | **`npx skill-mobile-mt --init copilot`** | `// PLAN:` comments |
|
|
12
17
|
| Codex | `~/.codex/skills/` (auto) | `npx skill-mobile-mt --codex` | `<think>...</think>` |
|
|
13
18
|
| Gemini CLI | `~/.gemini/skills/` (auto) | `npx skill-mobile-mt --gemini` | `## Thinking:` block |
|
|
14
19
|
| Kimi | `~/.kimi/skills/` (manual) | `npx skill-mobile-mt --kimi` | `【思考】` or markdown |
|
|
15
|
-
| **
|
|
16
|
-
| **
|
|
17
|
-
| **Windsurf** | **`.windsurfrules` in project root** | **`npx skill-mobile-mt --init windsurf`** | Inline reasoning |
|
|
20
|
+
| **Kilo Code** | **`.kilocode/rules/` in project root** | **`npx skill-mobile-mt --init kilocode`** | Inline reasoning |
|
|
21
|
+
| **Kiro** | **`.kiro/steering/` in project root** | **`npx skill-mobile-mt --init kiro`** | Inline reasoning |
|
|
18
22
|
| Antigravity | `~/.agents/skills/` (auto) | `npx skill-mobile-mt --antigravity` | Agent-native format |
|
|
19
23
|
|
|
20
24
|
---
|
|
@@ -30,13 +34,13 @@ skill-mobile-mt/
|
|
|
30
34
|
│ └── react-native.md ← RN + Expo patterns (5,108 tokens)
|
|
31
35
|
│
|
|
32
36
|
├── flutter/
|
|
33
|
-
│ └── flutter.md ← Flutter + Dart patterns (
|
|
37
|
+
│ └── flutter.md ← Flutter + Dart 3.x patterns (2,100 tokens)
|
|
34
38
|
│
|
|
35
39
|
├── ios/
|
|
36
40
|
│ └── ios-native.md ← Swift + UIKit/SwiftUI patterns (1,452 tokens)
|
|
37
41
|
│
|
|
38
42
|
├── android/
|
|
39
|
-
│ └── android-native.md ← Kotlin + Compose patterns (
|
|
43
|
+
│ └── android-native.md ← Kotlin + Compose patterns (2,100 tokens)
|
|
40
44
|
│
|
|
41
45
|
└── shared/
|
|
42
46
|
│
|
|
@@ -50,21 +54,24 @@ skill-mobile-mt/
|
|
|
50
54
|
├── document-analysis.md ← Parse images/PDFs/DOCX → code (1,200 tokens)
|
|
51
55
|
├── anti-patterns.md ← PII, cardinality, payload detection (2,800 tokens)
|
|
52
56
|
├── performance-prediction.md ← Frame budget, FPS prediction (1,500 tokens)
|
|
53
|
-
├── platform-excellence.md ← iOS 18+ vs Android 15+ UX (
|
|
57
|
+
├── platform-excellence.md ← iOS 18+ vs Android 15+ UX + HIG (2,200 tokens)
|
|
54
58
|
├── version-management.md ← SDK compat matrix + release testing (3,500 tokens)
|
|
55
59
|
├── observability.md ← Sessions as 4th pillar (3,000 tokens)
|
|
56
60
|
├── architecture-intelligence.md ← Patterns from 30+ production repos (4,500 tokens)
|
|
57
61
|
├── common-pitfalls.md ← Known issue patterns (1,160 tokens)
|
|
58
62
|
├── release-checklist.md ← App Store/Play Store checklist (587 tokens)
|
|
59
63
|
│
|
|
64
|
+
├── offline-first.md ← Local-first + sync patterns (2,566 tokens)
|
|
65
|
+
├── on-device-ai.md ← Core ML / TFLite / llama.cpp patterns (700 tokens)
|
|
66
|
+
│
|
|
60
67
|
├── ── TEMPLATES (copy to your project) ────────────────────
|
|
61
68
|
├── claude-md-template.md ← CLAUDE.md for Claude Code (copy to project root)
|
|
62
69
|
└── 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
|
|
63
70
|
```
|
|
64
71
|
|
|
65
72
|
**Token totals:**
|
|
66
|
-
- Smart load (1 platform + core shared): **~
|
|
67
|
-
- Full load (all files): **~
|
|
73
|
+
- Smart load (1 platform + core shared): **~38,600 tokens** (30.2% of 128K)
|
|
74
|
+
- Full load (all files): **~70,000 tokens** (54.7% of 128K)
|
|
68
75
|
|
|
69
76
|
---
|
|
70
77
|
|
|
@@ -76,13 +83,13 @@ skill-mobile-mt/
|
|
|
76
83
|
|
|
77
84
|
**Loads automatically:**
|
|
78
85
|
```
|
|
79
|
-
SKILL.md (
|
|
80
|
-
+ 1 platform file (~1,
|
|
81
|
-
+ shared/code-review.md (
|
|
82
|
-
+ shared/bug-detection.md (
|
|
83
|
-
+ shared/prompt-engineering.md (
|
|
86
|
+
SKILL.md (~13,200 tokens)
|
|
87
|
+
+ 1 platform file (~1,580–5,730 tokens depending on platform)
|
|
88
|
+
+ shared/code-review.md (~1,500 tokens)
|
|
89
|
+
+ shared/bug-detection.md (~800 tokens)
|
|
90
|
+
+ shared/prompt-engineering.md (~5,600 tokens)
|
|
84
91
|
─────────────────────────────────────────────────
|
|
85
|
-
≈
|
|
92
|
+
≈ 38,600 tokens total (estimated)
|
|
86
93
|
```
|
|
87
94
|
|
|
88
95
|
**Use case:** Regular coding, new features, code review. Covers 90% of daily work.
|
|
@@ -103,6 +110,7 @@ The agent reads the task, then decides which extra file to load:
|
|
|
103
110
|
| "Install this package / upgrade SDK" | `shared/version-management.md` |
|
|
104
111
|
| "Prepare for App Store / Play Store" | `shared/release-checklist.md` |
|
|
105
112
|
| "Weird issue, not sure why" | `shared/common-pitfalls.md` |
|
|
113
|
+
| "On-device AI / ML / inference" | `shared/on-device-ai.md` |
|
|
106
114
|
|
|
107
115
|
**Load cost:** +500 to +3,500 tokens per on-demand file.
|
|
108
116
|
|
|
@@ -112,7 +120,7 @@ The agent reads the task, then decides which extra file to load:
|
|
|
112
120
|
|
|
113
121
|
**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.
|
|
114
122
|
|
|
115
|
-
**Total:** ~
|
|
123
|
+
**Total:** ~70,000 tokens (54.7% of 128K, 35% of 200K)
|
|
116
124
|
|
|
117
125
|
**How it actually works:**
|
|
118
126
|
- `@skill-mobile-mt` only injects SKILL.md into context
|
|
@@ -137,7 +145,7 @@ The agent reads the task, then decides which extra file to load:
|
|
|
137
145
|
```yaml
|
|
138
146
|
skill:
|
|
139
147
|
name: skill-mobile-mt
|
|
140
|
-
version: "1.
|
|
148
|
+
version: "1.4.0"
|
|
141
149
|
author: buivietphi
|
|
142
150
|
category: engineering
|
|
143
151
|
tags:
|
|
@@ -170,6 +178,7 @@ skill:
|
|
|
170
178
|
# - shared/document-analysis.md
|
|
171
179
|
# - shared/release-checklist.md
|
|
172
180
|
# - shared/common-pitfalls.md
|
|
181
|
+
# - shared/on-device-ai.md
|
|
173
182
|
|
|
174
183
|
project:
|
|
175
184
|
description: "Read current project, adapt to its framework and conventions"
|
|
@@ -204,9 +213,9 @@ skill:
|
|
|
204
213
|
java: ".java files in app/src/"
|
|
205
214
|
|
|
206
215
|
context_budget:
|
|
207
|
-
max_tokens:
|
|
208
|
-
smart_load_tokens:
|
|
209
|
-
savings: "~
|
|
216
|
+
max_tokens: 70000
|
|
217
|
+
smart_load_tokens: 38600
|
|
218
|
+
savings: "~45%"
|
|
210
219
|
```
|
|
211
220
|
|
|
212
221
|
---
|
|
@@ -252,6 +261,7 @@ Every agent MUST follow this loading sequence:
|
|
|
252
261
|
- shared/observability.md (when adding logging, analytics, crash tracking)
|
|
253
262
|
- shared/common-pitfalls.md (when encountering unfamiliar errors)
|
|
254
263
|
- shared/release-checklist.md (when preparing for App Store/Play Store submission)
|
|
264
|
+
- shared/on-device-ai.md (when adding Core ML / TFLite / on-device inference)
|
|
255
265
|
|
|
256
266
|
7. SKIP non-matching platform subfolders (saves ~66% context)
|
|
257
267
|
```
|
|
@@ -273,6 +283,7 @@ Priority 6 (ON-DEMAND): shared/observability.md — Sessions as 4th pillar
|
|
|
273
283
|
Priority 6 (ON-DEMAND): shared/document-analysis.md — Parse images/PDFs → code
|
|
274
284
|
Priority 6 (ON-DEMAND): shared/release-checklist.md — Pre-release verification
|
|
275
285
|
Priority 6 (ON-DEMAND): shared/common-pitfalls.md — Known issue patterns
|
|
286
|
+
Priority 6 (ON-DEMAND): shared/on-device-ai.md — Core ML / TFLite / llama.cpp
|
|
276
287
|
```
|
|
277
288
|
|
|
278
289
|
---
|
|
@@ -299,24 +310,51 @@ Priority 6 (ON-DEMAND): shared/common-pitfalls.md — Known issue patterns
|
|
|
299
310
|
- Supports both Chinese and English prompts
|
|
300
311
|
- Think blocks use `【思考】` format
|
|
301
312
|
|
|
313
|
+
### Cline
|
|
314
|
+
- Reads `.clinerules/` directory from project root (also supports `.clinerules` single file)
|
|
315
|
+
- Also reads from `~/.cline/skills/` for global skills
|
|
316
|
+
- Run `npx @buivietphi/skill-mobile-mt --init cline` to generate `.clinerules/mobile-rules.md`
|
|
317
|
+
- Supports conditional rules with YAML frontmatter `paths:` field
|
|
318
|
+
|
|
319
|
+
### Roo Code
|
|
320
|
+
- Reads `.roo/rules/` directory from project root (recursive, multi-file)
|
|
321
|
+
- Also reads from `~/.roo/skills/` for global skills
|
|
322
|
+
- Supports mode-specific rules: `.roo/rules-code/`, `.roo/rules-architect/`
|
|
323
|
+
- Run `npx @buivietphi/skill-mobile-mt --init roocode` to generate `.roo/rules/mobile-rules.md`
|
|
324
|
+
- Auto-loads `AGENTS.md` from workspace root
|
|
325
|
+
|
|
302
326
|
### Cursor
|
|
303
|
-
-
|
|
304
|
-
- Run `npx @buivietphi/skill-mobile-mt --init cursor`
|
|
327
|
+
- Reads `.cursorrules` from project root
|
|
328
|
+
- Run `npx @buivietphi/skill-mobile-mt --init cursor` to generate `.cursorrules`
|
|
305
329
|
- The generated file includes auto-detected framework, rules, and security patterns
|
|
306
330
|
- Think blocks embedded as inline reasoning in Composer
|
|
307
331
|
|
|
308
332
|
### GitHub Copilot
|
|
309
|
-
-
|
|
310
|
-
- Run `npx @buivietphi/skill-mobile-mt --init copilot`
|
|
333
|
+
- Reads `.github/copilot-instructions.md` from project
|
|
334
|
+
- Run `npx @buivietphi/skill-mobile-mt --init copilot` to generate the file
|
|
311
335
|
- The generated file includes code patterns, required templates, and rules
|
|
312
336
|
- Think blocks as `// PLAN:` comments before code
|
|
313
337
|
|
|
314
338
|
### Windsurf
|
|
315
|
-
-
|
|
316
|
-
- Run `npx @buivietphi/skill-mobile-mt --init windsurf`
|
|
339
|
+
- Reads `.windsurfrules` from project root
|
|
340
|
+
- Run `npx @buivietphi/skill-mobile-mt --init windsurf` to generate `.windsurfrules`
|
|
317
341
|
- The generated file includes coding rules, security rules, and architecture patterns
|
|
318
342
|
- Think blocks as inline reasoning
|
|
319
343
|
|
|
344
|
+
### Kilo Code
|
|
345
|
+
- Reads `.kilocode/rules/` directory from project root
|
|
346
|
+
- Also reads from `~/.kilocode/rules/` for global rules
|
|
347
|
+
- Supports mode-specific rules: `.kilocode/rules-code/`, `.kilocode/rules-architect/`
|
|
348
|
+
- Run `npx @buivietphi/skill-mobile-mt --init kilocode` to generate `.kilocode/rules/mobile-rules.md`
|
|
349
|
+
- Auto-loads `AGENTS.md` from workspace root
|
|
350
|
+
|
|
351
|
+
### Kiro (AWS)
|
|
352
|
+
- Reads `.kiro/steering/` directory from project root
|
|
353
|
+
- Also reads from `~/.kiro/steering/` for global steering
|
|
354
|
+
- Uses YAML frontmatter with `inclusion: always|fileMatch|manual|auto`
|
|
355
|
+
- Run `npx @buivietphi/skill-mobile-mt --init kiro` to generate `.kiro/steering/mobile-rules.md`
|
|
356
|
+
- Separate specs system in `.kiro/specs/` for feature development
|
|
357
|
+
|
|
320
358
|
### Antigravity
|
|
321
359
|
- Orchestrator loads based on detected project type
|
|
322
360
|
- Follows `platform_detection` rules above
|
|
@@ -332,12 +370,16 @@ These are separate from the skill files — they go in the user's project, not i
|
|
|
332
370
|
| Agent | File | Location |
|
|
333
371
|
|-------|------|----------|
|
|
334
372
|
| Claude Code | `CLAUDE.md` | Project root |
|
|
373
|
+
| Cline | `.clinerules/` directory | Project root |
|
|
374
|
+
| Roo Code | `.roo/rules/` directory | Project root |
|
|
335
375
|
| Cursor | `.cursorrules` | Project root |
|
|
336
376
|
| Windsurf | `.windsurfrules` | Project root |
|
|
337
377
|
| GitHub Copilot | `.github/copilot-instructions.md` | `.github/` folder |
|
|
338
378
|
| Codex | `AGENTS.md` | Project root |
|
|
339
379
|
| Gemini CLI | `GEMINI.md` | Project root |
|
|
340
380
|
| Kimi | No auto-load — paste as context | — |
|
|
381
|
+
| Kilo Code | `.kilocode/rules/` directory | Project root |
|
|
382
|
+
| Kiro | `.kiro/steering/` directory | Project root |
|
|
341
383
|
| Antigravity | YAML `context.rules` field | Antigravity config |
|
|
342
384
|
|
|
343
385
|
**Templates for all agents:** `shared/agent-rules-template.md`
|
|
@@ -356,11 +398,14 @@ Copy the relevant section to your project to enable auto-check rules in every se
|
|
|
356
398
|
### Skill directory install (agents that read from skills/)
|
|
357
399
|
|
|
358
400
|
```bash
|
|
359
|
-
# Claude Code
|
|
401
|
+
# Claude Code
|
|
360
402
|
~/.claude/skills/skill-mobile-mt/
|
|
361
403
|
|
|
362
|
-
#
|
|
363
|
-
|
|
404
|
+
# Cline
|
|
405
|
+
~/.cline/skills/skill-mobile-mt/
|
|
406
|
+
|
|
407
|
+
# Roo Code
|
|
408
|
+
~/.roo/skills/skill-mobile-mt/
|
|
364
409
|
|
|
365
410
|
# Codex
|
|
366
411
|
~/.codex/skills/skill-mobile-mt/
|
|
@@ -371,6 +416,12 @@ Copy the relevant section to your project to enable auto-check rules in every se
|
|
|
371
416
|
# Kimi
|
|
372
417
|
~/.kimi/skills/skill-mobile-mt/
|
|
373
418
|
|
|
419
|
+
# Kilo Code
|
|
420
|
+
~/.kilocode/skills/skill-mobile-mt/
|
|
421
|
+
|
|
422
|
+
# Kiro
|
|
423
|
+
~/.kiro/skills/skill-mobile-mt/
|
|
424
|
+
|
|
374
425
|
# Antigravity (shared agent directory)
|
|
375
426
|
~/.agents/skills/skill-mobile-mt/
|
|
376
427
|
|
|
@@ -380,8 +431,7 @@ npx @buivietphi/skill-mobile-mt --path /your/custom/path
|
|
|
380
431
|
|
|
381
432
|
### Project-level files (agents that read from project root)
|
|
382
433
|
|
|
383
|
-
These agents read rules from project-level files
|
|
384
|
-
Use `--init` to generate them:
|
|
434
|
+
These agents read rules from project-level files. Use `--init` to generate them:
|
|
385
435
|
|
|
386
436
|
```bash
|
|
387
437
|
# Generate all project-level files (interactive selector)
|
|
@@ -389,9 +439,13 @@ npx @buivietphi/skill-mobile-mt --init
|
|
|
389
439
|
|
|
390
440
|
# Generate specific agent file
|
|
391
441
|
npx @buivietphi/skill-mobile-mt --init cursor # → .cursorrules
|
|
442
|
+
npx @buivietphi/skill-mobile-mt --init cline # → .clinerules/mobile-rules.md
|
|
443
|
+
npx @buivietphi/skill-mobile-mt --init roocode # → .roo/rules/mobile-rules.md
|
|
392
444
|
npx @buivietphi/skill-mobile-mt --init copilot # → .github/copilot-instructions.md
|
|
393
445
|
npx @buivietphi/skill-mobile-mt --init windsurf # → .windsurfrules
|
|
394
|
-
npx @buivietphi/skill-mobile-mt --init
|
|
446
|
+
npx @buivietphi/skill-mobile-mt --init kilocode # → .kilocode/rules/mobile-rules.md
|
|
447
|
+
npx @buivietphi/skill-mobile-mt --init kiro # → .kiro/steering/mobile-rules.md
|
|
448
|
+
npx @buivietphi/skill-mobile-mt --init all # → all files
|
|
395
449
|
```
|
|
396
450
|
|
|
397
451
|
**What `--init` does:**
|
|
@@ -408,7 +462,7 @@ npx @buivietphi/skill-mobile-mt --init all # → all three files
|
|
|
408
462
|
{
|
|
409
463
|
"id": "skill-mobile-mt",
|
|
410
464
|
"name": "skill-mobile-mt",
|
|
411
|
-
"version": "1.
|
|
465
|
+
"version": "1.4.0",
|
|
412
466
|
"author": "buivietphi",
|
|
413
467
|
"category": "engineering",
|
|
414
468
|
"description": "Master Senior Mobile Engineer. Pre-built patterns from 18 production apps + project adaptation. Auto-detects language and framework. React Native, Flutter, iOS, Android.",
|
|
@@ -416,6 +470,6 @@ npx @buivietphi/skill-mobile-mt --init all # → all three files
|
|
|
416
470
|
"source": "buivietphi (MIT)",
|
|
417
471
|
"platforms": ["react-native", "flutter", "ios", "android"],
|
|
418
472
|
"languages": ["typescript", "javascript", "dart", "swift", "kotlin", "java"],
|
|
419
|
-
"agents": ["claude-code", "
|
|
473
|
+
"agents": ["claude-code", "cline", "roo-code", "cursor", "windsurf", "copilot", "codex", "gemini", "kimi", "kilo-code", "kiro", "antigravity"]
|
|
420
474
|
}
|
|
421
475
|
```
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @buivietphi/skill-mobile-mt
|
|
2
2
|
|
|
3
|
-
**Master Senior Mobile Engineer** — AI skill for Claude Code, Codex, Gemini CLI, Kimi,
|
|
3
|
+
**Master Senior Mobile Engineer** — AI skill for Claude Code, Cline, Roo Code, Cursor, Windsurf, Copilot, Codex, Gemini CLI, Kimi, Kilo Code, Kiro, and Antigravity.
|
|
4
4
|
|
|
5
5
|
Pre-built architecture patterns from **30+ production repos (200k+ GitHub stars)** including Ignite, Expensify, Mattermost, Immich, AppFlowy, Now in Android, TCA + auto-adaptation to your current project.
|
|
6
6
|
|
|
@@ -24,16 +24,20 @@ npx @buivietphi/skill-mobile-mt --all # All agents
|
|
|
24
24
|
npx @buivietphi/skill-mobile-mt --path ./dir # Custom directory
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
### Generate project-level rules
|
|
27
|
+
### Generate project-level rules
|
|
28
28
|
|
|
29
|
-
Cursor, Copilot, and
|
|
29
|
+
Cline, Roo Code, Cursor, Windsurf, Copilot, Kilo Code, and Kiro read rules from **project-level files**. Run `--init` inside your project to generate them:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
npx @buivietphi/skill-mobile-mt --init # Interactive selector
|
|
33
33
|
npx @buivietphi/skill-mobile-mt --init cursor # .cursorrules
|
|
34
|
+
npx @buivietphi/skill-mobile-mt --init cline # .clinerules/mobile-rules.md
|
|
35
|
+
npx @buivietphi/skill-mobile-mt --init roocode # .roo/rules/mobile-rules.md
|
|
34
36
|
npx @buivietphi/skill-mobile-mt --init copilot # .github/copilot-instructions.md
|
|
35
37
|
npx @buivietphi/skill-mobile-mt --init windsurf # .windsurfrules
|
|
36
|
-
npx @buivietphi/skill-mobile-mt --init
|
|
38
|
+
npx @buivietphi/skill-mobile-mt --init kilocode # .kilocode/rules/mobile-rules.md
|
|
39
|
+
npx @buivietphi/skill-mobile-mt --init kiro # .kiro/steering/mobile-rules.md
|
|
40
|
+
npx @buivietphi/skill-mobile-mt --init all # All files
|
|
37
41
|
```
|
|
38
42
|
|
|
39
43
|
**What `--init` does:**
|
|
@@ -84,16 +88,20 @@ You'll see an interactive checkbox — use arrow keys to navigate, space to sele
|
|
|
84
88
|
↑↓ navigate Space toggle A select all Enter confirm Q cancel
|
|
85
89
|
|
|
86
90
|
› ◉ Claude Code [detected]
|
|
91
|
+
◯ Cline [detected]
|
|
92
|
+
◯ Roo Code [not found]
|
|
87
93
|
◯ Cursor [detected]
|
|
88
94
|
◯ Windsurf [not found]
|
|
89
95
|
◯ Copilot [not found]
|
|
90
96
|
◯ Codex [not found]
|
|
91
97
|
◉ Gemini CLI [detected]
|
|
92
98
|
◯ Kimi [not found]
|
|
99
|
+
◯ Kilo Code [not found]
|
|
100
|
+
◯ Kiro [not found]
|
|
93
101
|
◯ Antigravity [not found]
|
|
94
102
|
```
|
|
95
103
|
|
|
96
|
-
### Step 2
|
|
104
|
+
### Step 2: Generate project rules
|
|
97
105
|
|
|
98
106
|
```bash
|
|
99
107
|
# cd into your mobile project first
|
|
@@ -111,9 +119,13 @@ Output:
|
|
|
111
119
|
|
|
112
120
|
✓ .cursorrules → Cursor (auto-detected: Expo (React Native))
|
|
113
121
|
✓ .github/copilot-instructions.md → GitHub Copilot
|
|
122
|
+
✓ .clinerules/mobile-rules.md → Cline
|
|
123
|
+
✓ .roo/rules/mobile-rules.md → Roo Code
|
|
124
|
+
✓ .kilocode/rules/mobile-rules.md → Kilo Code
|
|
125
|
+
✓ .kiro/steering/mobile-rules.md → Kiro
|
|
114
126
|
✓ .windsurfrules → Windsurf
|
|
115
127
|
|
|
116
|
-
✅ Done! →
|
|
128
|
+
✅ Done! → 7 file(s) generated
|
|
117
129
|
```
|
|
118
130
|
|
|
119
131
|
### Step 3: Use in your AI agent
|
|
@@ -132,27 +144,28 @@ Output:
|
|
|
132
144
|
> Add cart feature following the same pattern as ProductList
|
|
133
145
|
```
|
|
134
146
|
|
|
135
|
-
####
|
|
147
|
+
#### Cline / Roo Code / Kilo Code
|
|
136
148
|
|
|
137
|
-
After running `--init
|
|
149
|
+
After running `--init cline` (or `roocode`, `kilocode`), rules are auto-loaded from the project directory. Just open your project and ask:
|
|
138
150
|
|
|
139
151
|
```
|
|
140
|
-
# In Cursor Composer, just ask:
|
|
141
152
|
> Create a login screen with email/password
|
|
142
153
|
> Fix the crash in ProductDetail when images is null
|
|
143
154
|
> Review this PR for mobile best practices
|
|
144
155
|
```
|
|
145
156
|
|
|
157
|
+
#### Cursor
|
|
158
|
+
|
|
159
|
+
After running `--init cursor`, Cursor auto-loads `.cursorrules` every session. Just open your project and code normally.
|
|
160
|
+
|
|
161
|
+
#### Kiro (AWS)
|
|
162
|
+
|
|
163
|
+
After running `--init kiro`, Kiro loads `.kiro/steering/mobile-rules.md` as steering context. The generated file uses `inclusion: always` frontmatter.
|
|
164
|
+
|
|
146
165
|
#### GitHub Copilot
|
|
147
166
|
|
|
148
167
|
After running `--init copilot`, Copilot reads `.github/copilot-instructions.md` as workspace context.
|
|
149
168
|
|
|
150
|
-
```
|
|
151
|
-
# In VS Code with Copilot Chat:
|
|
152
|
-
> Add pagination to the product list
|
|
153
|
-
> Handle offline mode for the cart feature
|
|
154
|
-
```
|
|
155
|
-
|
|
156
169
|
#### Windsurf
|
|
157
170
|
|
|
158
171
|
After running `--init windsurf`, Windsurf auto-loads `.windsurfrules`. Just code normally.
|
|
@@ -196,7 +209,7 @@ The skill automatically detects before any action:
|
|
|
196
209
|
|
|
197
210
|
## Smart Loading
|
|
198
211
|
|
|
199
|
-
Only loads the relevant platform docs — saves **~
|
|
212
|
+
Only loads the relevant platform docs — saves **~45% context tokens** vs loading everything.
|
|
200
213
|
|
|
201
214
|
```
|
|
202
215
|
Flutter project?
|
|
@@ -216,22 +229,22 @@ iOS only?
|
|
|
216
229
|
|
|
217
230
|
| Scenario | Tokens | % of 128K | % of 200K |
|
|
218
231
|
|----------|-------:|----------:|----------:|
|
|
219
|
-
| SKILL.md only | ~
|
|
220
|
-
| + 1 platform + core shared/ | ~
|
|
221
|
-
| Cross-platform (RN/Flutter + iOS + Android) | ~
|
|
222
|
-
| All files loaded | ~
|
|
223
|
-
| **Smart load (recommended)** | **~
|
|
232
|
+
| SKILL.md only | ~13,200 | 10.3% | 6.6% |
|
|
233
|
+
| + 1 platform + core shared/ | ~38,600 | 30.2% | 19.3% |
|
|
234
|
+
| Cross-platform (RN/Flutter + iOS + Android) | ~53,000 | 41.4% | 26.5% |
|
|
235
|
+
| All files loaded | ~70,000 | 54.7% | 35.0% |
|
|
236
|
+
| **Smart load (recommended)** | **~38,600** | **30.2%** | **19.3%** |
|
|
224
237
|
|
|
225
238
|
### Per-file token breakdown
|
|
226
239
|
|
|
227
240
|
| File | Tokens |
|
|
228
241
|
|------|-------:|
|
|
229
242
|
| `SKILL.md` | 6,100 |
|
|
230
|
-
| `AGENTS.md` | 1,
|
|
243
|
+
| `AGENTS.md` | 1,600 |
|
|
231
244
|
| `react-native/react-native.md` | 5,108 |
|
|
232
|
-
| `flutter/flutter.md` |
|
|
245
|
+
| `flutter/flutter.md` | 2,100 |
|
|
233
246
|
| `ios/ios-native.md` | 1,452 |
|
|
234
|
-
| `android/android-native.md` |
|
|
247
|
+
| `android/android-native.md` | 2,100 |
|
|
235
248
|
| `shared/code-review.md` | 865 |
|
|
236
249
|
| `shared/bug-detection.md` | 499 |
|
|
237
250
|
| `shared/prompt-engineering.md` | 3,927 |
|
|
@@ -242,17 +255,19 @@ iOS only?
|
|
|
242
255
|
| `shared/release-checklist.md` | 587 |
|
|
243
256
|
| `shared/anti-patterns.md` | 2,800 |
|
|
244
257
|
| `shared/performance-prediction.md` | 1,500 |
|
|
245
|
-
| `shared/platform-excellence.md` |
|
|
258
|
+
| `shared/platform-excellence.md` | 2,200 |
|
|
246
259
|
| `shared/version-management.md` | 3,500 |
|
|
247
260
|
| `shared/observability.md` | 3,000 |
|
|
261
|
+
| `shared/offline-first.md` | 2,566 |
|
|
262
|
+
| `shared/on-device-ai.md` | 700 |
|
|
248
263
|
| `shared/claude-md-template.md` | ~500 |
|
|
249
264
|
| `shared/agent-rules-template.md` | ~2,500 |
|
|
250
|
-
| **Total** | **~
|
|
265
|
+
| **Total** | **~49,500** |
|
|
251
266
|
|
|
252
267
|
## Installed Structure
|
|
253
268
|
|
|
254
269
|
```
|
|
255
|
-
~/.claude/skills/ (or ~/.
|
|
270
|
+
~/.claude/skills/ (or ~/.cline/skills/, ~/.roo/skills/, ~/.gemini/skills/, etc.)
|
|
256
271
|
└── skill-mobile-mt/
|
|
257
272
|
├── SKILL.md Entry point + auto-detect + quality gates
|
|
258
273
|
├── AGENTS.md Multi-agent compatibility
|
|
@@ -274,10 +289,12 @@ iOS only?
|
|
|
274
289
|
├── document-analysis.md Parse docs/images → code
|
|
275
290
|
├── anti-patterns.md PII, cardinality, payload detection
|
|
276
291
|
├── performance-prediction.md Frame budget, FPS prediction
|
|
277
|
-
├── platform-excellence.md iOS 18+ vs Android 15+ guidelines
|
|
292
|
+
├── platform-excellence.md iOS 18+ vs Android 15+ guidelines + HIG
|
|
278
293
|
├── version-management.md SDK compatibility matrix
|
|
279
294
|
├── observability.md Sessions as 4th pillar
|
|
280
295
|
├── release-checklist.md Pre-release verification
|
|
296
|
+
├── offline-first.md Local-first + sync patterns
|
|
297
|
+
├── on-device-ai.md Core ML / TFLite / llama.cpp
|
|
281
298
|
├── claude-md-template.md CLAUDE.md template for projects
|
|
282
299
|
└── agent-rules-template.md Rules templates for all agents
|
|
283
300
|
```
|
|
@@ -288,6 +305,17 @@ iOS only?
|
|
|
288
305
|
your-project/
|
|
289
306
|
├── .cursorrules Cursor rules (auto-detected stack)
|
|
290
307
|
├── .windsurfrules Windsurf rules (auto-detected stack)
|
|
308
|
+
├── .clinerules/
|
|
309
|
+
│ └── mobile-rules.md Cline rules (auto-detected stack)
|
|
310
|
+
├── .roo/
|
|
311
|
+
│ └── rules/
|
|
312
|
+
│ └── mobile-rules.md Roo Code rules (auto-detected stack)
|
|
313
|
+
├── .kilocode/
|
|
314
|
+
│ └── rules/
|
|
315
|
+
│ └── mobile-rules.md Kilo Code rules (auto-detected stack)
|
|
316
|
+
├── .kiro/
|
|
317
|
+
│ └── steering/
|
|
318
|
+
│ └── mobile-rules.md Kiro steering (auto-detected stack)
|
|
291
319
|
└── .github/
|
|
292
320
|
└── copilot-instructions.md Copilot rules (auto-detected stack)
|
|
293
321
|
```
|
|
@@ -309,6 +337,27 @@ your-project/
|
|
|
309
337
|
- Security vulnerabilities, performance issues, UX problems
|
|
310
338
|
- Platform-specific detection rules
|
|
311
339
|
|
|
340
|
+
### Grounding Protocol (Anti-Hallucination)
|
|
341
|
+
- **Source hierarchy**: project code > skill files > official docs > production repos > AI knowledge
|
|
342
|
+
- **Mandatory rules**: Read before answer, verify APIs exist, cite sources, say "I don't know" when unsure
|
|
343
|
+
- **No phantom packages**: verify package exists in package.json before suggesting
|
|
344
|
+
- **Version-specific**: check actual SDK version, never assume latest
|
|
345
|
+
- **Grounded bug fix**: read file → find exact line → verify types → cite source
|
|
346
|
+
- **Anti-hallucination checklist**: runs before every AI response
|
|
347
|
+
|
|
348
|
+
### Docs-First Protocol (Always Use Latest)
|
|
349
|
+
- **WebSearch before coding**: when setting up any library, ALWAYS search official docs first
|
|
350
|
+
- **Never rely on AI memory**: docs change, APIs change, syntax changes between versions
|
|
351
|
+
- **Package installation protocol**: verify exists → check compatibility → search install guide → test both platforms
|
|
352
|
+
- **Common AI traps**: React Navigation v5 vs v7, Firebase v8 vs v9 modular, Swift async/await availability
|
|
353
|
+
- **Version matrix + live verification**: snapshot matrix in skill + mandatory WebSearch for current data
|
|
354
|
+
|
|
355
|
+
### Security Protocol
|
|
356
|
+
- **7-category security scan** on every feature: secrets, token storage, input validation, network, data protection, auth flow, platform-specific
|
|
357
|
+
- **6 absolute rules**: never store tokens in plain storage, never hardcode secrets, never log sensitive data, never trust deep links, never disable SSL, never commit .env
|
|
358
|
+
- **Platform-specific checks**: iOS ATS + privacy manifest, Android cleartext + ProGuard + exported components
|
|
359
|
+
- **Never skip security**: even for prototypes, internal apps, or "quick fixes"
|
|
360
|
+
|
|
312
361
|
### Advanced AI Patterns (from Windsurf, Cursor, Devin, Cline)
|
|
313
362
|
- **Status Update Pattern**: Brief progress notes before tool use (no monologues)
|
|
314
363
|
- **Execution Modes**: Discovery → Implementation → Completion (prevents thrashing)
|
|
@@ -340,7 +389,8 @@ your-project/
|
|
|
340
389
|
|
|
341
390
|
- **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
|
|
342
391
|
- **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`
|
|
343
|
-
- **Platform Excellence** (`platform-excellence.md`): iOS 18+ vs Android 15+ native UX standards — navigation patterns, typography,
|
|
392
|
+
- **Platform Excellence** (`platform-excellence.md`): iOS 18+ vs Android 15+ native UX standards — navigation patterns, typography, haptic feedback types, permission timing, ratings prompt flow, Live Activities/Dynamic Island, performance targets (cold start < 1s iOS, < 1.5s Android)
|
|
393
|
+
- **On-Device AI** (`on-device-ai.md`): Decision matrix (API vs on-device), Core ML (iOS), ML Kit + MediaPipe (Android), llama.cpp cross-platform, TFLite Flutter, React Native ML Kit — with performance rules and model size guidance
|
|
344
394
|
- **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.
|
|
345
395
|
- **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.
|
|
346
396
|
|
|
@@ -364,13 +414,77 @@ your-project/
|
|
|
364
414
|
| Agent | How it works | Setup command |
|
|
365
415
|
|-------|-------------|---------------|
|
|
366
416
|
| **Claude Code** | Reads from `~/.claude/skills/` | `npx skill-mobile-mt --claude` |
|
|
417
|
+
| **Cline** | Reads `.clinerules/` from project root | `npx skill-mobile-mt --init cline` |
|
|
418
|
+
| **Roo Code** | Reads `.roo/rules/` from project root | `npx skill-mobile-mt --init roocode` |
|
|
419
|
+
| **Cursor** | Reads `.cursorrules` from project root | `npx skill-mobile-mt --init cursor` |
|
|
420
|
+
| **Windsurf** | Reads `.windsurfrules` from project root | `npx skill-mobile-mt --init windsurf` |
|
|
421
|
+
| **Copilot** | Reads `.github/copilot-instructions.md` | `npx skill-mobile-mt --init copilot` |
|
|
367
422
|
| **Codex** | Reads from `~/.codex/skills/` | `npx skill-mobile-mt --codex` |
|
|
368
423
|
| **Gemini CLI** | Reads from `~/.gemini/skills/` | `npx skill-mobile-mt --gemini` |
|
|
369
424
|
| **Kimi** | Reads from `~/.kimi/skills/` | `npx skill-mobile-mt --kimi` |
|
|
425
|
+
| **Kilo Code** | Reads `.kilocode/rules/` from project root | `npx skill-mobile-mt --init kilocode` |
|
|
426
|
+
| **Kiro** | Reads `.kiro/steering/` from project root | `npx skill-mobile-mt --init kiro` |
|
|
370
427
|
| **Antigravity** | Reads from `~/.agents/skills/` | `npx skill-mobile-mt --antigravity` |
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
428
|
+
|
|
429
|
+
## Humanizer — Mobile Copy
|
|
430
|
+
|
|
431
|
+
Installed automatically alongside the main skill. Removes AI writing patterns from mobile app text.
|
|
432
|
+
|
|
433
|
+
```
|
|
434
|
+
@humanizer-mobile
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
Use for: app store descriptions, release notes, error messages, onboarding, push notifications, permission prompts, paywall copy.
|
|
438
|
+
|
|
439
|
+
### Examples
|
|
440
|
+
|
|
441
|
+
**App Store Description**
|
|
442
|
+
```
|
|
443
|
+
❌ "TaskFlow is a powerful, comprehensive task management application that
|
|
444
|
+
seamlessly integrates with your existing workflow."
|
|
445
|
+
|
|
446
|
+
✅ "TaskFlow keeps your team's work in one place. Add tasks, assign them,
|
|
447
|
+
set deadlines — everything syncs in real time. Works with Slack and Notion."
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
**Release Notes**
|
|
451
|
+
```
|
|
452
|
+
❌ "Version 2.1.0 introduces significant enhancements to the overall user
|
|
453
|
+
experience including robust improvements to performance and reliability."
|
|
454
|
+
|
|
455
|
+
✅ "2.1.0
|
|
456
|
+
- Faster load times on older Android devices (was 4s, now 1.2s)
|
|
457
|
+
- Fixed crash when opening notifications while offline
|
|
458
|
+
- Dark mode now remembers your setting between sessions"
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
**Error Messages**
|
|
462
|
+
```
|
|
463
|
+
❌ "We apologize for the inconvenience. An unexpected error has occurred."
|
|
464
|
+
|
|
465
|
+
✅ "Couldn't save — no internet connection.
|
|
466
|
+
[Try again] [Save for later]"
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
**Push Notifications**
|
|
470
|
+
```
|
|
471
|
+
❌ "You have received a new message from a team member."
|
|
472
|
+
✅ "Alex commented on "Landing page redesign""
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
**Paywall**
|
|
476
|
+
```
|
|
477
|
+
❌ "Unlock the full potential of our comprehensive premium features."
|
|
478
|
+
|
|
479
|
+
✅ "Go Pro
|
|
480
|
+
• Unlimited projects (free plan: 3)
|
|
481
|
+
• Team sharing
|
|
482
|
+
[Start 7-day free trial]"
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
Covers 24 AI patterns across: content inflation, chatbot artifacts, style issues, mobile-specific copy (App Store limits, permission prompts, rating requests, subscription CTAs).
|
|
486
|
+
|
|
487
|
+
---
|
|
374
488
|
|
|
375
489
|
## License
|
|
376
490
|
|