claude-skill-lord 1.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 (684) hide show
  1. package/.claude-plugin/marketplace.json +19 -0
  2. package/.claude-plugin/plugin.json +54 -0
  3. package/CLAUDE.md +81 -0
  4. package/LICENSE +33 -0
  5. package/LICENSE-ui-ux-pro-max.txt +21 -0
  6. package/README.md +294 -0
  7. package/agents/architect.md +211 -0
  8. package/agents/brainstormer.md +103 -0
  9. package/agents/build-error-resolver.md +114 -0
  10. package/agents/chief-of-staff.md +151 -0
  11. package/agents/code-reviewer.md +285 -0
  12. package/agents/copywriter.md +111 -0
  13. package/agents/database-admin.md +91 -0
  14. package/agents/debugger.md +135 -0
  15. package/agents/docs-manager.md +119 -0
  16. package/agents/e2e-runner.md +107 -0
  17. package/agents/git-manager.md +199 -0
  18. package/agents/harness-optimizer.md +35 -0
  19. package/agents/loop-operator.md +36 -0
  20. package/agents/planner.md +245 -0
  21. package/agents/project-manager.md +117 -0
  22. package/agents/quality-gate.md +173 -0
  23. package/agents/refactor-cleaner.md +85 -0
  24. package/agents/scout.md +105 -0
  25. package/agents/security-reviewer.md +108 -0
  26. package/agents/skill-router.md +112 -0
  27. package/agents/tdd-guide.md +91 -0
  28. package/agents/ui-ux-designer.md +220 -0
  29. package/assets/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  30. package/assets/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  31. package/assets/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  32. package/assets/canvas-fonts/BigShoulders-OFL.txt +93 -0
  33. package/assets/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  34. package/assets/canvas-fonts/Boldonse-OFL.txt +93 -0
  35. package/assets/canvas-fonts/Boldonse-Regular.ttf +0 -0
  36. package/assets/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  37. package/assets/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  38. package/assets/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  39. package/assets/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  40. package/assets/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  41. package/assets/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  42. package/assets/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  43. package/assets/canvas-fonts/DMMono-OFL.txt +93 -0
  44. package/assets/canvas-fonts/DMMono-Regular.ttf +0 -0
  45. package/assets/canvas-fonts/EricaOne-OFL.txt +94 -0
  46. package/assets/canvas-fonts/EricaOne-Regular.ttf +0 -0
  47. package/assets/canvas-fonts/GeistMono-Bold.ttf +0 -0
  48. package/assets/canvas-fonts/GeistMono-OFL.txt +93 -0
  49. package/assets/canvas-fonts/GeistMono-Regular.ttf +0 -0
  50. package/assets/canvas-fonts/Gloock-OFL.txt +93 -0
  51. package/assets/canvas-fonts/Gloock-Regular.ttf +0 -0
  52. package/assets/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  53. package/assets/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  54. package/assets/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  55. package/assets/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  56. package/assets/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  57. package/assets/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  58. package/assets/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  59. package/assets/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  60. package/assets/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  61. package/assets/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  62. package/assets/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  63. package/assets/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  64. package/assets/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  65. package/assets/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  66. package/assets/canvas-fonts/Italiana-OFL.txt +93 -0
  67. package/assets/canvas-fonts/Italiana-Regular.ttf +0 -0
  68. package/assets/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  69. package/assets/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  70. package/assets/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  71. package/assets/canvas-fonts/Jura-Light.ttf +0 -0
  72. package/assets/canvas-fonts/Jura-Medium.ttf +0 -0
  73. package/assets/canvas-fonts/Jura-OFL.txt +93 -0
  74. package/assets/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  75. package/assets/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  76. package/assets/canvas-fonts/Lora-Bold.ttf +0 -0
  77. package/assets/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  78. package/assets/canvas-fonts/Lora-Italic.ttf +0 -0
  79. package/assets/canvas-fonts/Lora-OFL.txt +93 -0
  80. package/assets/canvas-fonts/Lora-Regular.ttf +0 -0
  81. package/assets/canvas-fonts/NationalPark-Bold.ttf +0 -0
  82. package/assets/canvas-fonts/NationalPark-OFL.txt +93 -0
  83. package/assets/canvas-fonts/NationalPark-Regular.ttf +0 -0
  84. package/assets/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  85. package/assets/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  86. package/assets/canvas-fonts/Outfit-Bold.ttf +0 -0
  87. package/assets/canvas-fonts/Outfit-OFL.txt +93 -0
  88. package/assets/canvas-fonts/Outfit-Regular.ttf +0 -0
  89. package/assets/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  90. package/assets/canvas-fonts/PixelifySans-OFL.txt +93 -0
  91. package/assets/canvas-fonts/PoiretOne-OFL.txt +93 -0
  92. package/assets/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  93. package/assets/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  94. package/assets/canvas-fonts/RedHatMono-OFL.txt +93 -0
  95. package/assets/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  96. package/assets/canvas-fonts/Silkscreen-OFL.txt +93 -0
  97. package/assets/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  98. package/assets/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  99. package/assets/canvas-fonts/SmoochSans-OFL.txt +93 -0
  100. package/assets/canvas-fonts/Tektur-Medium.ttf +0 -0
  101. package/assets/canvas-fonts/Tektur-OFL.txt +93 -0
  102. package/assets/canvas-fonts/Tektur-Regular.ttf +0 -0
  103. package/assets/canvas-fonts/WorkSans-Bold.ttf +0 -0
  104. package/assets/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  105. package/assets/canvas-fonts/WorkSans-Italic.ttf +0 -0
  106. package/assets/canvas-fonts/WorkSans-OFL.txt +93 -0
  107. package/assets/canvas-fonts/WorkSans-Regular.ttf +0 -0
  108. package/assets/canvas-fonts/YoungSerif-OFL.txt +93 -0
  109. package/assets/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  110. package/commands/ask.md +56 -0
  111. package/commands/audit.md +25 -0
  112. package/commands/bootstrap/auto/fast.md +111 -0
  113. package/commands/bootstrap/auto.md +115 -0
  114. package/commands/bootstrap.md +137 -0
  115. package/commands/brainstorm.md +69 -0
  116. package/commands/build-fix.md +66 -0
  117. package/commands/code-review.md +44 -0
  118. package/commands/code.md +93 -0
  119. package/commands/commit_gen.md +44 -0
  120. package/commands/content/cro.md +43 -0
  121. package/commands/content/enhance.md +14 -0
  122. package/commands/content/fast.md +13 -0
  123. package/commands/content/good.md +16 -0
  124. package/commands/cook/auto/fast.md +26 -0
  125. package/commands/cook/auto.md +15 -0
  126. package/commands/cook.md +105 -0
  127. package/commands/debug.md +13 -0
  128. package/commands/design/3d.md +74 -0
  129. package/commands/design/describe.md +21 -0
  130. package/commands/design/fast.md +22 -0
  131. package/commands/design/good.md +26 -0
  132. package/commands/design/screenshot.md +32 -0
  133. package/commands/design/video.md +32 -0
  134. package/commands/docs/init.md +15 -0
  135. package/commands/docs/summarize.md +22 -0
  136. package/commands/docs/update.md +23 -0
  137. package/commands/e2e.md +365 -0
  138. package/commands/evolve.md +178 -0
  139. package/commands/fix/ci.md +20 -0
  140. package/commands/fix/fast.md +19 -0
  141. package/commands/fix/hard.md +43 -0
  142. package/commands/fix/logs.md +20 -0
  143. package/commands/fix/test.md +20 -0
  144. package/commands/fix/types.md +9 -0
  145. package/commands/fix/ui.md +35 -0
  146. package/commands/fix.md +12 -0
  147. package/commands/git/cm.md +11 -0
  148. package/commands/git/cp.md +9 -0
  149. package/commands/git/pr.md +15 -0
  150. package/commands/integrate/polar.md +28 -0
  151. package/commands/integrate/sepay.md +28 -0
  152. package/commands/journal.md +5 -0
  153. package/commands/learn.md +74 -0
  154. package/commands/loop-start.md +36 -0
  155. package/commands/loop-status.md +28 -0
  156. package/commands/model-route.md +30 -0
  157. package/commands/plan.md +115 -0
  158. package/commands/prompt-optimize.md +38 -0
  159. package/commands/quality-gate.md +33 -0
  160. package/commands/refactor-clean.md +84 -0
  161. package/commands/review/codebase.md +49 -0
  162. package/commands/route.md +28 -0
  163. package/commands/scout/ext.md +35 -0
  164. package/commands/scout.md +28 -0
  165. package/commands/skill/add.md +29 -0
  166. package/commands/skill/create.md +22 -0
  167. package/commands/skill/fix-logs.md +21 -0
  168. package/commands/skill/optimize.md +28 -0
  169. package/commands/skill-create.md +174 -0
  170. package/commands/tdd.md +328 -0
  171. package/commands/test.md +8 -0
  172. package/commands/verify.md +63 -0
  173. package/commands/watzup.md +8 -0
  174. package/hooks/hooks.json +86 -0
  175. package/hooks/scripts/block-no-verify.js +19 -0
  176. package/hooks/scripts/check-console-log.js +71 -0
  177. package/hooks/scripts/check-hook-enabled.js +12 -0
  178. package/hooks/scripts/config-protection.js +125 -0
  179. package/hooks/scripts/post-edit-console-warn.js +54 -0
  180. package/hooks/scripts/post-edit-format.js +109 -0
  181. package/hooks/scripts/post-edit-typecheck.js +96 -0
  182. package/hooks/scripts/quality-gate.js +168 -0
  183. package/hooks/scripts/run-with-flags-shell.sh +32 -0
  184. package/hooks/scripts/run-with-flags.js +120 -0
  185. package/hooks/scripts/session-end.js +301 -0
  186. package/hooks/scripts/session-start.js +98 -0
  187. package/manifests/install-modules.json +96 -0
  188. package/manifests/install-profiles.json +17 -0
  189. package/package.json +52 -0
  190. package/scripts/install.js +144 -0
  191. package/scripts/lib/hook-flags.js +74 -0
  192. package/scripts/lib/profile-utils.js +97 -0
  193. package/scripts/lib/resolve-formatter.js +185 -0
  194. package/scripts/lib/resolve-root.js +89 -0
  195. package/scripts/lib/utils.js +564 -0
  196. package/scripts/sl.js +677 -0
  197. package/skills/manifest.json +493 -0
  198. package/skills/tier-1/api-design/SKILL.md +523 -0
  199. package/skills/tier-1/backend-development/SKILL.md +95 -0
  200. package/skills/tier-1/backend-development/references/backend-api-design.md +495 -0
  201. package/skills/tier-1/backend-development/references/backend-architecture.md +454 -0
  202. package/skills/tier-1/backend-development/references/backend-authentication.md +338 -0
  203. package/skills/tier-1/backend-development/references/backend-code-quality.md +659 -0
  204. package/skills/tier-1/backend-development/references/backend-debugging.md +904 -0
  205. package/skills/tier-1/backend-development/references/backend-devops.md +494 -0
  206. package/skills/tier-1/backend-development/references/backend-mindset.md +387 -0
  207. package/skills/tier-1/backend-development/references/backend-performance.md +397 -0
  208. package/skills/tier-1/backend-development/references/backend-security.md +290 -0
  209. package/skills/tier-1/backend-development/references/backend-technologies.md +256 -0
  210. package/skills/tier-1/backend-development/references/backend-testing.md +429 -0
  211. package/skills/tier-1/code-review/SKILL.md +143 -0
  212. package/skills/tier-1/code-review/references/code-review-reception.md +209 -0
  213. package/skills/tier-1/code-review/references/requesting-code-review.md +105 -0
  214. package/skills/tier-1/code-review/references/verification-before-completion.md +139 -0
  215. package/skills/tier-1/databases/SKILL.md +232 -0
  216. package/skills/tier-1/databases/references/mongodb-aggregation.md +447 -0
  217. package/skills/tier-1/databases/references/mongodb-atlas.md +465 -0
  218. package/skills/tier-1/databases/references/mongodb-crud.md +408 -0
  219. package/skills/tier-1/databases/references/mongodb-indexing.md +442 -0
  220. package/skills/tier-1/databases/references/postgresql-administration.md +594 -0
  221. package/skills/tier-1/databases/references/postgresql-performance.md +527 -0
  222. package/skills/tier-1/databases/references/postgresql-psql-cli.md +467 -0
  223. package/skills/tier-1/databases/references/postgresql-queries.md +475 -0
  224. package/skills/tier-1/databases/scripts/.coverage +0 -0
  225. package/skills/tier-1/databases/scripts/db_backup.py +502 -0
  226. package/skills/tier-1/databases/scripts/db_migrate.py +414 -0
  227. package/skills/tier-1/databases/scripts/db_performance_check.py +444 -0
  228. package/skills/tier-1/databases/scripts/requirements.txt +20 -0
  229. package/skills/tier-1/databases/scripts/tests/coverage-db.json +1 -0
  230. package/skills/tier-1/databases/scripts/tests/requirements.txt +4 -0
  231. package/skills/tier-1/databases/scripts/tests/test_db_backup.py +340 -0
  232. package/skills/tier-1/databases/scripts/tests/test_db_migrate.py +277 -0
  233. package/skills/tier-1/databases/scripts/tests/test_db_performance_check.py +370 -0
  234. package/skills/tier-1/debugging/SKILL.md +84 -0
  235. package/skills/tier-1/debugging/references/defense-in-depth.md +124 -0
  236. package/skills/tier-1/debugging/references/root-cause-tracing.md +122 -0
  237. package/skills/tier-1/debugging/references/systematic-debugging.md +102 -0
  238. package/skills/tier-1/debugging/references/verification.md +123 -0
  239. package/skills/tier-1/debugging/scripts/find-polluter.sh +63 -0
  240. package/skills/tier-1/debugging/scripts/find-polluter.test.md +102 -0
  241. package/skills/tier-1/devops/.env.example +76 -0
  242. package/skills/tier-1/devops/SKILL.md +285 -0
  243. package/skills/tier-1/devops/references/browser-rendering.md +305 -0
  244. package/skills/tier-1/devops/references/cloudflare-d1-kv.md +123 -0
  245. package/skills/tier-1/devops/references/cloudflare-platform.md +271 -0
  246. package/skills/tier-1/devops/references/cloudflare-r2-storage.md +280 -0
  247. package/skills/tier-1/devops/references/cloudflare-workers-advanced.md +312 -0
  248. package/skills/tier-1/devops/references/cloudflare-workers-apis.md +309 -0
  249. package/skills/tier-1/devops/references/cloudflare-workers-basics.md +418 -0
  250. package/skills/tier-1/devops/references/docker-basics.md +297 -0
  251. package/skills/tier-1/devops/references/docker-compose.md +292 -0
  252. package/skills/tier-1/devops/references/gcloud-platform.md +297 -0
  253. package/skills/tier-1/devops/references/gcloud-services.md +304 -0
  254. package/skills/tier-1/devops/scripts/cloudflare_deploy.py +269 -0
  255. package/skills/tier-1/devops/scripts/docker_optimize.py +320 -0
  256. package/skills/tier-1/devops/scripts/requirements.txt +20 -0
  257. package/skills/tier-1/devops/scripts/tests/requirements.txt +3 -0
  258. package/skills/tier-1/devops/scripts/tests/test_cloudflare_deploy.py +285 -0
  259. package/skills/tier-1/devops/scripts/tests/test_docker_optimize.py +436 -0
  260. package/skills/tier-1/frontend-development/SKILL.md +399 -0
  261. package/skills/tier-1/frontend-development/resources/common-patterns.md +331 -0
  262. package/skills/tier-1/frontend-development/resources/complete-examples.md +872 -0
  263. package/skills/tier-1/frontend-development/resources/component-patterns.md +502 -0
  264. package/skills/tier-1/frontend-development/resources/data-fetching.md +767 -0
  265. package/skills/tier-1/frontend-development/resources/file-organization.md +502 -0
  266. package/skills/tier-1/frontend-development/resources/loading-and-error-states.md +501 -0
  267. package/skills/tier-1/frontend-development/resources/performance.md +406 -0
  268. package/skills/tier-1/frontend-development/resources/routing-guide.md +364 -0
  269. package/skills/tier-1/frontend-development/resources/styling-guide.md +428 -0
  270. package/skills/tier-1/frontend-development/resources/typescript-standards.md +418 -0
  271. package/skills/tier-1/react-best-practices/AGENTS.md +2410 -0
  272. package/skills/tier-1/react-best-practices/README.md +123 -0
  273. package/skills/tier-1/react-best-practices/SKILL.md +125 -0
  274. package/skills/tier-1/react-best-practices/metadata.json +15 -0
  275. package/skills/tier-1/react-best-practices/rules/_sections.md +46 -0
  276. package/skills/tier-1/react-best-practices/rules/_template.md +28 -0
  277. package/skills/tier-1/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  278. package/skills/tier-1/react-best-practices/rules/advanced-use-latest.md +49 -0
  279. package/skills/tier-1/react-best-practices/rules/async-api-routes.md +38 -0
  280. package/skills/tier-1/react-best-practices/rules/async-defer-await.md +80 -0
  281. package/skills/tier-1/react-best-practices/rules/async-dependencies.md +36 -0
  282. package/skills/tier-1/react-best-practices/rules/async-parallel.md +28 -0
  283. package/skills/tier-1/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  284. package/skills/tier-1/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  285. package/skills/tier-1/react-best-practices/rules/bundle-conditional.md +31 -0
  286. package/skills/tier-1/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  287. package/skills/tier-1/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  288. package/skills/tier-1/react-best-practices/rules/bundle-preload.md +50 -0
  289. package/skills/tier-1/react-best-practices/rules/client-event-listeners.md +74 -0
  290. package/skills/tier-1/react-best-practices/rules/client-localstorage-schema.md +71 -0
  291. package/skills/tier-1/react-best-practices/rules/client-passive-event-listeners.md +48 -0
  292. package/skills/tier-1/react-best-practices/rules/client-swr-dedup.md +56 -0
  293. package/skills/tier-1/react-best-practices/rules/js-batch-dom-css.md +82 -0
  294. package/skills/tier-1/react-best-practices/rules/js-cache-function-results.md +80 -0
  295. package/skills/tier-1/react-best-practices/rules/js-cache-property-access.md +28 -0
  296. package/skills/tier-1/react-best-practices/rules/js-cache-storage.md +70 -0
  297. package/skills/tier-1/react-best-practices/rules/js-combine-iterations.md +32 -0
  298. package/skills/tier-1/react-best-practices/rules/js-early-exit.md +50 -0
  299. package/skills/tier-1/react-best-practices/rules/js-hoist-regexp.md +45 -0
  300. package/skills/tier-1/react-best-practices/rules/js-index-maps.md +37 -0
  301. package/skills/tier-1/react-best-practices/rules/js-length-check-first.md +49 -0
  302. package/skills/tier-1/react-best-practices/rules/js-min-max-loop.md +82 -0
  303. package/skills/tier-1/react-best-practices/rules/js-set-map-lookups.md +24 -0
  304. package/skills/tier-1/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  305. package/skills/tier-1/react-best-practices/rules/rendering-activity.md +26 -0
  306. package/skills/tier-1/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  307. package/skills/tier-1/react-best-practices/rules/rendering-conditional-render.md +40 -0
  308. package/skills/tier-1/react-best-practices/rules/rendering-content-visibility.md +38 -0
  309. package/skills/tier-1/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  310. package/skills/tier-1/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  311. package/skills/tier-1/react-best-practices/rules/rendering-svg-precision.md +28 -0
  312. package/skills/tier-1/react-best-practices/rules/rerender-defer-reads.md +39 -0
  313. package/skills/tier-1/react-best-practices/rules/rerender-dependencies.md +45 -0
  314. package/skills/tier-1/react-best-practices/rules/rerender-derived-state.md +29 -0
  315. package/skills/tier-1/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  316. package/skills/tier-1/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  317. package/skills/tier-1/react-best-practices/rules/rerender-memo.md +44 -0
  318. package/skills/tier-1/react-best-practices/rules/rerender-transitions.md +40 -0
  319. package/skills/tier-1/react-best-practices/rules/server-after-nonblocking.md +73 -0
  320. package/skills/tier-1/react-best-practices/rules/server-cache-lru.md +41 -0
  321. package/skills/tier-1/react-best-practices/rules/server-cache-react.md +76 -0
  322. package/skills/tier-1/react-best-practices/rules/server-parallel-fetching.md +83 -0
  323. package/skills/tier-1/react-best-practices/rules/server-serialization.md +38 -0
  324. package/skills/tier-1/research/SKILL.md +168 -0
  325. package/skills/tier-1/security-review/SKILL.md +495 -0
  326. package/skills/tier-1/security-review/cloud-infrastructure-security.md +361 -0
  327. package/skills/tier-1/sequential-thinking/.env.example +8 -0
  328. package/skills/tier-1/sequential-thinking/README.md +183 -0
  329. package/skills/tier-1/sequential-thinking/SKILL.md +94 -0
  330. package/skills/tier-1/sequential-thinking/package.json +31 -0
  331. package/skills/tier-1/sequential-thinking/references/advanced-strategies.md +79 -0
  332. package/skills/tier-1/sequential-thinking/references/advanced-techniques.md +76 -0
  333. package/skills/tier-1/sequential-thinking/references/core-patterns.md +95 -0
  334. package/skills/tier-1/sequential-thinking/references/examples-api.md +88 -0
  335. package/skills/tier-1/sequential-thinking/references/examples-architecture.md +94 -0
  336. package/skills/tier-1/sequential-thinking/references/examples-debug.md +90 -0
  337. package/skills/tier-1/sequential-thinking/scripts/format-thought.js +159 -0
  338. package/skills/tier-1/sequential-thinking/scripts/process-thought.js +236 -0
  339. package/skills/tier-1/sequential-thinking/tests/format-thought.test.js +133 -0
  340. package/skills/tier-1/sequential-thinking/tests/process-thought.test.js +215 -0
  341. package/skills/tier-1/tdd-workflow/SKILL.md +410 -0
  342. package/skills/tier-1/testing/SKILL.md +56 -0
  343. package/skills/tier-1/ui-styling/LICENSE.txt +202 -0
  344. package/skills/tier-1/ui-styling/SKILL.md +321 -0
  345. package/skills/tier-1/ui-styling/references/canvas-design-system.md +320 -0
  346. package/skills/tier-1/ui-styling/references/shadcn-accessibility.md +471 -0
  347. package/skills/tier-1/ui-styling/references/shadcn-components.md +424 -0
  348. package/skills/tier-1/ui-styling/references/shadcn-theming.md +373 -0
  349. package/skills/tier-1/ui-styling/references/tailwind-customization.md +483 -0
  350. package/skills/tier-1/ui-styling/references/tailwind-responsive.md +382 -0
  351. package/skills/tier-1/ui-styling/references/tailwind-utilities.md +455 -0
  352. package/skills/tier-1/ui-styling/scripts/.coverage +0 -0
  353. package/skills/tier-1/ui-styling/scripts/requirements.txt +17 -0
  354. package/skills/tier-1/ui-styling/scripts/shadcn_add.py +292 -0
  355. package/skills/tier-1/ui-styling/scripts/tailwind_config_gen.py +456 -0
  356. package/skills/tier-1/ui-styling/scripts/tests/coverage-ui.json +1 -0
  357. package/skills/tier-1/ui-styling/scripts/tests/requirements.txt +3 -0
  358. package/skills/tier-1/ui-styling/scripts/tests/test_shadcn_add.py +266 -0
  359. package/skills/tier-1/ui-styling/scripts/tests/test_tailwind_config_gen.py +336 -0
  360. package/skills/tier-1/ui-ux-pro-max/SKILL.md +659 -0
  361. package/skills/tier-1/ui-ux-pro-max/data/_sync_all.py +414 -0
  362. package/skills/tier-1/ui-ux-pro-max/data/app-interface.csv +31 -0
  363. package/skills/tier-1/ui-ux-pro-max/data/charts.csv +26 -0
  364. package/skills/tier-1/ui-ux-pro-max/data/colors.csv +162 -0
  365. package/skills/tier-1/ui-ux-pro-max/data/design.csv +1776 -0
  366. package/skills/tier-1/ui-ux-pro-max/data/draft.csv +1779 -0
  367. package/skills/tier-1/ui-ux-pro-max/data/google-fonts.csv +1924 -0
  368. package/skills/tier-1/ui-ux-pro-max/data/icons.csv +106 -0
  369. package/skills/tier-1/ui-ux-pro-max/data/landing.csv +35 -0
  370. package/skills/tier-1/ui-ux-pro-max/data/products.csv +162 -0
  371. package/skills/tier-1/ui-ux-pro-max/data/react-performance.csv +45 -0
  372. package/skills/tier-1/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  373. package/skills/tier-1/ui-ux-pro-max/data/styles.csv +85 -0
  374. package/skills/tier-1/ui-ux-pro-max/data/typography.csv +74 -0
  375. package/skills/tier-1/ui-ux-pro-max/data/ui-reasoning.csv +162 -0
  376. package/skills/tier-1/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  377. package/skills/tier-1/ui-ux-pro-max/scripts/core.py +247 -0
  378. package/skills/tier-1/ui-ux-pro-max/scripts/design_system.py +1067 -0
  379. package/skills/tier-1/ui-ux-pro-max/scripts/search.py +114 -0
  380. package/skills/tier-1/ui-ux-pro-max/templates/base/quick-reference.md +297 -0
  381. package/skills/tier-1/ui-ux-pro-max/templates/base/skill-content.md +358 -0
  382. package/skills/tier-1/ui-ux-pro-max/templates/platforms/agent.json +21 -0
  383. package/skills/tier-1/ui-ux-pro-max/templates/platforms/claude.json +21 -0
  384. package/skills/tier-1/ui-ux-pro-max/templates/platforms/codebuddy.json +21 -0
  385. package/skills/tier-1/ui-ux-pro-max/templates/platforms/codex.json +21 -0
  386. package/skills/tier-1/ui-ux-pro-max/templates/platforms/continue.json +21 -0
  387. package/skills/tier-1/ui-ux-pro-max/templates/platforms/copilot.json +18 -0
  388. package/skills/tier-1/ui-ux-pro-max/templates/platforms/cursor.json +18 -0
  389. package/skills/tier-1/ui-ux-pro-max/templates/platforms/droid.json +21 -0
  390. package/skills/tier-1/ui-ux-pro-max/templates/platforms/gemini.json +21 -0
  391. package/skills/tier-1/ui-ux-pro-max/templates/platforms/kiro.json +18 -0
  392. package/skills/tier-1/ui-ux-pro-max/templates/platforms/opencode.json +21 -0
  393. package/skills/tier-1/ui-ux-pro-max/templates/platforms/qoder.json +21 -0
  394. package/skills/tier-1/ui-ux-pro-max/templates/platforms/roocode.json +18 -0
  395. package/skills/tier-1/ui-ux-pro-max/templates/platforms/trae.json +21 -0
  396. package/skills/tier-1/ui-ux-pro-max/templates/platforms/windsurf.json +18 -0
  397. package/skills/tier-1/web-frameworks/SKILL.md +324 -0
  398. package/skills/tier-1/web-frameworks/references/nextjs-app-router.md +465 -0
  399. package/skills/tier-1/web-frameworks/references/nextjs-data-fetching.md +459 -0
  400. package/skills/tier-1/web-frameworks/references/nextjs-optimization.md +511 -0
  401. package/skills/tier-1/web-frameworks/references/nextjs-server-components.md +495 -0
  402. package/skills/tier-1/web-frameworks/references/remix-icon-integration.md +603 -0
  403. package/skills/tier-1/web-frameworks/references/turborepo-caching.md +551 -0
  404. package/skills/tier-1/web-frameworks/references/turborepo-pipelines.md +517 -0
  405. package/skills/tier-1/web-frameworks/references/turborepo-setup.md +542 -0
  406. package/skills/tier-1/web-frameworks/scripts/.coverage +0 -0
  407. package/skills/tier-1/web-frameworks/scripts/__init__.py +0 -0
  408. package/skills/tier-1/web-frameworks/scripts/nextjs_init.py +547 -0
  409. package/skills/tier-1/web-frameworks/scripts/requirements.txt +16 -0
  410. package/skills/tier-1/web-frameworks/scripts/tests/coverage-web.json +1 -0
  411. package/skills/tier-1/web-frameworks/scripts/tests/requirements.txt +3 -0
  412. package/skills/tier-1/web-frameworks/scripts/tests/test_nextjs_init.py +319 -0
  413. package/skills/tier-1/web-frameworks/scripts/tests/test_turborepo_migrate.py +374 -0
  414. package/skills/tier-1/web-frameworks/scripts/turborepo_migrate.py +394 -0
  415. package/skills/tier-2/ai-multimodal/.env.example +97 -0
  416. package/skills/tier-2/ai-multimodal/SKILL.md +353 -0
  417. package/skills/tier-2/ai-multimodal/references/audio-processing.md +373 -0
  418. package/skills/tier-2/ai-multimodal/references/image-generation.md +558 -0
  419. package/skills/tier-2/ai-multimodal/references/video-analysis.md +498 -0
  420. package/skills/tier-2/ai-multimodal/references/vision-understanding.md +479 -0
  421. package/skills/tier-2/ai-multimodal/scripts/.coverage +0 -0
  422. package/skills/tier-2/ai-multimodal/scripts/document_converter.py +395 -0
  423. package/skills/tier-2/ai-multimodal/scripts/gemini_batch_process.py +480 -0
  424. package/skills/tier-2/ai-multimodal/scripts/media_optimizer.py +506 -0
  425. package/skills/tier-2/ai-multimodal/scripts/requirements.txt +26 -0
  426. package/skills/tier-2/ai-multimodal/scripts/tests/.coverage +0 -0
  427. package/skills/tier-2/ai-multimodal/scripts/tests/requirements.txt +20 -0
  428. package/skills/tier-2/ai-multimodal/scripts/tests/test_document_converter.py +74 -0
  429. package/skills/tier-2/ai-multimodal/scripts/tests/test_failures.log +258 -0
  430. package/skills/tier-2/ai-multimodal/scripts/tests/test_gemini_batch_process.py +362 -0
  431. package/skills/tier-2/ai-multimodal/scripts/tests/test_media_optimizer.py +373 -0
  432. package/skills/tier-2/autonomous-loops/SKILL.md +610 -0
  433. package/skills/tier-2/backend-patterns/SKILL.md +598 -0
  434. package/skills/tier-2/better-auth/SKILL.md +204 -0
  435. package/skills/tier-2/better-auth/references/advanced-features.md +553 -0
  436. package/skills/tier-2/better-auth/references/database-integration.md +577 -0
  437. package/skills/tier-2/better-auth/references/email-password-auth.md +416 -0
  438. package/skills/tier-2/better-auth/references/oauth-providers.md +430 -0
  439. package/skills/tier-2/better-auth/scripts/.coverage +0 -0
  440. package/skills/tier-2/better-auth/scripts/better_auth_init.py +521 -0
  441. package/skills/tier-2/better-auth/scripts/requirements.txt +15 -0
  442. package/skills/tier-2/better-auth/scripts/tests/.coverage +0 -0
  443. package/skills/tier-2/better-auth/scripts/tests/test_better_auth_init.py +421 -0
  444. package/skills/tier-2/brand/SKILL.md +97 -0
  445. package/skills/tier-2/brand/references/approval-checklist.md +169 -0
  446. package/skills/tier-2/brand/references/asset-organization.md +157 -0
  447. package/skills/tier-2/brand/references/brand-guideline-template.md +140 -0
  448. package/skills/tier-2/brand/references/color-palette-management.md +186 -0
  449. package/skills/tier-2/brand/references/consistency-checklist.md +94 -0
  450. package/skills/tier-2/brand/references/logo-usage-rules.md +185 -0
  451. package/skills/tier-2/brand/references/messaging-framework.md +85 -0
  452. package/skills/tier-2/brand/references/typography-specifications.md +214 -0
  453. package/skills/tier-2/brand/references/update.md +118 -0
  454. package/skills/tier-2/brand/references/visual-identity.md +96 -0
  455. package/skills/tier-2/brand/references/voice-framework.md +88 -0
  456. package/skills/tier-2/brand/scripts/extract-colors.cjs +341 -0
  457. package/skills/tier-2/brand/scripts/inject-brand-context.cjs +349 -0
  458. package/skills/tier-2/brand/scripts/sync-brand-to-tokens.cjs +266 -0
  459. package/skills/tier-2/brand/scripts/validate-asset.cjs +387 -0
  460. package/skills/tier-2/brand/templates/brand-guidelines-starter.md +275 -0
  461. package/skills/tier-2/claude-code/SKILL.md +188 -0
  462. package/skills/tier-2/claude-code/references/advanced-features.md +399 -0
  463. package/skills/tier-2/claude-code/references/agent-skills.md +399 -0
  464. package/skills/tier-2/claude-code/references/api-reference.md +498 -0
  465. package/skills/tier-2/claude-code/references/best-practices.md +447 -0
  466. package/skills/tier-2/claude-code/references/cicd-integration.md +428 -0
  467. package/skills/tier-2/claude-code/references/configuration.md +480 -0
  468. package/skills/tier-2/claude-code/references/enterprise-features.md +472 -0
  469. package/skills/tier-2/claude-code/references/getting-started.md +252 -0
  470. package/skills/tier-2/claude-code/references/hooks-and-plugins.md +441 -0
  471. package/skills/tier-2/claude-code/references/ide-integration.md +316 -0
  472. package/skills/tier-2/claude-code/references/mcp-integration.md +386 -0
  473. package/skills/tier-2/claude-code/references/slash-commands.md +489 -0
  474. package/skills/tier-2/claude-code/references/troubleshooting.md +456 -0
  475. package/skills/tier-2/codebase-onboarding/SKILL.md +233 -0
  476. package/skills/tier-2/coding-standards/SKILL.md +530 -0
  477. package/skills/tier-2/continuous-learning/SKILL.md +365 -0
  478. package/skills/tier-2/continuous-learning/agents/observer-loop.sh +191 -0
  479. package/skills/tier-2/continuous-learning/agents/observer.md +198 -0
  480. package/skills/tier-2/continuous-learning/agents/session-guardian.sh +150 -0
  481. package/skills/tier-2/continuous-learning/agents/start-observer.sh +240 -0
  482. package/skills/tier-2/continuous-learning/config.json +8 -0
  483. package/skills/tier-2/continuous-learning/hooks/observe.sh +412 -0
  484. package/skills/tier-2/continuous-learning/scripts/detect-project.sh +228 -0
  485. package/skills/tier-2/continuous-learning/scripts/instinct-cli.py +1426 -0
  486. package/skills/tier-2/continuous-learning/scripts/test_parse_instinct.py +984 -0
  487. package/skills/tier-2/database-migrations/SKILL.md +429 -0
  488. package/skills/tier-2/deployment-patterns/SKILL.md +427 -0
  489. package/skills/tier-2/design/SKILL.md +302 -0
  490. package/skills/tier-2/design/data/cip/deliverables.csv +51 -0
  491. package/skills/tier-2/design/data/cip/industries.csv +21 -0
  492. package/skills/tier-2/design/data/cip/mockup-contexts.csv +21 -0
  493. package/skills/tier-2/design/data/cip/styles.csv +21 -0
  494. package/skills/tier-2/design/data/icon/styles.csv +16 -0
  495. package/skills/tier-2/design/data/logo/colors.csv +56 -0
  496. package/skills/tier-2/design/data/logo/industries.csv +56 -0
  497. package/skills/tier-2/design/data/logo/styles.csv +56 -0
  498. package/skills/tier-2/design/references/banner-sizes-and-styles.md +118 -0
  499. package/skills/tier-2/design/references/cip-deliverable-guide.md +95 -0
  500. package/skills/tier-2/design/references/cip-design.md +121 -0
  501. package/skills/tier-2/design/references/cip-prompt-engineering.md +84 -0
  502. package/skills/tier-2/design/references/cip-style-guide.md +68 -0
  503. package/skills/tier-2/design/references/design-routing.md +207 -0
  504. package/skills/tier-2/design/references/icon-design.md +122 -0
  505. package/skills/tier-2/design/references/logo-color-psychology.md +101 -0
  506. package/skills/tier-2/design/references/logo-design.md +92 -0
  507. package/skills/tier-2/design/references/logo-prompt-engineering.md +158 -0
  508. package/skills/tier-2/design/references/logo-style-guide.md +109 -0
  509. package/skills/tier-2/design/references/slides-copywriting-formulas.md +84 -0
  510. package/skills/tier-2/design/references/slides-create.md +4 -0
  511. package/skills/tier-2/design/references/slides-html-template.md +295 -0
  512. package/skills/tier-2/design/references/slides-layout-patterns.md +137 -0
  513. package/skills/tier-2/design/references/slides-strategies.md +94 -0
  514. package/skills/tier-2/design/references/slides.md +42 -0
  515. package/skills/tier-2/design/references/social-photos-design.md +329 -0
  516. package/skills/tier-2/design/scripts/cip/core.py +215 -0
  517. package/skills/tier-2/design/scripts/cip/generate.py +484 -0
  518. package/skills/tier-2/design/scripts/cip/render-html.py +424 -0
  519. package/skills/tier-2/design/scripts/cip/search.py +127 -0
  520. package/skills/tier-2/design/scripts/icon/generate.py +487 -0
  521. package/skills/tier-2/design/scripts/logo/core.py +175 -0
  522. package/skills/tier-2/design/scripts/logo/generate.py +362 -0
  523. package/skills/tier-2/design/scripts/logo/search.py +114 -0
  524. package/skills/tier-2/design-system/SKILL.md +244 -0
  525. package/skills/tier-2/design-system/data/slide-backgrounds.csv +11 -0
  526. package/skills/tier-2/design-system/data/slide-charts.csv +26 -0
  527. package/skills/tier-2/design-system/data/slide-color-logic.csv +14 -0
  528. package/skills/tier-2/design-system/data/slide-copy.csv +26 -0
  529. package/skills/tier-2/design-system/data/slide-layout-logic.csv +16 -0
  530. package/skills/tier-2/design-system/data/slide-layouts.csv +26 -0
  531. package/skills/tier-2/design-system/data/slide-strategies.csv +16 -0
  532. package/skills/tier-2/design-system/data/slide-typography.csv +15 -0
  533. package/skills/tier-2/design-system/references/component-specs.md +236 -0
  534. package/skills/tier-2/design-system/references/component-tokens.md +214 -0
  535. package/skills/tier-2/design-system/references/primitive-tokens.md +203 -0
  536. package/skills/tier-2/design-system/references/semantic-tokens.md +215 -0
  537. package/skills/tier-2/design-system/references/states-and-variants.md +241 -0
  538. package/skills/tier-2/design-system/references/tailwind-integration.md +251 -0
  539. package/skills/tier-2/design-system/references/token-architecture.md +224 -0
  540. package/skills/tier-2/design-system/scripts/embed-tokens.cjs +99 -0
  541. package/skills/tier-2/design-system/scripts/fetch-background.py +317 -0
  542. package/skills/tier-2/design-system/scripts/generate-slide.py +753 -0
  543. package/skills/tier-2/design-system/scripts/generate-tokens.cjs +205 -0
  544. package/skills/tier-2/design-system/scripts/html-token-validator.py +327 -0
  545. package/skills/tier-2/design-system/scripts/search-slides.py +218 -0
  546. package/skills/tier-2/design-system/scripts/slide-token-validator.py +35 -0
  547. package/skills/tier-2/design-system/scripts/slide_search_core.py +453 -0
  548. package/skills/tier-2/design-system/scripts/validate-tokens.cjs +251 -0
  549. package/skills/tier-2/design-system/templates/design-tokens-starter.json +143 -0
  550. package/skills/tier-2/docker-patterns/SKILL.md +364 -0
  551. package/skills/tier-2/e2e-testing/SKILL.md +326 -0
  552. package/skills/tier-2/eval-harness/SKILL.md +270 -0
  553. package/skills/tier-2/frontend-patterns/SKILL.md +642 -0
  554. package/skills/tier-2/google-adk-python/SKILL.md +242 -0
  555. package/skills/tier-2/mcp-management/README.md +219 -0
  556. package/skills/tier-2/mcp-management/SKILL.md +209 -0
  557. package/skills/tier-2/mcp-management/assets/tools.json +3146 -0
  558. package/skills/tier-2/mcp-management/references/configuration.md +114 -0
  559. package/skills/tier-2/mcp-management/references/gemini-cli-integration.md +215 -0
  560. package/skills/tier-2/mcp-management/references/mcp-protocol.md +116 -0
  561. package/skills/tier-2/mcp-management/scripts/.env.example +10 -0
  562. package/skills/tier-2/mcp-management/scripts/cli.ts +195 -0
  563. package/skills/tier-2/mcp-management/scripts/dist/analyze-tools.js +70 -0
  564. package/skills/tier-2/mcp-management/scripts/dist/cli.js +127 -0
  565. package/skills/tier-2/mcp-management/scripts/dist/mcp-client.js +115 -0
  566. package/skills/tier-2/mcp-management/scripts/mcp-client.ts +230 -0
  567. package/skills/tier-2/mcp-management/scripts/package.json +20 -0
  568. package/skills/tier-2/mcp-management/scripts/tsconfig.json +15 -0
  569. package/skills/tier-2/mcp-server-patterns/SKILL.md +67 -0
  570. package/skills/tier-2/media-processing/SKILL.md +358 -0
  571. package/skills/tier-2/media-processing/references/ffmpeg-encoding.md +358 -0
  572. package/skills/tier-2/media-processing/references/ffmpeg-filters.md +503 -0
  573. package/skills/tier-2/media-processing/references/ffmpeg-streaming.md +403 -0
  574. package/skills/tier-2/media-processing/references/format-compatibility.md +375 -0
  575. package/skills/tier-2/media-processing/references/imagemagick-batch.md +612 -0
  576. package/skills/tier-2/media-processing/references/imagemagick-editing.md +623 -0
  577. package/skills/tier-2/media-processing/scripts/batch_resize.py +342 -0
  578. package/skills/tier-2/media-processing/scripts/media_convert.py +311 -0
  579. package/skills/tier-2/media-processing/scripts/requirements.txt +24 -0
  580. package/skills/tier-2/media-processing/scripts/tests/.coverage +0 -0
  581. package/skills/tier-2/media-processing/scripts/tests/requirements.txt +2 -0
  582. package/skills/tier-2/media-processing/scripts/tests/test_batch_resize.py +372 -0
  583. package/skills/tier-2/media-processing/scripts/tests/test_media_convert.py +259 -0
  584. package/skills/tier-2/media-processing/scripts/tests/test_video_optimize.py +397 -0
  585. package/skills/tier-2/media-processing/scripts/video_optimize.py +414 -0
  586. package/skills/tier-2/mobile-development/SKILL.md +212 -0
  587. package/skills/tier-2/mobile-development/references/mobile-android.md +604 -0
  588. package/skills/tier-2/mobile-development/references/mobile-best-practices.md +545 -0
  589. package/skills/tier-2/mobile-development/references/mobile-debugging.md +1089 -0
  590. package/skills/tier-2/mobile-development/references/mobile-frameworks.md +465 -0
  591. package/skills/tier-2/mobile-development/references/mobile-ios.md +496 -0
  592. package/skills/tier-2/mobile-development/references/mobile-mindset.md +544 -0
  593. package/skills/tier-2/payment-integration/README.md +185 -0
  594. package/skills/tier-2/payment-integration/SKILL.md +118 -0
  595. package/skills/tier-2/payment-integration/references/polar/benefits.md +396 -0
  596. package/skills/tier-2/payment-integration/references/polar/best-practices.md +482 -0
  597. package/skills/tier-2/payment-integration/references/polar/checkouts.md +266 -0
  598. package/skills/tier-2/payment-integration/references/polar/overview.md +184 -0
  599. package/skills/tier-2/payment-integration/references/polar/products.md +244 -0
  600. package/skills/tier-2/payment-integration/references/polar/sdk.md +436 -0
  601. package/skills/tier-2/payment-integration/references/polar/subscriptions.md +340 -0
  602. package/skills/tier-2/payment-integration/references/polar/webhooks.md +405 -0
  603. package/skills/tier-2/payment-integration/references/sepay/api.md +140 -0
  604. package/skills/tier-2/payment-integration/references/sepay/best-practices.md +337 -0
  605. package/skills/tier-2/payment-integration/references/sepay/overview.md +138 -0
  606. package/skills/tier-2/payment-integration/references/sepay/qr-codes.md +228 -0
  607. package/skills/tier-2/payment-integration/references/sepay/sdk.md +213 -0
  608. package/skills/tier-2/payment-integration/references/sepay/webhooks.md +208 -0
  609. package/skills/tier-2/payment-integration/scripts/.env.example +20 -0
  610. package/skills/tier-2/payment-integration/scripts/checkout-helper.js +244 -0
  611. package/skills/tier-2/payment-integration/scripts/package.json +17 -0
  612. package/skills/tier-2/payment-integration/scripts/polar-webhook-verify.js +202 -0
  613. package/skills/tier-2/payment-integration/scripts/sepay-webhook-verify.js +193 -0
  614. package/skills/tier-2/payment-integration/scripts/test-scripts.js +237 -0
  615. package/skills/tier-2/planning/SKILL.md +88 -0
  616. package/skills/tier-2/planning/references/codebase-understanding.md +62 -0
  617. package/skills/tier-2/planning/references/output-standards.md +87 -0
  618. package/skills/tier-2/planning/references/plan-organization.md +100 -0
  619. package/skills/tier-2/planning/references/research-phase.md +49 -0
  620. package/skills/tier-2/planning/references/solution-design.md +63 -0
  621. package/skills/tier-2/postgres-patterns/SKILL.md +147 -0
  622. package/skills/tier-2/problem-solving/SKILL.md +96 -0
  623. package/skills/tier-2/problem-solving/references/attribution.md +69 -0
  624. package/skills/tier-2/problem-solving/references/collision-zone-thinking.md +79 -0
  625. package/skills/tier-2/problem-solving/references/inversion-exercise.md +91 -0
  626. package/skills/tier-2/problem-solving/references/meta-pattern-recognition.md +87 -0
  627. package/skills/tier-2/problem-solving/references/scale-game.md +95 -0
  628. package/skills/tier-2/problem-solving/references/simplification-cascades.md +80 -0
  629. package/skills/tier-2/problem-solving/references/when-stuck.md +72 -0
  630. package/skills/tier-2/strategic-compact/SKILL.md +131 -0
  631. package/skills/tier-2/strategic-compact/suggest-compact.sh +54 -0
  632. package/skills/tier-2/verification-loop/SKILL.md +126 -0
  633. package/skills/tier-3/agentic-engineering/SKILL.md +63 -0
  634. package/skills/tier-3/banner-design/SKILL.md +192 -0
  635. package/skills/tier-3/banner-design/references/banner-sizes-and-styles.md +118 -0
  636. package/skills/tier-3/cost-aware-llm-pipeline/SKILL.md +183 -0
  637. package/skills/tier-3/django-patterns/SKILL.md +734 -0
  638. package/skills/tier-3/golang-patterns/SKILL.md +674 -0
  639. package/skills/tier-3/kotlin-patterns/SKILL.md +711 -0
  640. package/skills/tier-3/laravel-patterns/SKILL.md +415 -0
  641. package/skills/tier-3/prompt-optimizer/SKILL.md +397 -0
  642. package/skills/tier-3/python-patterns/SKILL.md +750 -0
  643. package/skills/tier-3/pytorch-patterns/SKILL.md +396 -0
  644. package/skills/tier-3/rust-patterns/SKILL.md +499 -0
  645. package/skills/tier-3/shopify/README.md +66 -0
  646. package/skills/tier-3/shopify/SKILL.md +319 -0
  647. package/skills/tier-3/shopify/references/app-development.md +470 -0
  648. package/skills/tier-3/shopify/references/extensions.md +493 -0
  649. package/skills/tier-3/shopify/references/themes.md +498 -0
  650. package/skills/tier-3/shopify/scripts/.coverage +0 -0
  651. package/skills/tier-3/shopify/scripts/requirements.txt +19 -0
  652. package/skills/tier-3/shopify/scripts/shopify_init.py +423 -0
  653. package/skills/tier-3/shopify/scripts/tests/.coverage +0 -0
  654. package/skills/tier-3/shopify/scripts/tests/test_shopify_init.py +385 -0
  655. package/skills/tier-3/slides/SKILL.md +42 -0
  656. package/skills/tier-3/slides/references/copywriting-formulas.md +84 -0
  657. package/skills/tier-3/slides/references/create.md +4 -0
  658. package/skills/tier-3/slides/references/html-template.md +295 -0
  659. package/skills/tier-3/slides/references/layout-patterns.md +137 -0
  660. package/skills/tier-3/slides/references/slide-strategies.md +94 -0
  661. package/skills/tier-3/springboot-patterns/SKILL.md +314 -0
  662. package/skills/tier-3/swiftui-patterns/SKILL.md +259 -0
  663. package/skills/tier-3/threejs/SKILL.md +89 -0
  664. package/skills/tier-3/threejs/references/01-getting-started.md +177 -0
  665. package/skills/tier-3/threejs/references/02-loaders.md +169 -0
  666. package/skills/tier-3/threejs/references/03-textures.md +170 -0
  667. package/skills/tier-3/threejs/references/04-cameras.md +195 -0
  668. package/skills/tier-3/threejs/references/05-lights.md +183 -0
  669. package/skills/tier-3/threejs/references/06-animations.md +214 -0
  670. package/skills/tier-3/threejs/references/07-math.md +260 -0
  671. package/skills/tier-3/threejs/references/08-interaction.md +267 -0
  672. package/skills/tier-3/threejs/references/09-postprocessing.md +240 -0
  673. package/skills/tier-3/threejs/references/10-controls.md +259 -0
  674. package/skills/tier-3/threejs/references/11-materials-advanced.md +270 -0
  675. package/skills/tier-3/threejs/references/12-performance.md +269 -0
  676. package/skills/tier-3/threejs/references/13-node-materials.md +298 -0
  677. package/skills/tier-3/threejs/references/14-physics-vr.md +304 -0
  678. package/skills/tier-3/threejs/references/15-specialized-loaders.md +333 -0
  679. package/skills/tier-3/threejs/references/16-webgpu.md +302 -0
  680. package/skills/tier-3/vercel-deploy/SKILL.md +112 -0
  681. package/skills/tier-3/vercel-deploy/scripts/deploy.sh +249 -0
  682. package/workflows/development-rules.md +49 -0
  683. package/workflows/orchestration-protocol.md +16 -0
  684. package/workflows/primary-workflow.md +52 -0
@@ -0,0 +1,487 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """
4
+ Icon Generation Script using Gemini 3.1 Pro Preview API
5
+ Generates SVG icons via text generation (SVG is XML text format)
6
+
7
+ Model: gemini-3.1-pro-preview - best thinking, token efficiency, factual consistency
8
+
9
+ Usage:
10
+ python generate.py --prompt "settings gear icon" --style outlined
11
+ python generate.py --prompt "shopping cart" --style filled --color "#6366F1"
12
+ python generate.py --name "dashboard" --category navigation --style duotone
13
+ python generate.py --prompt "cloud upload" --batch 4 --output-dir ./icons
14
+ python generate.py --prompt "user profile" --sizes "16,24,32,48"
15
+ """
16
+
17
+ import argparse
18
+ import json
19
+ import os
20
+ import re
21
+ import sys
22
+ import time
23
+ from pathlib import Path
24
+ from datetime import datetime
25
+
26
+
27
+ def load_env():
28
+ """Load .env files in priority order"""
29
+ env_paths = [
30
+ Path(__file__).parent.parent.parent / ".env",
31
+ Path.home() / ".claude" / "skills" / ".env",
32
+ Path.home() / ".claude" / ".env"
33
+ ]
34
+ for env_path in env_paths:
35
+ if env_path.exists():
36
+ with open(env_path) as f:
37
+ for line in f:
38
+ line = line.strip()
39
+ if line and not line.startswith('#') and '=' in line:
40
+ key, value = line.split('=', 1)
41
+ if key not in os.environ:
42
+ os.environ[key] = value.strip('"\'')
43
+
44
+ load_env()
45
+
46
+ try:
47
+ from google import genai
48
+ from google.genai import types
49
+ except ImportError:
50
+ print("Error: google-genai package not installed.")
51
+ print("Install with: pip install google-genai")
52
+ sys.exit(1)
53
+
54
+
55
+ # ============ CONFIGURATION ============
56
+ GEMINI_API_KEY = os.environ.get("GEMINI_API_KEY")
57
+ MODEL = "gemini-3.1-pro-preview"
58
+
59
+ # Icon styles with SVG-specific instructions
60
+ ICON_STYLES = {
61
+ "outlined": "outlined stroke icons, 2px stroke width, no fill, clean open paths",
62
+ "filled": "solid filled icons, no stroke, flat color fills, bold shapes",
63
+ "duotone": "duotone style with primary color at full opacity and secondary color at 30% opacity, layered shapes",
64
+ "thin": "thin line icons, 1px or 1.5px stroke width, delicate minimalist lines",
65
+ "bold": "bold thick line icons, 3px stroke width, heavy weight, impactful",
66
+ "rounded": "rounded icons with round line caps and joins, soft corners, friendly feel",
67
+ "sharp": "sharp angular icons, square line caps and mitered joins, precise edges",
68
+ "flat": "flat design icons, solid fills, no gradients or shadows, geometric simplicity",
69
+ "gradient": "linear or radial gradient fills, modern vibrant color transitions",
70
+ "glassmorphism": "glassmorphism style with semi-transparent fills, blur backdrop effect simulation, frosted glass",
71
+ "pixel": "pixel art style icons on a grid, retro 8-bit aesthetic, crisp edges",
72
+ "hand-drawn": "hand-drawn sketch style, slightly irregular strokes, organic feel, imperfect lines",
73
+ "isometric": "isometric 3D projection, 30-degree angles, dimensional depth",
74
+ "glyph": "simple glyph style, single solid shape, minimal detail, pictogram",
75
+ "animated-ready": "animated-ready SVG with named groups and IDs for CSS/JS animation targets",
76
+ }
77
+
78
+ ICON_CATEGORIES = {
79
+ "navigation": "arrows, menus, hamburger, chevrons, home, back, forward, breadcrumb",
80
+ "action": "edit, delete, save, download, upload, share, copy, paste, print, search",
81
+ "communication": "email, chat, phone, video call, notification, bell, message bubble",
82
+ "media": "play, pause, stop, skip, volume, microphone, camera, image, gallery",
83
+ "file": "document, folder, archive, attachment, cloud, database, storage",
84
+ "user": "person, group, avatar, profile, settings, lock, key, shield",
85
+ "commerce": "cart, bag, wallet, credit card, receipt, tag, gift, store",
86
+ "data": "chart, graph, analytics, dashboard, table, filter, sort, calendar",
87
+ "development": "code, terminal, bug, git, API, server, database, deploy",
88
+ "social": "heart, star, thumbs up, bookmark, flag, trophy, badge, crown",
89
+ "weather": "sun, moon, cloud, rain, snow, wind, thunder, temperature",
90
+ "map": "pin, location, compass, globe, route, directions, map marker",
91
+ }
92
+
93
+ # SVG generation prompt template
94
+ SVG_PROMPT_TEMPLATE = """Generate a clean, production-ready SVG icon.
95
+
96
+ Requirements:
97
+ - Output ONLY valid SVG code, nothing else
98
+ - ViewBox: "0 0 {viewbox} {viewbox}"
99
+ - Use currentColor for strokes/fills (inherits CSS color)
100
+ - No embedded fonts or text elements unless specifically requested
101
+ - No raster images or external references
102
+ - Optimized paths with minimal nodes
103
+ - Accessible: include <title> element with icon description
104
+ {style_instructions}
105
+ {color_instructions}
106
+ {size_instructions}
107
+
108
+ Icon to generate: {prompt}
109
+
110
+ Output the SVG code only, wrapped in ```svg``` code block."""
111
+
112
+ SVG_BATCH_PROMPT_TEMPLATE = """Generate {count} distinct SVG icon variations for: {prompt}
113
+
114
+ Requirements for EACH icon:
115
+ - Output ONLY valid SVG code
116
+ - ViewBox: "0 0 {viewbox} {viewbox}"
117
+ - Use currentColor for strokes/fills (inherits CSS color)
118
+ - No embedded fonts, raster images, or external references
119
+ - Optimized paths with minimal nodes
120
+ - Include <title> element with icon description
121
+ {style_instructions}
122
+ {color_instructions}
123
+
124
+ Generate {count} different visual interpretations. Output each SVG in a separate ```svg``` code block.
125
+ Label each variation (e.g., "Variation 1: [brief description]")."""
126
+
127
+
128
+ def extract_svgs(text):
129
+ """Extract SVG code blocks from model response"""
130
+ svgs = []
131
+
132
+ # Try ```svg code blocks first
133
+ pattern = r'```svg\s*\n(.*?)```'
134
+ matches = re.findall(pattern, text, re.DOTALL)
135
+ if matches:
136
+ svgs.extend(matches)
137
+
138
+ # Fallback: try ```xml code blocks
139
+ if not svgs:
140
+ pattern = r'```xml\s*\n(.*?)```'
141
+ matches = re.findall(pattern, text, re.DOTALL)
142
+ svgs.extend(matches)
143
+
144
+ # Fallback: try bare <svg> tags
145
+ if not svgs:
146
+ pattern = r'(<svg[^>]*>.*?</svg>)'
147
+ matches = re.findall(pattern, text, re.DOTALL)
148
+ svgs.extend(matches)
149
+
150
+ # Clean up extracted SVGs
151
+ cleaned = []
152
+ for svg in svgs:
153
+ svg = svg.strip()
154
+ if not svg.startswith('<svg'):
155
+ # Try to find <svg> within the extracted text
156
+ match = re.search(r'(<svg[^>]*>.*?</svg>)', svg, re.DOTALL)
157
+ if match:
158
+ svg = match.group(1)
159
+ else:
160
+ continue
161
+ cleaned.append(svg)
162
+
163
+ return cleaned
164
+
165
+
166
+ def apply_color(svg_code, color):
167
+ """Replace currentColor with specific color if provided"""
168
+ if color:
169
+ # Replace currentColor with the specified color
170
+ svg_code = svg_code.replace('currentColor', color)
171
+ # If no currentColor was present, add fill/stroke color
172
+ if color not in svg_code:
173
+ svg_code = svg_code.replace('<svg', f'<svg color="{color}"', 1)
174
+ return svg_code
175
+
176
+
177
+ def apply_viewbox_size(svg_code, size):
178
+ """Adjust SVG viewBox to target size"""
179
+ if size:
180
+ # Update width/height attributes if present
181
+ svg_code = re.sub(r'width="[^"]*"', f'width="{size}"', svg_code)
182
+ svg_code = re.sub(r'height="[^"]*"', f'height="{size}"', svg_code)
183
+ # Add width/height if not present
184
+ if 'width=' not in svg_code:
185
+ svg_code = svg_code.replace('<svg', f'<svg width="{size}" height="{size}"', 1)
186
+ return svg_code
187
+
188
+
189
+ def generate_icon(prompt, style=None, category=None, name=None,
190
+ color=None, size=24, output_path=None, viewbox=24):
191
+ """Generate a single SVG icon using Gemini 3.1 Pro Preview"""
192
+
193
+ if not GEMINI_API_KEY:
194
+ print("Error: GEMINI_API_KEY not set")
195
+ print("Set it with: export GEMINI_API_KEY='your-key'")
196
+ return None
197
+
198
+ client = genai.Client(api_key=GEMINI_API_KEY)
199
+
200
+ # Build style instructions
201
+ style_instructions = ""
202
+ if style and style in ICON_STYLES:
203
+ style_instructions = f"- Style: {ICON_STYLES[style]}"
204
+
205
+ # Build color instructions
206
+ color_instructions = "- Use currentColor for all strokes and fills"
207
+ if color:
208
+ color_instructions = f"- Use color: {color} for primary elements, currentColor for secondary"
209
+
210
+ # Build size instructions
211
+ size_instructions = f"- Design for {size}px display size, optimize detail level accordingly"
212
+
213
+ # Build final prompt
214
+ icon_prompt = prompt
215
+ if category and category in ICON_CATEGORIES:
216
+ icon_prompt = f"{prompt} (category: {ICON_CATEGORIES[category]})"
217
+ if name:
218
+ icon_prompt = f"'{name}' icon: {icon_prompt}"
219
+
220
+ full_prompt = SVG_PROMPT_TEMPLATE.format(
221
+ prompt=icon_prompt,
222
+ viewbox=viewbox,
223
+ style_instructions=style_instructions,
224
+ color_instructions=color_instructions,
225
+ size_instructions=size_instructions
226
+ )
227
+
228
+ print(f"Generating icon with {MODEL}...")
229
+ print(f"Prompt: {prompt}")
230
+ if style:
231
+ print(f"Style: {style}")
232
+ print()
233
+
234
+ try:
235
+ response = client.models.generate_content(
236
+ model=MODEL,
237
+ contents=full_prompt,
238
+ config=types.GenerateContentConfig(
239
+ temperature=0.7,
240
+ max_output_tokens=4096,
241
+ )
242
+ )
243
+
244
+ # Extract SVG from response
245
+ response_text = response.text if hasattr(response, 'text') else ""
246
+ if not response_text:
247
+ for part in response.candidates[0].content.parts:
248
+ if hasattr(part, 'text') and part.text:
249
+ response_text += part.text
250
+
251
+ svgs = extract_svgs(response_text)
252
+
253
+ if not svgs:
254
+ print("No valid SVG generated. Model response:")
255
+ print(response_text[:500])
256
+ return None
257
+
258
+ svg_code = svgs[0]
259
+
260
+ # Apply color if specified
261
+ svg_code = apply_color(svg_code, color)
262
+
263
+ # Apply size
264
+ svg_code = apply_viewbox_size(svg_code, size)
265
+
266
+ # Determine output path
267
+ if output_path is None:
268
+ timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
269
+ slug = name or prompt.split()[0] if prompt else "icon"
270
+ slug = re.sub(r'[^a-zA-Z0-9_-]', '_', slug.lower())
271
+ style_suffix = f"_{style}" if style else ""
272
+ output_path = f"{slug}{style_suffix}_{timestamp}.svg"
273
+
274
+ # Save SVG
275
+ with open(output_path, "w", encoding="utf-8") as f:
276
+ f.write(svg_code)
277
+
278
+ print(f"Icon saved to: {output_path}")
279
+ return output_path
280
+
281
+ except Exception as e:
282
+ print(f"Error generating icon: {e}")
283
+ return None
284
+
285
+
286
+ def generate_batch(prompt, count, output_dir, style=None, color=None,
287
+ viewbox=24, name=None):
288
+ """Generate multiple icon variations"""
289
+
290
+ if not GEMINI_API_KEY:
291
+ print("Error: GEMINI_API_KEY not set")
292
+ return []
293
+
294
+ client = genai.Client(api_key=GEMINI_API_KEY)
295
+ os.makedirs(output_dir, exist_ok=True)
296
+
297
+ # Build instructions
298
+ style_instructions = ""
299
+ if style and style in ICON_STYLES:
300
+ style_instructions = f"- Style: {ICON_STYLES[style]}"
301
+
302
+ color_instructions = "- Use currentColor for all strokes and fills"
303
+ if color:
304
+ color_instructions = f"- Use color: {color} for primary elements"
305
+
306
+ full_prompt = SVG_BATCH_PROMPT_TEMPLATE.format(
307
+ prompt=prompt,
308
+ count=count,
309
+ viewbox=viewbox,
310
+ style_instructions=style_instructions,
311
+ color_instructions=color_instructions
312
+ )
313
+
314
+ print(f"\n{'='*60}")
315
+ print(f" BATCH ICON GENERATION")
316
+ print(f" Model: {MODEL}")
317
+ print(f" Prompt: {prompt}")
318
+ print(f" Variants: {count}")
319
+ print(f" Output: {output_dir}")
320
+ print(f"{'='*60}\n")
321
+
322
+ try:
323
+ response = client.models.generate_content(
324
+ model=MODEL,
325
+ contents=full_prompt,
326
+ config=types.GenerateContentConfig(
327
+ temperature=0.9,
328
+ max_output_tokens=16384,
329
+ )
330
+ )
331
+
332
+ response_text = response.text if hasattr(response, 'text') else ""
333
+ if not response_text:
334
+ for part in response.candidates[0].content.parts:
335
+ if hasattr(part, 'text') and part.text:
336
+ response_text += part.text
337
+
338
+ svgs = extract_svgs(response_text)
339
+
340
+ if not svgs:
341
+ print("No valid SVGs generated.")
342
+ print(response_text[:500])
343
+ return []
344
+
345
+ results = []
346
+ slug = name or re.sub(r'[^a-zA-Z0-9_-]', '_', prompt.split()[0].lower())
347
+ style_suffix = f"_{style}" if style else ""
348
+
349
+ for i, svg_code in enumerate(svgs[:count]):
350
+ svg_code = apply_color(svg_code, color)
351
+ filename = f"{slug}{style_suffix}_{i+1:02d}.svg"
352
+ filepath = os.path.join(output_dir, filename)
353
+
354
+ with open(filepath, "w", encoding="utf-8") as f:
355
+ f.write(svg_code)
356
+
357
+ results.append(filepath)
358
+ print(f" [{i+1}/{len(svgs[:count])}] Saved: {filename}")
359
+
360
+ print(f"\n{'='*60}")
361
+ print(f" BATCH COMPLETE: {len(results)}/{count} icons generated")
362
+ print(f"{'='*60}\n")
363
+
364
+ return results
365
+
366
+ except Exception as e:
367
+ print(f"Error generating icons: {e}")
368
+ return []
369
+
370
+
371
+ def generate_sizes(prompt, sizes, style=None, color=None, output_dir=None, name=None):
372
+ """Generate same icon at multiple sizes"""
373
+ if output_dir is None:
374
+ output_dir = "."
375
+ os.makedirs(output_dir, exist_ok=True)
376
+
377
+ results = []
378
+ slug = name or re.sub(r'[^a-zA-Z0-9_-]', '_', prompt.split()[0].lower())
379
+ style_suffix = f"_{style}" if style else ""
380
+
381
+ for size in sizes:
382
+ print(f"Generating {size}px variant...")
383
+ filename = f"{slug}{style_suffix}_{size}px.svg"
384
+ filepath = os.path.join(output_dir, filename)
385
+
386
+ result = generate_icon(
387
+ prompt=prompt,
388
+ style=style,
389
+ color=color,
390
+ size=size,
391
+ output_path=filepath,
392
+ viewbox=size
393
+ )
394
+
395
+ if result:
396
+ results.append(result)
397
+
398
+ time.sleep(1)
399
+
400
+ return results
401
+
402
+
403
+ def main():
404
+ parser = argparse.ArgumentParser(
405
+ description="Generate SVG icons using Gemini 3.1 Pro Preview"
406
+ )
407
+ parser.add_argument("--prompt", "-p", type=str, help="Icon description")
408
+ parser.add_argument("--name", "-n", type=str, help="Icon name (for filename)")
409
+ parser.add_argument("--style", "-s", choices=list(ICON_STYLES.keys()),
410
+ help="Icon style")
411
+ parser.add_argument("--category", "-c", choices=list(ICON_CATEGORIES.keys()),
412
+ help="Icon category for context")
413
+ parser.add_argument("--color", type=str,
414
+ help="Primary color (hex, e.g. #6366F1). Default: currentColor")
415
+ parser.add_argument("--size", type=int, default=24,
416
+ help="Icon size in px (default: 24)")
417
+ parser.add_argument("--viewbox", type=int, default=24,
418
+ help="SVG viewBox size (default: 24)")
419
+ parser.add_argument("--output", "-o", type=str, help="Output file path")
420
+ parser.add_argument("--output-dir", type=str, help="Output directory for batch")
421
+ parser.add_argument("--batch", type=int,
422
+ help="Number of icon variants to generate")
423
+ parser.add_argument("--sizes", type=str,
424
+ help="Comma-separated sizes (e.g. '16,24,32,48')")
425
+ parser.add_argument("--list-styles", action="store_true",
426
+ help="List available icon styles")
427
+ parser.add_argument("--list-categories", action="store_true",
428
+ help="List available icon categories")
429
+
430
+ args = parser.parse_args()
431
+
432
+ if args.list_styles:
433
+ print("Available icon styles:")
434
+ for style, desc in ICON_STYLES.items():
435
+ print(f" {style}: {desc[:70]}...")
436
+ return
437
+
438
+ if args.list_categories:
439
+ print("Available icon categories:")
440
+ for cat, desc in ICON_CATEGORIES.items():
441
+ print(f" {cat}: {desc}")
442
+ return
443
+
444
+ if not args.prompt and not args.name:
445
+ parser.error("Either --prompt or --name is required")
446
+
447
+ prompt = args.prompt or args.name
448
+
449
+ # Multi-size mode
450
+ if args.sizes:
451
+ sizes = [int(s.strip()) for s in args.sizes.split(",")]
452
+ generate_sizes(
453
+ prompt=prompt,
454
+ sizes=sizes,
455
+ style=args.style,
456
+ color=args.color,
457
+ output_dir=args.output_dir or "./icons",
458
+ name=args.name
459
+ )
460
+ # Batch mode
461
+ elif args.batch:
462
+ output_dir = args.output_dir or "./icons"
463
+ generate_batch(
464
+ prompt=prompt,
465
+ count=args.batch,
466
+ output_dir=output_dir,
467
+ style=args.style,
468
+ color=args.color,
469
+ viewbox=args.viewbox,
470
+ name=args.name
471
+ )
472
+ # Single icon
473
+ else:
474
+ generate_icon(
475
+ prompt=prompt,
476
+ style=args.style,
477
+ category=args.category,
478
+ name=args.name,
479
+ color=args.color,
480
+ size=args.size,
481
+ output_path=args.output,
482
+ viewbox=args.viewbox
483
+ )
484
+
485
+
486
+ if __name__ == "__main__":
487
+ main()
@@ -0,0 +1,175 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """
4
+ Logo Design Core - BM25 search engine for logo design guidelines
5
+ """
6
+
7
+ import csv
8
+ import re
9
+ from pathlib import Path
10
+ from math import log
11
+ from collections import defaultdict
12
+
13
+ # ============ CONFIGURATION ============
14
+ DATA_DIR = Path(__file__).parent.parent.parent / "data" / "logo"
15
+ MAX_RESULTS = 3
16
+
17
+ CSV_CONFIG = {
18
+ "style": {
19
+ "file": "styles.csv",
20
+ "search_cols": ["Style Name", "Category", "Keywords", "Best For"],
21
+ "output_cols": ["Style Name", "Category", "Keywords", "Primary Colors", "Secondary Colors", "Typography", "Effects", "Best For", "Avoid For", "Complexity", "Era"]
22
+ },
23
+ "color": {
24
+ "file": "colors.csv",
25
+ "search_cols": ["Palette Name", "Category", "Keywords", "Psychology", "Best For"],
26
+ "output_cols": ["Palette Name", "Category", "Keywords", "Primary Hex", "Secondary Hex", "Accent Hex", "Background Hex", "Text Hex", "Psychology", "Best For", "Avoid For"]
27
+ },
28
+ "industry": {
29
+ "file": "industries.csv",
30
+ "search_cols": ["Industry", "Keywords", "Recommended Styles", "Mood"],
31
+ "output_cols": ["Industry", "Keywords", "Recommended Styles", "Primary Colors", "Typography", "Common Symbols", "Mood", "Best Practices", "Avoid"]
32
+ }
33
+ }
34
+
35
+
36
+ # ============ BM25 IMPLEMENTATION ============
37
+ class BM25:
38
+ """BM25 ranking algorithm for text search"""
39
+
40
+ def __init__(self, k1=1.5, b=0.75):
41
+ self.k1 = k1
42
+ self.b = b
43
+ self.corpus = []
44
+ self.doc_lengths = []
45
+ self.avgdl = 0
46
+ self.idf = {}
47
+ self.doc_freqs = defaultdict(int)
48
+ self.N = 0
49
+
50
+ def tokenize(self, text):
51
+ """Lowercase, split, remove punctuation, filter short words"""
52
+ text = re.sub(r'[^\w\s]', ' ', str(text).lower())
53
+ return [w for w in text.split() if len(w) > 2]
54
+
55
+ def fit(self, documents):
56
+ """Build BM25 index from documents"""
57
+ self.corpus = [self.tokenize(doc) for doc in documents]
58
+ self.N = len(self.corpus)
59
+ if self.N == 0:
60
+ return
61
+ self.doc_lengths = [len(doc) for doc in self.corpus]
62
+ self.avgdl = sum(self.doc_lengths) / self.N
63
+
64
+ for doc in self.corpus:
65
+ seen = set()
66
+ for word in doc:
67
+ if word not in seen:
68
+ self.doc_freqs[word] += 1
69
+ seen.add(word)
70
+
71
+ for word, freq in self.doc_freqs.items():
72
+ self.idf[word] = log((self.N - freq + 0.5) / (freq + 0.5) + 1)
73
+
74
+ def score(self, query):
75
+ """Score all documents against query"""
76
+ query_tokens = self.tokenize(query)
77
+ scores = []
78
+
79
+ for idx, doc in enumerate(self.corpus):
80
+ score = 0
81
+ doc_len = self.doc_lengths[idx]
82
+ term_freqs = defaultdict(int)
83
+ for word in doc:
84
+ term_freqs[word] += 1
85
+
86
+ for token in query_tokens:
87
+ if token in self.idf:
88
+ tf = term_freqs[token]
89
+ idf = self.idf[token]
90
+ numerator = tf * (self.k1 + 1)
91
+ denominator = tf + self.k1 * (1 - self.b + self.b * doc_len / self.avgdl)
92
+ score += idf * numerator / denominator
93
+
94
+ scores.append((idx, score))
95
+
96
+ return sorted(scores, key=lambda x: x[1], reverse=True)
97
+
98
+
99
+ # ============ SEARCH FUNCTIONS ============
100
+ def _load_csv(filepath):
101
+ """Load CSV and return list of dicts"""
102
+ with open(filepath, 'r', encoding='utf-8') as f:
103
+ return list(csv.DictReader(f))
104
+
105
+
106
+ def _search_csv(filepath, search_cols, output_cols, query, max_results):
107
+ """Core search function using BM25"""
108
+ if not filepath.exists():
109
+ return []
110
+
111
+ data = _load_csv(filepath)
112
+
113
+ # Build documents from search columns
114
+ documents = [" ".join(str(row.get(col, "")) for col in search_cols) for row in data]
115
+
116
+ # BM25 search
117
+ bm25 = BM25()
118
+ bm25.fit(documents)
119
+ ranked = bm25.score(query)
120
+
121
+ # Get top results with score > 0
122
+ results = []
123
+ for idx, score in ranked[:max_results]:
124
+ if score > 0:
125
+ row = data[idx]
126
+ results.append({col: row.get(col, "") for col in output_cols if col in row})
127
+
128
+ return results
129
+
130
+
131
+ def detect_domain(query):
132
+ """Auto-detect the most relevant domain from query"""
133
+ query_lower = query.lower()
134
+
135
+ domain_keywords = {
136
+ "style": ["style", "minimalist", "vintage", "modern", "retro", "geometric", "abstract", "emblem", "badge", "wordmark", "mascot", "luxury", "playful", "corporate"],
137
+ "color": ["color", "palette", "hex", "#", "rgb", "blue", "red", "green", "gold", "warm", "cool", "vibrant", "pastel"],
138
+ "industry": ["tech", "healthcare", "finance", "legal", "restaurant", "food", "fashion", "beauty", "education", "sports", "fitness", "real estate", "crypto", "gaming"]
139
+ }
140
+
141
+ scores = {domain: sum(1 for kw in keywords if kw in query_lower) for domain, keywords in domain_keywords.items()}
142
+ best = max(scores, key=scores.get)
143
+ return best if scores[best] > 0 else "style"
144
+
145
+
146
+ def search(query, domain=None, max_results=MAX_RESULTS):
147
+ """Main search function with auto-domain detection"""
148
+ if domain is None:
149
+ domain = detect_domain(query)
150
+
151
+ config = CSV_CONFIG.get(domain, CSV_CONFIG["style"])
152
+ filepath = DATA_DIR / config["file"]
153
+
154
+ if not filepath.exists():
155
+ return {"error": f"File not found: {filepath}", "domain": domain}
156
+
157
+ results = _search_csv(filepath, config["search_cols"], config["output_cols"], query, max_results)
158
+
159
+ return {
160
+ "domain": domain,
161
+ "query": query,
162
+ "file": config["file"],
163
+ "count": len(results),
164
+ "results": results
165
+ }
166
+
167
+
168
+ def search_all(query, max_results=2):
169
+ """Search across all domains and combine results"""
170
+ all_results = {}
171
+ for domain in CSV_CONFIG.keys():
172
+ result = search(query, domain, max_results)
173
+ if result.get("results"):
174
+ all_results[domain] = result["results"]
175
+ return all_results