reis-mobile 0.3.6 → 0.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.
Files changed (463) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +24 -0
  4. package/README.md +175 -168
  5. package/THIRD_PARTY_NOTICES.md +224 -4
  6. package/agents/android-architect.md +89 -0
  7. package/agents/android-performance-engineer.md +92 -0
  8. package/agents/android-test-engineer.md +97 -0
  9. package/agents/flutter-test-engineer.md +2 -0
  10. package/agents/ios-architect.md +93 -0
  11. package/agents/ios-performance-engineer.md +92 -0
  12. package/agents/ios-test-engineer.md +95 -0
  13. package/agents/lead-mobile.md +10 -1
  14. package/agents/mobile-staff-engineer.md +1 -1
  15. package/agents/rn-architect.md +94 -0
  16. package/agents/rn-performance-engineer.md +92 -0
  17. package/agents/rn-test-engineer.md +98 -0
  18. package/bin/reis-mobile.mjs +59 -17
  19. package/commands/debate.md +10 -1
  20. package/commands/debug.md +60 -0
  21. package/commands/reis-mobile.md +7 -2
  22. package/core/config/project.mjs +59 -0
  23. package/core/registry/frontmatter.mjs +15 -4
  24. package/core/registry/registry.mjs +21 -1
  25. package/core/router/intents.mjs +2 -0
  26. package/core/router/router.mjs +10 -5
  27. package/package.json +1 -1
  28. package/skills/android-adaptive/SKILL.md +304 -0
  29. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/container-behavior.md +112 -0
  30. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/get-started.md +69 -0
  31. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/index.md +81 -0
  32. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/item-behavior.md +170 -0
  33. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/container-properties.md +415 -0
  34. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/get-started.md +51 -0
  35. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/index.md +73 -0
  36. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/item-properties.md +170 -0
  37. package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/mediaquery/index.md +333 -0
  38. package/skills/android-adaptive/references/android/develop/ui/compose/tooling/debug.md +114 -0
  39. package/skills/android-adaptive/references/android/guide/navigation/navigation-3/recipes/material-listdetail.md +141 -0
  40. package/skills/android-agp-9-upgrade/SKILL.md +106 -0
  41. package/skills/android-agp-9-upgrade/references/android/build/migrate-to-built-in-kotlin.md +416 -0
  42. package/skills/android-agp-9-upgrade/references/android/build/releases/agp-9-0-0-release-notes.md +554 -0
  43. package/skills/android-agp-9-upgrade/references/buildconfig.md +54 -0
  44. package/skills/android-agp-9-upgrade/references/ksp-kapt.md +39 -0
  45. package/skills/android-agp-9-upgrade/references/paparazzi-gradle-9.md +30 -0
  46. package/skills/android-agp-9-upgrade/references/recipes.md +62 -0
  47. package/skills/android-appfunctions/SKILL.md +74 -0
  48. package/skills/android-appfunctions/references/adb-interaction-testing.md +95 -0
  49. package/skills/android-appfunctions/references/context.md +26 -0
  50. package/skills/android-appfunctions/references/feature-discovery-analysis.md +71 -0
  51. package/skills/android-appfunctions/references/implementation-configuration.md +282 -0
  52. package/skills/android-appfunctions/references/kdoc-refinement-optimization.md +75 -0
  53. package/skills/android-appfunctions/references/migrate-to-service-entry-point.md +226 -0
  54. package/skills/android-camerax/SKILL.md +135 -0
  55. package/skills/android-camerax/references/camera1-to-camerax.md +198 -0
  56. package/skills/android-camerax/references/camera2-to-camerax.md +193 -0
  57. package/skills/android-camerax/references/expert-blueprints.md +58 -0
  58. package/skills/android-camerax/references/foldables.md +83 -0
  59. package/skills/android-camerax/references/immutability.md +60 -0
  60. package/skills/android-camerax/references/low-light.md +124 -0
  61. package/skills/android-camerax/references/mlkit-spatial.md +75 -0
  62. package/skills/android-camerax/references/modern-apis.md +42 -0
  63. package/skills/android-camerax/references/testing.md +69 -0
  64. package/skills/android-camerax/references/thermals.md +85 -0
  65. package/skills/android-camerax/references/wear-os.md +76 -0
  66. package/skills/android-camerax/references/xr.md +54 -0
  67. package/skills/android-cli/SKILL.md +474 -0
  68. package/skills/android-cli/references/interact.md +113 -0
  69. package/skills/android-cli/references/journeys.md +120 -0
  70. package/skills/android-code-review/SKILL.md +58 -0
  71. package/skills/android-display-glasses-with-jetpack-compose-glimmer/SKILL.md +340 -0
  72. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/design/ui/ai-glasses/guides/interaction/inputs.md +67 -0
  73. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/access-hardware-projected-context.md +388 -0
  74. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/buttons.md +139 -0
  75. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/cards.md +148 -0
  76. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/focus.md +107 -0
  77. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/icons.md +90 -0
  78. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/text.md +69 -0
  79. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/title-chips.md +82 -0
  80. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/request-hardware-permissions.md +213 -0
  81. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/button-samples-source.md +176 -0
  82. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/button-source.md +203 -0
  83. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/card-samples-source.md +296 -0
  84. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/card-source.md +515 -0
  85. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/deptheffect-source.md +224 -0
  86. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/deptheffectlevels-source.md +105 -0
  87. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/glimmersansflextypography-source.md +270 -0
  88. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/glimmertheme-source.md +182 -0
  89. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/icon-source.md +388 -0
  90. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/iconbutton-source.md +126 -0
  91. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/iconsizes-source.md +78 -0
  92. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/list-source.md +27 -0
  93. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/listitem-source.md +272 -0
  94. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/liststate-source.md +427 -0
  95. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/material-hct-source.md +217 -0
  96. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/projectedcontext-source.md +265 -0
  97. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stack-source.md +368 -0
  98. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stackitemscope-source.md +440 -0
  99. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stackstate-source.md +325 -0
  100. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/surface-source.md +1211 -0
  101. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/titlechip-samples-source.md +101 -0
  102. package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/titlechip-source.md +131 -0
  103. package/skills/android-edge-to-edge/SKILL.md +429 -0
  104. package/skills/android-engage-sdk-integration/SKILL.md +130 -0
  105. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/faq.md +439 -0
  106. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/food.md +1149 -0
  107. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/healthandfitness.md +1055 -0
  108. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/listen.md +1050 -0
  109. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/otherverticals.md +1301 -0
  110. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/read.md +910 -0
  111. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/shopping.md +1224 -0
  112. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/social.md +719 -0
  113. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/travel.md +1413 -0
  114. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/continue-watching/index.md +19 -0
  115. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/entitlements.md +353 -0
  116. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/getting-started.md +202 -0
  117. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/recommendations.md +471 -0
  118. package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/watch.md +1081 -0
  119. package/skills/android-engage-sdk-integration/references/clusters.md +154 -0
  120. package/skills/android-engage-sdk-integration/references/common.md +519 -0
  121. package/skills/android-engage-sdk-integration/references/patterns.md +527 -0
  122. package/skills/android-engage-sdk-integration/references/requests.md +260 -0
  123. package/skills/android-engage-sdk-integration/references/schemas/food.md +509 -0
  124. package/skills/android-engage-sdk-integration/references/schemas/listen.md +842 -0
  125. package/skills/android-engage-sdk-integration/references/schemas/other.md +220 -0
  126. package/skills/android-engage-sdk-integration/references/schemas/read.md +412 -0
  127. package/skills/android-engage-sdk-integration/references/schemas/shopping.md +357 -0
  128. package/skills/android-engage-sdk-integration/references/schemas/social.md +228 -0
  129. package/skills/android-engage-sdk-integration/references/schemas/travel.md +923 -0
  130. package/skills/android-engage-sdk-integration/references/schemas/tv.md +1226 -0
  131. package/skills/android-engage-sdk-integration/references/schemas/watch.md +1137 -0
  132. package/skills/android-engage-sdk-integration/references/troubleshooting.md +39 -0
  133. package/skills/android-gradle-build-debug/SKILL.md +71 -0
  134. package/skills/android-intent-security/SKILL.md +550 -0
  135. package/skills/android-leanback-to-compose-tv-migration/SKILL.md +743 -0
  136. package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/get-started/navigation.md +372 -0
  137. package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/playback/compose/browse.md +243 -0
  138. package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/playback/compose/index.md +153 -0
  139. package/skills/android-media3-cast-integration/SKILL.md +236 -0
  140. package/skills/android-media3-cast-integration/references/android/media/media3/cast/create-castplayer.md +390 -0
  141. package/skills/android-media3-cast-integration/references/android/media/media3/cast/customize-castoptions.md +93 -0
  142. package/skills/android-media3-cast-integration/references/android/media/media3/cast/index.md +21 -0
  143. package/skills/android-migrate-xml-views-to-jetpack-compose/SKILL.md +127 -0
  144. package/skills/android-migrate-xml-views-to-jetpack-compose/references/analysis-of-the-project-and-layout.md +42 -0
  145. package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/designsystems/migrate-xml-theme-to-compose.md +171 -0
  146. package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/migrate/interoperability-apis/compose-in-views.md +299 -0
  147. package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/migrate/interoperability-apis/views-in-compose.md +286 -0
  148. package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/setup-compose-dependencies-and-compiler.md +197 -0
  149. package/skills/android-migrate-xml-views-to-jetpack-compose/references/identify-optimal-xml-candidate.md +31 -0
  150. package/skills/android-migrate-xml-views-to-jetpack-compose/references/xml-layout-migration.md +86 -0
  151. package/skills/android-ml-kit-genai-prompt-api/SKILL.md +124 -0
  152. package/skills/android-ml-kit-genai-prompt-api/references/get-started.md +272 -0
  153. package/skills/android-ml-kit-genai-prompt-api/references/prefix-caching.md +146 -0
  154. package/skills/android-ml-kit-genai-prompt-api/references/prompt-design.md +55 -0
  155. package/skills/android-ml-kit-genai-prompt-api/references/prompt-optimization.md +74 -0
  156. package/skills/android-ml-kit-genai-prompt-api/references/structured-output.md +219 -0
  157. package/skills/android-ml-kit-genai-prompt-api/references/system-instructions.md +71 -0
  158. package/skills/android-navigation-3/SKILL.md +122 -0
  159. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/index.md +51 -0
  160. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/migration-guide.md +670 -0
  161. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/animations.md +147 -0
  162. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basic.md +89 -0
  163. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basicdsl.md +85 -0
  164. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basicsaveable.md +90 -0
  165. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/bottomsheet.md +195 -0
  166. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/common-ui.md +200 -0
  167. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/conditional-transitions.md +182 -0
  168. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/conditional.md +230 -0
  169. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-custommatcher.md +176 -0
  170. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-staticuri.md +140 -0
  171. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-syntheticbackstack.md +184 -0
  172. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/dialog.md +107 -0
  173. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/lifecycle-owner.md +185 -0
  174. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/material-listdetail.md +141 -0
  175. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/material-supportingpane.md +145 -0
  176. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/modular-hilt.md +283 -0
  177. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/modular-koin.md +287 -0
  178. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/multiple-backstacks.md +468 -0
  179. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/passingarguments.md +371 -0
  180. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/results-event.md +273 -0
  181. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/results-state.md +266 -0
  182. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/scenes-listdetail.md +435 -0
  183. package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/scenes-twopane.md +244 -0
  184. package/skills/android-navigation-3/references/android/guide/navigation/type-safe-destinations.md +129 -0
  185. package/skills/android-navigation-event/SKILL.md +312 -0
  186. package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/dispatcher.md +134 -0
  187. package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/handle-back.md +217 -0
  188. package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/index.md +83 -0
  189. package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/setup.md +32 -0
  190. package/skills/android-play-billing-library-version-upgrade/SKILL.md +96 -0
  191. package/skills/android-play-billing-library-version-upgrade/references/android/google/play/billing/release-notes.md +1240 -0
  192. package/skills/android-play-billing-library-version-upgrade/references/migration-logic.md +78 -0
  193. package/skills/android-play-billing-library-version-upgrade/references/version-checklist.md +54 -0
  194. package/skills/android-play-policy-insights/SKILL.md +172 -0
  195. package/skills/android-play-policy-insights/resources/common_mandates.md +100 -0
  196. package/skills/android-play-policy-insights/resources/compliance_report_template.md +59 -0
  197. package/skills/android-play-policy-insights/resources/critic.md +86 -0
  198. package/skills/android-play-policy-insights/resources/goal_data_safety.md +212 -0
  199. package/skills/android-play-policy-insights/resources/goal_permissions_and_apis.md +459 -0
  200. package/skills/android-play-policy-insights/resources/goal_user_account.md +106 -0
  201. package/skills/android-play-policy-insights/resources/policies.json +321 -0
  202. package/skills/android-play-policy-insights/resources/scanner_config.json +843 -0
  203. package/skills/android-play-policy-insights/scripts/generate_report.py +860 -0
  204. package/skills/android-play-policy-insights/scripts/orchestrator.py +1313 -0
  205. package/skills/android-play-policy-insights/scripts/play_store_scraper.py +410 -0
  206. package/skills/android-play-policy-insights/scripts/scanner.py +261 -0
  207. package/skills/android-play-policy-insights/scripts/template_engine.py +243 -0
  208. package/skills/android-profiler/SKILL.md +60 -0
  209. package/skills/android-profiler/analysis/analysis_orchestrator.md +32 -0
  210. package/skills/android-profiler/analysis/workflows/perfetto-sql/perfetto_sql.md +28 -0
  211. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/perfetto_trace_analysis.md +121 -0
  212. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/guiding_principles.md +51 -0
  213. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/domain_hints_template.md +7 -0
  214. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_cpu.md +56 -0
  215. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_graphics.md +51 -0
  216. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_io.md +46 -0
  217. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_ipc.md +41 -0
  218. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_memory.md +55 -0
  219. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_power.md +33 -0
  220. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/per_candidate_analysis.md +172 -0
  221. package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/triage.md +94 -0
  222. package/skills/android-profiler/recording/recording_orchestrator.md +36 -0
  223. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/perfetto_trace_recording.md +148 -0
  224. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/app_jank.pftxt +43 -0
  225. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/cpu_profile.pftxt +35 -0
  226. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/java_heap_dump.pftxt +21 -0
  227. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/long_background.pftxt +37 -0
  228. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/memory_counters.pftxt +45 -0
  229. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/native_heap.pftxt +21 -0
  230. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/sched_cpu.pftxt +33 -0
  231. package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/trace_config_reference.md +102 -0
  232. package/skills/android-profiler/references/env_setup.md +15 -0
  233. package/skills/android-profiler/references/perfetto/setup.md +29 -0
  234. package/skills/android-profiler/references/perfetto/sql.md +327 -0
  235. package/skills/android-r8-analyzer/SKILL.md +72 -0
  236. package/skills/android-r8-analyzer/references/CONFIGURATION-ANALYZER.md +287 -0
  237. package/skills/android-r8-analyzer/references/CONFIGURATION.md +44 -0
  238. package/skills/android-r8-analyzer/references/KEEP-RULES-IMPACT-HIERARCHY.md +83 -0
  239. package/skills/android-r8-analyzer/references/REDUNDANT-RULES.md +222 -0
  240. package/skills/android-r8-analyzer/references/REFLECTION-GUIDE.md +139 -0
  241. package/skills/android-r8-analyzer/references/REPORT_FORMAT.md +51 -0
  242. package/skills/android-r8-analyzer/references/android/topic/performance/app-optimization/enable-app-optimization.md +252 -0
  243. package/skills/android-r8-analyzer/references/android/training/testing/other-components/ui-automator.md +312 -0
  244. package/skills/android-restore-credentials/SKILL.md +359 -0
  245. package/skills/android-restore-credentials/references/android/guide/topics/manifest/application-element.md +832 -0
  246. package/skills/android-restore-credentials/references/android/identity/passkeys/create-passkeys.md +327 -0
  247. package/skills/android-restore-credentials/references/android/identity/passkeys/sign-in-with-passkeys.md +219 -0
  248. package/skills/android-styles/SKILL.md +229 -0
  249. package/skills/android-styles/references/android/develop/ui/compose/designsystems/custom.md +459 -0
  250. package/skills/android-styles/references/android/develop/ui/compose/styles/fundamentals.md +421 -0
  251. package/skills/android-styles/references/android/develop/ui/compose/styles/state-animations.md +461 -0
  252. package/skills/android-styles/references/android/develop/ui/compose/styles/styles-vs-modifiers.md +48 -0
  253. package/skills/android-styles/references/android/develop/ui/compose/styles/theming.md +269 -0
  254. package/skills/android-verified-email/SKILL.md +432 -0
  255. package/skills/android-verified-email/references/android/identity/credential-manager/index.md +67 -0
  256. package/skills/android-verified-email/references/android/identity/digital-credentials/credential-verifier.md +166 -0
  257. package/skills/android-verified-email/references/android/identity/digital-credentials/email-verification-implementation.md +313 -0
  258. package/skills/android-verified-email/references/android/identity/digital-credentials/email-verification.md +158 -0
  259. package/skills/android-verified-email/references/android/identity/digital-credentials/index.md +112 -0
  260. package/skills/android-verified-email/references/android/identity/passkeys/create-passkeys.md +327 -0
  261. package/skills/android-verified-email/references/android/identity/sign-in/credential-manager-webview.md +84 -0
  262. package/skills/android-wear-compose-m3/SKILL.md +365 -0
  263. package/skills/android-wear-compose-m3/references/android/training/wearables/compose/migrate-to-material3.md +677 -0
  264. package/skills/android-wear-compose-m3/references/foundation/AmbientModeSample.kt.md +123 -0
  265. package/skills/android-wear-compose-m3/references/foundation/AmbientModeSample.kt.md.txt +123 -0
  266. package/skills/android-wear-compose-m3/references/foundation/CurvedWorldSample.kt.md +430 -0
  267. package/skills/android-wear-compose-m3/references/foundation/CurvedWorldSample.kt.md.txt +430 -0
  268. package/skills/android-wear-compose-m3/references/foundation/ExpandableSample.kt.md +99 -0
  269. package/skills/android-wear-compose-m3/references/foundation/ExpandableSample.kt.md.txt +99 -0
  270. package/skills/android-wear-compose-m3/references/foundation/HierarchicalFocusSample.kt.md +141 -0
  271. package/skills/android-wear-compose-m3/references/foundation/HierarchicalFocusSample.kt.md.txt +141 -0
  272. package/skills/android-wear-compose-m3/references/foundation/PagerSamples.kt.md +56 -0
  273. package/skills/android-wear-compose-m3/references/foundation/PagerSamples.kt.md.txt +56 -0
  274. package/skills/android-wear-compose-m3/references/foundation/RotarySamples.kt.md +153 -0
  275. package/skills/android-wear-compose-m3/references/foundation/RotarySamples.kt.md.txt +153 -0
  276. package/skills/android-wear-compose-m3/references/foundation/ScalingLazyColumnSample.kt.md +131 -0
  277. package/skills/android-wear-compose-m3/references/foundation/ScalingLazyColumnSample.kt.md.txt +131 -0
  278. package/skills/android-wear-compose-m3/references/foundation/SwipeToDismissBoxSample.kt.md +169 -0
  279. package/skills/android-wear-compose-m3/references/foundation/SwipeToDismissBoxSample.kt.md.txt +169 -0
  280. package/skills/android-wear-compose-m3/references/foundation/SwipeToRevealSample.kt.md +282 -0
  281. package/skills/android-wear-compose-m3/references/foundation/SwipeToRevealSample.kt.md.txt +282 -0
  282. package/skills/android-wear-compose-m3/references/foundation/TransformingLazyColumnSample.kt.md +335 -0
  283. package/skills/android-wear-compose-m3/references/foundation/TransformingLazyColumnSample.kt.md.txt +335 -0
  284. package/skills/android-wear-compose-m3/references/material3/AlertDialogSample.kt.md +377 -0
  285. package/skills/android-wear-compose-m3/references/material3/AlertDialogSample.kt.md.txt +377 -0
  286. package/skills/android-wear-compose-m3/references/material3/AnimatedTextSample.kt.md +165 -0
  287. package/skills/android-wear-compose-m3/references/material3/AnimatedTextSample.kt.md.txt +165 -0
  288. package/skills/android-wear-compose-m3/references/material3/ButtonGroupSample.kt.md +91 -0
  289. package/skills/android-wear-compose-m3/references/material3/ButtonGroupSample.kt.md.txt +91 -0
  290. package/skills/android-wear-compose-m3/references/material3/ButtonSample.kt.md +496 -0
  291. package/skills/android-wear-compose-m3/references/material3/ButtonSample.kt.md.txt +496 -0
  292. package/skills/android-wear-compose-m3/references/material3/CardSample.kt.md +470 -0
  293. package/skills/android-wear-compose-m3/references/material3/CardSample.kt.md.txt +470 -0
  294. package/skills/android-wear-compose-m3/references/material3/CheckboxButtonSample.kt.md +67 -0
  295. package/skills/android-wear-compose-m3/references/material3/CheckboxButtonSample.kt.md.txt +67 -0
  296. package/skills/android-wear-compose-m3/references/material3/ConfirmationDialogSample.kt.md +162 -0
  297. package/skills/android-wear-compose-m3/references/material3/ConfirmationDialogSample.kt.md.txt +162 -0
  298. package/skills/android-wear-compose-m3/references/material3/CurvedTextSamples.kt.md +78 -0
  299. package/skills/android-wear-compose-m3/references/material3/CurvedTextSamples.kt.md.txt +78 -0
  300. package/skills/android-wear-compose-m3/references/material3/DatePickerSample.kt.md +131 -0
  301. package/skills/android-wear-compose-m3/references/material3/DatePickerSample.kt.md.txt +131 -0
  302. package/skills/android-wear-compose-m3/references/material3/DynamicColorSchemeSample.kt.md +74 -0
  303. package/skills/android-wear-compose-m3/references/material3/DynamicColorSchemeSample.kt.md.txt +74 -0
  304. package/skills/android-wear-compose-m3/references/material3/EdgeButtonSample.kt.md +63 -0
  305. package/skills/android-wear-compose-m3/references/material3/EdgeButtonSample.kt.md.txt +63 -0
  306. package/skills/android-wear-compose-m3/references/material3/FadingExpandingLabelSample.kt.md +60 -0
  307. package/skills/android-wear-compose-m3/references/material3/FadingExpandingLabelSample.kt.md.txt +60 -0
  308. package/skills/android-wear-compose-m3/references/material3/IconButtonSample.kt.md +125 -0
  309. package/skills/android-wear-compose-m3/references/material3/IconButtonSample.kt.md.txt +125 -0
  310. package/skills/android-wear-compose-m3/references/material3/IconToggleButtonSample.kt.md +116 -0
  311. package/skills/android-wear-compose-m3/references/material3/IconToggleButtonSample.kt.md.txt +116 -0
  312. package/skills/android-wear-compose-m3/references/material3/LevelIndicatorSample.kt.md +68 -0
  313. package/skills/android-wear-compose-m3/references/material3/LevelIndicatorSample.kt.md.txt +68 -0
  314. package/skills/android-wear-compose-m3/references/material3/LinearProgressIndicatorSample.kt.md +50 -0
  315. package/skills/android-wear-compose-m3/references/material3/LinearProgressIndicatorSample.kt.md.txt +50 -0
  316. package/skills/android-wear-compose-m3/references/material3/ListHeaderSample.kt.md +177 -0
  317. package/skills/android-wear-compose-m3/references/material3/ListHeaderSample.kt.md.txt +177 -0
  318. package/skills/android-wear-compose-m3/references/material3/OneHandedGestureSamples.kt.md +651 -0
  319. package/skills/android-wear-compose-m3/references/material3/OneHandedGestureSamples.kt.md.txt +651 -0
  320. package/skills/android-wear-compose-m3/references/material3/OpenOnPhoneDialogSample.kt.md +57 -0
  321. package/skills/android-wear-compose-m3/references/material3/OpenOnPhoneDialogSample.kt.md.txt +57 -0
  322. package/skills/android-wear-compose-m3/references/material3/PageIndicatorSample.kt.md +110 -0
  323. package/skills/android-wear-compose-m3/references/material3/PageIndicatorSample.kt.md.txt +110 -0
  324. package/skills/android-wear-compose-m3/references/material3/PagerScaffoldSample.kt.md +204 -0
  325. package/skills/android-wear-compose-m3/references/material3/PagerScaffoldSample.kt.md.txt +204 -0
  326. package/skills/android-wear-compose-m3/references/material3/PickerGroupSample.kt.md +139 -0
  327. package/skills/android-wear-compose-m3/references/material3/PickerGroupSample.kt.md.txt +139 -0
  328. package/skills/android-wear-compose-m3/references/material3/PickerSample.kt.md +111 -0
  329. package/skills/android-wear-compose-m3/references/material3/PickerSample.kt.md.txt +111 -0
  330. package/skills/android-wear-compose-m3/references/material3/PlaceholderSample.kt.md +184 -0
  331. package/skills/android-wear-compose-m3/references/material3/PlaceholderSample.kt.md.txt +184 -0
  332. package/skills/android-wear-compose-m3/references/material3/ProgressIndicatorSample.kt.md +263 -0
  333. package/skills/android-wear-compose-m3/references/material3/ProgressIndicatorSample.kt.md.txt +263 -0
  334. package/skills/android-wear-compose-m3/references/material3/RadioButtonSample.kt.md +105 -0
  335. package/skills/android-wear-compose-m3/references/material3/RadioButtonSample.kt.md.txt +105 -0
  336. package/skills/android-wear-compose-m3/references/material3/ScaffoldSample.kt.md +146 -0
  337. package/skills/android-wear-compose-m3/references/material3/ScaffoldSample.kt.md.txt +146 -0
  338. package/skills/android-wear-compose-m3/references/material3/ScrollAwaySample.kt.md +97 -0
  339. package/skills/android-wear-compose-m3/references/material3/ScrollAwaySample.kt.md.txt +97 -0
  340. package/skills/android-wear-compose-m3/references/material3/ScrollIndicatorSample.kt.md +66 -0
  341. package/skills/android-wear-compose-m3/references/material3/ScrollIndicatorSample.kt.md.txt +66 -0
  342. package/skills/android-wear-compose-m3/references/material3/SliderSample.kt.md +86 -0
  343. package/skills/android-wear-compose-m3/references/material3/SliderSample.kt.md.txt +86 -0
  344. package/skills/android-wear-compose-m3/references/material3/StepperSample.kt.md +148 -0
  345. package/skills/android-wear-compose-m3/references/material3/StepperSample.kt.md.txt +148 -0
  346. package/skills/android-wear-compose-m3/references/material3/SurfaceTransformationSample.kt.md +166 -0
  347. package/skills/android-wear-compose-m3/references/material3/SurfaceTransformationSample.kt.md.txt +166 -0
  348. package/skills/android-wear-compose-m3/references/material3/SwipeToDismissBoxSample.kt.md +172 -0
  349. package/skills/android-wear-compose-m3/references/material3/SwipeToDismissBoxSample.kt.md.txt +172 -0
  350. package/skills/android-wear-compose-m3/references/material3/SwipeToRevealSample.kt.md +367 -0
  351. package/skills/android-wear-compose-m3/references/material3/SwipeToRevealSample.kt.md.txt +367 -0
  352. package/skills/android-wear-compose-m3/references/material3/SwitchButtonSample.kt.md +66 -0
  353. package/skills/android-wear-compose-m3/references/material3/SwitchButtonSample.kt.md.txt +66 -0
  354. package/skills/android-wear-compose-m3/references/material3/TextButtonSample.kt.md +115 -0
  355. package/skills/android-wear-compose-m3/references/material3/TextButtonSample.kt.md.txt +115 -0
  356. package/skills/android-wear-compose-m3/references/material3/TextToggleButtonSample.kt.md +71 -0
  357. package/skills/android-wear-compose-m3/references/material3/TextToggleButtonSample.kt.md.txt +71 -0
  358. package/skills/android-wear-compose-m3/references/material3/TimePickerSample.kt.md +151 -0
  359. package/skills/android-wear-compose-m3/references/material3/TimePickerSample.kt.md.txt +151 -0
  360. package/skills/android-wear-compose-m3/references/material3/TimeTextSample.kt.md +65 -0
  361. package/skills/android-wear-compose-m3/references/material3/TimeTextSample.kt.md.txt +65 -0
  362. package/skills/android-wear-compose-m3/references/material3/TransformationSpecSample.kt.md +246 -0
  363. package/skills/android-wear-compose-m3/references/material3/TransformationSpecSample.kt.md.txt +246 -0
  364. package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnNotificationsSample.kt.md +89 -0
  365. package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnNotificationsSample.kt.md.txt +89 -0
  366. package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnSample.kt.md +309 -0
  367. package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnSample.kt.md.txt +309 -0
  368. package/skills/android-wear-compose-m3/references/navigation3/SwipeDismissableSceneStrategySample.kt.md +205 -0
  369. package/skills/android-wear-compose-m3/references/navigation3/SwipeDismissableSceneStrategySample.kt.md.txt +205 -0
  370. package/skills/{architecture-feature-first → flutter-architecture-feature-first}/SKILL.md +1 -1
  371. package/skills/{bloc → flutter-bloc}/SKILL.md +1 -1
  372. package/skills/flutter-build-debug/SKILL.md +66 -0
  373. package/skills/{code-review → flutter-code-review}/SKILL.md +1 -1
  374. package/skills/{dart-3-updates → flutter-dart-3-updates}/SKILL.md +1 -1
  375. package/skills/{dart-fix-runtime-errors → flutter-dart-fix-runtime-errors}/SKILL.md +1 -1
  376. package/skills/{dart-resolve-package-conflicts → flutter-dart-resolve-package-conflicts}/SKILL.md +1 -1
  377. package/skills/{dart-run-static-analysis → flutter-dart-run-static-analysis}/SKILL.md +1 -1
  378. package/skills/{dart-use-pattern-matching → flutter-dart-use-pattern-matching}/SKILL.md +1 -1
  379. package/skills/{effective-dart → flutter-effective-dart}/SKILL.md +1 -1
  380. package/skills/{provider → flutter-provider}/SKILL.md +1 -1
  381. package/skills/{riverpod → flutter-riverpod}/SKILL.md +1 -1
  382. package/skills/ios-cocoapods-debug/SKILL.md +65 -0
  383. package/skills/ios-code-review/SKILL.md +56 -0
  384. package/skills/ios-xcode-build-debug/SKILL.md +66 -0
  385. package/skills/{detect-mobile-stack → mobile-detect-stack}/SKILL.md +1 -1
  386. package/skills/mobile-firebase/SKILL.md +54 -0
  387. package/skills/mobile-firebase/references/android/ai-logic.md +31 -0
  388. package/skills/mobile-firebase/references/android/analytics.md +33 -0
  389. package/skills/mobile-firebase/references/android/app-check.md +36 -0
  390. package/skills/mobile-firebase/references/android/auth.md +44 -0
  391. package/skills/mobile-firebase/references/android/crashlytics.md +31 -0
  392. package/skills/mobile-firebase/references/android/firestore.md +44 -0
  393. package/skills/mobile-firebase/references/android/functions.md +33 -0
  394. package/skills/mobile-firebase/references/android/in-app-messaging.md +28 -0
  395. package/skills/mobile-firebase/references/android/messaging.md +41 -0
  396. package/skills/mobile-firebase/references/android/realtime-database.md +50 -0
  397. package/skills/mobile-firebase/references/android/remote-config.md +43 -0
  398. package/skills/mobile-firebase/references/android/sql-connect.md +31 -0
  399. package/skills/mobile-firebase/references/android/storage.md +39 -0
  400. package/skills/mobile-firebase/references/android.md +30 -0
  401. package/skills/{firebase-ai/SKILL.md → mobile-firebase/references/flutter/ai-logic.md} +2 -8
  402. package/skills/{firebase-analytics/SKILL.md → mobile-firebase/references/flutter/analytics.md} +2 -8
  403. package/skills/{firebase-app-check/SKILL.md → mobile-firebase/references/flutter/app-check.md} +2 -8
  404. package/skills/{firebase-auth/SKILL.md → mobile-firebase/references/flutter/auth.md} +2 -8
  405. package/skills/{firebase-crashlytics/SKILL.md → mobile-firebase/references/flutter/crashlytics.md} +2 -8
  406. package/skills/{firebase-cloud-firestore/SKILL.md → mobile-firebase/references/flutter/firestore.md} +2 -8
  407. package/skills/{firebase-cloud-functions/SKILL.md → mobile-firebase/references/flutter/functions.md} +2 -8
  408. package/skills/{firebase-in-app-messaging/SKILL.md → mobile-firebase/references/flutter/in-app-messaging.md} +2 -8
  409. package/skills/{firebase-messaging/SKILL.md → mobile-firebase/references/flutter/messaging.md} +2 -8
  410. package/skills/{firebase-database/SKILL.md → mobile-firebase/references/flutter/realtime-database.md} +2 -8
  411. package/skills/{firebase-remote-config/SKILL.md → mobile-firebase/references/flutter/remote-config.md} +2 -8
  412. package/skills/{flutterfire-configure/SKILL.md → mobile-firebase/references/flutter/setup-flutterfire.md} +1 -8
  413. package/skills/{firebase-data-connect/SKILL.md → mobile-firebase/references/flutter/sql-connect.md} +2 -8
  414. package/skills/{firebase-storage/SKILL.md → mobile-firebase/references/flutter/storage.md} +2 -8
  415. package/skills/mobile-firebase/references/flutter.md +36 -0
  416. package/skills/mobile-firebase/references/ios/ai-logic.md +30 -0
  417. package/skills/mobile-firebase/references/ios/analytics.md +33 -0
  418. package/skills/mobile-firebase/references/ios/app-check.md +36 -0
  419. package/skills/mobile-firebase/references/ios/auth.md +48 -0
  420. package/skills/mobile-firebase/references/ios/crashlytics.md +34 -0
  421. package/skills/mobile-firebase/references/ios/firestore.md +53 -0
  422. package/skills/mobile-firebase/references/ios/functions.md +35 -0
  423. package/skills/mobile-firebase/references/ios/in-app-messaging.md +26 -0
  424. package/skills/mobile-firebase/references/ios/messaging.md +45 -0
  425. package/skills/mobile-firebase/references/ios/realtime-database.md +49 -0
  426. package/skills/mobile-firebase/references/ios/remote-config.md +44 -0
  427. package/skills/mobile-firebase/references/ios/sql-connect.md +33 -0
  428. package/skills/mobile-firebase/references/ios/storage.md +36 -0
  429. package/skills/mobile-firebase/references/ios.md +28 -0
  430. package/skills/mobile-firebase/references/react-native/ai-logic.md +32 -0
  431. package/skills/mobile-firebase/references/react-native/analytics.md +43 -0
  432. package/skills/mobile-firebase/references/react-native/app-check.md +35 -0
  433. package/skills/mobile-firebase/references/react-native/auth.md +50 -0
  434. package/skills/mobile-firebase/references/react-native/crashlytics.md +36 -0
  435. package/skills/mobile-firebase/references/react-native/firestore.md +45 -0
  436. package/skills/mobile-firebase/references/react-native/functions.md +28 -0
  437. package/skills/mobile-firebase/references/react-native/in-app-messaging.md +27 -0
  438. package/skills/mobile-firebase/references/react-native/messaging.md +46 -0
  439. package/skills/mobile-firebase/references/react-native/realtime-database.md +46 -0
  440. package/skills/mobile-firebase/references/react-native/remote-config.md +32 -0
  441. package/skills/mobile-firebase/references/react-native/sql-connect.md +11 -0
  442. package/skills/mobile-firebase/references/react-native/storage.md +30 -0
  443. package/skills/mobile-firebase/references/react-native.md +29 -0
  444. package/skills/mobile-test/SKILL.md +63 -0
  445. package/skills/mobile-test/references/android/setup/GUIDE.md +183 -0
  446. package/skills/mobile-test/references/android/setup/references/android/develop/ui/compose/testing/common-patterns.md +181 -0
  447. package/skills/mobile-test/references/android/setup/references/android/studio/preview/compose-screenshot-testing.md +255 -0
  448. package/skills/mobile-test/references/android/setup/references/android/training/dependency-injection/hilt-testing.md +447 -0
  449. package/skills/mobile-test/references/android.md +83 -0
  450. package/skills/{dart-collect-coverage/SKILL.md → mobile-test/references/flutter/coverage.md} +2 -11
  451. package/skills/{dart-generate-test-mocks/SKILL.md → mobile-test/references/flutter/generate-mocks.md} +2 -11
  452. package/skills/{flutter-add-integration-test/SKILL.md → mobile-test/references/flutter/integration-tests.md} +2 -11
  453. package/skills/{dart-migrate-to-checks-package/SKILL.md → mobile-test/references/flutter/migrate-to-checks.md} +2 -13
  454. package/skills/{mockito/SKILL.md → mobile-test/references/flutter/mockito.md} +1 -8
  455. package/skills/{mocktail/SKILL.md → mobile-test/references/flutter/mocktail.md} +1 -8
  456. package/skills/{patrol-e2e-testing/SKILL.md → mobile-test/references/flutter/patrol.md} +1 -8
  457. package/skills/{testing/SKILL.md → mobile-test/references/flutter/testing-guidelines.md} +1 -8
  458. package/skills/{dart-add-unit-test/SKILL.md → mobile-test/references/flutter/unit-tests.md} +2 -11
  459. package/skills/{flutter-add-widget-test/SKILL.md → mobile-test/references/flutter/widget-tests.md} +2 -11
  460. package/skills/mobile-test/references/flutter.md +44 -0
  461. package/skills/mobile-test/references/ios.md +79 -0
  462. package/skills/mobile-test/references/react-native.md +62 -0
  463. /package/skills/{dart-use-pattern-matching → flutter-dart-use-pattern-matching}/examples/json_patterns.dart +0 -0
@@ -0,0 +1,46 @@
1
+ ---
2
+ subsystem: io
3
+ description: >
4
+ Expert hints for I/O and storage bottlenecks, uninterruptible sleep, and
5
+ page cache.
6
+ keywords:
7
+ - i/o
8
+ - storage
9
+ - disk
10
+ - uninterruptible sleep
11
+ - d state
12
+ - page fault
13
+ - dm-verity
14
+ - file
15
+ - syscall
16
+ ---
17
+
18
+ # I/O & Storage Expert Hints
19
+
20
+ - When debugging a long, uninterruptible sleep state related to I/O: Check for
21
+ overlapping slices with "verity" in their name (dm-verity).
22
+ - When a thread is stuck in an uninterruptible sleep with no `blocked_function`,
23
+ look for other threads that might be holding the memory lock (for example,
24
+ "jit-thread-pool", memory mapping ops).
25
+ - When analyzing a long uninterruptible sleep, check the `blocked_function` in
26
+ the thread state details (from `sched_blocked_reason` ftrace event).
27
+ - A lot of time spent in `do_page_fault` during app startup is a strong
28
+ indicator of I/O contention.
29
+ - For file integrity mechanisms like DM-Verity, search for events like
30
+ `dm_verity_fec_prefetch`.
31
+ - To find the specific kernel dependency of a stalled app thread, locate the
32
+ thread in state 'D', then look for kworker or kernel threads that become
33
+ runnable immediately after.
34
+ - For app stalls caused by I/O, analyze the scheduling latency of the relevant
35
+ kworker threads handling the request.
36
+ - To find inefficient file I/O, query the syscall table for a high frequency
37
+ of small, sequential `read()` or `pread()` syscalls on a single fd.
38
+ - If a thread spends significant time in 'Uninterruptible Sleep', check if
39
+ `blocked_function` is `page_cache_readahead`. Correlate waking timestamps
40
+ with `filemap_add_to_page_cache` ftrace events.
41
+ - Aggregate counts of `filemap_add_to_page_cache` grouping by `inode` to find
42
+ the specific file causing I/O pressure.
43
+ - Inspect `nr_sector` in `block_rq_issue` ftrace events to understand file
44
+ read-ahead size.
45
+ - If an I/O issue disappears on subsequent launches, it is a 'cold start'
46
+ problem (populating page cache).
@@ -0,0 +1,41 @@
1
+ ---
2
+ subsystem: ipc
3
+ description: >
4
+ Expert hints for IPC, binder transactions, and cross-process dependencies.
5
+ keywords:
6
+ - ipc
7
+ - binder
8
+ - transaction
9
+ - cross-process
10
+ - bottleneck
11
+ - service
12
+ - system_server
13
+ ---
14
+
15
+ # IPC & Binder Expert Hints
16
+
17
+ - Look for multiple outbound binder transactions from the same process
18
+ (`system_server`) that carry similar data to different destinations in a
19
+ short time frame. This "binder storm" indicates a lack of multiplexing.
20
+ - To trace data across processes, correlate slices using flow events by
21
+ linking a slice's ID to `flow.source_slice_id` or `flow.dest_slice_id`.
22
+ - To detect binder spam, query the `binder_transaction` table and group by
23
+ thread ID (`tid`), `service_name`, and `method_name` to find high numbers of
24
+ identical calls.
25
+ - When high binder concurrency is found, identify the bottleneck server
26
+ process by grouping transactions by `server_upid`.
27
+ - To analyze latency of a slow binder transaction, calculate time spent
28
+ outside the server by subtracting `server_dur` from total `dur` in the
29
+ `binder_transaction` table.
30
+ - When a thread is suspected of binder spam, correlate its `tid` with the
31
+ `cpu_slice` table to check for high CPU consumption.
32
+ - To find code responsible for binder spam, get the `utid` of the problematic
33
+ thread and use it to query `stack_profile_callsite`.
34
+ - To find callers of a problematic function, filter `stack_profile_callsite`
35
+ for frames mapping to it, then trace upwards using `parent_id`.
36
+ - A long-running slice on one thread causally linked to a slice on another
37
+ thread (for example, binder from `system_server` to SystemUI) indicates a
38
+ scheduling dependency bottleneck.
39
+ - To find asynchronous operations that might cause UI jank, look for a binder
40
+ transaction from a controlling process that returns quickly, followed by a
41
+ long-running slice in the receiving process.
@@ -0,0 +1,55 @@
1
+ ---
2
+ subsystem: memory
3
+ description: >
4
+ Expert hints for memory pressure, Low Memory Killer (LMK), and allocations.
5
+ keywords:
6
+ - memory
7
+ - lmk
8
+ - lmkd
9
+ - oom
10
+ - rss
11
+ - swap
12
+ - kswapd
13
+ - thrashing
14
+ - pressure
15
+ - allocation
16
+ ---
17
+
18
+ # Memory & LMK Expert Hints
19
+
20
+ - To investigate low memory kills, look for the `lmk_kill_occurred` ftrace
21
+ event; a high count indicates severe memory pressure.
22
+ - When you see a burst of `lmk_kill_occurred` events, query for processes with
23
+ high CPU `wall_duration` in the `sched_slice` table during the same time
24
+ window. Runaway processes consuming CPU exacerbate memory pressure.
25
+ - To understand a process's memory impact, inspect its `anon_rss` (Anonymous
26
+ Resident Set Size) from memory counters like `mem.info`.
27
+ - Check system-wide memory stats for a high or rapidly increasing `swap_used`
28
+ value.
29
+ - To confirm memory thrashing, look for high CPU usage by the `kswapd` kernel
30
+ thread.
31
+ - To find the direct trigger for LMKD, look for `memory_pressure` trace events
32
+ from Pressure Stall Information (PSI).
33
+ - To detect 'lost' memory for processes using hardware accelerators (like a
34
+ TPU), query the `counter` table for `RssFile` values. If it drops
35
+ significantly while hardware is active, check for `kswapd0` scheduling
36
+ slices.
37
+ - When analyzing memory shared with hardware, query `dma_heap_stat` and
38
+ `dmabuf_total_size` counters (or `ion_total_size` for older devices) for a
39
+ more accurate picture than RSS.
40
+ - Be aware that `RssFile` can over-report memory if the same physical page is
41
+ mapped multiple times.
42
+ - When investigating OOMs, establish a baseline by querying process memory
43
+ counters (for example, `mem.rss`) and compare the median and 95th percentile
44
+ against its history.
45
+ - If bitmaps are a major memory consumer, check for outliers in bitmap count by
46
+ querying `android.graphics.Bitmap` instances across traces.
47
+ - To find what is holding onto an object (like a bitmap), trace its retainer
48
+ path back to a GC root by querying `heap_graph_reference`. Pay close
49
+ attention to custom application classes.
50
+ - Query the `android_bitmaps` table to check the width and height properties of
51
+ bitmaps.
52
+ - Check for the presence of software bitmaps, which consume memory on both the
53
+ app heap and in graphics memory.
54
+ - When analyzing bitmaps, look for duplicates by checking for multiple
55
+ `android.graphics.Bitmap` objects with identical properties.
@@ -0,0 +1,33 @@
1
+ ---
2
+ subsystem: power
3
+ description: >
4
+ Expert hints for battery drain, power rails, network traffic, and wake locks.
5
+ keywords:
6
+ - power
7
+ - battery
8
+ - wake lock
9
+ - suspend
10
+ - network
11
+ - modem
12
+ - bluetooth
13
+ - drain
14
+ ---
15
+
16
+ # Power & Network Expert Hints
17
+
18
+ - When investigating overall battery drain, start by querying `power_rails`
19
+ track and summing energy consumed (`power_ma * duration`) for each rail.
20
+ - To check if a device is sleeping correctly during screen-off periods, query
21
+ the `suspend_state` track; a lack of time in "suspended" state indicates a
22
+ wakefulness problem.
23
+ - To find the root cause of the device failing to suspend, query the
24
+ `kernel_wakelock` track and aggregate total duration for each wake lock.
25
+ - If a top kernel wake lock name contains "bt_" or "bcm" (for example,
26
+ `bt_host_wake`), cross-reference its timing with events in the
27
+ `bluetooth_scan_results` track.
28
+ - If the modem rail in `power_rails` shows high consumption, query the
29
+ `network_packets` table and aggregate traffic volume by UID to identify app.
30
+ - When analyzing network traffic from a shared UID, use the `socket_tag`
31
+ associated with network packets for granular attribution.
32
+ - Convert impact into a common energy unit like milliwatt-hours (mWh) to
33
+ compare the severity of different issues.
@@ -0,0 +1,172 @@
1
+ # Candidate Investigation Protocol
2
+
3
+ This is the execution protocol for a deep-dive subagent during trace analysis.
4
+
5
+ ## Context
6
+
7
+ Execute the protocol below using the candidate details (Trace Paths, Symptom
8
+ Window, UTID, UPID, System Vitals) provided in your initial prompt.
9
+
10
+ ## Investigation Protocol
11
+
12
+ **High-Level Algorithm:**
13
+
14
+ 1. Prerequisites (Step 1)
15
+ 2. Calculate time distribution and identify state buckets (Step 2)
16
+ 3. Domain and System hints discovery and selection (Step 3)
17
+ 4. Run exhaustive investigation for each significant state bucket sequentially
18
+ (Steps 4 and 5), starting with the largest bucket. Output total time
19
+ explained so far after investigating each.
20
+ 5. Output the result (Step 6)
21
+
22
+ ### Step 1: Prerequisites
23
+
24
+ - Follow `$SKILL_ROOT/references/perfetto/sql.md` for session-based query execution.
25
+ - Read
26
+ `$SKILL_ROOT/analysis/workflows/perfetto-trace-analysis/references/guiding_principles.md`
27
+ to identify best practices, ensure data-driven analysis, and avoid pitfalls.
28
+
29
+ ### Step 2: Calculate the time distribution
30
+
31
+ 1. **Establish a baseline if possible:** For example, if investigating a jank
32
+ candidate, find a _non-janky_ instance of the **same** operation first to
33
+ establish expected behavior and rule out red herrings. _If no healthy
34
+ instance exists in the trace, note this as a `[GAP]` and proceed with the
35
+ next steps_.
36
+ 2. **Calculate time spent in each state:** Sum the time spent in `Running`,
37
+ `R`, `S` and `D` states. Investigate all substantial buckets. Also look for
38
+ composite bottlenecks (for example, "40% CPU-starved + 35% IO-blocked").
39
+ 3. **Run checks to rule out red herrings:** For example:
40
+ - A thread in `S` state could be normal behavior -> investigate only if
41
+ the sleep actually overlaps with a pending obligation (for example, a
42
+ pending binder reply).
43
+ - A thread in `Running/Runnable`: When a thread spends high duration in
44
+ `Running/Runnable`, inspect CPU frequency, throttling counters, and core
45
+ migrations before attributing latency to code inefficiency, because
46
+ hardware throttling inflates wall time without increasing instruction
47
+ overhead:
48
+ - Verify first that an identified code path is actually doing
49
+ disproportionate work.
50
+ - Query the trace to find what the thread was doing during this window.
51
+ Query the `slice` table for the longest duration slices during this
52
+ window.
53
+ - Beyond blocking slices, query and identify repetitive micro-operations
54
+ or gaps that collectively exhaust the budget to prevent tunnel vision.
55
+ - Perform a system-wide check to identify if there was CPU throttling or
56
+ core migrations around the symptom window (see Principle 7).
57
+ 4. **Drill down:** For every significant bucket revealed from the time
58
+ distribution analysis during the symptom window, identify what the thread
59
+ was doing at the transition point. Investigate every significant bucket (for
60
+ example, >= 20% of the time window) to avoid missing real bottlenecks or
61
+ composite issues.
62
+ > **Action:** Tag missing data as `[GAP]`. Do not guess.
63
+
64
+ ### Step 3: Domain and Hints Discovery
65
+
66
+ Even if you find a major bottleneck, continue searching for other bottlenecks
67
+ using expert-vetted domain and system hints and techniques. Follow these steps
68
+ in order:
69
+
70
+ - **Domain discovery:** Use your file search tools (for example, `grep_search`)
71
+ to scan frontmatter (`domain:`, `description:`, `keywords:`) in
72
+ `$SKILL_ROOT/analysis/workflows/perfetto-trace-analysis/references/hints/domains/`
73
+ (if it exists) and identify matching domain hint files based on collective
74
+ investigation state (victim, intermediate processes).
75
+ - **Subsystem hints:** Use your file search tools to scan frontmatter
76
+ (`subsystem:`, `description:`, `keywords:`) in
77
+ `$SKILL_ROOT/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/`
78
+ for relevant tracks (for example, keywords for sleep states, memory, IPC).
79
+ - **Hint Selection and Application:** Apply all the matched subsystem and
80
+ domain hint files during the Step 4 investigation, and list them under
81
+ `Applied Hints` in your Step 6 output.
82
+
83
+ ### Step 4: Exhaustive Investigation (Do Not Give Up Early)
84
+
85
+ - **Follow the dependency chain:**
86
+ - If the victim thread was waiting or blocked by another thread, follow the
87
+ chain to the leaf. Find out what it is waiting _for_. Cross process
88
+ boundaries if necessary. Do not conclude without following the entire
89
+ blocker chain (See Principle 4 in `guiding_principles.md`).
90
+ - **Dynamic hint injection:** If your dependency chain leads to a new
91
+ subsystem or process you haven't researched yet, do a single search in
92
+ `$SKILL_ROOT/analysis/workflows/perfetto-trace-analysis/references/hints/`
93
+ for relevant hints before proceeding. Do not fall into infinite loops.
94
+ - Every state bucket investigation should end in one of three states:
95
+ **Terminal root cause**, **Blocked by another thread**, or
96
+ **Partial suspect**.
97
+
98
+ > A finding is a "terminal root cause" if:
99
+ >
100
+ > - You can trace it down to a physical bottleneck (thermal throttle, GPU,
101
+ > storage). **Require Specificity:** Do not conclude with generic labels.
102
+ > Specify the _what_ clearly.
103
+ > - A specific function or code path is identified as doing disproportionate
104
+ > work relative to its purpose (for example, synchronous disk IO on main
105
+ > thread, unnecessary object allocation triggering GC).
106
+ > - A scheduling policy or resource limit is identified as artificially
107
+ > constraining the thread (for example, background CPU cap, foreground
108
+ > service restriction).
109
+ > - The bottleneck is identified in a different process/service that the
110
+ > investigated process cannot control (for example, `system_server` lock
111
+ > contention, `SurfaceFlinger` throttling).
112
+
113
+ - **Systemic sweep before concluding:** Discovering an application-layer
114
+ bottleneck (software root cause) does not terminate the investigation of a
115
+ state bucket. Before concluding any state bucket as a terminal root cause,
116
+ check relevant system hints for that state (`CPU`, `IO`, `Memory`, `IPC`)
117
+ and verify whether platform-level confounds - such as CPU scaling, memory
118
+ pressure, thermal throttling, or I/O saturation - simultaneously degraded
119
+ performance **around the symptom window.** Report discovered systemic
120
+ confounds as **co-root causes** or duration modifiers (see Principle 7 in
121
+ `guiding_principles.md`).
122
+
123
+ **Why:** Software execution duration is not an absolute constant; it is
124
+ modulated by platform state (frequency scaling, thermals, memory reclamation).
125
+ Always check system-wide confounds before reporting an inefficient code path as
126
+ the sole root cause - to avoid concluding inflated software duration as the
127
+ sole root cause while missing the underlying kernel or hardware anomaly that
128
+ magnified it. Back findings with empirical proof (`[SQL]`) or mark as `[GAP]`
129
+ if inconclusive.
130
+
131
+ ### Step 5: Contextualize the Workload
132
+
133
+ Once the mechanical bottleneck is identified in Step 4, query the trace to
134
+ identify the high-level user feature, UI operation, or exact workload that
135
+ triggered it. Explain the _why_, not just the _what_. This workload context
136
+ ensures that we can provide actionable next steps for the user instead of
137
+ leaving them confused.
138
+
139
+ ### Step 6: Output
140
+
141
+ Output the following investigation result:
142
+
143
+ ```markdown
144
+ # Investigation Result
145
+
146
+ Candidate:
147
+ Symptom Window: [Start TS] and [End TS]
148
+ Symptom Duration: [Duration]
149
+ Budget (Expected Duration): [If applicable]
150
+ Applied Hints: [List of matched subsystem and domain hint files used]
151
+
152
+ ## Primary Finding
153
+
154
+ - **Classification:** [Hardware | Software/Code | System Exhaustion | Scheduling Policy | External Dependency]
155
+ - **Details and Reasoning:** `___`
156
+ - **Explained Duration:** `___`
157
+ - **Evidence SQL or backing data:** `___`
158
+ - **Dependency chain:** [Root to Leaf Dependency Chain]
159
+ - **Root cause conclusion:** `___`
160
+
161
+ ## Other Findings
162
+
163
+ - **Status:** [Partial Suspect | Low Confidence Suspicion | Terminal Root Cause]
164
+ - _(same fields)_
165
+
166
+ ## Verification Checklist
167
+
168
+ - All claims tagged (`[SQL]`/`[GAP]`/`[INFERRED]`): [yes/no]
169
+ - Total explained time accounts for most of the symptom window: [yes/no]
170
+ - Unexplored state buckets: [none/list with reason why]
171
+ - Workload contextualized (for example, specific slices/layers involved): [yes/no]
172
+ ```
@@ -0,0 +1,94 @@
1
+ # System-Wide Triage
2
+
3
+ Follow these steps in order:
4
+
5
+ 1. **Verify data integrity:** Query `stats` for CPU and data loss indicators.
6
+ If found, warn the user that findings may be incomplete and proceed with
7
+ `[GAP]` awareness.
8
+
9
+ 2. **Run metrics:** Systemic issues (like thermal throttling, LMKs, binder
10
+ contention) affect all threads.
11
+
12
+ > **Prerequisite:** Verify that `trace_processor` is available in your
13
+ > environment before executing commands (see
14
+ > `$SKILL_ROOT/references/perfetto/setup.md`).
15
+
16
+ Run the following query based on the user's intent to understand the
17
+ high-level picture:
18
+
19
+ ```sh
20
+ trace_processor [trace_file] --run-metrics [comma_separated_metrics]
21
+ ```
22
+
23
+ 3. **Define target and symptom window:** Find the specific issue's start
24
+ (`ts`), duration (`dur`) and end timestamp (`ts + dur`). Verify the trace
25
+ actually covers the full window.
26
+
27
+ > After identifying the specific instance to investigate and the symptom
28
+ > window (for example, janky frame at `ts = 5.1s`), check whether the first
29
+ > blocking event was caused by a stall that _started before_ the symptom
30
+ > window. Expanding the window upstream is essential because stalls (for
31
+ > example, in binder servers, memory reclamation or kernel locks) often
32
+ > originate hundreds of milliseconds before the user-visible frame drop or
33
+ > latency spike occurs.
34
+ >
35
+ > - Find the victim's first non-Running state transition within the symptom
36
+ > window.
37
+ > - Follow the waker chain for that transition. Check waker timestamps -
38
+ > if the blocking event began significantly before the symptom window,
39
+ > expand the investigation window upstream to include that origin.
40
+ > - If it cascades down to an origin in another process (for example, a
41
+ > binder server that stalled `500ms` before the jank), **note** the
42
+ > expanded window and include the upstream stall as a co-candidate to
43
+ > investigate further.
44
+
45
+ 4. **Output** the triage summary using the format defined below.
46
+
47
+ ## Quick reference for triaging
48
+
49
+ Key available metrics for `--run-metrics`:
50
+ `android_startup`, `android_cpu`, `android_mem`, `android_lmk`,
51
+ `android_binder`, `android_surfaceflinger`, `android_gpu`
52
+
53
+ Quick lookup table based on symptom:
54
+
55
+ | Symptom/Issue | What to check | Useful Perfetto tables |
56
+ | :--------------- | :------------------------------------ | :---------------------------------------------- |
57
+ | App startup | Main thread | `android.startup.startups` (`android_startups`) |
58
+ | App jank | Main, render threads | `actual_frame_timeline_slice` |
59
+ | System jank | SurfaceFlinger | `actual_frame_timeline_slice` |
60
+ | App/system crash | `Process crashed` or `tombstoned` | `slice` |
61
+ | ANR | Main thread, `system_server` watchdog | `thread_state`, `slice` |
62
+ | Frame issues | `DrawFrame` or `doFrame` slices | `slice` |
63
+
64
+ ## Final Output Format
65
+
66
+ Output the triage summary in the following format:
67
+
68
+ ```markdown
69
+ ## Trace Metadata
70
+
71
+ - **Device Model:** `[String, e.g., Pixel 7 Pro]`
72
+ - **Android Build:** `[String, e.g., TQ2A.230505.002]`
73
+
74
+ ## System Vitals Summary
75
+
76
+ - **Status:** `[Nominal | Degraded | Critical]`
77
+ - **Flags Raised:** _(Only list systemic issues that are actually detected)_
78
+ - **Metric:** `[String, e.g., thermal_throttling, lmkd, binder_contention]`
79
+ - **Description:** `[e.g., 'Thermal throttling during symptom window']`
80
+
81
+ ## Candidate
82
+
83
+ - **Issue Classification:** `[String, e.g., Startup, Jank, ANR_Input, Crash]`
84
+ - **Package Name:** `[String]`
85
+ - **Process Name:** `[String]`
86
+ - **Thread Name:** `[String]`
87
+ - **UPID:** `[Integer]`
88
+ - **Target UTID:** `[Integer]` _(The primary thread)_
89
+ - **Render Thread UTID:** `[Integer or null]` _(If issue is jank)_
90
+ - **Start TS:** `[Integer Timestamp]`
91
+ - **End TS:** `[Integer Timestamp]`
92
+ - **Duration (ms):** `[Float]`
93
+ - **Severity Note:** `[String, e.g., '150ms missed frame - worst instance']`
94
+ ```
@@ -0,0 +1,36 @@
1
+ # Recording Orchestrator
2
+
3
+ Use the guidelines below to orchestrate between recording workflows after
4
+ disambiguating the user intent (for example, recording a system trace or a
5
+ heap dump). The guidelines below ensure pre-flight checks are always performed
6
+ and domain-specific profiling flags are applied accurately.
7
+
8
+ ## Workflow Selection
9
+
10
+ At this point, you should have an answer to the following question: "User
11
+ intends to record a _____". For example, "User intends to record a system
12
+ trace".
13
+
14
+ ## Handling Composite Requests
15
+
16
+ If the user's request involves multiple distinct recording goals (for example,
17
+ setting up a specialized environment AND recording a generic trace), do not
18
+ execute them simultaneously.
19
+
20
+ 1. Break down the request and propose a sequential execution plan to the user.
21
+ 2. Ask the user for confirmation to start the first step.
22
+ 3. Do not proceed to the next workflow until the current one is completed.
23
+
24
+ ## Workflow Discovery and Routing
25
+
26
+ This skill supports multiple specialized recording workflows. To determine the
27
+ right workflows to use:
28
+
29
+ 1. Use your file search tools (for example, `grep_search`) to recursively scan
30
+ the `$SKILL_ROOT/recording/workflows/` directory for workflow entrypoints
31
+ (markdown files defining a top-level `name:` key in their frontmatter,
32
+ ignoring internal `references/` subdirectories).
33
+ 2. Compare the user's request and intent against the `name:`, `description:`,
34
+ and `keywords:` fields to identify matching workflows. If multiple are
35
+ found, present them as options to the user and proceed with the
36
+ user's selection.
@@ -0,0 +1,148 @@
1
+ ---
2
+ name: perfetto-trace-recording
3
+ description: >
4
+ Records Java/native heap dumps, system traces, or custom configs via
5
+ Perfetto helper scripts on Android.
6
+ keywords:
7
+ - perfetto
8
+ - record
9
+ - system trace
10
+ - heap dump
11
+ - memory leak
12
+ - custom config
13
+ ---
14
+
15
+ # Recording Perfetto Traces on Android (Helper Scripts)
16
+
17
+ > [!IMPORTANT] **Scope:** This guide is **strictly for recording traces on
18
+ > Android devices**. For other platforms (Linux, macOS, or Chrome), refer to
19
+ > the platform documentation on [perfetto.dev/docs](https://perfetto.dev/docs/).
20
+
21
+ Rather than running raw `adb` commands, use the official Perfetto helper
22
+ scripts. They automatically handle pushing configurations, starting tracing
23
+ daemons, pulling the trace file, and optionally opening it in the browser.
24
+
25
+ Ensure **Developer options** and **USB debugging** are enabled, and your
26
+ device is connected via USB before starting.
27
+
28
+ ---
29
+
30
+ ## 0. Download the Helper Scripts
31
+
32
+ Download the helper scripts from the official Perfetto repository:
33
+
34
+ ```bash
35
+ TOOLS_URL="https://raw.githubusercontent.com/google/perfetto/main/tools"
36
+
37
+ # Java Heap Dump (ART)
38
+ curl -O "$TOOLS_URL/java_heap_dump" && chmod +x java_heap_dump
39
+
40
+ # Native Heap Profiling (heapprofd)
41
+ curl -O "$TOOLS_URL/heap_profile" && chmod +x heap_profile
42
+
43
+ # CPU Stack Sampling (traced_perf)
44
+ curl -O "$TOOLS_URL/cpu_profile" && chmod +x cpu_profile
45
+
46
+ # General Tracing (Ftrace, ATrace, custom configs)
47
+ curl -O "$TOOLS_URL/record_android_trace" && chmod +x record_android_trace
48
+ ```
49
+
50
+ ---
51
+
52
+ ## 1. Memory Tracing
53
+
54
+ Use these tools to analyze memory leaks, object retention, C/C++ allocations,
55
+ or system-wide memory counters.
56
+
57
+ ### A. Java Heap Dump (ART)
58
+
59
+ Capture a snapshot of all Java objects in a process to investigate memory
60
+ leaks. Reference docs:
61
+ <https://perfetto.dev/docs/data-sources/java-heap-profiler>.
62
+
63
+ ```bash
64
+ # Trigger a Java heap dump for a specific app
65
+ ./java_heap_dump -n YOUR_APP_PACKAGE_NAME -o ./heap_dump.perfetto-trace
66
+ ```
67
+
68
+ ### B. Native C/C++ Heap Profiling (heapprofd)
69
+
70
+ Track C/C++ memory allocations (malloc/free) to find native leaks. Reference
71
+ docs: <https://perfetto.dev/docs/data-sources/native-heap-profiler>.
72
+
73
+ ```bash
74
+ # Profile native allocations for a specific app
75
+ ./heap_profile -n YOUR_APP_PACKAGE_NAME
76
+
77
+ # Profile with custom sampling interval (default is 4096 bytes)
78
+ ./heap_profile -n YOUR_APP_PACKAGE_NAME -i 2048
79
+ ```
80
+
81
+ ### C. System-wide Memory Counters
82
+
83
+ Track RSS, Swap, and process stats over time. Reference docs:
84
+ <https://perfetto.dev/docs/data-sources/memory-counters-sys-stats>.
85
+
86
+ **Note:** To record memory counters, you must use a custom config via
87
+ `record_android_trace` (see Section 4).
88
+
89
+ ---
90
+
91
+ ## 2. Stack Sampling / Callstack Profiling (traced_perf)
92
+
93
+ Identify CPU hotspots in C/C++ or Rust code by periodically sampling
94
+ callstacks. Reference docs:
95
+ <https://perfetto.dev/docs/data-sources/cpu-profiler>.
96
+
97
+ ```bash
98
+ # Profile CPU usage by sampling callstacks at 100Hz (default) for 10 seconds
99
+ ./cpu_profile -n YOUR_APP_PACKAGE_NAME -d 10000
100
+
101
+ # Profile at a custom frequency (e.g., 200Hz)
102
+ ./cpu_profile -n YOUR_APP_PACKAGE_NAME -f 200
103
+ ```
104
+
105
+ ---
106
+
107
+ ## 3. System Tracing (CPU, Scheduling, & ATrace)
108
+
109
+ Investigate jank, slow transitions, CPU scheduling, and system calls.
110
+ Reference docs: <https://perfetto.dev/docs/data-sources/ftrace>.
111
+
112
+ You can specify duration, buffer size, and categories directly on the command
113
+ line:
114
+
115
+ ```bash
116
+ # Record scheduling, frequency, and window manager events for 5 seconds
117
+ ./record_android_trace -t 5s -b 32mb sched gfx wm -a YOUR_APP_PACKAGE_NAME
118
+ ```
119
+
120
+ Common categories: `sched` (CPU scheduling), `freq` (CPU frequency), `gfx`
121
+ (Graphics), `am` (Activity Manager), `wm` (Window Manager), `view` (View
122
+ System).
123
+
124
+ ---
125
+
126
+ ## 4. Custom Configs (Mix & Match Data Sources)
127
+
128
+ If you need a custom mixture of data sources (e.g., combining Java heap dumps
129
+ with ftrace), or control that command-line flags do not offer (ring buffers,
130
+ long traces, per-counter polling), synthesize a config:
131
+
132
+ 1. **Read the config reference:**
133
+ `$SKILL_ROOT/recording/workflows/perfetto-trace-recording/references/trace_config_reference.md`
134
+ explains config structure and data sources, pointing to exemplar configs in
135
+ `$SKILL_ROOT/recording/workflows/perfetto-trace-recording/references/example-configs/`
136
+ that you can start from and merge. For other sources, consult the
137
+ official guide at <https://perfetto.dev/docs/data-sources/>.
138
+ 2. **Save the Config:** Write the synthesized text configuration to a local
139
+ file (e.g., `config.pftxt`).
140
+ 3. **Execute the Trace:** Run the trace using the general recorder script
141
+ `record_android_trace` (specialized scripts do not accept custom configs):
142
+
143
+ ```bash
144
+ ./record_android_trace -c config.pftxt -o ./my_trace.perfetto-trace
145
+ ```
146
+
147
+ If the config has a typo, this fails fast with a parse error naming the bad
148
+ field - fix the config and retry.
@@ -0,0 +1,43 @@
1
+ # App jank / slow UI: framework + app atrace events, frame deadlines from
2
+ # SurfaceFlinger, and the scheduling context underneath.
3
+ # Replace com.example.myapp with the app's package name.
4
+ buffers {
5
+ size_kb: 65536
6
+ fill_policy: RING_BUFFER
7
+ }
8
+ duration_ms: 10000
9
+
10
+ data_sources {
11
+ config {
12
+ name: "linux.ftrace"
13
+ ftrace_config {
14
+ ftrace_events: "sched/sched_switch"
15
+ ftrace_events: "sched/sched_wakeup"
16
+ ftrace_events: "sched/sched_waking"
17
+ ftrace_events: "power/cpu_frequency"
18
+ ftrace_events: "power/cpu_idle"
19
+ atrace_categories: "gfx"
20
+ atrace_categories: "view"
21
+ atrace_categories: "wm"
22
+ atrace_categories: "am"
23
+ atrace_categories: "input"
24
+ atrace_apps: "com.example.myapp"
25
+ }
26
+ }
27
+ }
28
+
29
+ # Per-frame expected vs actual timelines (actual jank classification).
30
+ data_sources {
31
+ config {
32
+ name: "android.surfaceflinger.frametimeline"
33
+ }
34
+ }
35
+
36
+ data_sources {
37
+ config {
38
+ name: "linux.process_stats"
39
+ process_stats_config {
40
+ scan_all_processes_on_start: true
41
+ }
42
+ }
43
+ }