novahiz 0.2.2 → 0.2.5

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 (565) hide show
  1. package/NOTICE.md +25 -15
  2. package/README.md +353 -355
  3. package/adapters/README.md +1 -1
  4. package/adapters/opencode/agent/novahiz.md +1 -2
  5. package/adapters/opencode/commands/novahiz-init.md +10 -0
  6. package/adapters/opencode/instructions.md +1 -1
  7. package/adapters/opencode/novahiz.ts +182 -4
  8. package/bin/novahiz.cmd +2 -2
  9. package/catalog/categories.json +1085 -1093
  10. package/catalog/overrides.json +12 -13
  11. package/catalog/providers.json +18 -34
  12. package/catalog/rules.json +15 -22
  13. package/docs/ARCHITECTURE.md +2 -2
  14. package/docs/CATALOG.md +7 -6
  15. package/docs/CONFIGURATION.md +5 -5
  16. package/docs/CONSTITUTION.md +4 -4
  17. package/docs/GATE.md +7 -11
  18. package/docs/HARNESSES.md +11 -0
  19. package/docs/INSTALL.md +7 -5
  20. package/docs/PLUGIN.md +24 -6
  21. package/docs/PROVIDERS.md +12 -10
  22. package/docs/ROADMAPS.md +4 -3
  23. package/docs/RULES.md +11 -10
  24. package/install/bootstrap.mjs +9 -19
  25. package/install/install.mjs +23 -41
  26. package/mcp/novahiz-tools/index.mjs +35 -6
  27. package/novahiz.config.example.json +1 -5
  28. package/package.json +6 -7
  29. package/skills/apple-ui-audit/SKILL.md +95 -0
  30. package/skills/apple-ui-audit/references/screen-walkthrough.md +29 -0
  31. package/skills/browser-session/SKILL.md +61 -0
  32. package/skills/browser-session/references/session-run-sheet.md +30 -0
  33. package/skills/browser-session/scripts/browser_session_preflight.mjs +74 -0
  34. package/skills/browser-session/scripts/sample-run.json +5 -0
  35. package/skills/code-standards/SKILL.md +85 -0
  36. package/skills/code-standards/references/pr-review-worksheet.md +35 -0
  37. package/skills/design-token-pipeline/SKILL.md +85 -0
  38. package/skills/design-token-pipeline/references/dtcg-sample.json +37 -0
  39. package/skills/llm-threat-review/SKILL.md +99 -0
  40. package/skills/llm-threat-review/references/review-worksheet.md +34 -0
  41. package/skills/llm-threat-review/scripts/llm_risk_lint.mjs +105 -0
  42. package/skills/novahiz-audit/SKILL.md +1 -1
  43. package/skills/novahiz-gate/SKILL.md +7 -6
  44. package/skills/novahiz-humanizer/SKILL.md +1 -1
  45. package/skills/novahiz-implement/SKILL.md +1 -1
  46. package/skills/novahiz-init/SKILL.md +112 -0
  47. package/skills/novahiz-planner/SKILL.md +1 -2
  48. package/skills/openapi-mcp-server/SKILL.md +76 -0
  49. package/skills/openapi-mcp-server/references/mcp-ship-checklist.md +30 -0
  50. package/skills/openapi-mcp-server/references/tool-worksheet.md +30 -0
  51. package/skills/openapi-mcp-server/scripts/openapi_mcp_lint.mjs +133 -0
  52. package/skills/package-risk-audit/SKILL.md +83 -0
  53. package/skills/package-risk-audit/references/intake-worksheet.md +19 -0
  54. package/skills/package-risk-audit/scripts/dep_risk_lint.mjs +131 -0
  55. package/skills/secrets-hygiene/SKILL.md +62 -0
  56. package/skills/secrets-hygiene/references/rotation-playbook.md +27 -0
  57. package/skills/secrets-hygiene/scripts/secret_scan.mjs +120 -0
  58. package/skills/skill-authoring/SKILL.md +93 -0
  59. package/skills/skill-authoring/references/skill-template.md +59 -0
  60. package/skills/skill-authoring/scripts/skill_frontmatter_lint.mjs +65 -0
  61. package/skills/skill-eval-loop/SKILL.md +103 -0
  62. package/skills/skill-eval-loop/references/negative-patterns.md +12 -0
  63. package/skills/skill-eval-loop/references/run-sheet.md +40 -0
  64. package/skills/skill-eval-loop/scripts/skill_structure_check.mjs +100 -0
  65. package/skills/ui-craft-rules/SKILL.md +96 -0
  66. package/skills/ui-slop-remover/SKILL.md +110 -0
  67. package/skills/ui-slop-remover/references/tell-catalogue.md +58 -0
  68. package/skills/ui-slop-remover/scripts/slop_lint.mjs +119 -0
  69. package/src/autodocs.ts +192 -0
  70. package/src/cli.ts +8 -1
  71. package/src/commands/autodocs.ts +250 -0
  72. package/src/commands/doctor.ts +226 -217
  73. package/src/commands/gate.ts +16 -5
  74. package/src/commands/init.ts +356 -0
  75. package/src/commands/task.ts +20 -7
  76. package/src/gate.ts +401 -401
  77. package/src/ledger.ts +39 -0
  78. package/src/targets.ts +43 -7
  79. package/bundled-skills/ab-testing/SKILL.md +0 -353
  80. package/bundled-skills/ab-testing/evals/evals.json +0 -105
  81. package/bundled-skills/ab-testing/references/sample-size-guide.md +0 -263
  82. package/bundled-skills/ab-testing/references/test-templates.md +0 -277
  83. package/bundled-skills/ad-creative/SKILL.md +0 -425
  84. package/bundled-skills/ad-creative/assets/creative-review-template.html +0 -400
  85. package/bundled-skills/ad-creative/evals/evals.json +0 -217
  86. package/bundled-skills/ad-creative/references/creative-review-page.md +0 -106
  87. package/bundled-skills/ad-creative/references/creative-roadmap.md +0 -118
  88. package/bundled-skills/ad-creative/references/generative-tools.md +0 -637
  89. package/bundled-skills/ad-creative/references/hook-system.md +0 -115
  90. package/bundled-skills/ad-creative/references/imessage-video-ads.md +0 -201
  91. package/bundled-skills/ad-creative/references/meta-creative-formats.md +0 -114
  92. package/bundled-skills/ad-creative/references/motion-video-ads.md +0 -126
  93. package/bundled-skills/ad-creative/references/platform-specs.md +0 -213
  94. package/bundled-skills/ad-creative/references/short-form-video-specs.md +0 -213
  95. package/bundled-skills/ad-creative/references/static-ad-templates.md +0 -308
  96. package/bundled-skills/ads/SKILL.md +0 -499
  97. package/bundled-skills/ads/evals/evals.json +0 -157
  98. package/bundled-skills/ads/references/abm-playbook.md +0 -93
  99. package/bundled-skills/ads/references/ad-copy-templates.md +0 -207
  100. package/bundled-skills/ads/references/audience-targeting.md +0 -243
  101. package/bundled-skills/ads/references/audit-guardrails.md +0 -83
  102. package/bundled-skills/ads/references/b2b-paid-playbook.md +0 -115
  103. package/bundled-skills/ads/references/conversion-tracking.md +0 -361
  104. package/bundled-skills/ads/references/creative-research-automation.md +0 -103
  105. package/bundled-skills/ads/references/google-ads-audit-checklist.md +0 -84
  106. package/bundled-skills/ads/references/google-search-playbook.md +0 -120
  107. package/bundled-skills/ads/references/linkedin-b2b-playbook.md +0 -107
  108. package/bundled-skills/ads/references/meta-decision-system.md +0 -176
  109. package/bundled-skills/ads/references/payback-period.md +0 -69
  110. package/bundled-skills/ads/references/platform-setup-checklists.md +0 -277
  111. package/bundled-skills/ads/references/rsa-output-spec.md +0 -88
  112. package/bundled-skills/agent-device/SKILL.md +0 -20
  113. package/bundled-skills/ai-seo/SKILL.md +0 -488
  114. package/bundled-skills/ai-seo/evals/evals.json +0 -135
  115. package/bundled-skills/ai-seo/references/agent-readiness.md +0 -57
  116. package/bundled-skills/ai-seo/references/citations-vs-recommendations.md +0 -85
  117. package/bundled-skills/ai-seo/references/content-patterns.md +0 -287
  118. package/bundled-skills/ai-seo/references/content-types.md +0 -71
  119. package/bundled-skills/ai-seo/references/format-volatility.md +0 -98
  120. package/bundled-skills/ai-seo/references/okf.md +0 -104
  121. package/bundled-skills/ai-seo/references/platform-ranking-factors.md +0 -154
  122. package/bundled-skills/ai-seo/references/youtube-ai-citations.md +0 -60
  123. package/bundled-skills/analytics/SKILL.md +0 -310
  124. package/bundled-skills/analytics/evals/evals.json +0 -90
  125. package/bundled-skills/analytics/references/event-library.md +0 -260
  126. package/bundled-skills/analytics/references/ga4-implementation.md +0 -300
  127. package/bundled-skills/analytics/references/gtm-implementation.md +0 -390
  128. package/bundled-skills/android-emulator/SKILL.md +0 -32
  129. package/bundled-skills/android-reverse-engineering/LICENSE +0 -190
  130. package/bundled-skills/android-reverse-engineering/SKILL.md +0 -313
  131. package/bundled-skills/android-reverse-engineering/references/api-extraction-patterns.md +0 -197
  132. package/bundled-skills/android-reverse-engineering/references/call-flow-analysis.md +0 -210
  133. package/bundled-skills/android-reverse-engineering/references/fernflower-usage.md +0 -115
  134. package/bundled-skills/android-reverse-engineering/references/jadx-usage.md +0 -116
  135. package/bundled-skills/android-reverse-engineering/references/kotlin-name-recovery.md +0 -108
  136. package/bundled-skills/android-reverse-engineering/references/setup-guide.md +0 -221
  137. package/bundled-skills/android-reverse-engineering/references/third_party_hosts.txt +0 -122
  138. package/bundled-skills/android-reverse-engineering/scripts/check-deps.ps1 +0 -165
  139. package/bundled-skills/android-reverse-engineering/scripts/check-deps.sh +0 -129
  140. package/bundled-skills/android-reverse-engineering/scripts/decompile.ps1 +0 -400
  141. package/bundled-skills/android-reverse-engineering/scripts/decompile.sh +0 -578
  142. package/bundled-skills/android-reverse-engineering/scripts/find-api-calls.ps1 +0 -121
  143. package/bundled-skills/android-reverse-engineering/scripts/find-api-calls.sh +0 -339
  144. package/bundled-skills/android-reverse-engineering/scripts/fingerprint.sh +0 -241
  145. package/bundled-skills/android-reverse-engineering/scripts/install-dep.ps1 +0 -345
  146. package/bundled-skills/android-reverse-engineering/scripts/install-dep.sh +0 -448
  147. package/bundled-skills/android-reverse-engineering/scripts/lookup-name.sh +0 -85
  148. package/bundled-skills/android-reverse-engineering/scripts/recover-kotlin-names.sh +0 -140
  149. package/bundled-skills/build-graph/SKILL.md +0 -38
  150. package/bundled-skills/claude-history-ingest/SKILL.md +0 -463
  151. package/bundled-skills/claude-history-ingest/references/claude-data-format.md +0 -118
  152. package/bundled-skills/codex-history-ingest/SKILL.md +0 -248
  153. package/bundled-skills/codex-history-ingest/references/codex-data-format.md +0 -82
  154. package/bundled-skills/cold-email/SKILL.md +0 -159
  155. package/bundled-skills/cold-email/evals/evals.json +0 -94
  156. package/bundled-skills/cold-email/references/benchmarks.md +0 -83
  157. package/bundled-skills/cold-email/references/follow-up-sequences.md +0 -81
  158. package/bundled-skills/cold-email/references/frameworks.md +0 -90
  159. package/bundled-skills/cold-email/references/personalization.md +0 -79
  160. package/bundled-skills/cold-email/references/subject-lines.md +0 -53
  161. package/bundled-skills/competitor-profiling/SKILL.md +0 -415
  162. package/bundled-skills/competitor-profiling/evals/evals.json +0 -85
  163. package/bundled-skills/competitor-profiling/references/templates.md +0 -167
  164. package/bundled-skills/competitor-profiling/references/tool-reference.md +0 -179
  165. package/bundled-skills/computer-use/SKILL.md +0 -41
  166. package/bundled-skills/content-strategy/SKILL.md +0 -439
  167. package/bundled-skills/content-strategy/evals/evals.json +0 -116
  168. package/bundled-skills/content-strategy/references/content-distribution.md +0 -83
  169. package/bundled-skills/content-strategy/references/headless-cms.md +0 -194
  170. package/bundled-skills/copilot-history-ingest/SKILL.md +0 -376
  171. package/bundled-skills/copilot-history-ingest/references/copilot-data-format.md +0 -321
  172. package/bundled-skills/copy-editing/SKILL.md +0 -457
  173. package/bundled-skills/copy-editing/evals/evals.json +0 -89
  174. package/bundled-skills/copy-editing/references/checklist.md +0 -66
  175. package/bundled-skills/copy-editing/references/content-refresh.md +0 -38
  176. package/bundled-skills/copy-editing/references/plain-english-alternatives.md +0 -394
  177. package/bundled-skills/copywriting/SKILL.md +0 -256
  178. package/bundled-skills/copywriting/evals/evals.json +0 -126
  179. package/bundled-skills/copywriting/references/copy-frameworks.md +0 -433
  180. package/bundled-skills/copywriting/references/natural-transitions.md +0 -272
  181. package/bundled-skills/cro/SKILL.md +0 -187
  182. package/bundled-skills/cro/evals/evals.json +0 -111
  183. package/bundled-skills/cro/references/experiments.md +0 -248
  184. package/bundled-skills/cro/references/form.md +0 -422
  185. package/bundled-skills/cross-linker/SKILL.md +0 -309
  186. package/bundled-skills/customer-research/SKILL.md +0 -305
  187. package/bundled-skills/customer-research/evals/evals.json +0 -176
  188. package/bundled-skills/customer-research/references/interviews-and-surveys.md +0 -155
  189. package/bundled-skills/customer-research/references/source-guides.md +0 -401
  190. package/bundled-skills/daily-update/SKILL.md +0 -223
  191. package/bundled-skills/dart-add-unit-test/SKILL.md +0 -122
  192. package/bundled-skills/dart-build-cli-app/SKILL.md +0 -185
  193. package/bundled-skills/dart-collect-coverage/SKILL.md +0 -141
  194. package/bundled-skills/dart-fix-runtime-errors/SKILL.md +0 -166
  195. package/bundled-skills/dart-generate-test-mocks/SKILL.md +0 -155
  196. package/bundled-skills/dart-migrate-to-checks-package/SKILL.md +0 -528
  197. package/bundled-skills/dart-resolve-package-conflicts/SKILL.md +0 -116
  198. package/bundled-skills/dart-run-static-analysis/SKILL.md +0 -104
  199. package/bundled-skills/dart-setup-ffi-assets/SKILL.md +0 -419
  200. package/bundled-skills/dart-use-doc-examples/SKILL.md +0 -96
  201. package/bundled-skills/dart-use-ffigen/SKILL.md +0 -218
  202. package/bundled-skills/dart-use-pattern-matching/SKILL.md +0 -146
  203. package/bundled-skills/dart-use-primary-constructors/SKILL.md +0 -262
  204. package/bundled-skills/dart-write-documentation/SKILL.md +0 -136
  205. package/bundled-skills/debug-issue/SKILL.md +0 -28
  206. package/bundled-skills/dogfood/SKILL.md +0 -27
  207. package/bundled-skills/eas-app-stores/SKILL.md +0 -176
  208. package/bundled-skills/eas-app-stores/agents/openai.yaml +0 -4
  209. package/bundled-skills/eas-app-stores/references/app-store-metadata.md +0 -497
  210. package/bundled-skills/eas-app-stores/references/ios-app-store.md +0 -376
  211. package/bundled-skills/eas-app-stores/references/native-ios.md +0 -167
  212. package/bundled-skills/eas-app-stores/references/play-store.md +0 -244
  213. package/bundled-skills/eas-app-stores/references/testflight.md +0 -62
  214. package/bundled-skills/eas-app-stores/references/workflows.md +0 -120
  215. package/bundled-skills/eas-hosting/SKILL.md +0 -431
  216. package/bundled-skills/eas-hosting/agents/openai.yaml +0 -4
  217. package/bundled-skills/eas-observe/SKILL.md +0 -54
  218. package/bundled-skills/eas-observe/agents/openai.yaml +0 -4
  219. package/bundled-skills/eas-observe/references/metrics.md +0 -98
  220. package/bundled-skills/eas-observe/references/queries.md +0 -403
  221. package/bundled-skills/eas-observe/references/setup.md +0 -476
  222. package/bundled-skills/eas-observe/references/third-party.md +0 -136
  223. package/bundled-skills/eas-simulator/SKILL.md +0 -208
  224. package/bundled-skills/eas-simulator/agents/openai.yaml +0 -4
  225. package/bundled-skills/eas-simulator/references/controllers.md +0 -106
  226. package/bundled-skills/eas-simulator/references/run-your-app.md +0 -224
  227. package/bundled-skills/eas-simulator/references/troubleshooting.md +0 -44
  228. package/bundled-skills/eas-update/SKILL.md +0 -146
  229. package/bundled-skills/eas-update/agents/openai.yaml +0 -4
  230. package/bundled-skills/eas-update-insights/SKILL.md +0 -238
  231. package/bundled-skills/eas-update-insights/agents/openai.yaml +0 -4
  232. package/bundled-skills/eas-update-insights/references/channel-insights-schema.md +0 -47
  233. package/bundled-skills/eas-update-insights/references/update-insights-schema.md +0 -69
  234. package/bundled-skills/eas-workflows/SKILL.md +0 -99
  235. package/bundled-skills/eas-workflows/agents/openai.yaml +0 -4
  236. package/bundled-skills/eas-workflows/scripts/fetch.js +0 -109
  237. package/bundled-skills/eas-workflows/scripts/package.json +0 -6
  238. package/bundled-skills/emails/SKILL.md +0 -311
  239. package/bundled-skills/emails/evals/evals.json +0 -93
  240. package/bundled-skills/emails/references/copy-guidelines.md +0 -113
  241. package/bundled-skills/emails/references/email-types.md +0 -515
  242. package/bundled-skills/emails/references/sequence-templates.md +0 -168
  243. package/bundled-skills/explore-codebase/SKILL.md +0 -29
  244. package/bundled-skills/expo-animation/LICENSE +0 -21
  245. package/bundled-skills/expo-animation/RECIPES.md +0 -385
  246. package/bundled-skills/expo-animation/SKILL.md +0 -267
  247. package/bundled-skills/expo-animation/agents/openai.yaml +0 -4
  248. package/bundled-skills/expo-app-clip/SKILL.md +0 -290
  249. package/bundled-skills/expo-app-clip/agents/openai.yaml +0 -4
  250. package/bundled-skills/expo-app-clip/references/native-module.md +0 -96
  251. package/bundled-skills/expo-brownfield/SKILL.md +0 -62
  252. package/bundled-skills/expo-brownfield/agents/openai.yaml +0 -4
  253. package/bundled-skills/expo-brownfield/references/brownfield-integrated.md +0 -526
  254. package/bundled-skills/expo-brownfield/references/brownfield-isolated.md +0 -451
  255. package/bundled-skills/expo-brownfield/references/comparison.md +0 -63
  256. package/bundled-skills/expo-brownfield/references/troubleshooting.md +0 -88
  257. package/bundled-skills/expo-data-fetching/SKILL.md +0 -478
  258. package/bundled-skills/expo-data-fetching/agents/openai.yaml +0 -4
  259. package/bundled-skills/expo-data-fetching/references/expo-router-loaders.md +0 -341
  260. package/bundled-skills/expo-data-fetching/references/offline-and-cancellation.md +0 -68
  261. package/bundled-skills/expo-design-system/SKILL.md +0 -376
  262. package/bundled-skills/expo-design-system/agents/openai.yaml +0 -4
  263. package/bundled-skills/expo-design-system/references/audit.md +0 -190
  264. package/bundled-skills/expo-design-system/references/native-slop.md +0 -74
  265. package/bundled-skills/expo-dev-client/SKILL.md +0 -182
  266. package/bundled-skills/expo-dev-client/agents/openai.yaml +0 -4
  267. package/bundled-skills/expo-dom/SKILL.md +0 -425
  268. package/bundled-skills/expo-dom/agents/openai.yaml +0 -4
  269. package/bundled-skills/expo-examples/SKILL.md +0 -106
  270. package/bundled-skills/expo-examples/agents/openai.yaml +0 -4
  271. package/bundled-skills/expo-examples/references/catalog.md +0 -105
  272. package/bundled-skills/expo-migrate-module/SKILL.md +0 -113
  273. package/bundled-skills/expo-migrate-module/agents/openai.yaml +0 -4
  274. package/bundled-skills/expo-migrate-module/references/compatibility.md +0 -73
  275. package/bundled-skills/expo-migrate-module/references/example.md +0 -212
  276. package/bundled-skills/expo-migrate-module/references/migration-map.md +0 -306
  277. package/bundled-skills/expo-module/SKILL.md +0 -151
  278. package/bundled-skills/expo-module/agents/openai.yaml +0 -4
  279. package/bundled-skills/expo-module/references/config-plugin.md +0 -90
  280. package/bundled-skills/expo-module/references/create-expo-module.md +0 -206
  281. package/bundled-skills/expo-module/references/lifecycle.md +0 -127
  282. package/bundled-skills/expo-module/references/module-config.md +0 -48
  283. package/bundled-skills/expo-module/references/native-module.md +0 -286
  284. package/bundled-skills/expo-module/references/native-view.md +0 -171
  285. package/bundled-skills/expo-native-ui/SKILL.md +0 -201
  286. package/bundled-skills/expo-native-ui/agents/openai.yaml +0 -4
  287. package/bundled-skills/expo-native-ui/references/controls.md +0 -231
  288. package/bundled-skills/expo-native-ui/references/gradients.md +0 -106
  289. package/bundled-skills/expo-native-ui/references/icons.md +0 -232
  290. package/bundled-skills/expo-native-ui/references/media.md +0 -193
  291. package/bundled-skills/expo-native-ui/references/storage.md +0 -121
  292. package/bundled-skills/expo-native-ui/references/visual-effects.md +0 -198
  293. package/bundled-skills/expo-native-ui/references/webgpu-three.md +0 -605
  294. package/bundled-skills/expo-overview/SKILL.md +0 -115
  295. package/bundled-skills/expo-overview/agents/openai.yaml +0 -4
  296. package/bundled-skills/expo-project-structure/SKILL.md +0 -114
  297. package/bundled-skills/expo-project-structure/agents/openai.yaml +0 -4
  298. package/bundled-skills/expo-router/SKILL.md +0 -240
  299. package/bundled-skills/expo-router/agents/openai.yaml +0 -4
  300. package/bundled-skills/expo-router/references/form-sheet.md +0 -253
  301. package/bundled-skills/expo-router/references/route-structure.md +0 -229
  302. package/bundled-skills/expo-router/references/search.md +0 -248
  303. package/bundled-skills/expo-router/references/tabs.md +0 -433
  304. package/bundled-skills/expo-router/references/toolbar-and-headers.md +0 -284
  305. package/bundled-skills/expo-router/references/zoom-transitions.md +0 -158
  306. package/bundled-skills/expo-skill-eval/SKILL.md +0 -314
  307. package/bundled-skills/expo-skill-eval/agents/visual-grader.md +0 -52
  308. package/bundled-skills/expo-skill-eval/references/design-rubric.md +0 -45
  309. package/bundled-skills/expo-skill-eval/references/runtime-matrix.md +0 -34
  310. package/bundled-skills/expo-skill-eval/scripts/check-static.sh +0 -64
  311. package/bundled-skills/expo-skill-eval/scripts/clean-fixture.sh +0 -56
  312. package/bundled-skills/expo-skill-eval/scripts/generate_viewer.py +0 -450
  313. package/bundled-skills/expo-skill-eval/scripts/latest-sdk.sh +0 -46
  314. package/bundled-skills/expo-skill-eval/scripts/make-fixture.sh +0 -95
  315. package/bundled-skills/expo-skill-eval/scripts/make-workspace.sh +0 -31
  316. package/bundled-skills/expo-skill-eval/scripts/snapshot-android.sh +0 -284
  317. package/bundled-skills/expo-skill-eval/scripts/snapshot-ios.sh +0 -132
  318. package/bundled-skills/expo-skill-eval/scripts/snapshot-web.sh +0 -61
  319. package/bundled-skills/expo-skill-feedback/SKILL.md +0 -87
  320. package/bundled-skills/expo-skill-feedback/agents/openai.yaml +0 -4
  321. package/bundled-skills/expo-skill-feedback/scripts/skill-event.cjs +0 -180
  322. package/bundled-skills/expo-skill-feedback/scripts/telemetry.cjs +0 -65
  323. package/bundled-skills/expo-skill-feedback/scripts/telemetry_common.cjs +0 -171
  324. package/bundled-skills/expo-ui/SKILL.md +0 -101
  325. package/bundled-skills/expo-ui/agents/openai.yaml +0 -4
  326. package/bundled-skills/expo-ui/references/drop-in-replacements.md +0 -27
  327. package/bundled-skills/expo-ui/references/jetpack-compose.md +0 -73
  328. package/bundled-skills/expo-ui/references/swift-ui.md +0 -73
  329. package/bundled-skills/expo-ui/references/universal.md +0 -104
  330. package/bundled-skills/expo-ui/scripts/list-components.js +0 -193
  331. package/bundled-skills/expo-upgrade/SKILL.md +0 -150
  332. package/bundled-skills/expo-upgrade/agents/openai.yaml +0 -4
  333. package/bundled-skills/expo-upgrade/references/expo-av-to-audio.md +0 -132
  334. package/bundled-skills/expo-upgrade/references/expo-av-to-video.md +0 -160
  335. package/bundled-skills/expo-upgrade/references/native-tabs.md +0 -124
  336. package/bundled-skills/expo-upgrade/references/new-architecture.md +0 -79
  337. package/bundled-skills/expo-upgrade/references/react-19.md +0 -79
  338. package/bundled-skills/expo-upgrade/references/react-compiler.md +0 -59
  339. package/bundled-skills/expo-upgrade/references/react-navigation-to-expo-router.md +0 -61
  340. package/bundled-skills/expo-web-to-native/SKILL.md +0 -91
  341. package/bundled-skills/expo-web-to-native/agents/openai.yaml +0 -4
  342. package/bundled-skills/expo-web-to-native/references/false-friends.md +0 -119
  343. package/bundled-skills/expo-web-to-native/references/native-patterns.md +0 -39
  344. package/bundled-skills/expo-web-to-native/references/run-as-goal.md +0 -48
  345. package/bundled-skills/expo-web-to-native/references/verify-on-device.md +0 -45
  346. package/bundled-skills/find-skills/SKILL.md +0 -141
  347. package/bundled-skills/flutter-add-integration-test/SKILL.md +0 -163
  348. package/bundled-skills/flutter-add-widget-preview/SKILL.md +0 -145
  349. package/bundled-skills/flutter-add-widget-test/SKILL.md +0 -154
  350. package/bundled-skills/flutter-apply-architecture-best-practices/SKILL.md +0 -162
  351. package/bundled-skills/flutter-build-responsive-layout/SKILL.md +0 -139
  352. package/bundled-skills/flutter-fix-layout-issues/SKILL.md +0 -130
  353. package/bundled-skills/flutter-implement-json-serialization/SKILL.md +0 -153
  354. package/bundled-skills/flutter-setup-declarative-routing/SKILL.md +0 -255
  355. package/bundled-skills/flutter-setup-localization/SKILL.md +0 -210
  356. package/bundled-skills/flutter-use-http-package/SKILL.md +0 -174
  357. package/bundled-skills/graph-colorize/SKILL.md +0 -180
  358. package/bundled-skills/hermes-history-ingest/SKILL.md +0 -239
  359. package/bundled-skills/hermes-history-ingest/references/hermes-data-format.md +0 -131
  360. package/bundled-skills/impl-validator/SKILL.md +0 -118
  361. package/bundled-skills/ios-simulator/SKILL.md +0 -32
  362. package/bundled-skills/json-canvas/SKILL.md +0 -244
  363. package/bundled-skills/json-canvas/references/EXAMPLES.md +0 -329
  364. package/bundled-skills/launch/SKILL.md +0 -381
  365. package/bundled-skills/launch/evals/evals.json +0 -106
  366. package/bundled-skills/llm-wiki/SKILL.md +0 -661
  367. package/bundled-skills/llm-wiki/references/WRITING.md +0 -28
  368. package/bundled-skills/llm-wiki/references/karpathy-pattern.md +0 -45
  369. package/bundled-skills/marketing-plan/SKILL.md +0 -300
  370. package/bundled-skills/marketing-plan/evals/evals.json +0 -112
  371. package/bundled-skills/marketing-plan/references/aarrr-framework.md +0 -180
  372. package/bundled-skills/marketing-plan/references/budget-planning.md +0 -168
  373. package/bundled-skills/marketing-plan/references/client-types.md +0 -373
  374. package/bundled-skills/marketing-plan/references/current-state-rubric.md +0 -255
  375. package/bundled-skills/marketing-plan/references/example-quietude.md +0 -972
  376. package/bundled-skills/marketing-plan/references/funding-stage-unlocks.md +0 -230
  377. package/bundled-skills/marketing-plan/references/growth-patterns.md +0 -190
  378. package/bundled-skills/marketing-plan/references/idea-cross-reference.md +0 -265
  379. package/bundled-skills/marketing-plan/references/measurement-framework.md +0 -213
  380. package/bundled-skills/marketing-plan/references/methodology.md +0 -363
  381. package/bundled-skills/marketing-plan/references/ops-stack-mapping.md +0 -197
  382. package/bundled-skills/marketing-plan/references/plan-template.md +0 -494
  383. package/bundled-skills/marketing-plan/references/team-and-agency-model.md +0 -278
  384. package/bundled-skills/marketing-psychology/SKILL.md +0 -455
  385. package/bundled-skills/marketing-psychology/evals/evals.json +0 -88
  386. package/bundled-skills/memory-bridge/SKILL.md +0 -163
  387. package/bundled-skills/memory-save/SKILL.md +0 -88
  388. package/bundled-skills/obsidian-bases/SKILL.md +0 -499
  389. package/bundled-skills/obsidian-bases/references/FUNCTIONS_REFERENCE.md +0 -173
  390. package/bundled-skills/obsidian-cli/SKILL.md +0 -106
  391. package/bundled-skills/obsidian-layout-adjustment/SKILL.md +0 -226
  392. package/bundled-skills/obsidian-layout-adjustment/evals/evals.json +0 -53
  393. package/bundled-skills/obsidian-layout-adjustment/references/workflow-reference.md +0 -212
  394. package/bundled-skills/obsidian-markdown/SKILL.md +0 -196
  395. package/bundled-skills/obsidian-markdown/references/CALLOUTS.md +0 -58
  396. package/bundled-skills/obsidian-markdown/references/EMBEDS.md +0 -70
  397. package/bundled-skills/obsidian-markdown/references/PROPERTIES.md +0 -61
  398. package/bundled-skills/offers/SKILL.md +0 -155
  399. package/bundled-skills/offers/evals/evals.json +0 -21
  400. package/bundled-skills/offers/references/bonus-stacking.md +0 -150
  401. package/bundled-skills/offers/references/examples.md +0 -215
  402. package/bundled-skills/offers/references/guarantee-design.md +0 -172
  403. package/bundled-skills/offers/references/offer-anatomy.md +0 -203
  404. package/bundled-skills/offers/references/offer-formats.md +0 -240
  405. package/bundled-skills/offers/references/saas-offers.md +0 -116
  406. package/bundled-skills/offers/references/scarcity-urgency.md +0 -175
  407. package/bundled-skills/offers/references/value-equation.md +0 -134
  408. package/bundled-skills/onboarding/SKILL.md +0 -261
  409. package/bundled-skills/onboarding/evals/evals.json +0 -108
  410. package/bundled-skills/onboarding/references/activation-models.md +0 -57
  411. package/bundled-skills/onboarding/references/experiments.md +0 -258
  412. package/bundled-skills/onboarding/references/minimum-path-to-value.md +0 -49
  413. package/bundled-skills/openclaw-history-ingest/SKILL.md +0 -257
  414. package/bundled-skills/openclaw-history-ingest/references/openclaw-data-format.md +0 -154
  415. package/bundled-skills/orchestration/SKILL.md +0 -69
  416. package/bundled-skills/pi-history-ingest/SKILL.md +0 -312
  417. package/bundled-skills/pricing/SKILL.md +0 -295
  418. package/bundled-skills/pricing/evals/evals.json +0 -119
  419. package/bundled-skills/pricing/references/pricing-models.md +0 -66
  420. package/bundled-skills/pricing/references/pricing-page-teardown.md +0 -85
  421. package/bundled-skills/pricing/references/research-methods.md +0 -152
  422. package/bundled-skills/pricing/references/tier-structure.md +0 -232
  423. package/bundled-skills/product-marketing/SKILL.md +0 -255
  424. package/bundled-skills/product-marketing/evals/evals.json +0 -98
  425. package/bundled-skills/prospecting/SKILL.md +0 -262
  426. package/bundled-skills/prospecting/evals/evals.json +0 -122
  427. package/bundled-skills/prospecting/references/b2b-prospecting.md +0 -106
  428. package/bundled-skills/prospecting/references/compliance.md +0 -123
  429. package/bundled-skills/prospecting/references/data-sources.md +0 -287
  430. package/bundled-skills/prospecting/references/demand-signals.md +0 -129
  431. package/bundled-skills/prospecting/references/local-prospecting.md +0 -165
  432. package/bundled-skills/prospecting/references/saas-prospecting.md +0 -123
  433. package/bundled-skills/refactor-safely/SKILL.md +0 -29
  434. package/bundled-skills/review-delta/SKILL.md +0 -46
  435. package/bundled-skills/review-pr/SKILL.md +0 -66
  436. package/bundled-skills/sales-enablement/SKILL.md +0 -359
  437. package/bundled-skills/sales-enablement/evals/evals.json +0 -91
  438. package/bundled-skills/sales-enablement/references/deck-frameworks.md +0 -263
  439. package/bundled-skills/sales-enablement/references/demo-scripts.md +0 -355
  440. package/bundled-skills/sales-enablement/references/objection-library.md +0 -270
  441. package/bundled-skills/sales-enablement/references/one-pager-templates.md +0 -208
  442. package/bundled-skills/seo-audit/SKILL.md +0 -499
  443. package/bundled-skills/seo-audit/evals/evals.json +0 -136
  444. package/bundled-skills/seo-audit/references/ai-writing-detection.md +0 -200
  445. package/bundled-skills/seo-audit/references/international-seo.md +0 -230
  446. package/bundled-skills/session-brain/SKILL.md +0 -101
  447. package/bundled-skills/session-search/SKILL.md +0 -97
  448. package/bundled-skills/social/SKILL.md +0 -413
  449. package/bundled-skills/social/evals/evals.json +0 -107
  450. package/bundled-skills/social/references/carousel-frameworks.md +0 -141
  451. package/bundled-skills/social/references/listening-sources-template.md +0 -123
  452. package/bundled-skills/social/references/listening.md +0 -283
  453. package/bundled-skills/social/references/platform-limits.md +0 -110
  454. package/bundled-skills/social/references/platforms.md +0 -170
  455. package/bundled-skills/social/references/post-templates.md +0 -179
  456. package/bundled-skills/social/references/reverse-engineering.md +0 -195
  457. package/bundled-skills/social/references/short-form-video.md +0 -237
  458. package/bundled-skills/tag-taxonomy/SKILL.md +0 -218
  459. package/bundled-skills/vault-skill-factory/SKILL.md +0 -143
  460. package/bundled-skills/video/SKILL.md +0 -346
  461. package/bundled-skills/video/evals/evals.json +0 -103
  462. package/bundled-skills/video/references/ai-video-prompting.md +0 -175
  463. package/bundled-skills/video/references/edit-anatomy.md +0 -84
  464. package/bundled-skills/wiki-agent/SKILL.md +0 -322
  465. package/bundled-skills/wiki-capture/SKILL.md +0 -337
  466. package/bundled-skills/wiki-capture/references/RAW-FORMAT.md +0 -115
  467. package/bundled-skills/wiki-context-pack/SKILL.md +0 -89
  468. package/bundled-skills/wiki-dashboard/SKILL.md +0 -472
  469. package/bundled-skills/wiki-dedup/SKILL.md +0 -320
  470. package/bundled-skills/wiki-digest/SKILL.md +0 -243
  471. package/bundled-skills/wiki-export/SKILL.md +0 -445
  472. package/bundled-skills/wiki-history-ingest/SKILL.md +0 -61
  473. package/bundled-skills/wiki-import/SKILL.md +0 -276
  474. package/bundled-skills/wiki-ingest/SKILL.md +0 -563
  475. package/bundled-skills/wiki-ingest/references/ingest-prompts.md +0 -54
  476. package/bundled-skills/wiki-ingest/references/pageindex.md +0 -72
  477. package/bundled-skills/wiki-ingest/references/url-sources.md +0 -295
  478. package/bundled-skills/wiki-lint/SKILL.md +0 -643
  479. package/bundled-skills/wiki-narrate/SKILL.md +0 -120
  480. package/bundled-skills/wiki-narrate/references/voices.md +0 -29
  481. package/bundled-skills/wiki-query/SKILL.md +0 -307
  482. package/bundled-skills/wiki-rebuild/SKILL.md +0 -212
  483. package/bundled-skills/wiki-research/SKILL.md +0 -319
  484. package/bundled-skills/wiki-setup/SKILL.md +0 -359
  485. package/bundled-skills/wiki-stage-commit/SKILL.md +0 -164
  486. package/bundled-skills/wiki-status/SKILL.md +0 -556
  487. package/bundled-skills/wiki-switch/SKILL.md +0 -115
  488. package/bundled-skills/wiki-synthesize/SKILL.md +0 -212
  489. package/bundled-skills/wiki-update/SKILL.md +0 -271
  490. package/skills/ai-security/SKILL.md +0 -132
  491. package/skills/ai-security/references/atlas-coverage.md +0 -60
  492. package/skills/ai-security/scripts/ai_threat_scanner.py +0 -373
  493. package/skills/anti-AI-design/SKILL.md +0 -72
  494. package/skills/apple-hig-audit/SKILL.md +0 -64
  495. package/skills/apple-hig-audit/references/accessibility.md +0 -78
  496. package/skills/apple-hig-audit/references/platform-specifics.md +0 -57
  497. package/skills/apple-hig-audit/references/visual-design.md +0 -68
  498. package/skills/apple-hig-audit/scripts/hig_checker.py +0 -115
  499. package/skills/apple-hig-audit/templates/hig-audit-template.md +0 -114
  500. package/skills/dependency-auditor/README.md +0 -98
  501. package/skills/dependency-auditor/SKILL.md +0 -114
  502. package/skills/dependency-auditor/assets/sample_go.mod +0 -53
  503. package/skills/dependency-auditor/assets/sample_package.json +0 -72
  504. package/skills/dependency-auditor/assets/sample_requirements.txt +0 -71
  505. package/skills/dependency-auditor/expected_outputs/sample_license_report.txt +0 -37
  506. package/skills/dependency-auditor/expected_outputs/sample_upgrade_plan.txt +0 -59
  507. package/skills/dependency-auditor/expected_outputs/sample_vulnerability_report.json +0 -71
  508. package/skills/dependency-auditor/references/dependency_management_best_practices.md +0 -46
  509. package/skills/dependency-auditor/references/license_compatibility_matrix.md +0 -57
  510. package/skills/dependency-auditor/references/vulnerability_assessment_guide.md +0 -62
  511. package/skills/dependency-auditor/scripts/dep_scanner.py +0 -595
  512. package/skills/dependency-auditor/scripts/license_checker.py +0 -442
  513. package/skills/dependency-auditor/scripts/upgrade_planner.py +0 -490
  514. package/skills/dependency-auditor/test-inventory.json +0 -421
  515. package/skills/dependency-auditor/test-project/package.json +0 -72
  516. package/skills/design-system-tokens/SKILL.md +0 -90
  517. package/skills/design-system-tokens/assets/design_system_doc_template.md +0 -129
  518. package/skills/design-system-tokens/references/component-architecture.md +0 -88
  519. package/skills/design-system-tokens/references/developer-handoff.md +0 -61
  520. package/skills/design-system-tokens/references/responsive-calculations.md +0 -72
  521. package/skills/design-system-tokens/references/token-generation.md +0 -62
  522. package/skills/design-system-tokens/scripts/design_token_generator.py +0 -315
  523. package/skills/engineering-code-standards/SKILL.md +0 -174
  524. package/skills/env-secrets-manager/SKILL.md +0 -102
  525. package/skills/env-secrets-manager/references/secret-patterns.md +0 -56
  526. package/skills/env-secrets-manager/references/validation-detection-rotation.md +0 -76
  527. package/skills/env-secrets-manager/scripts/env_auditor.py +0 -340
  528. package/skills/frontend-design-taste/SKILL.md +0 -62
  529. package/skills/mcp-server-builder/README.md +0 -42
  530. package/skills/mcp-server-builder/SKILL.md +0 -144
  531. package/skills/mcp-server-builder/references/openapi-extraction-guide.md +0 -34
  532. package/skills/mcp-server-builder/references/production-hardening-guide.md +0 -80
  533. package/skills/mcp-server-builder/references/python-server-template.md +0 -22
  534. package/skills/mcp-server-builder/references/spec-compatibility.md +0 -129
  535. package/skills/mcp-server-builder/references/typescript-server-template.md +0 -19
  536. package/skills/mcp-server-builder/references/validation-checklist.md +0 -30
  537. package/skills/mcp-server-builder/scripts/mcp_validator.py +0 -180
  538. package/skills/mcp-server-builder/scripts/openapi_to_mcp.py +0 -279
  539. package/skills/playwright-agent/SKILL.md +0 -147
  540. package/skills/skill-creator/LICENSE.txt +0 -14
  541. package/skills/skill-creator/SKILL.md +0 -471
  542. package/skills/skill-creator/agents/analyzer.md +0 -274
  543. package/skills/skill-creator/agents/comparator.md +0 -202
  544. package/skills/skill-creator/agents/grader.md +0 -223
  545. package/skills/skill-creator/assets/eval_review.html +0 -143
  546. package/skills/skill-creator/eval-viewer/generate_review.py +0 -471
  547. package/skills/skill-creator/eval-viewer/viewer.html +0 -1321
  548. package/skills/skill-creator/references/schemas.md +0 -430
  549. package/skills/skill-creator/scripts/__init__.py +0 -0
  550. package/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
  551. package/skills/skill-creator/scripts/generate_report.py +0 -322
  552. package/skills/skill-creator/scripts/improve_description.py +0 -247
  553. package/skills/skill-creator/scripts/package_skill.py +0 -136
  554. package/skills/skill-creator/scripts/quick_validate.py +0 -103
  555. package/skills/skill-creator/scripts/run_eval.py +0 -310
  556. package/skills/skill-creator/scripts/run_loop.py +0 -328
  557. package/skills/skill-creator/scripts/utils.py +0 -47
  558. package/skills/write-a-skill/SKILL.md +0 -111
  559. package/skills/write-a-skill/references/companion_tooling.md +0 -61
  560. package/skills/write-a-skill/references/description_design_patterns.md +0 -136
  561. package/skills/write-a-skill/references/progressive_disclosure_principles.md +0 -87
  562. package/skills/write-a-skill/references/quality_gates_for_skills.md +0 -158
  563. package/skills/write-a-skill/scripts/skill_description_validator.py +0 -241
  564. package/skills/write-a-skill/scripts/skill_review_checklist_runner.py +0 -257
  565. package/skills/write-a-skill/scripts/skill_structure_validator.py +0 -265
@@ -1,180 +0,0 @@
1
- #!/usr/bin/env node
2
- // Submit a `skill_invoked` event to PostHog — fire-and-forget.
3
- //
4
- // Invoked two ways, both cross-platform (plain `node`, no shell wrapper, so it runs the
5
- // same on macOS / Linux / Windows):
6
- // 1. From Claude Code hooks (../../../hooks/hooks.json) as
7
- // `node skill-event.cjs --skill auto --initiator <ai|user> --plugin-root <dir> --detach --quiet`.
8
- // The foreground process reads the hook payload from stdin, resolves which skill ran,
9
- // runs the cheap local gates, then — for `--detach` — re-launches a DETACHED copy of
10
- // itself to do the network POST and returns immediately, so the agent turn never blocks.
11
- // 2. Directly (that detached child, or manual / --dry-run testing) with a resolved
12
- // `--skill <name>`, which builds the event and sends it inline.
13
-
14
- const fs = require("fs");
15
- const path = require("path");
16
-
17
- const {
18
- POSTHOG_PROJECT_API_KEY,
19
- SOURCE,
20
- telemetryActive,
21
- telemetryConfigured,
22
- detectHarness,
23
- platformProps,
24
- telemetryIdentity,
25
- sendToPosthog,
26
- } = require("./telemetry_common.cjs");
27
-
28
- const EVENT = "skill_invoked";
29
-
30
- function parseArgs(argv) {
31
- const args = { skill: "", agentHarness: "", initiator: "", pluginRoot: "", dryRun: false, quiet: false, detach: false };
32
- for (let i = 0; i < argv.length; i++) {
33
- const flag = argv[i];
34
- const next = () => argv[++i] || "";
35
- switch (flag) {
36
- case "--skill": args.skill = next(); break;
37
- case "--agent-harness": args.agentHarness = next(); break;
38
- case "--initiator": args.initiator = next(); break;
39
- case "--plugin-root": args.pluginRoot = next(); break;
40
- case "--detach": args.detach = true; break;
41
- case "--dry-run": args.dryRun = true; break;
42
- case "--quiet": args.quiet = true; break;
43
- default: break; // ignore unknown flags
44
- }
45
- }
46
- return args;
47
- }
48
-
49
- // Read the hook payload from stdin (fd 0) and parse it as JSON. Only used to resolve
50
- // `--skill auto` in the foreground hook process; the detached sender is handed the
51
- // already-resolved name and never touches stdin.
52
- function readHookInput() {
53
- try {
54
- if (process.stdin.isTTY) return {};
55
- const raw = (fs.readFileSync(0, "utf8") || "").trim(); // fd 0 = stdin
56
- if (!raw) return {};
57
- const parsed = JSON.parse(raw);
58
- return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
59
- } catch {
60
- return {};
61
- }
62
- }
63
-
64
- // Resolve the invoked skill name from the hook payload. The name arrives in different
65
- // fields across payload shapes, so check every plausible location:
66
- // - Claude Code Skill tool: tool_input.skill (e.g. "expo:eas-observe")
67
- // - Claude Code /slash command: command_name (UserPromptExpansion)
68
- // - other payload shapes: tool_input.skill_name, top-level skill / skill_name
69
- // Namespaced names must be OURS: "expo:<skill>" keeps the final segment, any other
70
- // namespace is dropped — another plugin's "foo:expo-ui" must not count as ours, and
71
- // skillBelongsToPlugin() can't tell name collisions apart. Bare names stay permissive
72
- // and are scoped by skillBelongsToPlugin() downstream.
73
- function skillFromHook(hookInput) {
74
- const ti = hookInput && typeof hookInput.tool_input === "object" && hookInput.tool_input ? hookInput.tool_input : {};
75
- const raw = String(
76
- ti.skill || ti.skill_name || hookInput.command_name || hookInput.skill || hookInput.skill_name || ""
77
- ).trim().replace(/^\//, ""); // tolerate a leading "/" from slash-command payloads
78
- if (!raw.includes(":")) return raw;
79
- const sep = raw.lastIndexOf(":");
80
- return raw.slice(0, sep) === "expo" ? raw.slice(sep + 1) : "";
81
- }
82
-
83
- function pluginRootFor(args) {
84
- // Self-derive from this script's location: <root>/skills/expo-skill-feedback/scripts.
85
- return args.pluginRoot || path.resolve(__dirname, "..", "..", "..");
86
- }
87
-
88
- // Only emit for skills that belong to THIS plugin (so we never track other plugins'
89
- // or the user's own skills). Confirms <pluginRoot>/skills/<skill>/SKILL.md exists.
90
- // The skill name must be a single kebab-case segment — this also blocks path traversal
91
- // (e.g. "../../x") from a malformed payload reaching path.join or the event property.
92
- function skillBelongsToPlugin(skill, pluginRoot) {
93
- if (!skill || !pluginRoot) return false;
94
- if (!/^[a-z0-9][a-z0-9-]*$/.test(skill)) return false;
95
- try { return fs.existsSync(path.join(pluginRoot, "skills", skill, "SKILL.md")); }
96
- catch { return false; }
97
- }
98
-
99
- function eventPayload(skill, args) {
100
- const agentHarness = args.agentHarness.trim() || detectHarness();
101
- const initiator = args.initiator.trim();
102
- const timestamp = new Date().toISOString();
103
- const [distinctId, identityProperties] = telemetryIdentity(agentHarness, { createInstallation: !args.dryRun });
104
-
105
- const properties = {
106
- $process_person_profile: false,
107
- source: SOURCE,
108
- skill,
109
- agent_harness: agentHarness,
110
- ...(initiator ? { initiator } : {}),
111
- ...platformProps(),
112
- ...identityProperties,
113
- };
114
-
115
- return { api_key: POSTHOG_PROJECT_API_KEY, event: EVENT, distinct_id: distinctId, timestamp, properties };
116
- }
117
-
118
- // Re-launch this script DETACHED to perform the network POST off the agent's critical
119
- // path — the cross-platform equivalent of `node skill-event.cjs … &`. We pass the already
120
- // resolved `--skill <name>` (not "auto") and drop `--detach`, so the child sends inline and
121
- // never reads stdin or re-detaches. It runs under the same runtime that launched us
122
- // (process.execPath = node or bun) and inherits our env (CLAUDECODE, EXPO_SKILLS_*, …).
123
- // windowsHide avoids a console-window flash on Windows; failures are ignored (best-effort).
124
- function spawnDetachedSend(skill, args) {
125
- try {
126
- const { spawn } = require("child_process");
127
- const childArgs = [__filename, "--skill", skill, "--quiet"];
128
- if (args.initiator.trim()) childArgs.push("--initiator", args.initiator.trim());
129
- if (args.agentHarness.trim()) childArgs.push("--agent-harness", args.agentHarness.trim());
130
- const child = spawn(process.execPath, childArgs, { detached: true, stdio: "ignore", windowsHide: true });
131
- child.unref();
132
- } catch {
133
- // best-effort: if the child can't be spawned, skip the send rather than block
134
- }
135
- }
136
-
137
- async function main(argv) {
138
- const args = parseArgs(argv);
139
-
140
- // Resolve which skill ran. `--skill auto` means "read it from the hook payload on
141
- // stdin" — which must happen HERE, in the foreground hook process, because a detached
142
- // child's stdin is /dev/null.
143
- let skill = args.skill.trim();
144
- if (skill === "auto") skill = skillFromHook(readHookInput());
145
-
146
- // Cheap, local, no-network gates: decide up front whether anything will be sent, so the
147
- // common "not an Expo skill / opted out" cases cost nothing and never spawn a child.
148
- if (!skill) return 0; // not a skill invocation
149
- if (!args.dryRun && !telemetryActive()) return 0; // opt-in: off until enabled (dry-run inspects regardless)
150
- if (!telemetryConfigured() && !args.dryRun) return 0; // no key in this build (e.g. a fork) -> inert
151
- if (!skillBelongsToPlugin(skill, pluginRootFor(args))) return 0; // not one of ours
152
-
153
- // Hook path: hand the network POST to a detached copy of ourselves so the turn never
154
- // blocks on it, then return immediately. (--dry-run stays inline so it can be inspected.)
155
- if (args.detach && !args.dryRun) {
156
- spawnDetachedSend(skill, args);
157
- return 0;
158
- }
159
-
160
- const payload = eventPayload(skill, args);
161
-
162
- if (args.dryRun) {
163
- console.log(JSON.stringify({ ...payload, api_key: "phc_..." }, null, 2));
164
- return 0;
165
- }
166
-
167
- try {
168
- await sendToPosthog(payload, { userAgent: "expo-skills/skill-event", timeoutMs: 3000 });
169
- } catch (err) {
170
- if (!args.quiet) console.error(`skill-event: ${err.message}`);
171
- return args.quiet ? 0 : 1;
172
- }
173
-
174
- if (!args.quiet) console.log(`sent ${EVENT}: ${payload.properties.skill} (${payload.properties.initiator || "?"})`);
175
- return 0;
176
- }
177
-
178
- main(process.argv.slice(2))
179
- .then((code) => process.exit(code))
180
- .catch(() => process.exit(0));
@@ -1,65 +0,0 @@
1
- #!/usr/bin/env node
2
- // Turn Expo skills usage telemetry on or off, or check its status.
3
- //
4
- // Telemetry is OFF by default (opt-in) — nothing is sent until you enable it here or
5
- // via EXPO_SKILLS_TELEMETRY=1. Usage:
6
- // node telemetry.cjs --status # show whether telemetry is on/off and why
7
- // node telemetry.cjs --on # enable (writes the opt-in marker)
8
- // node telemetry.cjs --off # disable (removes the opt-in marker — the default)
9
- //
10
- // The opt-in marker is the reliable switch: it works no matter how the agent was
11
- // launched. EXPO_SKILLS_TELEMETRY=1/0 and DO_NOT_TRACK also work (handy for CI), but
12
- // env vars don't always reach hook subprocesses.
13
-
14
- const fs = require("fs");
15
- const path = require("path");
16
- const {
17
- OPT_IN_PATH,
18
- telemetryActive,
19
- telemetryEnvSignal,
20
- telemetryConfigured,
21
- isCI,
22
- } = require("./telemetry_common.cjs");
23
-
24
- // One-line explanation of the current state (mirrors telemetryActive()'s precedence).
25
- function reason() {
26
- const env = telemetryEnvSignal();
27
- if (env === "off") return "env var (EXPO_SKILLS_TELEMETRY=0 / DO_NOT_TRACK)";
28
- if (isCI()) return "CI environment (telemetry never emits from CI)";
29
- if (env === "on") return "env var EXPO_SKILLS_TELEMETRY=1";
30
- if (safeExists(OPT_IN_PATH)) return `opt-in marker (${OPT_IN_PATH})`;
31
- return "default (opt-in — off until enabled)";
32
- }
33
-
34
- function safeExists(p) { try { return fs.existsSync(p); } catch { return false; } }
35
-
36
- function printStatus() {
37
- const on = telemetryActive();
38
- if (on && !telemetryConfigured()) {
39
- console.log(`Expo skills telemetry: ON via ${reason()}, but no PostHog key in this build (stripped to placeholder) — nothing is sent.`);
40
- } else if (on) {
41
- console.log(`Expo skills telemetry: ON (anonymous) — ${reason()}. Turn off with: telemetry.cjs --off`);
42
- } else {
43
- console.log(`Expo skills telemetry: OFF — ${reason()}. Turn on with: telemetry.cjs --on (or EXPO_SKILLS_TELEMETRY=1)`);
44
- }
45
- }
46
-
47
- const cmd = process.argv[2];
48
-
49
- if (cmd === "--on" || cmd === "--enable") {
50
- fs.mkdirSync(path.dirname(OPT_IN_PATH), { recursive: true, mode: 0o700 });
51
- fs.writeFileSync(OPT_IN_PATH, "Expo skills telemetry enabled by user.\n");
52
- console.log(`Telemetry enabled — wrote ${OPT_IN_PATH}`);
53
- if (telemetryEnvSignal() === "off") console.log("Note: an env var (EXPO_SKILLS_TELEMETRY=0 / DO_NOT_TRACK) still forces it OFF; unset it to send.");
54
- else if (isCI()) console.log("Note: this looks like CI, where telemetry stays OFF regardless.");
55
- console.log("Turn off any time with: telemetry.cjs --off");
56
- } else if (cmd === "--off" || cmd === "--disable") {
57
- try { fs.rmSync(OPT_IN_PATH, { force: true }); } catch {}
58
- console.log("Telemetry off — removed the opt-in marker (off is the default).");
59
- if (telemetryEnvSignal() === "on") console.log("Note: EXPO_SKILLS_TELEMETRY=1 still forces it ON; unset it to stay off.");
60
- } else if (cmd === "--status" || cmd === undefined) {
61
- printStatus();
62
- } else {
63
- console.error(`Unknown option: ${cmd}\nUsage: telemetry.cjs [--status | --on | --off]`);
64
- process.exit(2);
65
- }
@@ -1,171 +0,0 @@
1
- // Shared helpers for Expo skills PostHog telemetry.
2
- //
3
- // Zero npm dependencies — Node.js built-ins only (crypto, fs, https, os, path).
4
- // Node is a hard requirement for Expo development, so it is available wherever
5
- // these skills are used. If `node` is ever missing, the calling hook simply
6
- // fails non-blocking and no telemetry is sent.
7
-
8
- const crypto = require("crypto");
9
- const fs = require("fs");
10
- const https = require("https");
11
- const os = require("os");
12
- const path = require("path");
13
-
14
- const POSTHOG_HOST = "https://us.i.posthog.com";
15
-
16
- // PostHog project API key. This is a *write-only, public* ingestion key — the
17
- // same kind embedded in browser snippets — so it is safe to commit. Override
18
- // per environment with EXPO_SKILLS_POSTHOG_KEY (e.g. a staging project).
19
- // NOTE: never put a PostHog *personal* API key (phx_...) here — those are secret.
20
- const POSTHOG_PROJECT_API_KEY =
21
- process.env.EXPO_SKILLS_POSTHOG_KEY || "phc_w8xRytdAAwkV3oExnuUozqH64PMzCmDLnyoChpPBcNXs";
22
-
23
- const SOURCE = "expo-skills";
24
- const INSTALLATION_ID_PATH = path.join(os.homedir(), ".expo-skills", "installation-id");
25
-
26
- // Opt-in is the model: telemetry is OFF by default and only sends once the user
27
- // explicitly enables it. This is the one product knob — flip to true for an opt-out
28
- // (on-by-default) model instead.
29
- const DEFAULT_ON = false;
30
-
31
- // Persistent opt-in marker. Its presence turns telemetry on across sessions, regardless
32
- // of how the agent was launched (env vars don't always reach hook subprocesses).
33
- // Written / removed by scripts/telemetry.cjs --on / --off.
34
- const OPT_IN_PATH = path.join(os.homedir(), ".expo-skills", "opt-in");
35
-
36
- // CI detection — never emit from automated environments so usage data reflects real
37
- // humans. Honors the common CI=true convention plus major providers' signals.
38
- function isCI() {
39
- const ci = String(process.env.CI || "").trim().toLowerCase();
40
- if (ci && ci !== "0" && ci !== "false") return true;
41
- return Boolean(
42
- process.env.GITHUB_ACTIONS ||
43
- process.env.GITLAB_CI ||
44
- process.env.CIRCLECI ||
45
- process.env.TRAVIS ||
46
- process.env.BUILDKITE ||
47
- process.env.JENKINS_URL ||
48
- process.env.TEAMCITY_VERSION ||
49
- process.env.TF_BUILD
50
- );
51
- }
52
-
53
- // Explicit on/off intent from env vars: returns "on" | "off" | null.
54
- // DO_NOT_TRACK=1 -> off (https://consoledonottrack.com)
55
- // EXPO_SKILLS_TELEMETRY=0/off/false/no -> off
56
- // EXPO_SKILLS_TELEMETRY=1/on/true/yes -> on
57
- function telemetryEnvSignal() {
58
- const dnt = String(process.env.DO_NOT_TRACK || "").trim().toLowerCase();
59
- if (dnt && dnt !== "0" && dnt !== "false") return "off";
60
- const flag = String(process.env.EXPO_SKILLS_TELEMETRY || "").trim().toLowerCase();
61
- if (["0", "false", "off", "no"].includes(flag)) return "off";
62
- if (["1", "true", "on", "yes"].includes(flag)) return "on";
63
- return null;
64
- }
65
-
66
- // Master gate. Nothing is sent unless this returns true. Precedence (highest first):
67
- // 1. explicit env off (DO_NOT_TRACK / EXPO_SKILLS_TELEMETRY=0) -> off
68
- // 2. CI -> off (never emit from bots)
69
- // 3. explicit env on (EXPO_SKILLS_TELEMETRY=1) -> on
70
- // 4. persistent opt-in marker (telemetry.cjs --on) -> on
71
- // 5. default -> DEFAULT_ON (off = opt-in)
72
- // So explicit-off and CI always win; otherwise it's on only when explicitly enabled.
73
- function telemetryActive() {
74
- const env = telemetryEnvSignal();
75
- if (env === "off") return false;
76
- if (isCI()) return false;
77
- if (env === "on") return true;
78
- try { if (fs.existsSync(OPT_IN_PATH)) return true; } catch {}
79
- return DEFAULT_ON;
80
- }
81
-
82
- // A real key ships in this file, so this check passes by default. This guard only
83
- // makes the scripts inert if someone strips the key (e.g. a fork or private build).
84
- function telemetryConfigured() {
85
- const key = String(POSTHOG_PROJECT_API_KEY || "").trim();
86
- return key.length > 0 && key !== "phc_REPLACE_ME";
87
- }
88
-
89
- // Best-effort agent-harness label for the event (default when --agent-harness isn't passed).
90
- function detectHarness() {
91
- if (process.env.CLAUDECODE) return "claude-code";
92
- if (process.env.CODEX_SANDBOX || process.env.CODEX_SANDBOX_NETWORK_DISABLED ||
93
- String(process.env.AGENT || "").toLowerCase() === "codex") return "codex";
94
- return "unknown";
95
- }
96
-
97
- // Friendly OS + CPU arch for event properties (non-PII).
98
- function platformProps() {
99
- const osName = { darwin: "macos", win32: "windows" }[process.platform] || process.platform;
100
- return { os: osName, arch: process.arch };
101
- }
102
-
103
- // Random, anonymous, per-install id — created once at 0600, only its hash is ever sent.
104
- function readInstallationId(create = true) {
105
- try {
106
- if (fs.existsSync(INSTALLATION_ID_PATH)) {
107
- const existing = fs.readFileSync(INSTALLATION_ID_PATH, "utf8").trim();
108
- if (existing) return existing;
109
- }
110
- if (!create) return null;
111
- fs.mkdirSync(path.dirname(INSTALLATION_ID_PATH), { recursive: true, mode: 0o700 });
112
- try { fs.chmodSync(path.dirname(INSTALLATION_ID_PATH), 0o700); } catch {}
113
- const installationId = crypto.randomUUID().replace(/-/g, "");
114
- try {
115
- // 'wx' = O_CREAT | O_EXCL | O_WRONLY — atomic create, fails if it exists.
116
- const fd = fs.openSync(INSTALLATION_ID_PATH, "wx", 0o600);
117
- try { fs.writeFileSync(fd, installationId + "\n"); } finally { fs.closeSync(fd); }
118
- return installationId;
119
- } catch (err) {
120
- if (err && err.code === "EEXIST") return fs.readFileSync(INSTALLATION_ID_PATH, "utf8").trim() || null;
121
- throw err;
122
- }
123
- } catch {
124
- return null;
125
- }
126
- }
127
-
128
- function telemetryIdentity(agentHarness, { createInstallation = true } = {}) {
129
- const id = readInstallationId(createInstallation);
130
- const installHash = id ? crypto.createHash("sha256").update(id).digest("hex").slice(0, 32) : null;
131
- if (installHash) return [`expo-skills-installation:${installHash}`, { installation_id_hash: installHash }];
132
- return [`expo-skills-events:${agentHarness}`, {}];
133
- }
134
-
135
- function sendToPosthog(payload, { userAgent, timeoutMs }) {
136
- return new Promise((resolve, reject) => {
137
- const url = new URL("/i/v0/e/", POSTHOG_HOST);
138
- const body = Buffer.from(JSON.stringify(payload), "utf8");
139
- const req = https.request(url, {
140
- method: "POST",
141
- headers: { "Content-Type": "application/json", "Content-Length": body.length, "User-Agent": userAgent },
142
- timeout: timeoutMs,
143
- }, (res) => {
144
- const chunks = [];
145
- res.on("data", (c) => chunks.push(c));
146
- res.on("end", () => {
147
- const status = res.statusCode || 0;
148
- if (status >= 200 && status < 300) return resolve();
149
- reject(new Error(`HTTP ${status} ${Buffer.concat(chunks).toString("utf8")}`));
150
- });
151
- });
152
- req.on("timeout", () => req.destroy(new Error("request timed out")));
153
- req.on("error", reject);
154
- req.write(body);
155
- req.end();
156
- });
157
- }
158
-
159
- module.exports = {
160
- POSTHOG_PROJECT_API_KEY,
161
- SOURCE,
162
- OPT_IN_PATH,
163
- telemetryActive,
164
- telemetryEnvSignal,
165
- telemetryConfigured,
166
- detectHarness,
167
- isCI,
168
- platformProps,
169
- telemetryIdentity,
170
- sendToPosthog,
171
- };
@@ -1,101 +0,0 @@
1
- ---
2
- name: expo-ui
3
- description: "Framework (OSS). Build native UI with the @expo/ui package: real SwiftUI on iOS and Jetpack Compose on Android. Default to @expo/ui for sheets (BottomSheet), pickers, sliders, toggles, menus, and grouped-form sections — do NOT reach for Reanimated, @gorhom/bottom-sheet, or RN built-in Picker/Switch; use @expo/ui instead. Fall back to RN built-ins only when @expo/ui is missing the component. NOTE: @expo/ui List renders native grouped rows like an iOS Settings screen — it is NOT a virtualized list; use FlatList/FlashList for large datasets. Covers universal components (Host, Column, Row, Button, Text, List, BottomSheet, FieldGroup, Switch, Slider, Picker, Menu), drop-in replacements for RN community libraries, and platform-specific SwiftUI/Jetpack Compose trees. Not for Expo Router navigation, Reanimated, or data fetching."
4
- version: 1.0.0
5
- license: MIT
6
- allowed-tools: "Bash(node *expo-ui/scripts/list-components.js *)"
7
- ---
8
-
9
- # Expo UI (`@expo/ui`)
10
-
11
- `@expo/ui` renders real native UI from React: SwiftUI on iOS, Jetpack Compose on Android. It also ships drop-in replacements for migrating off RN community UI libraries.
12
-
13
- > These instructions track the latest Expo SDK. The **universal** layer requires **SDK 56+** and works in Expo Go — no custom build needed. Drop-in replacements and the platform-specific layers also exist on SDK 55. For component details on a specific SDK, refer to the Expo UI docs for that version.
14
-
15
- ## Installation
16
-
17
- ```bash
18
- npx expo install @expo/ui
19
- ```
20
-
21
- Every `@expo/ui` tree — universal or platform-specific — must be wrapped in `Host`.
22
-
23
- ## Use @expo/ui by default — don't reach for RN alternatives first
24
-
25
- **Before using Reanimated, `@gorhom/bottom-sheet`, React Native's built-in `Switch`/`Picker`, or any community UI library for the items below, use `@expo/ui` instead.** Only fall back to RN built-ins when `@expo/ui` is missing the component.
26
-
27
- | Need | Use |
28
- |------|-----|
29
- | Slide-up sheet / bottom sheet | `BottomSheet` from `@expo/ui` — **not** Reanimated or `@gorhom/bottom-sheet` |
30
- | Grouped native list rows (settings/form-style) | `List` + `ListItem` from `@expo/ui` — **not** `FlatList` (see note below) |
31
- | Toggle | `Switch` from `@expo/ui` |
32
- | Slider | `Slider` from `@expo/ui` |
33
- | Date/time picker | `@expo/ui/community/datetimepicker` |
34
- | Menu | `Menu` from `@expo/ui` |
35
- | Form section with label | `FieldGroup` from `@expo/ui` |
36
- | Collapsible section | `Collapsible` from `@expo/ui` |
37
-
38
- > **`List` is NOT a virtualized scrolling list.** It renders native grouped table rows — the visual look of an iOS Settings screen or a form section, with disclosure indicators and native row styling. Each `ListItem` is a native node on the JS thread; rows are not recycled. For any list with large or unknown-length data (feeds, search results, catalogs), use **`FlatList`** or **`FlashList`** instead. `List` is the right choice for short, fixed-length groups: a settings screen, a detail panel's rows, a fixed menu.
39
-
40
- **`BottomSheet` example** (use this for map pin details, action sheets, detail panels — not Reanimated):
41
-
42
- ```tsx
43
- import { Host, BottomSheet, Column, Text } from '@expo/ui';
44
- import { useState } from 'react';
45
-
46
- export default function MapScreen() {
47
- const [isOpen, setIsOpen] = useState(false);
48
-
49
- return (
50
- <View style={{ flex: 1 }}>
51
- <MapView onMarkerPress={() => setIsOpen(true)} />
52
- <Host>
53
- <BottomSheet
54
- isPresented={isOpen}
55
- onDismiss={() => setIsOpen(false)}
56
- snapPoints={['half', 'full']}
57
- >
58
- <Column>
59
- <Text>Café name</Text>
60
- <Text>Address</Text>
61
- </Column>
62
- </BottomSheet>
63
- </Host>
64
- </View>
65
- );
66
- }
67
- ```
68
-
69
- `BottomSheet` uses `isPresented`/`onDismiss` — **not** `isOpened`, `isOpen`, `onIsOpenedChange`, or `onChange` (those are `@gorhom/bottom-sheet` props and will silently do nothing). `snapPoints` accepts `'half'`, `'full'`, `{ fraction: 0.5 }`, or `{ height: 400 }` and is optional (auto-sizes to content when omitted).
70
-
71
- ## Choosing an approach
72
-
73
- Work down this list and stop at the first layer that meets the need:
74
-
75
- 1. **Universal components — start here.** Import from the `@expo/ui` root. One component tree runs unmodified on iOS, Android, and web from a single source (Compose on Android, SwiftUI on iOS, `react-native-web`/`react-dom` on web). No platform file splits. → `./references/universal.md`
76
-
77
- 2. **Platform-specific (SwiftUI / Jetpack Compose).** Import from `@expo/ui/swift-ui` or `@expo/ui/jetpack-compose`. Use **only** when the universal layer is missing a component or modifier you need, or when you need platform-specific behavior or optimization. **Downside:** you write two trees and split them into `.ios.tsx` / `.android.tsx` files (or branch on `Platform.OS`) — more code to maintain.
78
-
79
- > **`@expo/ui/swift-ui` is iOS-only. `@expo/ui/jetpack-compose` is Android-only.** Importing either in a file that runs on the other platform will crash at runtime with "Unable to get view config" errors. Isolate platform-specific trees in `.ios.tsx` / `.android.tsx` files placed in `components/` (never inside `app/` — Expo Router does not support platform extensions for route files), or guard with `Platform.OS` in a regular route file. `Host` must always be imported from `@expo/ui` (the universal package root), not from the platform-specific sub-packages. → `./references/swift-ui.md` and `./references/jetpack-compose.md`
80
-
81
- **Already using an RN community UI library?** `@expo/ui` also ships **drop-in replacements** — API-compatible swaps for popular libraries (`@gorhom/bottom-sheet`, `@react-native-community/datetimepicker`, and more), imported from `@expo/ui/community/<name>`. This is a migration side-path for replacing an existing dependency, not a step in the universal-vs-platform decision above. → `./references/drop-in-replacements.md`
82
-
83
- ## References
84
-
85
- Consult these resources as needed:
86
-
87
- ```
88
- references/
89
- universal.md Universal @expo/ui components and when to use them (SDK 56+)
90
- drop-in-replacements.md API-compatible replacements for RN community UI libraries
91
- swift-ui.md Platform-specific iOS UI: @expo/ui/swift-ui components, modifiers, RNHostView, useNativeState
92
- jetpack-compose.md Platform-specific Android UI: @expo/ui/jetpack-compose components, modifiers, LazyColumn caveat, icons, useNativeState
93
- ```
94
-
95
- ## Submitting Feedback
96
- If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:
97
- ```bash
98
- npx --yes submit-expo-feedback@latest --category skills --subject "expo-ui" "<actionable feedback>"
99
- ```
100
- Only submit when you have something specific and actionable to report. Include as much relevant context as possible.
101
- If an AI agent repeatedly failed or the user had to take over an Expo task, load the expo-skill-feedback skill and follow its eval-candidate flow instead of reusing the command above.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Expo UI"
3
- short_description: "Build native UI with @expo/ui — universal components first, SwiftUI/Jetpack Compose when needed"
4
- default_prompt: "Use $expo-ui when adding or reviewing @expo/ui UI: universal cross-platform components (Host, Column, Row, Button, Text, List, ...), drop-in replacements for React Native community libraries, or platform-specific @expo/ui/swift-ui and @expo/ui/jetpack-compose trees and modifiers. Recommend universal components first; use drop-in replacements when migrating off a community UI library; reach for platform-specific layers only when universal is missing something or you need platform optimization (which requires .ios.tsx/.android.tsx splits)."
@@ -1,27 +0,0 @@
1
- # Drop-in replacements for RN community libraries
2
-
3
- `@expo/ui` ships API-compatible replacements for popular React Native community libraries, powered by native `@expo/ui` components (Jetpack Compose on Android, SwiftUI on iOS). Use these when migrating an existing app off a community UI dependency — the API matches the library being replaced, so the swap is usually just the import path.
4
-
5
- ## Available replacements
6
-
7
- Every drop-in lives under `@expo/ui/community/<kebab-case-name>`. Note which are default vs named imports.
8
-
9
- | Replaces | Import |
10
- |----------|--------|
11
- | `@gorhom/bottom-sheet` | `import BottomSheet, { BottomSheetView } from '@expo/ui/community/bottom-sheet'` |
12
- | `@react-native-community/datetimepicker` | `import DateTimePicker from '@expo/ui/community/datetime-picker'` |
13
- | `@react-native-masked-view/masked-view` | `import { MaskedView } from '@expo/ui/community/masked-view'` |
14
- | `@react-native-menu/menu` | `import { MenuView } from '@expo/ui/community/menu'` |
15
- | `react-native-pager-view` | `import PagerView from '@expo/ui/community/pager-view'` |
16
- | `@react-native-picker/picker` | `import { Picker } from '@expo/ui/community/picker'` |
17
- | `@react-native-segmented-control/segmented-control` | `import SegmentedControl from '@expo/ui/community/segmented-control'` |
18
- | `@react-native-community/slider` | `import Slider from '@expo/ui/community/slider'` |
19
-
20
- ## Confirming the API
21
-
22
- Each component has a dedicated docs page with setup and usage:
23
-
24
- - Overview — https://docs.expo.dev/versions/latest/sdk/ui/drop-in-replacements/index.md
25
- - Per component — https://docs.expo.dev/versions/latest/sdk/ui/drop-in-replacements/{component}/index.md (slug is the component name lowercased, no hyphens, e.g. `bottomsheet`, `datetimepicker`, `segmentedcontrol`)
26
-
27
- The installed package's TypeScript types (`.d.ts`) are the most reliable source of truth for the exact props on your SDK version (@expo/ui is versioned with the SDK and its API can change between versions). Use the doc page to find platform support and any props that differ from the library being replaced.
@@ -1,73 +0,0 @@
1
- # Platform-specific Android UI: `@expo/ui/jetpack-compose`
2
-
3
- > **Android only.** Code that imports from `@expo/ui/jetpack-compose` will crash on iOS with "Unable to get view config" errors. Always place this code in an `.android.tsx` component file or guard it with `Platform.OS === 'android'`. `Host` must be imported from `@expo/ui` (the universal root), not from `@expo/ui/jetpack-compose`.
4
-
5
- Use this layer only when the universal `@expo/ui` components don't cover what you need on Android (see `./universal.md` first). This requires a platform-specific tree.
6
-
7
- ### File placement with Expo Router
8
-
9
- **Do not put `.android.tsx` files inside `app/` or `src/app/`.** Expo Router does not support platform-extension suffixes for route files and will throw a "no fallback sibling" Render Error.
10
-
11
- Place platform-specific component files in `components/` (or any directory outside the route tree), then import them from a regular route file:
12
-
13
- ```
14
- src/components/ProductList.android.tsx ← Compose tree lives here
15
- src/app/product-list.tsx ← regular Expo Router route, imports the component
16
- ```
17
-
18
- `src/app/product-list.tsx`:
19
- ```tsx
20
- import ProductList from '../components/ProductList';
21
- export default ProductList;
22
- ```
23
-
24
- Alternatively, keep everything in one regular route file and branch on `Platform.OS`:
25
-
26
- ```tsx
27
- // src/app/product-list.tsx
28
- import { Platform } from 'react-native';
29
- const ComposeList = Platform.OS === 'android' ? require('../components/ProductList.android').default : null;
30
- ```
31
-
32
- ## Instructions
33
-
34
- - Expo UI's API mirrors Jetpack Compose's API. Use Jetpack Compose and Material Design 3 knowledge to decide which components or modifiers to use. If you need deeper Jetpack Compose or Material 3 guidance (e.g. which component to pick, layout patterns, theming), spawn a subagent to research [Jetpack Compose](https://developer.android.com/develop/ui/compose/components) and [Material Design 3](https://m3.material.io/) best practices.
35
- - Components are imported from `@expo/ui/jetpack-compose`, modifiers from `@expo/ui/jetpack-compose/modifiers`.
36
- - **Before writing any code, run the list-components script** to get the exact components and modifiers available in the installed version:
37
- ```bash
38
- node <skill-root>/scripts/list-components.js <project-path> # names only (compact)
39
- node <skill-root>/scripts/list-components.js <project-path> --docs # with one-line descriptions
40
- ```
41
- (`<skill-root>` is the directory containing this `references/` folder.)
42
- - **Always read the `.d.ts` type files** to confirm prop shapes and signatures — read the relevant `{ComponentName}/index.d.ts` from the installed `@expo/ui/jetpack-compose` package in `node_modules`. This is the most reliable source of truth.
43
- - When about to use a component, fetch its docs to confirm the API — https://docs.expo.dev/versions/latest/sdk/ui/jetpack-compose/{component-name}/index.md
44
- - When unsure about a modifier's API, refer to the docs — https://docs.expo.dev/versions/latest/sdk/ui/jetpack-compose/modifiers/index.md
45
- - Every Jetpack Compose tree must be wrapped in `Host`. Use `<Host matchContents>` for intrinsic sizing, or `<Host style={{ flex: 1 }}>` when you need explicit size (e.g. as a parent of `LazyColumn`). Example:
46
-
47
- ```jsx
48
- import { Host } from "@expo/ui"; // Host always from universal root
49
- import { Column, Button, Text } from "@expo/ui/jetpack-compose";
50
- import { fillMaxWidth, paddingAll } from "@expo/ui/jetpack-compose/modifiers";
51
-
52
- <Host matchContents>
53
- <Column verticalArrangement={{ spacedBy: 8 }} modifiers={[fillMaxWidth(), paddingAll(16)]}>
54
- <Text style={{ typography: "titleLarge" }}>Hello</Text>
55
- <Button onPress={() => alert("Pressed!")}>Press me</Button>
56
- </Column>
57
- </Host>;
58
- ```
59
-
60
- - `RNHostView` embeds React Native components inside a Jetpack Compose tree (the same concept as in `@expo/ui/swift-ui`) — wrap any RN child in `<RNHostView>`.
61
- - If a required composable or modifier is missing in Expo UI, it can be extended via a local Expo module. See: https://docs.expo.dev/guides/expo-ui-jetpack-compose/extending/index.md. Confirm with the user before extending.
62
-
63
- ## Key Components
64
-
65
- - **LazyColumn** — Use instead of react-native `ScrollView`/`FlatList` for scrollable lists. Wrap in `<Host style={{ flex: 1 }}>`. Not suitable for large lists — each item is a JSX node processed on the JS thread, which causes noticeable slowdowns at scale.
66
- - **Icon** — Use `<Icon source={require('./icon.xml')} size={24} />` with Android XML vector drawables. To get icons: go to [Material Symbols](https://fonts.google.com/icons), select an icon, choose the Android platform, and download the XML vector drawable. Save these as `.xml` files in your project's `assets/` directory (e.g. `assets/icons/wifi.xml`). Metro bundles `.xml` assets automatically — no metro config changes needed.
67
-
68
- ## useNativeState
69
-
70
- `useNativeState` creates observable state that updates synchronously on the UI thread via worklets, enabling immediate native state changes without waiting for a React render cycle. Requires `react-native-worklets` — without it updates still go through React and flickering remains. Best for real-time interactions where synchronous updates matter, e.g. a text field that masks or formats input as the user types.
71
-
72
- - `ObservableState.value` is readable/writable from worklets; `onChange` fires a worklet listener on state change.
73
- - Docs — https://docs.expo.dev/versions/latest/sdk/ui/jetpack-compose/usenativestate/index.md