thachvd-kit 1.0.29 → 1.0.31

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 (408) hide show
  1. package/README.md +53 -148
  2. package/bin/cli.js +407 -310
  3. package/package.json +1 -10
  4. package/.agent/agents/backend-specialist.md +0 -263
  5. package/.agent/agents/code-archaeologist.md +0 -106
  6. package/.agent/agents/database-architect.md +0 -226
  7. package/.agent/agents/debugger.md +0 -225
  8. package/.agent/agents/devops-engineer.md +0 -242
  9. package/.agent/agents/documentation-writer.md +0 -104
  10. package/.agent/agents/explorer-agent.md +0 -73
  11. package/.agent/agents/frontend-specialist.md +0 -593
  12. package/.agent/agents/game-developer.md +0 -162
  13. package/.agent/agents/mobile-developer.md +0 -377
  14. package/.agent/agents/orchestrator.md +0 -416
  15. package/.agent/agents/penetration-tester.md +0 -188
  16. package/.agent/agents/performance-optimizer.md +0 -187
  17. package/.agent/agents/product-manager.md +0 -112
  18. package/.agent/agents/product-owner.md +0 -95
  19. package/.agent/agents/project-planner.md +0 -406
  20. package/.agent/agents/qa-automation-engineer.md +0 -103
  21. package/.agent/agents/security-auditor.md +0 -170
  22. package/.agent/agents/seo-specialist.md +0 -111
  23. package/.agent/agents/test-engineer.md +0 -158
  24. package/.agent/docs/architecture.md +0 -15
  25. package/.agent/docs/conventions.md +0 -16
  26. package/.agent/docs/getting-started.md +0 -95
  27. package/.agent/docs/project.md +0 -59
  28. package/.agent/docs/tooling.md +0 -136
  29. package/.agent/docs/workflow.md +0 -79
  30. package/.agent/rules/GEMINI.md +0 -62
  31. package/.agent/skills/api-design/SKILL.md +0 -156
  32. package/.agent/skills/api-patterns/SKILL.md +0 -81
  33. package/.agent/skills/api-patterns/api-style.md +0 -42
  34. package/.agent/skills/api-patterns/auth.md +0 -24
  35. package/.agent/skills/api-patterns/documentation.md +0 -26
  36. package/.agent/skills/api-patterns/graphql.md +0 -41
  37. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  38. package/.agent/skills/api-patterns/response.md +0 -37
  39. package/.agent/skills/api-patterns/rest.md +0 -40
  40. package/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
  41. package/.agent/skills/api-patterns/security-testing.md +0 -122
  42. package/.agent/skills/api-patterns/trpc.md +0 -41
  43. package/.agent/skills/api-patterns/versioning.md +0 -22
  44. package/.agent/skills/app-builder/SKILL.md +0 -75
  45. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  46. package/.agent/skills/app-builder/feature-building.md +0 -53
  47. package/.agent/skills/app-builder/project-detection.md +0 -34
  48. package/.agent/skills/app-builder/scaffolding.md +0 -118
  49. package/.agent/skills/app-builder/tech-stack.md +0 -40
  50. package/.agent/skills/app-builder/templates/SKILL.md +0 -39
  51. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  52. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  53. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  54. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  55. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  56. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  57. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  58. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
  59. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
  60. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
  61. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
  62. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  63. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
  64. package/.agent/skills/architecture/SKILL.md +0 -55
  65. package/.agent/skills/architecture/context-discovery.md +0 -43
  66. package/.agent/skills/architecture/examples.md +0 -94
  67. package/.agent/skills/architecture/pattern-selection.md +0 -68
  68. package/.agent/skills/architecture/patterns-reference.md +0 -50
  69. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  70. package/.agent/skills/bash-linux/SKILL.md +0 -199
  71. package/.agent/skills/behavioral-modes/SKILL.md +0 -242
  72. package/.agent/skills/brainstorming/SKILL.md +0 -163
  73. package/.agent/skills/brainstorming/dynamic-questioning.md +0 -350
  74. package/.agent/skills/clean-code/SKILL.md +0 -201
  75. package/.agent/skills/code-review-checklist/SKILL.md +0 -109
  76. package/.agent/skills/database-design/SKILL.md +0 -52
  77. package/.agent/skills/database-design/database-selection.md +0 -43
  78. package/.agent/skills/database-design/indexing.md +0 -39
  79. package/.agent/skills/database-design/migrations.md +0 -48
  80. package/.agent/skills/database-design/optimization.md +0 -36
  81. package/.agent/skills/database-design/orm-selection.md +0 -30
  82. package/.agent/skills/database-design/schema-design.md +0 -56
  83. package/.agent/skills/database-design/scripts/schema_validator.py +0 -172
  84. package/.agent/skills/deployment-procedures/SKILL.md +0 -241
  85. package/.agent/skills/desktop-design/SKILL.md +0 -25
  86. package/.agent/skills/dispatching-parallel-agents/SKILL.md +0 -112
  87. package/.agent/skills/doc.md +0 -177
  88. package/.agent/skills/docker-patterns/SKILL.md +0 -232
  89. package/.agent/skills/documentation-templates/SKILL.md +0 -194
  90. package/.agent/skills/executing-plans/SKILL.md +0 -61
  91. package/.agent/skills/finishing-a-development-branch/SKILL.md +0 -135
  92. package/.agent/skills/frontend-design/SKILL.md +0 -418
  93. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  94. package/.agent/skills/frontend-design/color-system.md +0 -311
  95. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  96. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  97. package/.agent/skills/frontend-design/scripts/accessibility_checker.py +0 -183
  98. package/.agent/skills/frontend-design/scripts/ux_audit.py +0 -722
  99. package/.agent/skills/frontend-design/typography-system.md +0 -345
  100. package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
  101. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  102. package/.agent/skills/game-development/2d-games/SKILL.md +0 -119
  103. package/.agent/skills/game-development/3d-games/SKILL.md +0 -135
  104. package/.agent/skills/game-development/SKILL.md +0 -167
  105. package/.agent/skills/game-development/game-art/SKILL.md +0 -185
  106. package/.agent/skills/game-development/game-audio/SKILL.md +0 -190
  107. package/.agent/skills/game-development/game-design/SKILL.md +0 -129
  108. package/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
  109. package/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
  110. package/.agent/skills/game-development/pc-games/SKILL.md +0 -144
  111. package/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
  112. package/.agent/skills/game-development/web-games/SKILL.md +0 -150
  113. package/.agent/skills/geo-fundamentals/SKILL.md +0 -156
  114. package/.agent/skills/geo-fundamentals/scripts/geo_checker.py +0 -289
  115. package/.agent/skills/golang-patterns/SKILL.md +0 -226
  116. package/.agent/skills/golang-testing/SKILL.md +0 -182
  117. package/.agent/skills/i18n-localization/SKILL.md +0 -154
  118. package/.agent/skills/i18n-localization/scripts/i18n_checker.py +0 -241
  119. package/.agent/skills/intelligent-routing/SKILL.md +0 -335
  120. package/.agent/skills/laravel-patterns/SKILL.md +0 -224
  121. package/.agent/skills/laravel-security/SKILL.md +0 -171
  122. package/.agent/skills/laravel-tdd/SKILL.md +0 -149
  123. package/.agent/skills/lint-and-validate/SKILL.md +0 -45
  124. package/.agent/skills/lint-and-validate/scripts/lint_runner.py +0 -184
  125. package/.agent/skills/lint-and-validate/scripts/type_coverage.py +0 -173
  126. package/.agent/skills/mcp-builder/SKILL.md +0 -176
  127. package/.agent/skills/mobile-design/SKILL.md +0 -394
  128. package/.agent/skills/mobile-design/decision-trees.md +0 -516
  129. package/.agent/skills/mobile-design/mobile-backend.md +0 -491
  130. package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
  131. package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
  132. package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
  133. package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
  134. package/.agent/skills/mobile-design/mobile-performance.md +0 -767
  135. package/.agent/skills/mobile-design/mobile-testing.md +0 -356
  136. package/.agent/skills/mobile-design/mobile-typography.md +0 -433
  137. package/.agent/skills/mobile-design/platform-android.md +0 -666
  138. package/.agent/skills/mobile-design/platform-ios.md +0 -561
  139. package/.agent/skills/mobile-design/scripts/mobile_audit.py +0 -670
  140. package/.agent/skills/mobile-design/touch-psychology.md +0 -537
  141. package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
  142. package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
  143. package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
  144. package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
  145. package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
  146. package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
  147. package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
  148. package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
  149. package/.agent/skills/nextjs-react-expert/SKILL.md +0 -286
  150. package/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +0 -222
  151. package/.agent/skills/nextjs-react-expert/scripts/react_performance_checker.py +0 -252
  152. package/.agent/skills/nodejs-best-practices/SKILL.md +0 -333
  153. package/.agent/skills/parallel-agents/SKILL.md +0 -175
  154. package/.agent/skills/performance-profiling/SKILL.md +0 -143
  155. package/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +0 -76
  156. package/.agent/skills/plan-writing/SKILL.md +0 -152
  157. package/.agent/skills/powershell-windows/SKILL.md +0 -167
  158. package/.agent/skills/project-onboarding/SKILL.md +0 -42
  159. package/.agent/skills/python-patterns/SKILL.md +0 -441
  160. package/.agent/skills/react-frontend/SKILL.md +0 -25
  161. package/.agent/skills/receiving-code-review/SKILL.md +0 -120
  162. package/.agent/skills/red-team-tactics/SKILL.md +0 -199
  163. package/.agent/skills/requesting-code-review/SKILL.md +0 -67
  164. package/.agent/skills/rust-pro/SKILL.md +0 -176
  165. package/.agent/skills/seo-fundamentals/SKILL.md +0 -129
  166. package/.agent/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
  167. package/.agent/skills/server-management/SKILL.md +0 -161
  168. package/.agent/skills/subagent-driven-development/SKILL.md +0 -76
  169. package/.agent/skills/systematic-debugging/SKILL.md +0 -109
  170. package/.agent/skills/tailwind-patterns/SKILL.md +0 -269
  171. package/.agent/skills/tdd-workflow/SKILL.md +0 -149
  172. package/.agent/skills/testing-patterns/SKILL.md +0 -178
  173. package/.agent/skills/testing-patterns/scripts/test_runner.py +0 -219
  174. package/.agent/skills/using-git-worktrees/SKILL.md +0 -121
  175. package/.agent/skills/verification-before-completion/SKILL.md +0 -99
  176. package/.agent/skills/vulnerability-scanner/SKILL.md +0 -276
  177. package/.agent/skills/vulnerability-scanner/checklists.md +0 -121
  178. package/.agent/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  179. package/.agent/skills/web-design-guidelines/SKILL.md +0 -57
  180. package/.agent/skills/webapp-testing/SKILL.md +0 -187
  181. package/.agent/skills/webapp-testing/scripts/playwright_runner.py +0 -173
  182. package/.agent/skills/writing-skills/SKILL.md +0 -170
  183. package/.agent/workflows/brainstorm.md +0 -113
  184. package/.agent/workflows/create.md +0 -59
  185. package/.agent/workflows/debug.md +0 -103
  186. package/.agent/workflows/deploy.md +0 -176
  187. package/.agent/workflows/enhance.md +0 -63
  188. package/.agent/workflows/forge-debug.md +0 -12
  189. package/.agent/workflows/forge-fast.md +0 -22
  190. package/.agent/workflows/forge-release.md +0 -12
  191. package/.agent/workflows/forge-research.md +0 -24
  192. package/.agent/workflows/forge-review.md +0 -12
  193. package/.agent/workflows/forge-task.md +0 -37
  194. package/.agent/workflows/orchestrate.md +0 -237
  195. package/.agent/workflows/plan.md +0 -89
  196. package/.agent/workflows/preview.md +0 -81
  197. package/.agent/workflows/release.md +0 -42
  198. package/.agent/workflows/review.md +0 -125
  199. package/.agent/workflows/simple.md +0 -42
  200. package/.agent/workflows/spec.md +0 -140
  201. package/.agent/workflows/status.md +0 -86
  202. package/.agent/workflows/task.md +0 -59
  203. package/.agent/workflows/test.md +0 -144
  204. package/.agent/workflows/ui-ux-pro-max.md +0 -296
  205. package/agents/backend-specialist.md +0 -263
  206. package/agents/code-archaeologist.md +0 -106
  207. package/agents/database-architect.md +0 -226
  208. package/agents/debugger.md +0 -225
  209. package/agents/devops-engineer.md +0 -242
  210. package/agents/documentation-writer.md +0 -104
  211. package/agents/explorer-agent.md +0 -73
  212. package/agents/frontend-specialist.md +0 -593
  213. package/agents/game-developer.md +0 -162
  214. package/agents/mobile-developer.md +0 -377
  215. package/agents/orchestrator.md +0 -416
  216. package/agents/penetration-tester.md +0 -188
  217. package/agents/performance-optimizer.md +0 -187
  218. package/agents/product-manager.md +0 -112
  219. package/agents/product-owner.md +0 -95
  220. package/agents/project-planner.md +0 -406
  221. package/agents/qa-automation-engineer.md +0 -103
  222. package/agents/security-auditor.md +0 -170
  223. package/agents/seo-specialist.md +0 -111
  224. package/agents/test-engineer.md +0 -158
  225. package/commands/forge-debug.md +0 -12
  226. package/commands/forge-fast.md +0 -22
  227. package/commands/forge-release.md +0 -12
  228. package/commands/forge-research.md +0 -24
  229. package/commands/forge-review.md +0 -12
  230. package/commands/forge-task.md +0 -37
  231. package/kit/PROMPT_RECIPE.md +0 -30
  232. package/kit/README.md +0 -30
  233. package/prompts/debug.md +0 -11
  234. package/prompts/release.md +0 -11
  235. package/prompts/simple.md +0 -11
  236. package/prompts/spec.md +0 -11
  237. package/prompts/task.md +0 -12
  238. package/rules/GEMINI.md +0 -45
  239. package/scripts/auto_preview.py +0 -148
  240. package/scripts/checklist.py +0 -217
  241. package/scripts/session_manager.py +0 -120
  242. package/scripts/verify_all.py +0 -327
  243. package/skills/api-design/SKILL.md +0 -156
  244. package/skills/api-patterns/SKILL.md +0 -81
  245. package/skills/api-patterns/api-style.md +0 -42
  246. package/skills/api-patterns/auth.md +0 -24
  247. package/skills/api-patterns/documentation.md +0 -26
  248. package/skills/api-patterns/graphql.md +0 -41
  249. package/skills/api-patterns/rate-limiting.md +0 -31
  250. package/skills/api-patterns/response.md +0 -37
  251. package/skills/api-patterns/rest.md +0 -40
  252. package/skills/api-patterns/scripts/api_validator.py +0 -211
  253. package/skills/api-patterns/security-testing.md +0 -122
  254. package/skills/api-patterns/trpc.md +0 -41
  255. package/skills/api-patterns/versioning.md +0 -22
  256. package/skills/app-builder/SKILL.md +0 -75
  257. package/skills/app-builder/agent-coordination.md +0 -71
  258. package/skills/app-builder/feature-building.md +0 -53
  259. package/skills/app-builder/project-detection.md +0 -34
  260. package/skills/app-builder/scaffolding.md +0 -118
  261. package/skills/app-builder/tech-stack.md +0 -40
  262. package/skills/app-builder/templates/SKILL.md +0 -39
  263. package/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  264. package/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  265. package/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  266. package/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  267. package/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  268. package/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  269. package/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  270. package/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
  271. package/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
  272. package/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
  273. package/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
  274. package/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  275. package/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
  276. package/skills/architecture/SKILL.md +0 -55
  277. package/skills/architecture/context-discovery.md +0 -43
  278. package/skills/architecture/examples.md +0 -94
  279. package/skills/architecture/pattern-selection.md +0 -68
  280. package/skills/architecture/patterns-reference.md +0 -50
  281. package/skills/architecture/trade-off-analysis.md +0 -77
  282. package/skills/bash-linux/SKILL.md +0 -199
  283. package/skills/behavioral-modes/SKILL.md +0 -242
  284. package/skills/brainstorming/SKILL.md +0 -163
  285. package/skills/brainstorming/dynamic-questioning.md +0 -350
  286. package/skills/clean-code/SKILL.md +0 -201
  287. package/skills/code-review-checklist/SKILL.md +0 -142
  288. package/skills/database-design/SKILL.md +0 -52
  289. package/skills/database-design/database-selection.md +0 -43
  290. package/skills/database-design/indexing.md +0 -39
  291. package/skills/database-design/migrations.md +0 -48
  292. package/skills/database-design/optimization.md +0 -36
  293. package/skills/database-design/orm-selection.md +0 -30
  294. package/skills/database-design/schema-design.md +0 -56
  295. package/skills/database-design/scripts/schema_validator.py +0 -172
  296. package/skills/deployment-procedures/SKILL.md +0 -241
  297. package/skills/desktop-design/SKILL.md +0 -25
  298. package/skills/dispatching-parallel-agents/SKILL.md +0 -112
  299. package/skills/doc.md +0 -177
  300. package/skills/docker-patterns/SKILL.md +0 -232
  301. package/skills/documentation-templates/SKILL.md +0 -194
  302. package/skills/executing-plans/SKILL.md +0 -61
  303. package/skills/finishing-a-development-branch/SKILL.md +0 -135
  304. package/skills/frontend-design/SKILL.md +0 -418
  305. package/skills/frontend-design/animation-guide.md +0 -331
  306. package/skills/frontend-design/color-system.md +0 -311
  307. package/skills/frontend-design/decision-trees.md +0 -418
  308. package/skills/frontend-design/motion-graphics.md +0 -306
  309. package/skills/frontend-design/scripts/accessibility_checker.py +0 -183
  310. package/skills/frontend-design/scripts/ux_audit.py +0 -722
  311. package/skills/frontend-design/typography-system.md +0 -345
  312. package/skills/frontend-design/ux-psychology.md +0 -1116
  313. package/skills/frontend-design/visual-effects.md +0 -383
  314. package/skills/game-development/2d-games/SKILL.md +0 -119
  315. package/skills/game-development/3d-games/SKILL.md +0 -135
  316. package/skills/game-development/SKILL.md +0 -167
  317. package/skills/game-development/game-art/SKILL.md +0 -185
  318. package/skills/game-development/game-audio/SKILL.md +0 -190
  319. package/skills/game-development/game-design/SKILL.md +0 -129
  320. package/skills/game-development/mobile-games/SKILL.md +0 -108
  321. package/skills/game-development/multiplayer/SKILL.md +0 -132
  322. package/skills/game-development/pc-games/SKILL.md +0 -144
  323. package/skills/game-development/vr-ar/SKILL.md +0 -123
  324. package/skills/game-development/web-games/SKILL.md +0 -150
  325. package/skills/geo-fundamentals/SKILL.md +0 -156
  326. package/skills/geo-fundamentals/scripts/geo_checker.py +0 -289
  327. package/skills/golang-patterns/SKILL.md +0 -226
  328. package/skills/golang-testing/SKILL.md +0 -182
  329. package/skills/i18n-localization/SKILL.md +0 -154
  330. package/skills/i18n-localization/scripts/i18n_checker.py +0 -241
  331. package/skills/intelligent-routing/SKILL.md +0 -335
  332. package/skills/laravel-patterns/SKILL.md +0 -224
  333. package/skills/laravel-security/SKILL.md +0 -171
  334. package/skills/laravel-tdd/SKILL.md +0 -149
  335. package/skills/lint-and-validate/SKILL.md +0 -45
  336. package/skills/lint-and-validate/scripts/lint_runner.py +0 -184
  337. package/skills/lint-and-validate/scripts/type_coverage.py +0 -173
  338. package/skills/mcp-builder/SKILL.md +0 -176
  339. package/skills/mobile-design/SKILL.md +0 -394
  340. package/skills/mobile-design/decision-trees.md +0 -516
  341. package/skills/mobile-design/mobile-backend.md +0 -491
  342. package/skills/mobile-design/mobile-color-system.md +0 -420
  343. package/skills/mobile-design/mobile-debugging.md +0 -122
  344. package/skills/mobile-design/mobile-design-thinking.md +0 -357
  345. package/skills/mobile-design/mobile-navigation.md +0 -458
  346. package/skills/mobile-design/mobile-performance.md +0 -767
  347. package/skills/mobile-design/mobile-testing.md +0 -356
  348. package/skills/mobile-design/mobile-typography.md +0 -433
  349. package/skills/mobile-design/platform-android.md +0 -666
  350. package/skills/mobile-design/platform-ios.md +0 -561
  351. package/skills/mobile-design/scripts/mobile_audit.py +0 -670
  352. package/skills/mobile-design/touch-psychology.md +0 -537
  353. package/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
  354. package/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
  355. package/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
  356. package/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
  357. package/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
  358. package/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
  359. package/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
  360. package/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
  361. package/skills/nextjs-react-expert/SKILL.md +0 -286
  362. package/skills/nextjs-react-expert/scripts/convert_rules.py +0 -222
  363. package/skills/nextjs-react-expert/scripts/react_performance_checker.py +0 -252
  364. package/skills/nodejs-best-practices/SKILL.md +0 -333
  365. package/skills/parallel-agents/SKILL.md +0 -175
  366. package/skills/performance-profiling/SKILL.md +0 -143
  367. package/skills/performance-profiling/scripts/lighthouse_audit.py +0 -76
  368. package/skills/plan-writing/SKILL.md +0 -152
  369. package/skills/powershell-windows/SKILL.md +0 -167
  370. package/skills/project-onboarding/SKILL.md +0 -42
  371. package/skills/python-patterns/SKILL.md +0 -441
  372. package/skills/react-frontend/SKILL.md +0 -25
  373. package/skills/receiving-code-review/SKILL.md +0 -120
  374. package/skills/red-team-tactics/SKILL.md +0 -199
  375. package/skills/requesting-code-review/SKILL.md +0 -67
  376. package/skills/rust-pro/SKILL.md +0 -176
  377. package/skills/seo-fundamentals/SKILL.md +0 -129
  378. package/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
  379. package/skills/server-management/SKILL.md +0 -161
  380. package/skills/subagent-driven-development/SKILL.md +0 -76
  381. package/skills/systematic-debugging/SKILL.md +0 -109
  382. package/skills/tailwind-patterns/SKILL.md +0 -269
  383. package/skills/tdd-workflow/SKILL.md +0 -173
  384. package/skills/testing-patterns/SKILL.md +0 -178
  385. package/skills/testing-patterns/scripts/test_runner.py +0 -219
  386. package/skills/using-git-worktrees/SKILL.md +0 -121
  387. package/skills/verification-before-completion/SKILL.md +0 -113
  388. package/skills/vulnerability-scanner/SKILL.md +0 -276
  389. package/skills/vulnerability-scanner/checklists.md +0 -121
  390. package/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  391. package/skills/web-design-guidelines/SKILL.md +0 -57
  392. package/skills/webapp-testing/SKILL.md +0 -187
  393. package/skills/webapp-testing/scripts/playwright_runner.py +0 -173
  394. package/skills/writing-skills/SKILL.md +0 -170
  395. package/workflows/brainstorm.md +0 -113
  396. package/workflows/create.md +0 -59
  397. package/workflows/debug.md +0 -103
  398. package/workflows/deploy.md +0 -176
  399. package/workflows/enhance.md +0 -63
  400. package/workflows/orchestrate.md +0 -237
  401. package/workflows/plan.md +0 -89
  402. package/workflows/preview.md +0 -81
  403. package/workflows/release.md +0 -42
  404. package/workflows/simple.md +0 -42
  405. package/workflows/status.md +0 -86
  406. package/workflows/task.md +0 -59
  407. package/workflows/test.md +0 -144
  408. package/workflows/ui-ux-pro-max.md +0 -296
@@ -1,767 +0,0 @@
1
- # Mobile Performance Reference
2
-
3
- > Deep dive into React Native and Flutter performance optimization, 60fps animations, memory management, and battery considerations.
4
- > **This file covers the #1 area where AI-generated code FAILS.**
5
-
6
- ---
7
-
8
- ## 1. The Mobile Performance Mindset
9
-
10
- ### Why Mobile Performance is Different
11
-
12
- ```
13
- DESKTOP: MOBILE:
14
- ├── Unlimited power ├── Battery matters
15
- ├── Abundant RAM ├── RAM is shared, limited
16
- ├── Stable network ├── Network is unreliable
17
- ├── CPU always available ├── CPU throttles when hot
18
- └── User expects fast anyway └── User expects INSTANT
19
- ```
20
-
21
- ### Performance Budget Concept
22
-
23
- ```
24
- Every frame must complete in:
25
- ├── 60fps → 16.67ms per frame
26
- ├── 120fps (ProMotion) → 8.33ms per frame
27
-
28
- If your code takes longer:
29
- ├── Frame drops → Janky scroll/animation
30
- ├── User perceives as "slow" or "broken"
31
- └── They WILL uninstall your app
32
- ```
33
-
34
- ---
35
-
36
- ## 2. React Native Performance
37
-
38
- ### 🚫 The #1 AI Mistake: ScrollView for Lists
39
-
40
- ```javascript
41
- // ❌ NEVER DO THIS - AI's favorite mistake
42
- <ScrollView>
43
- {items.map(item => (
44
- <ItemComponent key={item.id} item={item} />
45
- ))}
46
- </ScrollView>
47
-
48
- // Why it's catastrophic:
49
- // ├── Renders ALL items immediately (1000 items = 1000 renders)
50
- // ├── Memory explodes
51
- // ├── Initial render takes seconds
52
- // └── Scroll becomes janky
53
-
54
- // ✅ ALWAYS USE FlatList
55
- <FlatList
56
- data={items}
57
- renderItem={renderItem}
58
- keyExtractor={item => item.id}
59
- />
60
- ```
61
-
62
- ### FlatList Optimization Checklist
63
-
64
- ```javascript
65
- // ✅ CORRECT: All optimizations applied
66
-
67
- // 1. Memoize the item component
68
- const ListItem = React.memo(({ item }: { item: Item }) => {
69
- return (
70
- <Pressable style={styles.item}>
71
- <Text>{item.title}</Text>
72
- </Pressable>
73
- );
74
- });
75
-
76
- // 2. Memoize renderItem with useCallback
77
- const renderItem = useCallback(
78
- ({ item }: { item: Item }) => <ListItem item={item} />,
79
- [] // Empty deps = never recreated
80
- );
81
-
82
- // 3. Stable keyExtractor (NEVER use index!)
83
- const keyExtractor = useCallback((item: Item) => item.id, []);
84
-
85
- // 4. Provide getItemLayout for fixed-height items
86
- const getItemLayout = useCallback(
87
- (data: Item[] | null, index: number) => ({
88
- length: ITEM_HEIGHT, // Fixed height
89
- offset: ITEM_HEIGHT * index,
90
- index,
91
- }),
92
- []
93
- );
94
-
95
- // 5. Apply to FlatList
96
- <FlatList
97
- data={items}
98
- renderItem={renderItem}
99
- keyExtractor={keyExtractor}
100
- getItemLayout={getItemLayout}
101
- // Performance props
102
- removeClippedSubviews={true} // Android: detach off-screen
103
- maxToRenderPerBatch={10} // Items per batch
104
- windowSize={5} // Render window (5 = 2 screens each side)
105
- initialNumToRender={10} // Initial items
106
- updateCellsBatchingPeriod={50} // Batching delay
107
- />
108
- ```
109
-
110
- ### Why Each Optimization Matters
111
-
112
- | Optimization | What It Prevents | Impact |
113
- |--------------|------------------|--------|
114
- | `React.memo` | Re-render on parent change | 🔴 Critical |
115
- | `useCallback renderItem` | New function every render | 🔴 Critical |
116
- | Stable `keyExtractor` | Wrong item recycling | 🔴 Critical |
117
- | `getItemLayout` | Async layout calculation | 🟡 High |
118
- | `removeClippedSubviews` | Memory from off-screen | 🟡 High |
119
- | `maxToRenderPerBatch` | Blocking main thread | 🟢 Medium |
120
- | `windowSize` | Memory usage | 🟢 Medium |
121
-
122
- ### FlashList: The Better Option
123
-
124
- ```javascript
125
- // Consider FlashList for better performance
126
- import { FlashList } from "@shopify/flash-list";
127
-
128
- <FlashList
129
- data={items}
130
- renderItem={renderItem}
131
- estimatedItemSize={ITEM_HEIGHT}
132
- keyExtractor={keyExtractor}
133
- />
134
-
135
- // Benefits over FlatList:
136
- // ├── Faster recycling
137
- // ├── Better memory management
138
- // ├── Simpler API
139
- // └── Fewer optimization props needed
140
- ```
141
-
142
- ### Animation Performance
143
-
144
- ```javascript
145
- // ❌ JS-driven animation (blocks JS thread)
146
- Animated.timing(value, {
147
- toValue: 1,
148
- duration: 300,
149
- useNativeDriver: false, // BAD!
150
- }).start();
151
-
152
- // ✅ Native-driver animation (runs on UI thread)
153
- Animated.timing(value, {
154
- toValue: 1,
155
- duration: 300,
156
- useNativeDriver: true, // GOOD!
157
- }).start();
158
-
159
- // Native driver supports ONLY:
160
- // ├── transform (translate, scale, rotate)
161
- // └── opacity
162
- //
163
- // Does NOT support:
164
- // ├── width, height
165
- // ├── backgroundColor
166
- // ├── borderRadius changes
167
- // └── margin, padding
168
- ```
169
-
170
- ### Reanimated for Complex Animations
171
-
172
- ```javascript
173
- // For animations native driver can't handle, use Reanimated 3
174
-
175
- import Animated, {
176
- useSharedValue,
177
- useAnimatedStyle,
178
- withSpring,
179
- } from 'react-native-reanimated';
180
-
181
- const Component = () => {
182
- const offset = useSharedValue(0);
183
-
184
- const animatedStyles = useAnimatedStyle(() => ({
185
- transform: [{ translateX: withSpring(offset.value) }],
186
- }));
187
-
188
- return <Animated.View style={animatedStyles} />;
189
- };
190
-
191
- // Benefits:
192
- // ├── Runs on UI thread (60fps guaranteed)
193
- // ├── Can animate any property
194
- // ├── Gesture-driven animations
195
- // └── Worklets for complex logic
196
- ```
197
-
198
- ### Memory Leak Prevention
199
-
200
- ```javascript
201
- // ❌ Memory leak: uncleared interval
202
- useEffect(() => {
203
- const interval = setInterval(() => {
204
- fetchData();
205
- }, 5000);
206
- // Missing cleanup!
207
- }, []);
208
-
209
- // ✅ Proper cleanup
210
- useEffect(() => {
211
- const interval = setInterval(() => {
212
- fetchData();
213
- }, 5000);
214
-
215
- return () => clearInterval(interval); // CLEANUP!
216
- }, []);
217
-
218
- // Common memory leak sources:
219
- // ├── Timers (setInterval, setTimeout)
220
- // ├── Event listeners
221
- // ├── Subscriptions (WebSocket, PubSub)
222
- // ├── Async operations that update state after unmount
223
- // └── Image caching without limits
224
- ```
225
-
226
- ### React Native Performance Checklist
227
-
228
- ```markdown
229
- ## Before Every List
230
- - [ ] Using FlatList or FlashList (NOT ScrollView)
231
- - [ ] renderItem is useCallback memoized
232
- - [ ] List items are React.memo wrapped
233
- - [ ] keyExtractor uses stable ID (NOT index)
234
- - [ ] getItemLayout provided (if fixed height)
235
-
236
- ## Before Every Animation
237
- - [ ] useNativeDriver: true (if possible)
238
- - [ ] Using Reanimated for complex animations
239
- - [ ] Only animating transform/opacity
240
- - [ ] Tested on low-end Android device
241
-
242
- ## Before Any Release
243
- - [ ] console.log statements removed
244
- - [ ] Cleanup functions in all useEffects
245
- - [ ] No memory leaks (test with profiler)
246
- - [ ] Tested in release build (not dev)
247
- ```
248
-
249
- ---
250
-
251
- ## 3. Flutter Performance
252
-
253
- ### 🚫 The #1 AI Mistake: setState Overuse
254
-
255
- ```dart
256
- // ❌ WRONG: setState rebuilds ENTIRE widget tree
257
- class BadCounter extends StatefulWidget {
258
- @override
259
- State<BadCounter> createState() => _BadCounterState();
260
- }
261
-
262
- class _BadCounterState extends State<BadCounter> {
263
- int _counter = 0;
264
-
265
- void _increment() {
266
- setState(() {
267
- _counter++; // This rebuilds EVERYTHING below!
268
- });
269
- }
270
-
271
- @override
272
- Widget build(BuildContext context) {
273
- return Column(
274
- children: [
275
- Text('Counter: $_counter'),
276
- ExpensiveWidget(), // Rebuilds unnecessarily!
277
- AnotherExpensiveWidget(), // Rebuilds unnecessarily!
278
- ],
279
- );
280
- }
281
- }
282
- ```
283
-
284
- ### The `const` Constructor Revolution
285
-
286
- ```dart
287
- // ✅ CORRECT: const prevents rebuilds
288
-
289
- class GoodCounter extends StatefulWidget {
290
- const GoodCounter({super.key}); // CONST constructor!
291
-
292
- @override
293
- State<GoodCounter> createState() => _GoodCounterState();
294
- }
295
-
296
- class _GoodCounterState extends State<GoodCounter> {
297
- int _counter = 0;
298
-
299
- @override
300
- Widget build(BuildContext context) {
301
- return Column(
302
- children: [
303
- Text('Counter: $_counter'),
304
- const ExpensiveWidget(), // Won't rebuild!
305
- const AnotherExpensiveWidget(), // Won't rebuild!
306
- ],
307
- );
308
- }
309
- }
310
-
311
- // RULE: Add `const` to EVERY widget that doesn't depend on state
312
- ```
313
-
314
- ### Targeted State Management
315
-
316
- ```dart
317
- // ❌ setState rebuilds whole tree
318
- setState(() => _value = newValue);
319
-
320
- // ✅ ValueListenableBuilder: surgical rebuilds
321
- class TargetedState extends StatelessWidget {
322
- final ValueNotifier<int> counter = ValueNotifier(0);
323
-
324
- @override
325
- Widget build(BuildContext context) {
326
- return Column(
327
- children: [
328
- // Only this rebuilds when counter changes
329
- ValueListenableBuilder<int>(
330
- valueListenable: counter,
331
- builder: (context, value, child) => Text('$value'),
332
- child: const Icon(Icons.star), // Won't rebuild!
333
- ),
334
- const ExpensiveWidget(), // Never rebuilds
335
- ],
336
- );
337
- }
338
- }
339
- ```
340
-
341
- ### Riverpod/Provider Best Practices
342
-
343
- ```dart
344
- // ❌ WRONG: Reading entire provider in build
345
- Widget build(BuildContext context) {
346
- final state = ref.watch(myProvider); // Rebuilds on ANY change
347
- return Text(state.name);
348
- }
349
-
350
- // ✅ CORRECT: Select only what you need
351
- Widget build(BuildContext context) {
352
- final name = ref.watch(myProvider.select((s) => s.name));
353
- return Text(name); // Only rebuilds when name changes
354
- }
355
- ```
356
-
357
- ### ListView Optimization
358
-
359
- ```dart
360
- // ❌ WRONG: ListView without builder (renders all)
361
- ListView(
362
- children: items.map((item) => ItemWidget(item)).toList(),
363
- )
364
-
365
- // ✅ CORRECT: ListView.builder (lazy rendering)
366
- ListView.builder(
367
- itemCount: items.length,
368
- itemBuilder: (context, index) => ItemWidget(items[index]),
369
- // Additional optimizations:
370
- itemExtent: 56, // Fixed height = faster layout
371
- cacheExtent: 100, // Pre-render distance
372
- )
373
-
374
- // ✅ EVEN BETTER: ListView.separated for dividers
375
- ListView.separated(
376
- itemCount: items.length,
377
- itemBuilder: (context, index) => ItemWidget(items[index]),
378
- separatorBuilder: (context, index) => const Divider(),
379
- )
380
- ```
381
-
382
- ### Image Optimization
383
-
384
- ```dart
385
- // ❌ WRONG: No caching, full resolution
386
- Image.network(url)
387
-
388
- // ✅ CORRECT: Cached with proper sizing
389
- CachedNetworkImage(
390
- imageUrl: url,
391
- width: 100,
392
- height: 100,
393
- fit: BoxFit.cover,
394
- memCacheWidth: 200, // Cache at 2x for retina
395
- memCacheHeight: 200,
396
- placeholder: (context, url) => const Skeleton(),
397
- errorWidget: (context, url, error) => const Icon(Icons.error),
398
- )
399
- ```
400
-
401
- ### Dispose Pattern
402
-
403
- ```dart
404
- class MyWidget extends StatefulWidget {
405
- @override
406
- State<MyWidget> createState() => _MyWidgetState();
407
- }
408
-
409
- class _MyWidgetState extends State<MyWidget> {
410
- late final StreamSubscription _subscription;
411
- late final AnimationController _controller;
412
- late final TextEditingController _textController;
413
-
414
- @override
415
- void initState() {
416
- super.initState();
417
- _subscription = stream.listen((_) {});
418
- _controller = AnimationController(vsync: this);
419
- _textController = TextEditingController();
420
- }
421
-
422
- @override
423
- void dispose() {
424
- // ALWAYS dispose in reverse order of creation
425
- _textController.dispose();
426
- _controller.dispose();
427
- _subscription.cancel();
428
- super.dispose();
429
- }
430
-
431
- @override
432
- Widget build(BuildContext context) => Container();
433
- }
434
- ```
435
-
436
- ### Flutter Performance Checklist
437
-
438
- ```markdown
439
- ## Before Every Widget
440
- - [ ] const constructor added (if no runtime args)
441
- - [ ] const keywords on static children
442
- - [ ] Minimal setState scope
443
- - [ ] Using selectors for provider watches
444
-
445
- ## Before Every List
446
- - [ ] Using ListView.builder (NOT ListView with children)
447
- - [ ] itemExtent provided (if fixed height)
448
- - [ ] Image caching with size limits
449
-
450
- ## Before Any Animation
451
- - [ ] Using Impeller (Flutter 3.16+)
452
- - [ ] Avoiding Opacity widget (use FadeTransition)
453
- - [ ] TickerProviderStateMixin for AnimationController
454
-
455
- ## Before Any Release
456
- - [ ] All dispose() methods implemented
457
- - [ ] No print() in production
458
- - [ ] Tested in profile/release mode
459
- - [ ] DevTools performance overlay checked
460
- ```
461
-
462
- ---
463
-
464
- ## 4. Animation Performance (Both Platforms)
465
-
466
- ### The 60fps Imperative
467
-
468
- ```
469
- Human eye detects:
470
- ├── < 24 fps → "Slideshow" (broken)
471
- ├── 24-30 fps → "Choppy" (uncomfortable)
472
- ├── 30-45 fps → "Noticeably not smooth"
473
- ├── 45-60 fps → "Smooth" (acceptable)
474
- ├── 60 fps → "Buttery" (target)
475
- └── 120 fps → "Premium" (ProMotion devices)
476
-
477
- NEVER ship < 60fps animations.
478
- ```
479
-
480
- ### GPU vs CPU Animation
481
-
482
- ```
483
- GPU-ACCELERATED (FAST): CPU-BOUND (SLOW):
484
- ├── transform: translate ├── width, height
485
- ├── transform: scale ├── top, left, right, bottom
486
- ├── transform: rotate ├── margin, padding
487
- ├── opacity ├── border-radius (animated)
488
- └── (Composited, off main) └── box-shadow (animated)
489
-
490
- RULE: Only animate transform and opacity.
491
- Everything else causes layout recalculation.
492
- ```
493
-
494
- ### Animation Timing Guide
495
-
496
- | Animation Type | Duration | Easing |
497
- |----------------|----------|--------|
498
- | Micro-interaction | 100-200ms | ease-out |
499
- | Standard transition | 200-300ms | ease-out |
500
- | Page transition | 300-400ms | ease-in-out |
501
- | Complex/dramatic | 400-600ms | ease-in-out |
502
- | Loading skeletons | 1000-1500ms | linear (loop) |
503
-
504
- ### Spring Physics
505
-
506
- ```javascript
507
- // React Native Reanimated
508
- withSpring(targetValue, {
509
- damping: 15, // How quickly it settles (higher = faster stop)
510
- stiffness: 150, // How "tight" the spring (higher = faster)
511
- mass: 1, // Weight of the object
512
- })
513
-
514
- // Flutter
515
- SpringSimulation(
516
- SpringDescription(
517
- mass: 1,
518
- stiffness: 150,
519
- damping: 15,
520
- ),
521
- start,
522
- end,
523
- velocity,
524
- )
525
-
526
- // Natural feel ranges:
527
- // Damping: 10-20 (bouncy to settled)
528
- // Stiffness: 100-200 (loose to tight)
529
- // Mass: 0.5-2 (light to heavy)
530
- ```
531
-
532
- ---
533
-
534
- ## 5. Memory Management
535
-
536
- ### Common Memory Leaks
537
-
538
- | Source | Platform | Solution |
539
- |--------|----------|----------|
540
- | Timers | Both | Clear in cleanup/dispose |
541
- | Event listeners | Both | Remove in cleanup/dispose |
542
- | Subscriptions | Both | Cancel in cleanup/dispose |
543
- | Large images | Both | Limit cache, resize |
544
- | Async after unmount | RN | isMounted check or AbortController |
545
- | Animation controllers | Flutter | Dispose controllers |
546
-
547
- ### Image Memory
548
-
549
- ```
550
- Image memory = width × height × 4 bytes (RGBA)
551
-
552
- 1080p image = 1920 × 1080 × 4 = 8.3 MB
553
- 4K image = 3840 × 2160 × 4 = 33.2 MB
554
-
555
- 10 4K images = 332 MB → App crash!
556
-
557
- RULE: Always resize images to display size (or 2-3x for retina).
558
- ```
559
-
560
- ### Memory Profiling
561
-
562
- ```
563
- React Native:
564
- ├── Flipper → Memory tab
565
- ├── Xcode Instruments (iOS)
566
- └── Android Studio Profiler
567
-
568
- Flutter:
569
- ├── DevTools → Memory tab
570
- ├── Observatory
571
- └── flutter run --profile
572
- ```
573
-
574
- ---
575
-
576
- ## 6. Battery Optimization
577
-
578
- ### Battery Drain Sources
579
-
580
- | Source | Impact | Mitigation |
581
- |--------|--------|------------|
582
- | **Screen on** | 🔴 Highest | Dark mode on OLED |
583
- | **GPS continuous** | 🔴 Very high | Use significant change |
584
- | **Network requests** | 🟡 High | Batch, cache aggressively |
585
- | **Animations** | 🟡 Medium | Reduce when low battery |
586
- | **Background work** | 🟡 Medium | Defer non-critical |
587
- | **CPU computation** | 🟢 Lower | Offload to backend |
588
-
589
- ### OLED Battery Saving
590
-
591
- ```
592
- OLED screens: Black pixels = OFF = 0 power
593
-
594
- Dark mode savings:
595
- ├── True black (#000000) → Maximum savings
596
- ├── Dark gray (#1a1a1a) → Slight savings
597
- ├── Any color → Some power
598
- └── White (#FFFFFF) → Maximum power
599
-
600
- RULE: On dark mode, use true black for backgrounds.
601
- ```
602
-
603
- ### Background Task Guidelines
604
-
605
- ```
606
- iOS:
607
- ├── Background refresh: Limited, system-scheduled
608
- ├── Push notifications: Use for important updates
609
- ├── Background modes: Location, audio, VoIP only
610
- └── Background tasks: Max ~30 seconds
611
-
612
- Android:
613
- ├── WorkManager: System-scheduled, battery-aware
614
- ├── Foreground service: Visible to user, continuous
615
- ├── JobScheduler: Batch network operations
616
- └── Doze mode: Respect it, batch operations
617
- ```
618
-
619
- ---
620
-
621
- ## 7. Network Performance
622
-
623
- ### Offline-First Architecture
624
-
625
- ```
626
- ┌──────────────┐
627
- │ UI │
628
- └──────┬───────┘
629
- │
630
- ┌──────▼───────┐
631
- │ Cache │ ← Read from cache FIRST
632
- └──────┬───────┘
633
- │
634
- ┌──────▼───────┐
635
- │ Network │ ← Update cache from network
636
- └──────────────┘
637
-
638
- Benefits:
639
- ├── Instant UI (no loading spinner for cached data)
640
- ├── Works offline
641
- ├── Reduces data usage
642
- └── Better UX on slow networks
643
- ```
644
-
645
- ### Request Optimization
646
-
647
- ```
648
- BATCH: Combine multiple requests into one
649
- ├── 10 small requests → 1 batch request
650
- ├── Reduces connection overhead
651
- └── Better for battery (radio on once)
652
-
653
- CACHE: Don't re-fetch unchanged data
654
- ├── ETag/If-None-Match headers
655
- ├── Cache-Control headers
656
- └── Stale-while-revalidate pattern
657
-
658
- COMPRESS: Reduce payload size
659
- ├── gzip/brotli compression
660
- ├── Request only needed fields (GraphQL)
661
- └── Paginate large lists
662
- ```
663
-
664
- ---
665
-
666
- ## 8. Performance Testing
667
-
668
- ### What to Test
669
-
670
- | Metric | Target | Tool |
671
- |--------|--------|------|
672
- | **Frame rate** | ≥ 60fps | Performance overlay |
673
- | **Memory** | Stable, no growth | Profiler |
674
- | **Cold start** | < 2s | Manual timing |
675
- | **TTI (Time to Interactive)** | < 3s | Lighthouse |
676
- | **List scroll** | No jank | Manual feel |
677
- | **Animation smoothness** | No drops | Performance monitor |
678
-
679
- ### Test on Real Devices
680
-
681
- ```
682
- ⚠️ NEVER trust only:
683
- ├── Simulator/emulator (faster than real)
684
- ├── Dev mode (slower than release)
685
- ├── High-end devices only
686
-
687
- ✅ ALWAYS test on:
688
- ├── Low-end Android (< $200 phone)
689
- ├── Older iOS device (iPhone 8 or SE)
690
- ├── Release/profile build
691
- └── With real data (not 10 items)
692
- ```
693
-
694
- ### Performance Monitoring Checklist
695
-
696
- ```markdown
697
- ## During Development
698
- - [ ] Performance overlay enabled
699
- - [ ] Watching for dropped frames
700
- - [ ] Memory usage stable
701
- - [ ] No console warnings about performance
702
-
703
- ## Before Release
704
- - [ ] Tested on low-end device
705
- - [ ] Profiled memory over extended use
706
- - [ ] Cold start time measured
707
- - [ ] List scroll tested with 1000+ items
708
- - [ ] Animations tested at 60fps
709
- - [ ] Network tested on slow 3G
710
- ```
711
-
712
- ---
713
-
714
- ## 9. Quick Reference Card
715
-
716
- ### React Native Essentials
717
-
718
- ```javascript
719
- // List: Always use
720
- <FlatList
721
- data={data}
722
- renderItem={useCallback(({item}) => <MemoItem item={item} />, [])}
723
- keyExtractor={useCallback(item => item.id, [])}
724
- getItemLayout={useCallback((_, i) => ({length: H, offset: H*i, index: i}), [])}
725
- />
726
-
727
- // Animation: Always native
728
- useNativeDriver: true
729
-
730
- // Cleanup: Always present
731
- useEffect(() => {
732
- return () => cleanup();
733
- }, []);
734
- ```
735
-
736
- ### Flutter Essentials
737
-
738
- ```dart
739
- // Widgets: Always const
740
- const MyWidget()
741
-
742
- // Lists: Always builder
743
- ListView.builder(itemBuilder: ...)
744
-
745
- // State: Always targeted
746
- ValueListenableBuilder() or ref.watch(provider.select(...))
747
-
748
- // Dispose: Always cleanup
749
- @override
750
- void dispose() {
751
- controller.dispose();
752
- super.dispose();
753
- }
754
- ```
755
-
756
- ### Animation Targets
757
-
758
- ```
759
- Transform/Opacity only ← What to animate
760
- 16.67ms per frame ← Time budget
761
- 60fps minimum ← Target
762
- Low-end Android ← Test device
763
- ```
764
-
765
- ---
766
-
767
- > **Remember:** Performance is not optimization—it's baseline quality. A slow app is a broken app. Test on the worst device your users have, not the best device you have.