@buivietphi/skill-mobile-mt 2.1.0 → 2.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.
- package/AGENTS.md +83 -45
- package/README.md +44 -35
- package/SKILL.md +333 -46
- package/package.json +1 -1
- package/shared/code-generation-templates.md +656 -0
- package/shared/code-review.md +8 -8
- package/shared/complex-ui-patterns.md +526 -0
- package/shared/data-flow-patterns.md +422 -0
- package/shared/error-handling.md +394 -0
- package/shared/intent-analysis.md +473 -0
- package/shared/navigation-patterns.md +375 -0
- package/shared/spec-to-code.md +293 -0
- package/shared/testing-patterns.md +428 -0
package/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: skill-mobile-mt
|
|
3
3
|
description: "Master Senior Mobile Engineer. Patterns from 30+ production repos (200k+ GitHub stars: Ignite, Expensify, Mattermost, Immich, AppFlowy, Now in Android, TCA). Use when: building mobile features, fixing mobile bugs, reviewing mobile code, mobile architecture, React Native, Flutter, iOS Swift, Android Kotlin, mobile performance, mobile security audit, mobile code review, app release. Two modes: (1) default = pre-built production patterns, (2) 'project' = reads current project and adapts."
|
|
4
|
-
version: "2.
|
|
4
|
+
version: "2.2.0"
|
|
5
5
|
author: buivietphi
|
|
6
6
|
priority: high
|
|
7
7
|
user-invocable: true
|
|
@@ -50,27 +50,30 @@ RULE 7: ASK AFTER 3 FAILS — 3 failed attempts at same error → STOP → prese
|
|
|
50
50
|
|
|
51
51
|
1. [Cardinal Rules](#cardinal-rules-inviolable)
|
|
52
52
|
2. [Task Router](#task-router)
|
|
53
|
-
3. [
|
|
54
|
-
4. [
|
|
55
|
-
5. [
|
|
56
|
-
6. [
|
|
57
|
-
7. [
|
|
58
|
-
8. [
|
|
59
|
-
9. [
|
|
60
|
-
10. [
|
|
61
|
-
11. [
|
|
62
|
-
12. [
|
|
63
|
-
13. [
|
|
64
|
-
14. [
|
|
65
|
-
15. [
|
|
66
|
-
16. [
|
|
67
|
-
17. [
|
|
68
|
-
18. [
|
|
69
|
-
19. [
|
|
70
|
-
20. [
|
|
71
|
-
21. [
|
|
72
|
-
22. [
|
|
73
|
-
23. [
|
|
53
|
+
3. [Intent Analysis Detector](#intent-analysis-detector-auto-load-sharedintent-analysismd) *(routes to shared/intent-analysis.md)*
|
|
54
|
+
4. [Multi-Fix Execution Protocol](#multi-fix-execution-protocol)
|
|
55
|
+
5. [UI Fix Protocol](#ui-fix-protocol)
|
|
56
|
+
6. [Communication Protocol](#communication-protocol)
|
|
57
|
+
7. [Decision Matrix Protocol](#decision-matrix-protocol)
|
|
58
|
+
8. [Execution Modes](#execution-modes)
|
|
59
|
+
9. [Mandatory Checkpoint](#mandatory-checkpoint)
|
|
60
|
+
10. [Auto-Detect](#auto-detect)
|
|
61
|
+
11. [Mobile Context](#mobile-context)
|
|
62
|
+
12. [Mode Selection](#mode-selection)
|
|
63
|
+
13. [Feature Scaffold Protocol](#feature-scaffold-protocol-project-mode)
|
|
64
|
+
14. [Error Recovery Protocol](#error-recovery-protocol)
|
|
65
|
+
15. [Quality Gate](#quality-gate) *(includes Completion Re-check)*
|
|
66
|
+
16. [Build & Deploy Gates](#build--deploy-gates)
|
|
67
|
+
17. [Codebase Scan Strategy](#codebase-scan-strategy)
|
|
68
|
+
18. [Smart Loading](#smart-loading)
|
|
69
|
+
19. [Grounding Protocol (Anti-Hallucination)](#grounding-protocol-anti-hallucination)
|
|
70
|
+
20. [Docs-First Protocol (Always Use Latest)](#docs-first-protocol-always-use-latest)
|
|
71
|
+
21. [Security Protocol](#security-protocol)
|
|
72
|
+
22. [Hard Bans](#hard-bans)
|
|
73
|
+
23. [Mobile Anti-Patterns](#mobile-anti-patterns)
|
|
74
|
+
24. [Leverage Pyramid](#leverage-pyramid-where-to-invest-review-time)
|
|
75
|
+
25. [Session State Tracking](#session-state-tracking-for-long-tasks)
|
|
76
|
+
26. [Reference Files](#reference-files)
|
|
74
77
|
|
|
75
78
|
---
|
|
76
79
|
|
|
@@ -84,11 +87,18 @@ RULE 7: ASK AFTER 3 FAILS — 3 failed attempts at same error → STOP → prese
|
|
|
84
87
|
```
|
|
85
88
|
USER REQUEST → ACTION (Read tool required)
|
|
86
89
|
─────────────────────────────────────────────────────────────────
|
|
87
|
-
"Create/build X feature" →
|
|
90
|
+
"Create/build X feature" → Check: is the spec clear or vague?
|
|
91
|
+
CLEAR → Feature Scaffold Protocol (no extra file needed)
|
|
92
|
+
VAGUE → Spec Analysis Protocol FIRST → confirm → then scaffold
|
|
88
93
|
screen + hook + service + store + types
|
|
89
94
|
|
|
90
|
-
"Create/add X screen/page" →
|
|
91
|
-
|
|
95
|
+
"Create/add X screen/page" → Check: is the spec clear or vague?
|
|
96
|
+
CLEAR → Feature Scaffold Protocol — MINIMAL (screen + hook)
|
|
97
|
+
VAGUE → Spec Analysis Protocol FIRST → confirm → then scaffold
|
|
98
|
+
|
|
99
|
+
"Build something like X app / → Read: shared/intent-analysis.md (Spec Analysis Protocol)
|
|
100
|
+
similar to / standard / usual / Parse → classify → present structured spec → wait confirm
|
|
101
|
+
you know what I mean" ⛔ NEVER start coding without confirmed spec
|
|
92
102
|
|
|
93
103
|
"Add X to existing Y" → MODIFY existing files, don't create new structure
|
|
94
104
|
|
|
@@ -122,8 +132,8 @@ USER REQUEST → ACTION (Read tool required)
|
|
|
122
132
|
Step 5: Root cause → fix → cite
|
|
123
133
|
If long/complex trace → also Read: shared/debugging-intelligence.md
|
|
124
134
|
|
|
125
|
-
"
|
|
126
|
-
|
|
135
|
+
"Take a look / something's off / → ⛔ USER DOESN'T KNOW THE CAUSE — run Diagnostic Scan:
|
|
136
|
+
not sure why / describe symptoms Step 1: EXTRACT AREA from what user said or showed:
|
|
127
137
|
why / take a look / describe → Screen name? Feature name? Module name? File name?
|
|
128
138
|
symptoms without error" → If user paste code → that IS the area
|
|
129
139
|
→ If user describe behavior → extract the feature/screen name
|
|
@@ -148,34 +158,32 @@ USER REQUEST → ACTION (Read tool required)
|
|
|
148
158
|
|
|
149
159
|
"Review" (generic, no scope) → Read: shared/code-review.md → detect Review Mode:
|
|
150
160
|
→ Check git status → if changes exist → MODE: CHANGES
|
|
151
|
-
→ If no changes → ASK user: "Review full
|
|
161
|
+
→ If no changes → ASK user: "Review full codebase or specific file?"
|
|
152
162
|
|
|
153
|
-
"Review full /
|
|
163
|
+
"Review full code / audit" → Read: shared/code-review.md → MODE: FULL
|
|
154
164
|
Read ALL src/ files → 12-category checklist → full report
|
|
155
165
|
|
|
156
|
-
"Review changes / review
|
|
157
|
-
review code đã sửa" → Read: shared/code-review.md → MODE: CHANGES
|
|
166
|
+
"Review changes / review diff" → Read: shared/code-review.md → MODE: CHANGES
|
|
158
167
|
git diff → review only changed lines + context
|
|
159
168
|
|
|
160
|
-
"Review file X /
|
|
161
|
-
|
|
169
|
+
"Review file X / this file" → Read: shared/code-review.md → MODE: FILE
|
|
170
|
+
Read specified file → 12-category checklist on that file
|
|
162
171
|
|
|
163
|
-
"Review function X /
|
|
164
|
-
|
|
172
|
+
"Review function X / this func" → Read: shared/code-review.md → MODE: FUNCTION
|
|
173
|
+
Find function → trace callers → deep review
|
|
165
174
|
|
|
166
|
-
"Review PR /
|
|
167
|
-
|
|
168
|
-
|
|
175
|
+
"Review PR / pull request" → Read: shared/code-review.md → MODE: PR
|
|
176
|
+
Read: shared/anti-patterns.md
|
|
177
|
+
Step 0 PR-Level → git diff base..HEAD → 12-category → verdict
|
|
169
178
|
|
|
170
|
-
"Review modified files /
|
|
171
|
-
|
|
172
|
-
git status → read modified files → review
|
|
179
|
+
"Review modified files" → Read: shared/code-review.md → MODE: MODIFIED
|
|
180
|
+
git status → read modified files → review
|
|
173
181
|
|
|
174
|
-
"Review
|
|
175
|
-
|
|
182
|
+
"Review commits" → Read: shared/code-review.md → MODE: COMMITS
|
|
183
|
+
git log → git show each commit → review diffs
|
|
176
184
|
|
|
177
|
-
"Check PR
|
|
178
|
-
|
|
185
|
+
"Check PR" → Read: shared/code-review.md → MODE: PR-CHECK
|
|
186
|
+
Step 0 ONLY (size, scope, tests, commits) → quick ✅/🔴
|
|
179
187
|
|
|
180
188
|
"Review accessibility / a11y" → Read: shared/code-review.md (§ Accessibility)
|
|
181
189
|
then: WCAG 2.1 mobile checklist — labels, touch targets,
|
|
@@ -259,6 +267,66 @@ USER REQUEST → ACTION (Read tool required)
|
|
|
259
267
|
"How much work / big change? / → Estimation Protocol (in Decision Matrix Protocol section)
|
|
260
268
|
scope / effort / risk" Scan → classify XS/S/M/L/XL → risk → present
|
|
261
269
|
|
|
270
|
+
"Fix UI / match design / → UI Fix Protocol (in this file)
|
|
271
|
+
adjust layout / UI broken / Step 1: Identify what → Step 2: Read component tree
|
|
272
|
+
UI mismatch / layout wrong" Step 3: Trace style chain → Step 4: Fix → Step 5: Verify
|
|
273
|
+
|
|
274
|
+
"Fix multiple / fix A then B / → Read: shared/intent-analysis.md (Task Extraction Protocol)
|
|
275
|
+
multiple files / fix + fix + Extract ALL tasks → classify → order → track → verify ALL
|
|
276
|
+
fix UI + fix bug + add X" ⛔ NEVER start until ALL tasks are listed
|
|
277
|
+
|
|
278
|
+
"Update UI to match design / → UI Fix Protocol (in this file)
|
|
279
|
+
Figma / screenshot / mockup" Read component tree → trace style → fix → verify both themes
|
|
280
|
+
|
|
281
|
+
"Make it better / improve this / → Read: shared/intent-analysis.md (Scope Clarification Protocol)
|
|
282
|
+
fix everything / clean up / Detect vague → clarify scope → set completion criteria
|
|
283
|
+
something is wrong / not right" ⛔ NEVER start coding until scope is clear
|
|
284
|
+
|
|
285
|
+
"It's slow / doesn't work / → Read: shared/intent-analysis.md (Intent Understanding Protocol)
|
|
286
|
+
button doesn't work / blank / Map non-technical → technical → search code → fix
|
|
287
|
+
freezes / flickers / keeps Confirm interpretation before acting
|
|
288
|
+
crashing / shows old data"
|
|
289
|
+
|
|
290
|
+
"Fix that / same for this one / → Read: shared/intent-analysis.md (Context Tracking)
|
|
291
|
+
the other screen / do it again / Resolve pronoun → confirm reference → proceed
|
|
292
|
+
like before / undo that" ⛔ NEVER guess when reference is ambiguous
|
|
293
|
+
|
|
294
|
+
"URGENT / production down / → Read: shared/intent-analysis.md (Priority Detection)
|
|
295
|
+
before release / deadline / Adjust depth: CRITICAL=fix only, HIGH=fix+verify
|
|
296
|
+
blocker / ASAP" Skip nice-to-haves, communicate progress
|
|
297
|
+
|
|
298
|
+
"Build feature from spec / → Read: shared/spec-to-code.md
|
|
299
|
+
implement from requirements / Parse → dependency graph → file plan → types-first → implement
|
|
300
|
+
convert spec to code" ⛔ NEVER skip type definitions
|
|
301
|
+
|
|
302
|
+
"Setup state management / → Read: shared/code-generation-templates.md
|
|
303
|
+
add Zustand / Redux / Riverpod / Production templates with persist, middleware, selectors
|
|
304
|
+
setup API client / setup forms / API client with retry + token refresh + error normalization
|
|
305
|
+
form validation" Forms with Zod, multi-step, file upload
|
|
306
|
+
|
|
307
|
+
"Add navigation / auth flow / → Read: shared/navigation-patterns.md
|
|
308
|
+
deep links / modal / tabs / Auth stack, deep link config, modal groups, tab persistence
|
|
309
|
+
push notifications / Push notification setup + deep link from notification
|
|
310
|
+
permissions" Permission request + denied handling + settings redirect
|
|
311
|
+
|
|
312
|
+
"Carousel / swipe / gestures / → Read: shared/complex-ui-patterns.md
|
|
313
|
+
responsive / tablet / keyboard / Image carousel, swipe cards, gesture handling
|
|
314
|
+
dark mode / skeleton / Responsive layout, keyboard avoidance, dark mode theme
|
|
315
|
+
accessibility / a11y" Skeleton loading, accessibility implementation per platform
|
|
316
|
+
|
|
317
|
+
"Pagination / infinite scroll / → Read: shared/data-flow-patterns.md
|
|
318
|
+
optimistic update / cache / Cursor + offset pagination, prefetching
|
|
319
|
+
real-time / WebSocket / Optimistic updates with rollback, cache invalidation
|
|
320
|
+
offline queue" WebSocket manager, offline request queue
|
|
321
|
+
|
|
322
|
+
"Error handling / retry / → Read: shared/error-handling.md
|
|
323
|
+
error boundary / toast / Error type hierarchy, user-facing messages
|
|
324
|
+
global error handler" Error boundary, retry with backoff, toast notifications
|
|
325
|
+
|
|
326
|
+
"Write unit tests / component → Read: shared/testing-patterns.md
|
|
327
|
+
tests / mock / factory / Component tests (4 states), hook tests, service tests
|
|
328
|
+
test setup / test helpers" Test factories, provider wrapper, snapshot strategy
|
|
329
|
+
|
|
262
330
|
```
|
|
263
331
|
|
|
264
332
|
**⛔ NEVER start coding without identifying the task type first.**
|
|
@@ -266,6 +334,185 @@ USER REQUEST → ACTION (Read tool required)
|
|
|
266
334
|
|
|
267
335
|
---
|
|
268
336
|
|
|
337
|
+
## Intent Analysis Detector (auto-load shared/intent-analysis.md)
|
|
338
|
+
|
|
339
|
+
**BEFORE coding: detect if input needs deep analysis. If yes → Read shared/intent-analysis.md.**
|
|
340
|
+
|
|
341
|
+
```
|
|
342
|
+
═══ COMPLEXITY SIGNALS — auto-trigger Read: shared/intent-analysis.md ═══
|
|
343
|
+
|
|
344
|
+
MULTI-PART → Task Extraction Protocol:
|
|
345
|
+
- Multiple sentences with different requests
|
|
346
|
+
- Comma-separated requests ("fix A, fix B, add C")
|
|
347
|
+
- References to multiple files/screens/components
|
|
348
|
+
⛔ NEVER start coding after reading only the first sentence
|
|
349
|
+
|
|
350
|
+
VAGUE INPUT → Scope Clarification Protocol:
|
|
351
|
+
- "Make it better / fix the UI / improve this / fix everything"
|
|
352
|
+
- No specific screen, component, or symptom mentioned
|
|
353
|
+
⛔ NEVER guess what "better" means — clarify first
|
|
354
|
+
|
|
355
|
+
NON-TECHNICAL → Intent Understanding Protocol:
|
|
356
|
+
- "Button doesn't work / screen is blank / it freezes / takes forever"
|
|
357
|
+
- Map everyday language → technical cause → search code → fix
|
|
358
|
+
⛔ NEVER ask user for error message if they clearly don't have one
|
|
359
|
+
|
|
360
|
+
CONTEXT REFERENCE → Intent Understanding Protocol — Context Tracking:
|
|
361
|
+
- "Fix that / same for this one / the other screen / like before"
|
|
362
|
+
- Resolve pronoun → confirm reference → proceed
|
|
363
|
+
⛔ NEVER guess when reference is ambiguous
|
|
364
|
+
|
|
365
|
+
URGENCY → Intent Understanding Protocol — Priority Detection:
|
|
366
|
+
- CRITICAL: "URGENT / production down / users affected"
|
|
367
|
+
- HIGH: "before release / deadline / blocker"
|
|
368
|
+
- LOW: "when you get a chance / not urgent / nice to have"
|
|
369
|
+
|
|
370
|
+
VAGUE FEATURE → Spec Analysis Protocol:
|
|
371
|
+
- "Build X like other apps / something similar to Y / you know what I mean"
|
|
372
|
+
- Present ✅/❓/⚠️ structured spec → wait confirm → then build
|
|
373
|
+
⛔ NEVER start building from a vague description
|
|
374
|
+
|
|
375
|
+
CLEAR INPUT (skip — proceed to Task Router directly):
|
|
376
|
+
- "Fix the login button — it doesn't respond to tap"
|
|
377
|
+
- "Add loading spinner to ProfileScreen"
|
|
378
|
+
- Single task with specific target + action
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## Multi-Fix Execution Protocol
|
|
384
|
+
|
|
385
|
+
**When fixing multiple issues across multiple files:**
|
|
386
|
+
|
|
387
|
+
```
|
|
388
|
+
⛔ DO NOT edit 5 files then check if it works.
|
|
389
|
+
✅ Fix → Verify → Fix → Verify → Fix → Verify (incremental)
|
|
390
|
+
|
|
391
|
+
═══ EXECUTION FLOW ═══
|
|
392
|
+
|
|
393
|
+
PHASE 1: MAP (before any edit)
|
|
394
|
+
→ Read ALL affected files first (parallel reads)
|
|
395
|
+
→ Map dependencies: "File A imports from File B"
|
|
396
|
+
→ Identify shared code: "Both Screen X and Screen Y use useAuth"
|
|
397
|
+
→ Decide order: edit shared/base code FIRST, then consumers
|
|
398
|
+
|
|
399
|
+
PHASE 2: EXECUTE (one fix at a time)
|
|
400
|
+
For each task (in dependency order):
|
|
401
|
+
1. STATE what you're fixing: "Fixing TASK 2: crash on back press"
|
|
402
|
+
2. READ the target file(s) — even if read before (Context Staleness Rule)
|
|
403
|
+
3. EDIT — make the change
|
|
404
|
+
4. VERIFY — check imports resolve, types pass, no new errors
|
|
405
|
+
5. MARK complete: "✅ TASK 2 done"
|
|
406
|
+
6. CHECK SIDE EFFECTS: did this change break anything else?
|
|
407
|
+
→ If yes → fix the side effect BEFORE moving to next task
|
|
408
|
+
|
|
409
|
+
PHASE 3: FINAL VERIFICATION
|
|
410
|
+
→ Re-read ALL modified files
|
|
411
|
+
→ Run Quality Gate on each
|
|
412
|
+
→ Verify no circular breakage (File A fix didn't break File B fix)
|
|
413
|
+
→ List all changes: "Modified: FileA.tsx (line 45), FileB.tsx (line 12, 89)"
|
|
414
|
+
|
|
415
|
+
═══ SIDE EFFECTS MAP ═══
|
|
416
|
+
|
|
417
|
+
When editing a file, CHECK these for side effects:
|
|
418
|
+
SHARED HOOK changed? → Re-check ALL screens that use it
|
|
419
|
+
NAVIGATION changed? → Re-check ALL screens that navigate to/from it
|
|
420
|
+
TYPE/INTERFACE changed? → Re-check ALL files that import it
|
|
421
|
+
API SERVICE changed? → Re-check ALL hooks/screens that call it
|
|
422
|
+
STYLE/THEME changed? → Re-check ALL components using that style
|
|
423
|
+
STATE SHAPE changed? → Re-check ALL selectors/consumers
|
|
424
|
+
|
|
425
|
+
═══ CONFLICT DETECTION ═══
|
|
426
|
+
|
|
427
|
+
Before editing a file that was already edited in this session:
|
|
428
|
+
→ RE-READ the file (your earlier edit is already applied)
|
|
429
|
+
→ Verify your new edit doesn't revert the previous fix
|
|
430
|
+
→ If conflict: merge both fixes into one coherent edit
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
## UI Fix Protocol
|
|
436
|
+
|
|
437
|
+
**When user asks to fix UI / match design / adjust layout:**
|
|
438
|
+
|
|
439
|
+
```
|
|
440
|
+
⛔ DO NOT guess what the UI should look like.
|
|
441
|
+
✅ READ the actual component code first.
|
|
442
|
+
✅ TRACE the style chain: component → stylesheet → theme → platform.
|
|
443
|
+
|
|
444
|
+
═══ UI FIX WORKFLOW ═══
|
|
445
|
+
|
|
446
|
+
STEP 1: IDENTIFY what needs fixing
|
|
447
|
+
→ User says "fix UI" → ASK: "Which screen/component? What's wrong specifically?"
|
|
448
|
+
→ User shows screenshot → Compare with code structure
|
|
449
|
+
→ User references design → Read the design spec/figma description
|
|
450
|
+
|
|
451
|
+
STEP 2: READ the component tree (top-down)
|
|
452
|
+
→ Screen file (the container)
|
|
453
|
+
→ Child components used in that screen
|
|
454
|
+
→ Shared components (Button, Input, Card, etc.)
|
|
455
|
+
→ Style files / theme files
|
|
456
|
+
→ DO NOT skip any layer — UI bugs often come from parent, not child
|
|
457
|
+
|
|
458
|
+
STEP 3: TRACE the style chain
|
|
459
|
+
For each UI element to fix:
|
|
460
|
+
→ Inline style? → check the style object
|
|
461
|
+
→ StyleSheet? → find the stylesheet, check the exact rule
|
|
462
|
+
→ Theme? → check if theme variable is correct
|
|
463
|
+
→ Platform-specific? → check Platform.OS / platform files
|
|
464
|
+
→ Responsive? → check Dimensions / useWindowDimensions
|
|
465
|
+
→ Dark mode? → check if both light/dark have the value
|
|
466
|
+
|
|
467
|
+
STEP 4: FIX with precision
|
|
468
|
+
→ Edit ONLY the specific style/layout property
|
|
469
|
+
→ DO NOT refactor the entire component "while you're at it"
|
|
470
|
+
→ Preserve existing patterns (if project uses StyleSheet, don't switch to inline)
|
|
471
|
+
|
|
472
|
+
STEP 5: VERIFY the fix
|
|
473
|
+
→ Re-read the component → does the fix make visual sense?
|
|
474
|
+
→ Check sibling components → are they still consistent?
|
|
475
|
+
→ Check platform: if RN → both iOS and Android affected?
|
|
476
|
+
→ Check theme: if dark mode exists → fix applies to both themes?
|
|
477
|
+
|
|
478
|
+
═══ COMMON UI FIX PATTERNS ═══
|
|
479
|
+
|
|
480
|
+
SPACING/ALIGNMENT:
|
|
481
|
+
→ Check: padding, margin, flex, alignItems, justifyContent
|
|
482
|
+
→ Common mistake: mixing padding on parent AND child → double spacing
|
|
483
|
+
→ Fix: adjust ONE layer, not both
|
|
484
|
+
|
|
485
|
+
TEXT NOT SHOWING / CUT OFF:
|
|
486
|
+
→ Check: numberOfLines, flex: 1, width, overflow
|
|
487
|
+
→ Common mistake: parent has fixed height → child text truncated
|
|
488
|
+
→ Fix: use flexShrink/flexGrow or remove fixed height
|
|
489
|
+
|
|
490
|
+
IMAGE WRONG SIZE:
|
|
491
|
+
→ Check: resizeMode, width/height, aspectRatio
|
|
492
|
+
→ Common mistake: no explicit dimensions → image takes natural size
|
|
493
|
+
→ Fix: set explicit width + aspectRatio (not width + height)
|
|
494
|
+
|
|
495
|
+
LIST PERFORMANCE:
|
|
496
|
+
→ Check: FlatList vs ScrollView, keyExtractor, getItemLayout
|
|
497
|
+
→ Common mistake: ScrollView with 100+ items → jank
|
|
498
|
+
→ Fix: switch to FlatList + add keyExtractor + getItemLayout if fixed height
|
|
499
|
+
|
|
500
|
+
KEYBOARD OVERLAP:
|
|
501
|
+
→ Check: KeyboardAvoidingView, behavior (iOS=padding, Android=height)
|
|
502
|
+
→ Common mistake: no KeyboardAvoidingView → input hidden behind keyboard
|
|
503
|
+
→ Fix: wrap in KeyboardAvoidingView with correct behavior per platform
|
|
504
|
+
|
|
505
|
+
═══ MULTI-SCREEN UI FIX ═══
|
|
506
|
+
|
|
507
|
+
When fixing UI across multiple screens:
|
|
508
|
+
→ FIX shared components FIRST (Button, Header, Input, etc.)
|
|
509
|
+
→ Then fix individual screens (they inherit from shared)
|
|
510
|
+
→ Verify consistency: same Button should look same on all screens
|
|
511
|
+
→ Check navigation transitions: screen A → screen B still smooth?
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
---
|
|
515
|
+
|
|
269
516
|
## Communication Protocol
|
|
270
517
|
|
|
271
518
|
**Show progress, not monologues. Brief status updates before each tool use.**
|
|
@@ -898,9 +1145,41 @@ STEP 2: REVIEW — Re-read your own code with fresh eyes:
|
|
|
898
1145
|
- Would a senior dev approve this in code review?
|
|
899
1146
|
- Am I importing anything that doesn't exist in the project?
|
|
900
1147
|
STEP 3: REFINE — Fix issues found in review
|
|
901
|
-
STEP 4: VERIFY — Run Quality Gate above → all pass?
|
|
1148
|
+
STEP 4: VERIFY — Run Quality Gate above → all pass?
|
|
1149
|
+
STEP 5: COMPLETION RE-CHECK (MANDATORY — never skip)
|
|
1150
|
+
→ Re-read the user's ORIGINAL message (scroll up if needed)
|
|
1151
|
+
→ List every task/request the user made
|
|
1152
|
+
→ For EACH task, verify:
|
|
1153
|
+
□ Was it actually done? (not just planned, actually EDITED)
|
|
1154
|
+
□ Which file:line was changed?
|
|
1155
|
+
□ Does the change match what user asked?
|
|
1156
|
+
→ If ANY task was missed → DO IT NOW before saying "done"
|
|
1157
|
+
→ Report:
|
|
1158
|
+
"✅ Done. Changes:"
|
|
1159
|
+
"1. [task] → [file:line] — [what changed]"
|
|
1160
|
+
"2. [task] → [file:line] — [what changed]"
|
|
902
1161
|
|
|
903
1162
|
If STEP 2 finds issues → loop back to STEP 3 (max 2 loops)
|
|
1163
|
+
If STEP 5 finds missed tasks → loop back to STEP 1 for those tasks
|
|
1164
|
+
```
|
|
1165
|
+
|
|
1166
|
+
### Common "Forgot to Complete" Patterns
|
|
1167
|
+
|
|
1168
|
+
```
|
|
1169
|
+
⛔ PATTERN 1: "I'll do that next" → then never does it
|
|
1170
|
+
→ FIX: Track with Task Extraction Protocol, check off each task
|
|
1171
|
+
|
|
1172
|
+
⛔ PATTERN 2: Read the file, understand the issue, but forgot to EDIT
|
|
1173
|
+
→ FIX: After each task, verify you actually USED the Edit/Write tool
|
|
1174
|
+
|
|
1175
|
+
⛔ PATTERN 3: Fixed file A, but file B also needed the same fix
|
|
1176
|
+
→ FIX: After fixing, Grep for same pattern in other files
|
|
1177
|
+
|
|
1178
|
+
⛔ PATTERN 4: Fixed the logic but forgot to update the UI/types/tests
|
|
1179
|
+
→ FIX: Side Effects Map (see Multi-Fix Execution Protocol)
|
|
1180
|
+
|
|
1181
|
+
⛔ PATTERN 5: User said "fix multiple places" but AI fixed only the first one
|
|
1182
|
+
→ FIX: Task Extraction Protocol → extract ALL → track ALL → verify ALL
|
|
904
1183
|
```
|
|
905
1184
|
|
|
906
1185
|
### Context Staleness Rule
|
|
@@ -1175,6 +1454,14 @@ SCAN PROTOCOL:
|
|
|
1175
1454
|
| All platforms | `shared/storage-patterns.md` | 🟡 Task Router says so |
|
|
1176
1455
|
| All platforms | `shared/i18n-localization.md` | 🟡 Task Router says so |
|
|
1177
1456
|
| All platforms | `shared/debugging-intelligence.md` | 🟡 Complex bugs / stack traces / issue investigation |
|
|
1457
|
+
| All platforms | `shared/intent-analysis.md` | 🟡 Multi-part, vague, non-technical, or ambiguous input |
|
|
1458
|
+
| All platforms | `shared/code-generation-templates.md` | 🟡 State management, API client, forms setup |
|
|
1459
|
+
| All platforms | `shared/spec-to-code.md` | 🟡 Building feature from spec/requirements |
|
|
1460
|
+
| All platforms | `shared/navigation-patterns.md` | 🟡 Auth flow, deep links, modals, tabs, permissions |
|
|
1461
|
+
| All platforms | `shared/complex-ui-patterns.md` | 🟡 Carousel, gestures, responsive, dark mode, a11y |
|
|
1462
|
+
| All platforms | `shared/data-flow-patterns.md` | 🟡 Pagination, optimistic updates, cache, WebSocket |
|
|
1463
|
+
| All platforms | `shared/error-handling.md` | 🟡 Error hierarchy, retry, error boundary, toast |
|
|
1464
|
+
| All platforms | `shared/testing-patterns.md` | 🟡 Component tests, hook tests, factories, snapshots |
|
|
1178
1465
|
|
|
1179
1466
|
**Cross-platform:** Flutter/RN projects also Read `ios/ios-native.md` + `android/android-native.md` for native modules.
|
|
1180
1467
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buivietphi/skill-mobile-mt",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Master Senior Mobile Engineer skill for AI agents. Pre-built patterns from 30+ production repos. React Native, Flutter, iOS, Android. Supports Claude, Cline, Cursor, Windsurf, Copilot, Codex, Gemini, Kimi, Kilo Code, Kiro, Antigravity.",
|
|
5
5
|
"author": "buivietphi",
|
|
6
6
|
"license": "MIT",
|