@luci-dev/skills 0.0.0-stage → 0.5.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 (389) hide show
  1. package/dist/benchmark.d.ts +48 -0
  2. package/dist/benchmark.d.ts.map +1 -0
  3. package/dist/benchmark.js +84 -0
  4. package/dist/benchmark.js.map +1 -0
  5. package/dist/discovery.d.ts +105 -0
  6. package/dist/discovery.d.ts.map +1 -0
  7. package/dist/discovery.js +271 -0
  8. package/dist/discovery.js.map +1 -0
  9. package/dist/drafts.d.ts +20 -0
  10. package/dist/drafts.d.ts.map +1 -0
  11. package/dist/drafts.js +57 -0
  12. package/dist/drafts.js.map +1 -0
  13. package/dist/github.d.ts +49 -0
  14. package/dist/github.d.ts.map +1 -0
  15. package/dist/github.js +93 -0
  16. package/dist/github.js.map +1 -0
  17. package/dist/import.d.ts +80 -0
  18. package/dist/import.d.ts.map +1 -0
  19. package/dist/import.js +286 -0
  20. package/dist/import.js.map +1 -0
  21. package/dist/index.d.ts +17 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +17 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/licenses.d.ts +30 -0
  26. package/dist/licenses.d.ts.map +1 -0
  27. package/dist/licenses.js +116 -0
  28. package/dist/licenses.js.map +1 -0
  29. package/dist/linter.d.ts +35 -0
  30. package/dist/linter.d.ts.map +1 -0
  31. package/dist/linter.js +262 -0
  32. package/dist/linter.js.map +1 -0
  33. package/dist/lss.d.ts +74 -0
  34. package/dist/lss.d.ts.map +1 -0
  35. package/dist/lss.js +273 -0
  36. package/dist/lss.js.map +1 -0
  37. package/dist/orchestrator.d.ts +164 -0
  38. package/dist/orchestrator.d.ts.map +1 -0
  39. package/dist/orchestrator.js +370 -0
  40. package/dist/orchestrator.js.map +1 -0
  41. package/dist/packs.d.ts +50 -0
  42. package/dist/packs.d.ts.map +1 -0
  43. package/dist/packs.js +166 -0
  44. package/dist/packs.js.map +1 -0
  45. package/dist/preferences.d.ts +18 -0
  46. package/dist/preferences.d.ts.map +1 -0
  47. package/dist/preferences.js +57 -0
  48. package/dist/preferences.js.map +1 -0
  49. package/dist/project.d.ts +45 -0
  50. package/dist/project.d.ts.map +1 -0
  51. package/dist/project.js +183 -0
  52. package/dist/project.js.map +1 -0
  53. package/dist/rankability.d.ts +51 -0
  54. package/dist/rankability.d.ts.map +1 -0
  55. package/dist/rankability.js +217 -0
  56. package/dist/rankability.js.map +1 -0
  57. package/dist/registry.d.ts +82 -0
  58. package/dist/registry.d.ts.map +1 -0
  59. package/dist/registry.js +300 -0
  60. package/dist/registry.js.map +1 -0
  61. package/dist/trust.d.ts +13 -0
  62. package/dist/trust.d.ts.map +1 -0
  63. package/dist/trust.js +41 -0
  64. package/dist/trust.js.map +1 -0
  65. package/dist/types.d.ts +44 -0
  66. package/dist/types.d.ts.map +1 -0
  67. package/dist/types.js +2 -0
  68. package/dist/types.js.map +1 -0
  69. package/library/3d/threejs/LICENSE.txt +21 -0
  70. package/library/3d/threejs/NOTICE.md +7 -0
  71. package/library/3d/threejs/SKILL.md +102 -0
  72. package/library/3d/threejs/luci.json +39 -0
  73. package/library/accessibility/accessibility-baseline/SKILL.md +51 -0
  74. package/library/accessibility/accessibility-baseline/luci.json +33 -0
  75. package/library/accessibility/fixing-accessibility/NOTICE.md +6 -0
  76. package/library/accessibility/fixing-accessibility/SKILL.md +141 -0
  77. package/library/accessibility/fixing-accessibility/luci.json +36 -0
  78. package/library/animation-motion/animation-systems/LICENSE.txt +21 -0
  79. package/library/animation-motion/animation-systems/NOTICE.md +7 -0
  80. package/library/animation-motion/animation-systems/SKILL.md +192 -0
  81. package/library/animation-motion/animation-systems/luci.json +32 -0
  82. package/library/animation-motion/animejs/SKILL.md +64 -0
  83. package/library/animation-motion/animejs/luci.json +12 -0
  84. package/library/animation-motion/motion-dev/SKILL.md +69 -0
  85. package/library/animation-motion/motion-dev/luci.json +13 -0
  86. package/library/animation-motion/react-view-transitions/AGENTS.md +1380 -0
  87. package/library/animation-motion/react-view-transitions/NOTICE.md +6 -0
  88. package/library/animation-motion/react-view-transitions/README.md +44 -0
  89. package/library/animation-motion/react-view-transitions/SKILL.md +334 -0
  90. package/library/animation-motion/react-view-transitions/luci.json +40 -0
  91. package/library/animation-motion/react-view-transitions/metadata.json +12 -0
  92. package/library/animation-motion/react-view-transitions/references/css-recipes.md +312 -0
  93. package/library/animation-motion/react-view-transitions/references/implementation.md +170 -0
  94. package/library/animation-motion/react-view-transitions/references/nextjs.md +233 -0
  95. package/library/animation-motion/react-view-transitions/references/patterns.md +274 -0
  96. package/library/animation-motion/react-view-transitions/references/troubleshooting.md +47 -0
  97. package/library/code-quality/code-review/NOTICE.md +6 -0
  98. package/library/code-quality/code-review/SKILL.md +94 -0
  99. package/library/code-quality/code-review/agents/openai.yaml +3 -0
  100. package/library/code-quality/code-review/luci.json +33 -0
  101. package/library/components/company-logos/LICENSE.txt +21 -0
  102. package/library/components/company-logos/NOTICE.md +7 -0
  103. package/library/components/company-logos/SKILL.md +27 -0
  104. package/library/components/company-logos/luci.json +38 -0
  105. package/library/components/container-lines/LICENSE.txt +21 -0
  106. package/library/components/container-lines/NOTICE.md +7 -0
  107. package/library/components/container-lines/SKILL.md +124 -0
  108. package/library/components/container-lines/luci.json +48 -0
  109. package/library/design-systems/build-design-system/NOTICE.md +6 -0
  110. package/library/design-systems/build-design-system/SKILL.md +78 -0
  111. package/library/design-systems/build-design-system/luci.json +29 -0
  112. package/library/design-systems/build-design-system/references/components.md +46 -0
  113. package/library/design-systems/build-design-system/references/glossary.md +77 -0
  114. package/library/design-systems/build-design-system/references/taste.md +37 -0
  115. package/library/design-systems/build-design-system/references/tokens.md +59 -0
  116. package/library/design-systems/build-design-system/references/traps.md +128 -0
  117. package/library/design-systems/build-design-system/scripts/capture-guard.mjs +470 -0
  118. package/library/design-systems/build-design-system/scripts/capture.mjs +355 -0
  119. package/library/design-systems/build-design-system/scripts/check-system.mjs +1883 -0
  120. package/library/design-systems/build-design-system/scripts/find-chromium.mjs +137 -0
  121. package/library/design-systems/build-design-system/scripts/oklch.mjs +221 -0
  122. package/library/design-systems/build-design-system/scripts/pixdiff.mjs +186 -0
  123. package/library/design-systems/component-docs/NOTICE.md +6 -0
  124. package/library/design-systems/component-docs/SKILL.md +50 -0
  125. package/library/design-systems/component-docs/luci.json +30 -0
  126. package/library/design-systems/component-docs/references/doc-format.md +85 -0
  127. package/library/design-systems/create-design-md/NOTICE.md +6 -0
  128. package/library/design-systems/create-design-md/SKILL.md +259 -0
  129. package/library/design-systems/create-design-md/luci.json +38 -0
  130. package/library/design-systems/design-system-boss/NOTICE.md +6 -0
  131. package/library/design-systems/design-system-boss/SKILL.md +58 -0
  132. package/library/design-systems/design-system-boss/luci.json +29 -0
  133. package/library/design-systems/design-system-boss/playbooks/build.md +10 -0
  134. package/library/design-systems/design-system-boss/playbooks/component.md +9 -0
  135. package/library/design-systems/design-system-boss/playbooks/migrate.md +11 -0
  136. package/library/design-systems/design-system-boss/playbooks/review.md +9 -0
  137. package/library/design-systems/migrate-design-system/NOTICE.md +6 -0
  138. package/library/design-systems/migrate-design-system/SKILL.md +62 -0
  139. package/library/design-systems/migrate-design-system/luci.json +33 -0
  140. package/library/design-systems/migrate-design-system/references/correct.md +37 -0
  141. package/library/design-systems/migrate-design-system/references/lessons.md +69 -0
  142. package/library/design-systems/migrate-design-system/references/parity.md +44 -0
  143. package/library/design-systems/migrate-design-system/references/running-many-agents.md +52 -0
  144. package/library/design-systems/migrate-design-system/scripts/bodies-check.mjs +215 -0
  145. package/library/design-systems/migrate-design-system/scripts/land.mjs +433 -0
  146. package/library/design-systems/migrate-design-system/scripts/legacy.mjs +283 -0
  147. package/library/design-systems/migrate-design-system/scripts/parity.mjs +173 -0
  148. package/library/design-systems/token-mapping/NOTICE.md +6 -0
  149. package/library/design-systems/token-mapping/SKILL.md +46 -0
  150. package/library/design-systems/token-mapping/luci.json +25 -0
  151. package/library/design-systems/token-mapping/references/mapping-rules.md +54 -0
  152. package/library/design-systems/ui-review/NOTICE.md +6 -0
  153. package/library/design-systems/ui-review/SKILL.md +53 -0
  154. package/library/design-systems/ui-review/luci.json +29 -0
  155. package/library/design-systems/ui-review/references/criteria.md +49 -0
  156. package/library/frontend/composition-patterns/AGENTS.md +946 -0
  157. package/library/frontend/composition-patterns/NOTICE.md +6 -0
  158. package/library/frontend/composition-patterns/README.md +60 -0
  159. package/library/frontend/composition-patterns/SKILL.md +86 -0
  160. package/library/frontend/composition-patterns/luci.json +33 -0
  161. package/library/frontend/composition-patterns/metadata.json +11 -0
  162. package/library/frontend/composition-patterns/rules/_sections.md +29 -0
  163. package/library/frontend/composition-patterns/rules/_template.md +24 -0
  164. package/library/frontend/composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
  165. package/library/frontend/composition-patterns/rules/architecture-compound-components.md +112 -0
  166. package/library/frontend/composition-patterns/rules/patterns-children-over-render-props.md +87 -0
  167. package/library/frontend/composition-patterns/rules/patterns-explicit-variants.md +100 -0
  168. package/library/frontend/composition-patterns/rules/react19-no-forwardref.md +42 -0
  169. package/library/frontend/composition-patterns/rules/state-context-interface.md +191 -0
  170. package/library/frontend/composition-patterns/rules/state-decouple-implementation.md +113 -0
  171. package/library/frontend/composition-patterns/rules/state-lift-state.md +125 -0
  172. package/library/frontend/design-mobile-apps/NOTICE.md +6 -0
  173. package/library/frontend/design-mobile-apps/SKILL.md +121 -0
  174. package/library/frontend/design-mobile-apps/designing.md +56 -0
  175. package/library/frontend/design-mobile-apps/endpoints.md +362 -0
  176. package/library/frontend/design-mobile-apps/implementing.md +213 -0
  177. package/library/frontend/design-mobile-apps/luci.json +31 -0
  178. package/library/frontend/design-mobile-apps/styling/nativewind.md +57 -0
  179. package/library/frontend/design-mobile-apps/styling/stylesheet.md +28 -0
  180. package/library/frontend/design-mobile-apps/styling/uniwind.md +38 -0
  181. package/library/frontend/frontend-design/LICENSE.txt +202 -0
  182. package/library/frontend/frontend-design/NOTICE.md +6 -0
  183. package/library/frontend/frontend-design/SKILL.md +81 -0
  184. package/library/frontend/frontend-design/luci.json +43 -0
  185. package/library/frontend/react-native-skills/AGENTS.md +2897 -0
  186. package/library/frontend/react-native-skills/NOTICE.md +6 -0
  187. package/library/frontend/react-native-skills/README.md +165 -0
  188. package/library/frontend/react-native-skills/SKILL.md +119 -0
  189. package/library/frontend/react-native-skills/luci.json +33 -0
  190. package/library/frontend/react-native-skills/metadata.json +16 -0
  191. package/library/frontend/react-native-skills/rules/_sections.md +86 -0
  192. package/library/frontend/react-native-skills/rules/_template.md +28 -0
  193. package/library/frontend/react-native-skills/rules/animation-derived-value.md +53 -0
  194. package/library/frontend/react-native-skills/rules/animation-gesture-detector-press.md +95 -0
  195. package/library/frontend/react-native-skills/rules/animation-gpu-properties.md +65 -0
  196. package/library/frontend/react-native-skills/rules/design-system-compound-components.md +66 -0
  197. package/library/frontend/react-native-skills/rules/fonts-config-plugin.md +71 -0
  198. package/library/frontend/react-native-skills/rules/imports-design-system-folder.md +68 -0
  199. package/library/frontend/react-native-skills/rules/js-hoist-intl.md +61 -0
  200. package/library/frontend/react-native-skills/rules/list-performance-callbacks.md +44 -0
  201. package/library/frontend/react-native-skills/rules/list-performance-function-references.md +132 -0
  202. package/library/frontend/react-native-skills/rules/list-performance-images.md +53 -0
  203. package/library/frontend/react-native-skills/rules/list-performance-inline-objects.md +97 -0
  204. package/library/frontend/react-native-skills/rules/list-performance-item-expensive.md +94 -0
  205. package/library/frontend/react-native-skills/rules/list-performance-item-memo.md +82 -0
  206. package/library/frontend/react-native-skills/rules/list-performance-item-types.md +104 -0
  207. package/library/frontend/react-native-skills/rules/list-performance-virtualize.md +67 -0
  208. package/library/frontend/react-native-skills/rules/monorepo-native-deps-in-app.md +46 -0
  209. package/library/frontend/react-native-skills/rules/monorepo-single-dependency-versions.md +63 -0
  210. package/library/frontend/react-native-skills/rules/navigation-native-navigators.md +188 -0
  211. package/library/frontend/react-native-skills/rules/react-compiler-destructure-functions.md +50 -0
  212. package/library/frontend/react-native-skills/rules/react-compiler-reanimated-shared-values.md +48 -0
  213. package/library/frontend/react-native-skills/rules/react-state-dispatcher.md +91 -0
  214. package/library/frontend/react-native-skills/rules/react-state-fallback.md +56 -0
  215. package/library/frontend/react-native-skills/rules/react-state-minimize.md +65 -0
  216. package/library/frontend/react-native-skills/rules/rendering-no-falsy-and.md +74 -0
  217. package/library/frontend/react-native-skills/rules/rendering-text-in-text-component.md +36 -0
  218. package/library/frontend/react-native-skills/rules/scroll-position-no-state.md +82 -0
  219. package/library/frontend/react-native-skills/rules/state-ground-truth.md +80 -0
  220. package/library/frontend/react-native-skills/rules/ui-expo-image.md +66 -0
  221. package/library/frontend/react-native-skills/rules/ui-image-gallery.md +104 -0
  222. package/library/frontend/react-native-skills/rules/ui-measure-views.md +78 -0
  223. package/library/frontend/react-native-skills/rules/ui-menus.md +174 -0
  224. package/library/frontend/react-native-skills/rules/ui-native-modals.md +77 -0
  225. package/library/frontend/react-native-skills/rules/ui-pressable.md +61 -0
  226. package/library/frontend/react-native-skills/rules/ui-safe-area-scroll.md +65 -0
  227. package/library/frontend/react-native-skills/rules/ui-scrollview-content-inset.md +45 -0
  228. package/library/frontend/react-native-skills/rules/ui-styling.md +87 -0
  229. package/library/frontend/tailwindcss/LICENSE.txt +21 -0
  230. package/library/frontend/tailwindcss/NOTICE.md +7 -0
  231. package/library/frontend/tailwindcss/SKILL.md +83 -0
  232. package/library/frontend/tailwindcss/luci.json +39 -0
  233. package/library/frontend-frameworks/react-best-practices/NOTICE.md +6 -0
  234. package/library/frontend-frameworks/react-best-practices/SKILL.md +151 -0
  235. package/library/frontend-frameworks/react-best-practices/luci.json +39 -0
  236. package/library/general/algorithmic-art/LICENSE.txt +202 -0
  237. package/library/general/algorithmic-art/NOTICE.md +6 -0
  238. package/library/general/algorithmic-art/SKILL.md +409 -0
  239. package/library/general/algorithmic-art/luci.json +27 -0
  240. package/library/general/algorithmic-art/templates/generator_template.js +223 -0
  241. package/library/general/algorithmic-art/templates/viewer.html +599 -0
  242. package/library/general/canvas-design/LICENSE.txt +202 -0
  243. package/library/general/canvas-design/NOTICE.md +6 -0
  244. package/library/general/canvas-design/SKILL.md +134 -0
  245. package/library/general/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  246. package/library/general/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  247. package/library/general/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  248. package/library/general/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  249. package/library/general/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  250. package/library/general/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  251. package/library/general/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  252. package/library/general/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  253. package/library/general/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  254. package/library/general/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  255. package/library/general/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  256. package/library/general/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  257. package/library/general/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  258. package/library/general/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  259. package/library/general/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  260. package/library/general/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  261. package/library/general/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  262. package/library/general/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  263. package/library/general/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  264. package/library/general/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  265. package/library/general/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  266. package/library/general/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  267. package/library/general/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  268. package/library/general/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  269. package/library/general/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  270. package/library/general/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  271. package/library/general/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  272. package/library/general/canvas-design/luci.json +29 -0
  273. package/library/index.json +2507 -0
  274. package/library/interaction/animation-on-scroll/LICENSE.txt +21 -0
  275. package/library/interaction/animation-on-scroll/NOTICE.md +7 -0
  276. package/library/interaction/animation-on-scroll/SKILL.md +115 -0
  277. package/library/interaction/animation-on-scroll/luci.json +38 -0
  278. package/library/micro-interactions/masked-reveal/LICENSE.txt +21 -0
  279. package/library/micro-interactions/masked-reveal/NOTICE.md +7 -0
  280. package/library/micro-interactions/masked-reveal/SKILL.md +187 -0
  281. package/library/micro-interactions/masked-reveal/luci.json +63 -0
  282. package/library/micro-interactions/micro-interaction/NOTICE.md +6 -0
  283. package/library/micro-interactions/micro-interaction/SKILL.md +177 -0
  284. package/library/micro-interactions/micro-interaction/luci.json +52 -0
  285. package/library/micro-interactions/micro-interaction/references/css-recipes.md +142 -0
  286. package/library/micro-interactions/micro-interaction/references/framer-motion-recipes.md +187 -0
  287. package/library/micro-interactions/micro-interaction/scripts/README.md +42 -0
  288. package/library/micro-interactions/micro-interaction/scripts/contact-sheet.sh +17 -0
  289. package/library/micro-interactions/micro-interaction/scripts/seek-shot.sh +21 -0
  290. package/library/performance/fixing-motion-performance/NOTICE.md +6 -0
  291. package/library/performance/fixing-motion-performance/SKILL.md +156 -0
  292. package/library/performance/fixing-motion-performance/luci.json +30 -0
  293. package/library/seo/fixing-metadata/NOTICE.md +6 -0
  294. package/library/seo/fixing-metadata/SKILL.md +111 -0
  295. package/library/seo/fixing-metadata/luci.json +36 -0
  296. package/library/shadcn-ui/migrate-radix-to-base/NOTICE.md +6 -0
  297. package/library/shadcn-ui/migrate-radix-to-base/SKILL.md +178 -0
  298. package/library/shadcn-ui/migrate-radix-to-base/class-mapping.md +62 -0
  299. package/library/shadcn-ui/migrate-radix-to-base/consumer-props.md +58 -0
  300. package/library/shadcn-ui/migrate-radix-to-base/disclosure.md +353 -0
  301. package/library/shadcn-ui/migrate-radix-to-base/display-misc.md +410 -0
  302. package/library/shadcn-ui/migrate-radix-to-base/form-controls.md +390 -0
  303. package/library/shadcn-ui/migrate-radix-to-base/luci.json +33 -0
  304. package/library/shadcn-ui/migrate-radix-to-base/menus.md +409 -0
  305. package/library/shadcn-ui/migrate-radix-to-base/overlays.md +459 -0
  306. package/library/shadcn-ui/migrate-radix-to-base/universal-patterns.md +286 -0
  307. package/library/shadcn-ui/migrate-radix-to-base/wrapper-shapes.md +110 -0
  308. package/library/shadcn-ui/shadcn/NOTICE.md +6 -0
  309. package/library/shadcn-ui/shadcn/SKILL.md +187 -0
  310. package/library/shadcn-ui/shadcn/agents/openai.yml +5 -0
  311. package/library/shadcn-ui/shadcn/assets/shadcn-small.png +0 -0
  312. package/library/shadcn-ui/shadcn/assets/shadcn.png +0 -0
  313. package/library/shadcn-ui/shadcn/assets/showcase/color-pair.tsx +126 -0
  314. package/library/shadcn-ui/shadcn/assets/showcase/preview-states.css +14 -0
  315. package/library/shadcn-ui/shadcn/assets/showcase/state-matrix.tsx +72 -0
  316. package/library/shadcn-ui/shadcn/cli.md +290 -0
  317. package/library/shadcn-ui/shadcn/customization.md +211 -0
  318. package/library/shadcn-ui/shadcn/design-system-page.md +268 -0
  319. package/library/shadcn-ui/shadcn/design-system.md +386 -0
  320. package/library/shadcn-ui/shadcn/evals/evals.json +126 -0
  321. package/library/shadcn-ui/shadcn/luci.json +34 -0
  322. package/library/shadcn-ui/shadcn/mcp.md +105 -0
  323. package/library/shadcn-ui/shadcn/references/updating-components.md +91 -0
  324. package/library/shadcn-ui/shadcn/references/workflow.md +31 -0
  325. package/library/shadcn-ui/shadcn/registry.md +277 -0
  326. package/library/shadcn-ui/shadcn/rules/base-vs-radix.md +306 -0
  327. package/library/shadcn-ui/shadcn/rules/chat.md +507 -0
  328. package/library/shadcn-ui/shadcn/rules/composition.md +213 -0
  329. package/library/shadcn-ui/shadcn/rules/forms.md +192 -0
  330. package/library/shadcn-ui/shadcn/rules/icons.md +101 -0
  331. package/library/shadcn-ui/shadcn/rules/styling.md +185 -0
  332. package/library/shadcn-ui/shadcn/scripts/showcase-coverage.mjs +53 -0
  333. package/library/systems/baseline-ui/NOTICE.md +6 -0
  334. package/library/systems/baseline-ui/SKILL.md +90 -0
  335. package/library/systems/baseline-ui/luci.json +35 -0
  336. package/library/testing/tdd/NOTICE.md +6 -0
  337. package/library/testing/tdd/SKILL.md +43 -0
  338. package/library/testing/tdd/agents/openai.yaml +3 -0
  339. package/library/testing/tdd/luci.json +29 -0
  340. package/library/testing/tdd/mocking.md +59 -0
  341. package/library/testing/tdd/tests.md +77 -0
  342. package/library/testing/webapp-testing/LICENSE.txt +202 -0
  343. package/library/testing/webapp-testing/NOTICE.md +6 -0
  344. package/library/testing/webapp-testing/SKILL.md +100 -0
  345. package/library/testing/webapp-testing/examples/console_logging.py +35 -0
  346. package/library/testing/webapp-testing/examples/element_discovery.py +40 -0
  347. package/library/testing/webapp-testing/examples/static_html_automation.py +33 -0
  348. package/library/testing/webapp-testing/luci.json +33 -0
  349. package/library/testing/webapp-testing/scripts/with_server.py +106 -0
  350. package/library/ui-ux/improve-ui/NOTICE.md +6 -0
  351. package/library/ui-ux/improve-ui/SKILL.md +127 -0
  352. package/library/ui-ux/improve-ui/agents/openai.yaml +13 -0
  353. package/library/ui-ux/improve-ui/luci.json +47 -0
  354. package/library/ui-ux/improve-ui/references/plan-template.md +55 -0
  355. package/library/ui-ux/landing-page/LICENSE.txt +21 -0
  356. package/library/ui-ux/landing-page/NOTICE.md +7 -0
  357. package/library/ui-ux/landing-page/SKILL.md +213 -0
  358. package/library/ui-ux/landing-page/luci.json +47 -0
  359. package/library/ui-ux/pricing-page/LICENSE.txt +21 -0
  360. package/library/ui-ux/pricing-page/NOTICE.md +7 -0
  361. package/library/ui-ux/pricing-page/SKILL.md +217 -0
  362. package/library/ui-ux/pricing-page/luci.json +47 -0
  363. package/library/ui-ux/prototype/LOGIC.md +67 -0
  364. package/library/ui-ux/prototype/NOTICE.md +6 -0
  365. package/library/ui-ux/prototype/SKILL.md +31 -0
  366. package/library/ui-ux/prototype/UI.md +112 -0
  367. package/library/ui-ux/prototype/agents/openai.yaml +3 -0
  368. package/library/ui-ux/prototype/luci.json +33 -0
  369. package/library/ui-ux/theme-factory/LICENSE.txt +202 -0
  370. package/library/ui-ux/theme-factory/NOTICE.md +6 -0
  371. package/library/ui-ux/theme-factory/SKILL.md +62 -0
  372. package/library/ui-ux/theme-factory/luci.json +35 -0
  373. package/library/ui-ux/theme-factory/themes/arctic-frost.md +19 -0
  374. package/library/ui-ux/theme-factory/themes/botanical-garden.md +19 -0
  375. package/library/ui-ux/theme-factory/themes/desert-rose.md +19 -0
  376. package/library/ui-ux/theme-factory/themes/forest-canopy.md +19 -0
  377. package/library/ui-ux/theme-factory/themes/golden-hour.md +19 -0
  378. package/library/ui-ux/theme-factory/themes/midnight-galaxy.md +19 -0
  379. package/library/ui-ux/theme-factory/themes/modern-minimalist.md +19 -0
  380. package/library/ui-ux/theme-factory/themes/ocean-depths.md +19 -0
  381. package/library/ui-ux/theme-factory/themes/sunset-boulevard.md +19 -0
  382. package/library/ui-ux/theme-factory/themes/tech-innovation.md +19 -0
  383. package/package.json +21 -3
  384. package/packs/design-system-build.json +10 -0
  385. package/packs/design-system.json +16 -0
  386. package/packs/marketing.json +11 -0
  387. package/packs/motion.json +12 -0
  388. package/packs/ui.json +13 -0
  389. package/README.md +0 -3
@@ -0,0 +1,191 @@
1
+ ---
2
+ title: Define Generic Context Interfaces for Dependency Injection
3
+ impact: HIGH
4
+ impactDescription: enables dependency-injectable state across use-cases
5
+ tags: composition, context, state, typescript, dependency-injection
6
+ ---
7
+
8
+ ## Define Generic Context Interfaces for Dependency Injection
9
+
10
+ Define a **generic interface** for your component context with three parts:
11
+ `state`, `actions`, and `meta`. This interface is a contract that any provider
12
+ can implement—enabling the same UI components to work with completely different
13
+ state implementations.
14
+
15
+ **Core principle:** Lift state, compose internals, make state
16
+ dependency-injectable.
17
+
18
+ **Incorrect (UI coupled to specific state implementation):**
19
+
20
+ ```tsx
21
+ function ComposerInput() {
22
+ // Tightly coupled to a specific hook
23
+ const { input, setInput } = useChannelComposerState()
24
+ return <TextInput value={input} onChangeText={setInput} />
25
+ }
26
+ ```
27
+
28
+ **Correct (generic interface enables dependency injection):**
29
+
30
+ ```tsx
31
+ // Define a GENERIC interface that any provider can implement
32
+ interface ComposerState {
33
+ input: string
34
+ attachments: Attachment[]
35
+ isSubmitting: boolean
36
+ }
37
+
38
+ interface ComposerActions {
39
+ update: (updater: (state: ComposerState) => ComposerState) => void
40
+ submit: () => void
41
+ }
42
+
43
+ interface ComposerMeta {
44
+ inputRef: React.RefObject<TextInput>
45
+ }
46
+
47
+ interface ComposerContextValue {
48
+ state: ComposerState
49
+ actions: ComposerActions
50
+ meta: ComposerMeta
51
+ }
52
+
53
+ const ComposerContext = createContext<ComposerContextValue | null>(null)
54
+ ```
55
+
56
+ **UI components consume the interface, not the implementation:**
57
+
58
+ ```tsx
59
+ function ComposerInput() {
60
+ const {
61
+ state,
62
+ actions: { update },
63
+ meta,
64
+ } = use(ComposerContext)
65
+
66
+ // This component works with ANY provider that implements the interface
67
+ return (
68
+ <TextInput
69
+ ref={meta.inputRef}
70
+ value={state.input}
71
+ onChangeText={(text) => update((s) => ({ ...s, input: text }))}
72
+ />
73
+ )
74
+ }
75
+ ```
76
+
77
+ **Different providers implement the same interface:**
78
+
79
+ ```tsx
80
+ // Provider A: Local state for ephemeral forms
81
+ function ForwardMessageProvider({ children }: { children: React.ReactNode }) {
82
+ const [state, setState] = useState(initialState)
83
+ const inputRef = useRef(null)
84
+ const submit = useForwardMessage()
85
+
86
+ return (
87
+ <ComposerContext
88
+ value={{
89
+ state,
90
+ actions: { update: setState, submit },
91
+ meta: { inputRef },
92
+ }}
93
+ >
94
+ {children}
95
+ </ComposerContext>
96
+ )
97
+ }
98
+
99
+ // Provider B: Global synced state for channels
100
+ function ChannelProvider({ channelId, children }: Props) {
101
+ const { state, update, submit } = useGlobalChannel(channelId)
102
+ const inputRef = useRef(null)
103
+
104
+ return (
105
+ <ComposerContext
106
+ value={{
107
+ state,
108
+ actions: { update, submit },
109
+ meta: { inputRef },
110
+ }}
111
+ >
112
+ {children}
113
+ </ComposerContext>
114
+ )
115
+ }
116
+ ```
117
+
118
+ **The same composed UI works with both:**
119
+
120
+ ```tsx
121
+ // Works with ForwardMessageProvider (local state)
122
+ <ForwardMessageProvider>
123
+ <Composer.Frame>
124
+ <Composer.Input />
125
+ <Composer.Submit />
126
+ </Composer.Frame>
127
+ </ForwardMessageProvider>
128
+
129
+ // Works with ChannelProvider (global synced state)
130
+ <ChannelProvider channelId="abc">
131
+ <Composer.Frame>
132
+ <Composer.Input />
133
+ <Composer.Submit />
134
+ </Composer.Frame>
135
+ </ChannelProvider>
136
+ ```
137
+
138
+ **Custom UI outside the component can access state and actions:**
139
+
140
+ The provider boundary is what matters—not the visual nesting. Components that
141
+ need shared state don't have to be inside the `Composer.Frame`. They just need
142
+ to be within the provider.
143
+
144
+ ```tsx
145
+ function ForwardMessageDialog() {
146
+ return (
147
+ <ForwardMessageProvider>
148
+ <Dialog>
149
+ {/* The composer UI */}
150
+ <Composer.Frame>
151
+ <Composer.Input placeholder="Add a message, if you'd like." />
152
+ <Composer.Footer>
153
+ <Composer.Formatting />
154
+ <Composer.Emojis />
155
+ </Composer.Footer>
156
+ </Composer.Frame>
157
+
158
+ {/* Custom UI OUTSIDE the composer, but INSIDE the provider */}
159
+ <MessagePreview />
160
+
161
+ {/* Actions at the bottom of the dialog */}
162
+ <DialogActions>
163
+ <CancelButton />
164
+ <ForwardButton />
165
+ </DialogActions>
166
+ </Dialog>
167
+ </ForwardMessageProvider>
168
+ )
169
+ }
170
+
171
+ // This button lives OUTSIDE Composer.Frame but can still submit based on its context!
172
+ function ForwardButton() {
173
+ const {
174
+ actions: { submit },
175
+ } = use(ComposerContext)
176
+ return <Button onPress={submit}>Forward</Button>
177
+ }
178
+
179
+ // This preview lives OUTSIDE Composer.Frame but can read composer's state!
180
+ function MessagePreview() {
181
+ const { state } = use(ComposerContext)
182
+ return <Preview message={state.input} attachments={state.attachments} />
183
+ }
184
+ ```
185
+
186
+ The `ForwardButton` and `MessagePreview` are not visually inside the composer
187
+ box, but they can still access its state and actions. This is the power of
188
+ lifting state into providers.
189
+
190
+ The UI is reusable bits you compose together. The state is dependency-injected
191
+ by the provider. Swap the provider, keep the UI.
@@ -0,0 +1,113 @@
1
+ ---
2
+ title: Decouple State Management from UI
3
+ impact: MEDIUM
4
+ impactDescription: enables swapping state implementations without changing UI
5
+ tags: composition, state, architecture
6
+ ---
7
+
8
+ ## Decouple State Management from UI
9
+
10
+ The provider component should be the only place that knows how state is managed.
11
+ UI components consume the context interface—they don't know if state comes from
12
+ useState, Zustand, or a server sync.
13
+
14
+ **Incorrect (UI coupled to state implementation):**
15
+
16
+ ```tsx
17
+ function ChannelComposer({ channelId }: { channelId: string }) {
18
+ // UI component knows about global state implementation
19
+ const state = useGlobalChannelState(channelId)
20
+ const { submit, updateInput } = useChannelSync(channelId)
21
+
22
+ return (
23
+ <Composer.Frame>
24
+ <Composer.Input
25
+ value={state.input}
26
+ onChange={(text) => sync.updateInput(text)}
27
+ />
28
+ <Composer.Submit onPress={() => sync.submit()} />
29
+ </Composer.Frame>
30
+ )
31
+ }
32
+ ```
33
+
34
+ **Correct (state management isolated in provider):**
35
+
36
+ ```tsx
37
+ // Provider handles all state management details
38
+ function ChannelProvider({
39
+ channelId,
40
+ children,
41
+ }: {
42
+ channelId: string
43
+ children: React.ReactNode
44
+ }) {
45
+ const { state, update, submit } = useGlobalChannel(channelId)
46
+ const inputRef = useRef(null)
47
+
48
+ return (
49
+ <Composer.Provider
50
+ state={state}
51
+ actions={{ update, submit }}
52
+ meta={{ inputRef }}
53
+ >
54
+ {children}
55
+ </Composer.Provider>
56
+ )
57
+ }
58
+
59
+ // UI component only knows about the context interface
60
+ function ChannelComposer() {
61
+ return (
62
+ <Composer.Frame>
63
+ <Composer.Header />
64
+ <Composer.Input />
65
+ <Composer.Footer>
66
+ <Composer.Submit />
67
+ </Composer.Footer>
68
+ </Composer.Frame>
69
+ )
70
+ }
71
+
72
+ // Usage
73
+ function Channel({ channelId }: { channelId: string }) {
74
+ return (
75
+ <ChannelProvider channelId={channelId}>
76
+ <ChannelComposer />
77
+ </ChannelProvider>
78
+ )
79
+ }
80
+ ```
81
+
82
+ **Different providers, same UI:**
83
+
84
+ ```tsx
85
+ // Local state for ephemeral forms
86
+ function ForwardMessageProvider({ children }) {
87
+ const [state, setState] = useState(initialState)
88
+ const forwardMessage = useForwardMessage()
89
+
90
+ return (
91
+ <Composer.Provider
92
+ state={state}
93
+ actions={{ update: setState, submit: forwardMessage }}
94
+ >
95
+ {children}
96
+ </Composer.Provider>
97
+ )
98
+ }
99
+
100
+ // Global synced state for channels
101
+ function ChannelProvider({ channelId, children }) {
102
+ const { state, update, submit } = useGlobalChannel(channelId)
103
+
104
+ return (
105
+ <Composer.Provider state={state} actions={{ update, submit }}>
106
+ {children}
107
+ </Composer.Provider>
108
+ )
109
+ }
110
+ ```
111
+
112
+ The same `Composer.Input` component works with both providers because it only
113
+ depends on the context interface, not the implementation.
@@ -0,0 +1,125 @@
1
+ ---
2
+ title: Lift State into Provider Components
3
+ impact: HIGH
4
+ impactDescription: enables state sharing outside component boundaries
5
+ tags: composition, state, context, providers
6
+ ---
7
+
8
+ ## Lift State into Provider Components
9
+
10
+ Move state management into dedicated provider components. This allows sibling
11
+ components outside the main UI to access and modify state without prop drilling
12
+ or awkward refs.
13
+
14
+ **Incorrect (state trapped inside component):**
15
+
16
+ ```tsx
17
+ function ForwardMessageComposer() {
18
+ const [state, setState] = useState(initialState)
19
+ const forwardMessage = useForwardMessage()
20
+
21
+ return (
22
+ <Composer.Frame>
23
+ <Composer.Input />
24
+ <Composer.Footer />
25
+ </Composer.Frame>
26
+ )
27
+ }
28
+
29
+ // Problem: How does this button access composer state?
30
+ function ForwardMessageDialog() {
31
+ return (
32
+ <Dialog>
33
+ <ForwardMessageComposer />
34
+ <MessagePreview /> {/* Needs composer state */}
35
+ <DialogActions>
36
+ <CancelButton />
37
+ <ForwardButton /> {/* Needs to call submit */}
38
+ </DialogActions>
39
+ </Dialog>
40
+ )
41
+ }
42
+ ```
43
+
44
+ **Incorrect (useEffect to sync state up):**
45
+
46
+ ```tsx
47
+ function ForwardMessageDialog() {
48
+ const [input, setInput] = useState('')
49
+ return (
50
+ <Dialog>
51
+ <ForwardMessageComposer onInputChange={setInput} />
52
+ <MessagePreview input={input} />
53
+ </Dialog>
54
+ )
55
+ }
56
+
57
+ function ForwardMessageComposer({ onInputChange }) {
58
+ const [state, setState] = useState(initialState)
59
+ useEffect(() => {
60
+ onInputChange(state.input) // Sync on every change 😬
61
+ }, [state.input])
62
+ }
63
+ ```
64
+
65
+ **Incorrect (reading state from ref on submit):**
66
+
67
+ ```tsx
68
+ function ForwardMessageDialog() {
69
+ const stateRef = useRef(null)
70
+ return (
71
+ <Dialog>
72
+ <ForwardMessageComposer stateRef={stateRef} />
73
+ <ForwardButton onPress={() => submit(stateRef.current)} />
74
+ </Dialog>
75
+ )
76
+ }
77
+ ```
78
+
79
+ **Correct (state lifted to provider):**
80
+
81
+ ```tsx
82
+ function ForwardMessageProvider({ children }: { children: React.ReactNode }) {
83
+ const [state, setState] = useState(initialState)
84
+ const forwardMessage = useForwardMessage()
85
+ const inputRef = useRef(null)
86
+
87
+ return (
88
+ <Composer.Provider
89
+ state={state}
90
+ actions={{ update: setState, submit: forwardMessage }}
91
+ meta={{ inputRef }}
92
+ >
93
+ {children}
94
+ </Composer.Provider>
95
+ )
96
+ }
97
+
98
+ function ForwardMessageDialog() {
99
+ return (
100
+ <ForwardMessageProvider>
101
+ <Dialog>
102
+ <ForwardMessageComposer />
103
+ <MessagePreview /> {/* Custom components can access state and actions */}
104
+ <DialogActions>
105
+ <CancelButton />
106
+ <ForwardButton /> {/* Custom components can access state and actions */}
107
+ </DialogActions>
108
+ </Dialog>
109
+ </ForwardMessageProvider>
110
+ )
111
+ }
112
+
113
+ function ForwardButton() {
114
+ const { actions } = use(Composer.Context)
115
+ return <Button onPress={actions.submit}>Forward</Button>
116
+ }
117
+ ```
118
+
119
+ The ForwardButton lives outside the Composer.Frame but still has access to the
120
+ submit action because it's within the provider. Even though it's a one-off
121
+ component, it can still access the composer's state and actions from outside the
122
+ UI itself.
123
+
124
+ **Key insight:** Components that need shared state don't have to be visually
125
+ nested inside each other—they just need to be within the same provider.
@@ -0,0 +1,6 @@
1
+ # Notice
2
+
3
+ This skill comes from https://github.com/designed-by-ai/skills (`skills/design-mobile-apps/SKILL.md`).
4
+ Licence: MIT (evidence: repository license, https://github.com/designed-by-ai/skills/blob/main/LICENSE, checked 2026-11-08).
5
+
6
+ Luci converted it to the Luci Skill Standard: SKILL.md metadata keys and luci.json. The instructions are unchanged.
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: "design-mobile-apps"
3
+ description: "Design mobile app screens with Sleek, edit Sleek projects, and implement their designs in React Native or HTML."
4
+ license: "MIT"
5
+ metadata:
6
+ luci-category: "frontend"
7
+ luci-author: "designed-by-ai"
8
+ luci-version: "1.0.0"
9
+ ---
10
+
11
+ # Designing with Sleek
12
+
13
+ [![Design mobile apps in minutes](https://raw.githubusercontent.com/sleekdotdesign/agent-skills/main/assets/hero.png)](https://sleek.design)
14
+
15
+ ## Overview
16
+
17
+ [sleek.design](https://sleek.design) provides a REST API at `/api/v1/*` to create projects, design screens from a brief, and fetch their HTML and renders.
18
+
19
+ **Base URL**: `https://sleek.design`
20
+ **Auth**: `Authorization: Bearer $SLEEK_API_KEY`, except the public device start/poll endpoints
21
+ **Content-Type**: send `application/json` for JSON request bodies.
22
+ **CORS**: Enabled on all `/api/v1/*` endpoints
23
+ **Envelope**: check HTTP status first. Successful JSON wraps its payload in `data`; lists also include sibling `pagination`. Errors use top-level `code`, `status` and `message`, with optional `data.url`. Successful screenshots and share cards return image bytes; `204` has no body.
24
+ **Ids**: opaque 11-character tokens like `V1StGXR8Z5j`, with no type prefix. Nothing about an id says whether it names a project, screen, component, version or theme, so track each one by the response field it arrived in.
25
+ **Parsing responses**: write the body to a file (`curl -o run.json`) and parse the file. Piping JSON through `echo` corrupts it: zsh expands the escaped `\n` inside string values into real newlines, which makes the body invalid JSON.
26
+ **API docs**: OpenAPI spec at `https://sleek.design/api/v1/spec.json`; browsable docs at `https://sleek.design/api/v1/docs`. Fetch the spec for any contract detail not covered here.
27
+
28
+ ---
29
+
30
+ ## Designing or implementing
31
+
32
+ A single run can take both directions — "design me a fitness app and build it in Expo" is a design pass followed by an implementation pass. Gate each pointer on the artefact in front of you rather than on a one-time reading of the request:
33
+
34
+ **Designing** — you are about to send a chat message to Sleek. Read [designing.md](designing.md) first; it carries the create → chat → screenshot loop, how to author a style direction, and when to seed one from a reference instead.
35
+
36
+ **Implementing.** Before writing code from a Sleek design, read [implementing.md](implementing.md) for version selection, native conversion, working features, and acceptance checks.
37
+
38
+ ## User shot and review shot
39
+
40
+ Screenshots come in two framings, and each file below asks for one by name:
41
+
42
+ - A **user shot** is the default render: viewport height, phone-shaped. This is the one you show the user.
43
+ - A **review shot** adds `fullHeight: true`, one component per request. This is the one you judge your own work against.
44
+
45
+ ---
46
+
47
+ ## Prerequisites: API Key
48
+
49
+ If `SLEEK_API_KEY` is not set, use the device flow so the user never handles the raw key:
50
+
51
+ 1. `POST https://sleek.design/api/v1/device/start` (no auth) with body `{"source": "your-tool-slug"}`. The response contains a `verificationUrl`, a human-checkable `userCode`, a secret `deviceCode`, and a poll `interval` in seconds.
52
+ 2. Show the user the `verificationUrl` and the `userCode`, and tell them to confirm the code matches before approving.
53
+ 3. Poll `POST https://sleek.design/api/v1/device/poll` with `{"deviceCode": "..."}` every `interval` seconds. On `pending`, keep waiting. On `approved`, store `data.key` privately as `SLEEK_API_KEY` on that first read: the key is handed over once. On `expired` or `404 NOT_FOUND`, start a new flow. See [Device: Poll](endpoints.md#device-poll) for the response contract.
54
+
55
+ Fallback: send the user to **https://sleek.design/agents/setup**, which handles sign-in, plan upgrade, and key creation in one place, and ask them to paste the key back to you. Keys can also be managed at **https://sleek.design/dashboard/api-keys**. The full key value is shown only once at creation, and a free account holds one active key at a time.
56
+
57
+ **Plans**: free accounts can try the API with their one-time trial credits (about one design run), so a new user can see their first design before any payment decision. Sustained use requires the Pro plan or higher. This file carries no figures on purpose — read the current price, billing periods and credit allowance from **https://sleek.design/agents.md**, which is generated from Sleek's live pricing, and quote them from there. When cost becomes relevant (the user asks, an upgrade is needed to continue, or you're about to send them to a payment page), state that pricing plainly, including the yearly option, so the user sees a payment step coming before they reach it.
58
+
59
+ ---
60
+
61
+ ## Quick Reference: All Endpoints
62
+
63
+ Every endpoint the API exposes:
64
+
65
+ | Method | Path | Scope |
66
+ | -------- | ---------------------------------------------- | ----------------- |
67
+ | `GET` | `/api/v1/projects` | `projects:read` |
68
+ | `POST` | `/api/v1/projects` | `projects:write` |
69
+ | `GET` | `/api/v1/projects/:id` | `projects:read` |
70
+ | `DELETE` | `/api/v1/projects/:id` | `projects:write` |
71
+ | `GET` | `/api/v1/projects/:id/components` | `components:read` |
72
+ | `GET` | `/api/v1/projects/:id/components/:componentId` | `components:read` |
73
+ | `GET` | `/api/v1/references` | any valid key |
74
+ | `POST` | `/api/v1/projects/:id/chat/messages` | `chats:write` |
75
+ | `GET` | `/api/v1/projects/:id/chat/runs/:runId` | `chats:read` |
76
+ | `POST` | `/api/v1/projects/:id/chat/runs/:runId/cancel` | `chats:write` |
77
+ | `POST` | `/api/v1/screenshots` | `screenshots` |
78
+ | `POST` | `/api/v1/share-cards` | `screenshots` |
79
+ | `POST` | `/api/v1/device/start` | public, no auth |
80
+ | `POST` | `/api/v1/device/poll` | public, no auth |
81
+
82
+ Create a key holding only the scopes the task uses.
83
+
84
+ Every row above is specified in full — request body, response shape, field defaults, status codes — in [endpoints.md](endpoints.md). This table is enough to pick an endpoint; read the reference when you need a contract detail it doesn't carry.
85
+
86
+ ---
87
+
88
+ ## Error Shapes
89
+
90
+ ```json
91
+ {
92
+ "defined": true,
93
+ "code": "FORBIDDEN",
94
+ "status": 403,
95
+ "message": "...",
96
+ "data": { "url": "https://sleek.design/..." }
97
+ }
98
+ ```
99
+
100
+ | HTTP | Code | When |
101
+ | ---- | ----------------------- | ------------------------------------------------------------------------ |
102
+ | 401 | `UNAUTHORIZED` | Missing/invalid/expired API key |
103
+ | 403 | `FORBIDDEN` | Valid key, wrong scope or plan |
104
+ | 404 | `NOT_FOUND` | Resource doesn't exist |
105
+ | 400 | `BAD_REQUEST` | Validation failure |
106
+ | 409 | `CONFLICT` | Another run is active for this project |
107
+ | 429 | `TOO_MANY_REQUESTS` | Render cap: 1000 screenshots + share cards per hour per org, counted on API-key requests only |
108
+ | 500 | `INTERNAL_SERVER_ERROR` | Server error |
109
+
110
+ `401`, `403` and `429` bodies may include `data.url`: a page where the user can fix the condition (create a key, upgrade the plan). Share it as-is.
111
+
112
+ Chat run-level errors (inside `data.error`):
113
+
114
+ | Code | Meaning |
115
+ | --------------------------------- | ---------------------------------------------------------- |
116
+ | `out_of_credits` | Organization has no credits left |
117
+ | `execution_failed` | AI execution error |
118
+ | `cancelled` | Run cancelled via the cancel endpoint |
119
+ | `request_message_persist_failed` | The run failed before reaching the AI; the message was never stored |
120
+
121
+ For `out_of_credits`, relay `error.url` and wait for the user to resolve it. Follow [Safe retries](designing.md#2-send-a-chat-message) for replay versus a new attempt after either recoverable failure.
@@ -0,0 +1,56 @@
1
+ # Designing
2
+
3
+ Request and response shapes go beyond the fields named here; read the [API reference](endpoints.md) when you need a field this file doesn't name.
4
+
5
+ ## 1. Create a project
6
+
7
+ Create a project with `POST /api/v1/projects` if one doesn't exist yet.
8
+
9
+ Each project has its own theme, style, and design system, so a project holds one style direction at a time. Even so, keep design variations in one project by default: project count is plan-capped (free 1, Starter 5), and `POST /api/v1/projects` answers a capped account with `403 FORBIDDEN` at `projects_limit`. That 403 carries no `data.url`, so name the cap and the upgrade to the user yourself. Spread variations across projects only when the user asks to see them side by side — and check the headroom with `GET /api/v1/projects` before you start.
10
+
11
+ ## 2. Send a chat message
12
+
13
+ Send the request with `POST /api/v1/projects/:id/chat/messages`. Sleek plans screen content and layout from your message, and invents a visual style when you give it none. Send the full intent as a single message in the user's own terms: Sleek does the decomposition into screens itself and produces richer designs when given room to plan. If the user described specific screens, include those.
14
+
15
+ **Author a style direction**: write one whenever the user has given you anything to ground it in — reference images, apps they like, vibe adjectives, things to avoid — or whenever you're producing variations, one direction per variation. Pass the request through unchanged only when it's bare. A style direction is a single comprehensive paragraph, included in the message, covering mood (2–3 adjectives), color strategy (the logic, not hex codes), typography feel, layout philosophy, component style (radii, borders vs shadows, nav treatment), imagery and illustration style, and one or two distinctive details. Commit to a palette, a type direction, and an overall feel — anything that only sets a mood reads as a hint, not a direction. Put the personality in color, type, and imagery rather than in unusual layout or navigation.
16
+
17
+ Extend what the user gave you and keep every constraint they set. When they point at reference images or apps they like, study each one and carry what you take into the direction — Sleek only sees images passed as `imageUrls`, so for anything local the direction is how those references reach it. Borrow patterns, and leave the source's branding, content, and name behind.
18
+
19
+ Use a style direction or a `referenceId`, not both — a reference already carries a full style guide of its own.
20
+
21
+ **Seed a style with a reference**: Sleek curates a catalog of design references. When the user wants a specific look or asks for style options, list them with `GET /api/v1/references` (each has a `name` and `previewImageUrls` you can show) and pass the chosen id as `referenceId` on the first message to a project, so its style guide seeds the whole design.
22
+
23
+ **Identify your tool**: always send `source`, the slug of the tool making the request. The Sleek editor uses it to show the user who is designing while the run streams. Recognized values: `claude-code`, `claude`, `codex`, `chatgpt`, `cursor`, `openclaw`, `grok`. If your tool isn't listed, send a short kebab-case slug for it anyway (max 64 chars). Unrecognized values are fine and get a generic label.
24
+
25
+ **Watch it live**: runs render in the Sleek editor in real time. After sending the first message to a project, tell the user they can watch their screens being designed live in Sleek, and share the editor link: `https://sleek.design/project/:projectId`. Open a browser yourself only when the user asks you to.
26
+
27
+ **Polling**: chat messages are async by default: you get a `runId` and poll `GET /api/v1/projects/:id/chat/runs/:runId`. Start at a 2s interval, back off to 5s after 10s, and poll for up to **10 minutes**. Exit on `completed` or `failed`; if you can't read the status, stop and report that rather than counting it as "not done yet". After ten minutes, report the last known status and run ID. Elapsed time does not prove completion or release the project's run lock; don't start another attempt while its outcome is unknown. You can also use `?wait=true` for a blocking call (up to 300s; falls back to polling if it times out with `202`).
28
+
29
+ Save the request body, idempotency key, `runId` and `statusUrl` per project as soon as they are available. A `409` carries no active-run pointer and the API has no run-list endpoint. If the blocking run's ID is unknown, report the conflict and request its run ID or editor context; don't invent a polling URL or cancel an unidentified run.
30
+
31
+ A `failed` run can still carry a `result`: Sleek records the operations it applied before the failure. Read `result` on both terminal statuses and show the created or updated screens through step 3. Report the failure alongside the applied changes. Continue to implementation only when the user requested code.
32
+
33
+ **Editing a specific screen**: use `target.screenId` to direct changes to the right screen. Read it from the run's `result.operations` or the component list's `screenId` field, which can be null. It is distinct from the component ID; do not substitute that ID when no screen ID is returned.
34
+
35
+ **One run at a time**: keep one active run per project. Follow a known run to a terminal status before sending the next message; use the missing-context path above when its ID is unknown. If the user changes direction, cancel the identified run (see [Cancel Run](endpoints.md#chat-cancel-run)). Messages to different projects can run in parallel; use async polling when running them concurrently.
36
+
37
+ **Safe retries**: choose an `idempotency-key` header (≤255 chars) before sending a message. If the response is lost, resend the same payload with the same key to recover the original run. Reusing a key also returns its terminal failure: after `request_message_persist_failed`, or after the user resolves `out_of_credits`, a new logical attempt needs a new key. Read the existing run first; don't create a new attempt while its outcome is unknown.
38
+
39
+ ## 3. Show the results
40
+
41
+ After every chat run that produces `screen_created` or `screen_updated` operations, **take screenshots and show them to the user** using `POST /api/v1/screenshots`. The step is done once the user has seen a **user shot** of every screen the run created or updated, and each run ends with the user having seen what it changed.
42
+
43
+ - **New screens**: one screenshot per screen + one combined screenshot of all screens in the project.
44
+ - **Updated screens**: one screenshot per affected screen.
45
+
46
+ Save screenshots in the project directory (not a temporary folder) so the user can easily view them.
47
+
48
+ **Review your own work with a review shot.** The user shot's phone-shaped framing is the point when you're showing a screen to the user, and the wrong framing for judging it: everything below the fold is cropped away. Re-shoot with `fullHeight: true`, one screen per request, when you're checking what a run actually produced.
49
+
50
+ Screenshot requests are independent, so issue them in parallel — the user shot and the review shot go out together, as do the shots for different screens. "One screen per request" governs what goes into each image, not how fast you send them. Back off only if you actually get a `429`.
51
+
52
+ **Confirm missing content.** Content that looks missing in a user shot can be below the fold. Review the full-height shot first. Before reporting something absent or asking Sleek to add it, check the component HTML from `GET /api/v1/projects/:id/components/:componentId` too: rendering can omit content past its height cap or inside collapsed sections and carousel slides. An element present in HTML can still be invisible to the user.
53
+
54
+ ---
55
+
56
+ When the user asks for these screens as code, read [implementing.md](implementing.md) before writing the implementation.