claudeinone-cli 1.0.2 → 1.0.3

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 (428) hide show
  1. package/kit/.claude/.ck.json +9 -0
  2. package/kit/.claude/.ckignore +12 -0
  3. package/kit/.claude/agents/accessibility-auditor.md +46 -0
  4. package/kit/.claude/agents/api-designer.md +43 -0
  5. package/kit/.claude/agents/backend-developer.md +54 -0
  6. package/kit/.claude/agents/brainstormer.md +33 -0
  7. package/kit/.claude/agents/campaign-manager.md +36 -0
  8. package/kit/.claude/agents/code-reviewer.md +39 -0
  9. package/kit/.claude/agents/content-creator.md +38 -0
  10. package/kit/.claude/agents/copywriter.md +42 -0
  11. package/kit/.claude/agents/database-admin.md +37 -0
  12. package/kit/.claude/agents/debugger.md +46 -0
  13. package/kit/.claude/agents/devops-engineer.md +41 -0
  14. package/kit/.claude/agents/docs-manager.md +33 -0
  15. package/kit/.claude/agents/email-wizard.md +40 -0
  16. package/kit/.claude/agents/frontend-developer.md +52 -0
  17. package/kit/.claude/agents/fullstack-developer.md +55 -0
  18. package/kit/.claude/agents/git-manager.md +40 -0
  19. package/kit/.claude/agents/i18n-specialist.md +46 -0
  20. package/kit/.claude/agents/integration-specialist.md +48 -0
  21. package/kit/.claude/agents/journal-writer.md +39 -0
  22. package/kit/.claude/agents/mcp-manager.md +57 -0
  23. package/kit/.claude/agents/mobile-developer.md +38 -0
  24. package/kit/.claude/agents/performance-optimizer.md +38 -0
  25. package/kit/.claude/agents/planner.md +56 -0
  26. package/kit/.claude/agents/project-manager.md +34 -0
  27. package/kit/.claude/agents/refactorer.md +43 -0
  28. package/kit/.claude/agents/researcher.md +45 -0
  29. package/kit/.claude/agents/risk-analyst.md +33 -0
  30. package/kit/.claude/agents/scalability-consultant.md +39 -0
  31. package/kit/.claude/agents/scout.md +25 -0
  32. package/kit/.claude/agents/security-auditor.md +42 -0
  33. package/kit/.claude/agents/seo-specialist.md +44 -0
  34. package/kit/.claude/agents/skill-creator.md +64 -0
  35. package/kit/.claude/agents/social-media-manager.md +35 -0
  36. package/kit/.claude/agents/systems-designer.md +35 -0
  37. package/kit/.claude/agents/technology-strategist.md +43 -0
  38. package/kit/.claude/agents/tester.md +40 -0
  39. package/kit/.claude/agents/ui-ux-designer.md +40 -0
  40. package/kit/.claude/commands/co/ask.md +29 -0
  41. package/kit/.claude/commands/co/bootstrap-auto-fast.md +28 -0
  42. package/kit/.claude/commands/co/bootstrap-auto-parallel.md +29 -0
  43. package/kit/.claude/commands/co/bootstrap-auto.md +30 -0
  44. package/kit/.claude/commands/co/bootstrap.md +31 -0
  45. package/kit/.claude/commands/co/brainstorm.md +27 -0
  46. package/kit/.claude/commands/co/campaign.md +28 -0
  47. package/kit/.claude/commands/co/changelog.md +25 -0
  48. package/kit/.claude/commands/co/checkpoint.md +25 -0
  49. package/kit/.claude/commands/co/ci.md +26 -0
  50. package/kit/.claude/commands/co/ck-help.md +24 -0
  51. package/kit/.claude/commands/co/coding-level.md +24 -0
  52. package/kit/.claude/commands/co/content-cro.md +26 -0
  53. package/kit/.claude/commands/co/content-enhance.md +26 -0
  54. package/kit/.claude/commands/co/content-fast.md +24 -0
  55. package/kit/.claude/commands/co/content-good.md +26 -0
  56. package/kit/.claude/commands/co/cook.md +33 -0
  57. package/kit/.claude/commands/co/debug.md +26 -0
  58. package/kit/.claude/commands/co/deploy.md +25 -0
  59. package/kit/.claude/commands/co/design-3d.md +27 -0
  60. package/kit/.claude/commands/co/design-describe.md +25 -0
  61. package/kit/.claude/commands/co/design-fast.md +25 -0
  62. package/kit/.claude/commands/co/design-good.md +28 -0
  63. package/kit/.claude/commands/co/design-screenshot.md +26 -0
  64. package/kit/.claude/commands/co/design-video.md +26 -0
  65. package/kit/.claude/commands/co/docker.md +24 -0
  66. package/kit/.claude/commands/co/docs-api.md +25 -0
  67. package/kit/.claude/commands/co/docs-init.md +26 -0
  68. package/kit/.claude/commands/co/docs-readme.md +24 -0
  69. package/kit/.claude/commands/co/docs-summarize.md +25 -0
  70. package/kit/.claude/commands/co/docs-update.md +25 -0
  71. package/kit/.claude/commands/co/env-check.md +25 -0
  72. package/kit/.claude/commands/co/fix-ci.md +29 -0
  73. package/kit/.claude/commands/co/fix-fast.md +28 -0
  74. package/kit/.claude/commands/co/fix-hard.md +33 -0
  75. package/kit/.claude/commands/co/fix-logs.md +28 -0
  76. package/kit/.claude/commands/co/fix-types.md +28 -0
  77. package/kit/.claude/commands/co/fix-ui.md +28 -0
  78. package/kit/.claude/commands/co/fix.md +27 -0
  79. package/kit/.claude/commands/co/git-cm.md +26 -0
  80. package/kit/.claude/commands/co/git-cp.md +26 -0
  81. package/kit/.claude/commands/co/git-pr.md +26 -0
  82. package/kit/.claude/commands/co/index.md +24 -0
  83. package/kit/.claude/commands/co/integrate-polar.md +29 -0
  84. package/kit/.claude/commands/co/integrate-sepay.md +29 -0
  85. package/kit/.claude/commands/co/journal.md +27 -0
  86. package/kit/.claude/commands/co/k8s.md +24 -0
  87. package/kit/.claude/commands/co/kanban.md +25 -0
  88. package/kit/.claude/commands/co/lint-fix.md +24 -0
  89. package/kit/.claude/commands/co/load.md +25 -0
  90. package/kit/.claude/commands/co/migrate.md +28 -0
  91. package/kit/.claude/commands/co/mock.md +26 -0
  92. package/kit/.claude/commands/co/mode.md +24 -0
  93. package/kit/.claude/commands/co/monitor.md +25 -0
  94. package/kit/.claude/commands/co/new-feature.md +27 -0
  95. package/kit/.claude/commands/co/optimize.md +26 -0
  96. package/kit/.claude/commands/co/plan-archive.md +24 -0
  97. package/kit/.claude/commands/co/plan-ci.md +28 -0
  98. package/kit/.claude/commands/co/plan-cro.md +27 -0
  99. package/kit/.claude/commands/co/plan-fast.md +24 -0
  100. package/kit/.claude/commands/co/plan-hard.md +27 -0
  101. package/kit/.claude/commands/co/plan-parallel.md +25 -0
  102. package/kit/.claude/commands/co/plan-two.md +29 -0
  103. package/kit/.claude/commands/co/plan-validate.md +27 -0
  104. package/kit/.claude/commands/co/plan.md +27 -0
  105. package/kit/.claude/commands/co/pr.md +25 -0
  106. package/kit/.claude/commands/co/preview.md +26 -0
  107. package/kit/.claude/commands/co/refactor.md +25 -0
  108. package/kit/.claude/commands/co/release.md +25 -0
  109. package/kit/.claude/commands/co/review-a11y.md +24 -0
  110. package/kit/.claude/commands/co/review-codebase-parallel.md +27 -0
  111. package/kit/.claude/commands/co/review-codebase.md +27 -0
  112. package/kit/.claude/commands/co/review-perf.md +24 -0
  113. package/kit/.claude/commands/co/review-security.md +25 -0
  114. package/kit/.claude/commands/co/scaffold.md +25 -0
  115. package/kit/.claude/commands/co/scout.md +26 -0
  116. package/kit/.claude/commands/co/secure.md +26 -0
  117. package/kit/.claude/commands/co/seed.md +25 -0
  118. package/kit/.claude/commands/co/seo-audit.md +24 -0
  119. package/kit/.claude/commands/co/seo-keywords.md +25 -0
  120. package/kit/.claude/commands/co/skill-create.md +29 -0
  121. package/kit/.claude/commands/co/skill-fix-logs.md +28 -0
  122. package/kit/.claude/commands/co/slide-create.md +24 -0
  123. package/kit/.claude/commands/co/spawn.md +24 -0
  124. package/kit/.claude/commands/co/terraform.md +24 -0
  125. package/kit/.claude/commands/co/test-gen.md +24 -0
  126. package/kit/.claude/commands/co/test-ui.md +27 -0
  127. package/kit/.claude/commands/co/test.md +26 -0
  128. package/kit/.claude/commands/co/use-mcp.md +25 -0
  129. package/kit/.claude/commands/co/video-script.md +25 -0
  130. package/kit/.claude/commands/co/watzup.md +25 -0
  131. package/kit/.claude/commands/co/worktree.md +25 -0
  132. package/kit/.claude/commands/co/write-blog.md +25 -0
  133. package/kit/.claude/commands/co/write-copy.md +24 -0
  134. package/kit/.claude/commands/co/write-email.md +25 -0
  135. package/kit/.claude/commands/content/content-cro.md +26 -0
  136. package/kit/.claude/commands/content/content-enhance.md +26 -0
  137. package/kit/.claude/commands/content/content-fast.md +24 -0
  138. package/kit/.claude/commands/content/content-good.md +26 -0
  139. package/kit/.claude/commands/content/enhance.md +26 -0
  140. package/kit/.claude/commands/content/good.md +26 -0
  141. package/kit/.claude/commands/core/ask.md +29 -0
  142. package/kit/.claude/commands/core/bootstrap-auto-fast.md +28 -0
  143. package/kit/.claude/commands/core/bootstrap-auto-parallel.md +29 -0
  144. package/kit/.claude/commands/core/bootstrap-auto.md +30 -0
  145. package/kit/.claude/commands/core/bootstrap.md +31 -0
  146. package/kit/.claude/commands/core/ck-help.md +24 -0
  147. package/kit/.claude/commands/core/coding-level.md +24 -0
  148. package/kit/.claude/commands/core/cook.md +33 -0
  149. package/kit/.claude/commands/core/debug.md +26 -0
  150. package/kit/.claude/commands/core/journal.md +27 -0
  151. package/kit/.claude/commands/core/kanban.md +25 -0
  152. package/kit/.claude/commands/core/preview.md +26 -0
  153. package/kit/.claude/commands/core/scout.md +26 -0
  154. package/kit/.claude/commands/core/test-ui.md +27 -0
  155. package/kit/.claude/commands/core/test.md +26 -0
  156. package/kit/.claude/commands/core/use-mcp.md +25 -0
  157. package/kit/.claude/commands/core/watzup.md +25 -0
  158. package/kit/.claude/commands/core/worktree.md +25 -0
  159. package/kit/.claude/commands/design/3d.md +27 -0
  160. package/kit/.claude/commands/design/design-3d.md +27 -0
  161. package/kit/.claude/commands/design/design-describe.md +25 -0
  162. package/kit/.claude/commands/design/design-fast.md +25 -0
  163. package/kit/.claude/commands/design/design-good.md +28 -0
  164. package/kit/.claude/commands/design/design-screenshot.md +26 -0
  165. package/kit/.claude/commands/design/design-video.md +26 -0
  166. package/kit/.claude/commands/design/good.md +28 -0
  167. package/kit/.claude/commands/design/video.md +26 -0
  168. package/kit/.claude/commands/docs/docs-init.md +26 -0
  169. package/kit/.claude/commands/docs/docs-summarize.md +25 -0
  170. package/kit/.claude/commands/docs/docs-update.md +25 -0
  171. package/kit/.claude/commands/docs/init.md +26 -0
  172. package/kit/.claude/commands/docs/summarize.md +25 -0
  173. package/kit/.claude/commands/fix/ci.md +29 -0
  174. package/kit/.claude/commands/fix/fast.md +28 -0
  175. package/kit/.claude/commands/fix/fix-ci.md +29 -0
  176. package/kit/.claude/commands/fix/fix-fast.md +28 -0
  177. package/kit/.claude/commands/fix/fix-hard.md +33 -0
  178. package/kit/.claude/commands/fix/fix-logs.md +28 -0
  179. package/kit/.claude/commands/fix/fix-types.md +28 -0
  180. package/kit/.claude/commands/fix/fix-ui.md +28 -0
  181. package/kit/.claude/commands/fix/hard.md +33 -0
  182. package/kit/.claude/commands/fix/logs.md +28 -0
  183. package/kit/.claude/commands/fix/types.md +28 -0
  184. package/kit/.claude/commands/fix/ui.md +28 -0
  185. package/kit/.claude/commands/git/cp.md +26 -0
  186. package/kit/.claude/commands/git/git-cm.md +26 -0
  187. package/kit/.claude/commands/git/git-cp.md +26 -0
  188. package/kit/.claude/commands/git/git-pr.md +26 -0
  189. package/kit/.claude/commands/integrate/integrate-polar.md +29 -0
  190. package/kit/.claude/commands/integrate/integrate-sepay.md +29 -0
  191. package/kit/.claude/commands/integrate/sepay.md +29 -0
  192. package/kit/.claude/commands/plan/ci.md +28 -0
  193. package/kit/.claude/commands/plan/cro.md +27 -0
  194. package/kit/.claude/commands/plan/hard.md +27 -0
  195. package/kit/.claude/commands/plan/plan-archive.md +24 -0
  196. package/kit/.claude/commands/plan/plan-ci.md +28 -0
  197. package/kit/.claude/commands/plan/plan-cro.md +27 -0
  198. package/kit/.claude/commands/plan/plan-fast.md +24 -0
  199. package/kit/.claude/commands/plan/plan-hard.md +27 -0
  200. package/kit/.claude/commands/plan/plan-parallel.md +25 -0
  201. package/kit/.claude/commands/plan/plan-two.md +29 -0
  202. package/kit/.claude/commands/plan/plan-validate.md +27 -0
  203. package/kit/.claude/commands/plan/plan.md +27 -0
  204. package/kit/.claude/commands/plan/validate.md +27 -0
  205. package/kit/.claude/commands/skill/fix-logs.md +28 -0
  206. package/kit/.claude/commands/skill/skill-create.md +29 -0
  207. package/kit/.claude/commands/skill/skill-fix-logs.md +28 -0
  208. package/kit/.claude/settings.json +16 -0
  209. package/kit/.claude/skills/ai-anthropic.md +100 -0
  210. package/kit/.claude/skills/ai-context-engineering.md +113 -0
  211. package/kit/.claude/skills/ai-gemini.md +152 -0
  212. package/kit/.claude/skills/ai-langchain.md +93 -0
  213. package/kit/.claude/skills/ai-llamaindex.md +179 -0
  214. package/kit/.claude/skills/ai-mcp-builder.md +101 -0
  215. package/kit/.claude/skills/ai-openai.md +250 -0
  216. package/kit/.claude/skills/ai-prompt-engineering.md +173 -0
  217. package/kit/.claude/skills/ai-rag.md +91 -0
  218. package/kit/.claude/skills/ai-vectordb.md +215 -0
  219. package/kit/.claude/skills/analytics-segment.md +161 -0
  220. package/kit/.claude/skills/api-caching.md +103 -0
  221. package/kit/.claude/skills/api-documentation.md +50 -0
  222. package/kit/.claude/skills/api-graphql.md +234 -0
  223. package/kit/.claude/skills/api-openapi.md +116 -0
  224. package/kit/.claude/skills/api-pagination-filtering.md +239 -0
  225. package/kit/.claude/skills/api-rate-limiting.md +179 -0
  226. package/kit/.claude/skills/api-rest-advanced.md +50 -0
  227. package/kit/.claude/skills/api-rest.md +217 -0
  228. package/kit/.claude/skills/api-trpc.md +173 -0
  229. package/kit/.claude/skills/api-versioning.md +70 -0
  230. package/kit/.claude/skills/api-webhooks.md +226 -0
  231. package/kit/.claude/skills/arch-clean-code.md +226 -0
  232. package/kit/.claude/skills/arch-clean.md +91 -0
  233. package/kit/.claude/skills/arch-cqrs.md +229 -0
  234. package/kit/.claude/skills/arch-ddd.md +85 -0
  235. package/kit/.claude/skills/arch-event-driven.md +189 -0
  236. package/kit/.claude/skills/arch-microservices.md +80 -0
  237. package/kit/.claude/skills/arch-monorepo.md +87 -0
  238. package/kit/.claude/skills/arch-multi-tenant.md +81 -0
  239. package/kit/.claude/skills/arch-serverless.md +86 -0
  240. package/kit/.claude/skills/auth-clerk.md +97 -0
  241. package/kit/.claude/skills/auth-jwt.md +143 -0
  242. package/kit/.claude/skills/auth-lucia.md +93 -0
  243. package/kit/.claude/skills/auth-nextauth.md +446 -0
  244. package/kit/.claude/skills/auth-oauth.md +208 -0
  245. package/kit/.claude/skills/auth-oauth2.md +110 -0
  246. package/kit/.claude/skills/auth-passkeys.md +109 -0
  247. package/kit/.claude/skills/auth-session.md +88 -0
  248. package/kit/.claude/skills/backend-dotnet.md +414 -0
  249. package/kit/.claude/skills/backend-express.md +129 -0
  250. package/kit/.claude/skills/backend-fastify.md +104 -0
  251. package/kit/.claude/skills/backend-go.md +205 -0
  252. package/kit/.claude/skills/backend-graphql.md +149 -0
  253. package/kit/.claude/skills/backend-grpc.md +382 -0
  254. package/kit/.claude/skills/backend-hono.md +95 -0
  255. package/kit/.claude/skills/backend-java-spring.md +198 -0
  256. package/kit/.claude/skills/backend-nodejs-express.md +165 -0
  257. package/kit/.claude/skills/backend-nodejs.md +143 -0
  258. package/kit/.claude/skills/backend-php-laravel.md +156 -0
  259. package/kit/.claude/skills/backend-python-django.md +200 -0
  260. package/kit/.claude/skills/backend-python-fastapi.md +169 -0
  261. package/kit/.claude/skills/backend-ruby-rails.md +190 -0
  262. package/kit/.claude/skills/backend-rust.md +182 -0
  263. package/kit/.claude/skills/backend-websockets.md +392 -0
  264. package/kit/.claude/skills/cache-redis.md +195 -0
  265. package/kit/.claude/skills/caching-strategies.md +100 -0
  266. package/kit/.claude/skills/cloud-aws.md +165 -0
  267. package/kit/.claude/skills/cloud-azure.md +187 -0
  268. package/kit/.claude/skills/cloud-cloudflare.md +74 -0
  269. package/kit/.claude/skills/cloud-fly.md +94 -0
  270. package/kit/.claude/skills/cloud-gcp.md +160 -0
  271. package/kit/.claude/skills/cloud-railway.md +92 -0
  272. package/kit/.claude/skills/cloud-render.md +70 -0
  273. package/kit/.claude/skills/cloud-serverless.md +68 -0
  274. package/kit/.claude/skills/cloud-vercel.md +76 -0
  275. package/kit/.claude/skills/component-patterns.md +50 -0
  276. package/kit/.claude/skills/content-management.md +197 -0
  277. package/kit/.claude/skills/cors-security.md +50 -0
  278. package/kit/.claude/skills/data-csv-excel.md +210 -0
  279. package/kit/.claude/skills/database-optimization.md +196 -0
  280. package/kit/.claude/skills/databases-transactions.md +68 -0
  281. package/kit/.claude/skills/db-cassandra.md +89 -0
  282. package/kit/.claude/skills/db-drizzle.md +363 -0
  283. package/kit/.claude/skills/db-dynamodb.md +83 -0
  284. package/kit/.claude/skills/db-elasticsearch.md +105 -0
  285. package/kit/.claude/skills/db-firebase-firestore.md +191 -0
  286. package/kit/.claude/skills/db-mongodb.md +198 -0
  287. package/kit/.claude/skills/db-mysql.md +50 -0
  288. package/kit/.claude/skills/db-neon.md +72 -0
  289. package/kit/.claude/skills/db-planetscale.md +76 -0
  290. package/kit/.claude/skills/db-postgresql.md +50 -0
  291. package/kit/.claude/skills/db-prisma.md +414 -0
  292. package/kit/.claude/skills/db-redis.md +50 -0
  293. package/kit/.claude/skills/db-sqlite.md +149 -0
  294. package/kit/.claude/skills/db-supabase.md +445 -0
  295. package/kit/.claude/skills/devops-ci-cd.md +271 -0
  296. package/kit/.claude/skills/devops-database-backup.md +77 -0
  297. package/kit/.claude/skills/devops-docker.md +93 -0
  298. package/kit/.claude/skills/devops-github-actions.md +82 -0
  299. package/kit/.claude/skills/devops-health-checks.md +50 -0
  300. package/kit/.claude/skills/devops-kubernetes.md +109 -0
  301. package/kit/.claude/skills/devops-logging.md +163 -0
  302. package/kit/.claude/skills/devops-monitoring.md +203 -0
  303. package/kit/.claude/skills/devops-pulumi.md +94 -0
  304. package/kit/.claude/skills/devops-secrets.md +166 -0
  305. package/kit/.claude/skills/devops-terraform.md +226 -0
  306. package/kit/.claude/skills/error-boundaries.md +84 -0
  307. package/kit/.claude/skills/file-storage.md +50 -0
  308. package/kit/.claude/skills/frontend-angular.md +104 -0
  309. package/kit/.claude/skills/frontend-astro.md +94 -0
  310. package/kit/.claude/skills/frontend-bundle-analysis.md +147 -0
  311. package/kit/.claude/skills/frontend-forms.md +134 -0
  312. package/kit/.claude/skills/frontend-htmx.md +86 -0
  313. package/kit/.claude/skills/frontend-nextjs.md +188 -0
  314. package/kit/.claude/skills/frontend-pwa.md +105 -0
  315. package/kit/.claude/skills/frontend-react-hooks.md +238 -0
  316. package/kit/.claude/skills/frontend-react.md +129 -0
  317. package/kit/.claude/skills/frontend-remix-advanced.md +106 -0
  318. package/kit/.claude/skills/frontend-remix.md +101 -0
  319. package/kit/.claude/skills/frontend-solid.md +99 -0
  320. package/kit/.claude/skills/frontend-state-management.md +134 -0
  321. package/kit/.claude/skills/frontend-state.md +106 -0
  322. package/kit/.claude/skills/frontend-svelte.md +121 -0
  323. package/kit/.claude/skills/frontend-testing.md +100 -0
  324. package/kit/.claude/skills/frontend-vite.md +94 -0
  325. package/kit/.claude/skills/frontend-vue.md +133 -0
  326. package/kit/.claude/skills/frontend-webpack.md +93 -0
  327. package/kit/.claude/skills/functional-programming.md +50 -0
  328. package/kit/.claude/skills/hooks-custom.md +50 -0
  329. package/kit/.claude/skills/http-server.md +50 -0
  330. package/kit/.claude/skills/i18n-general.md +89 -0
  331. package/kit/.claude/skills/i18n-localization.md +191 -0
  332. package/kit/.claude/skills/i18n-nextjs.md +127 -0
  333. package/kit/.claude/skills/infrastructure-docker-compose.md +77 -0
  334. package/kit/.claude/skills/infrastructure-serverless.md +177 -0
  335. package/kit/.claude/skills/jwt-tokens.md +50 -0
  336. package/kit/.claude/skills/logging-winston.md +106 -0
  337. package/kit/.claude/skills/messaging-kafka.md +102 -0
  338. package/kit/.claude/skills/messaging-rabbitmq.md +50 -0
  339. package/kit/.claude/skills/mobile-capacitor.md +109 -0
  340. package/kit/.claude/skills/mobile-expo.md +101 -0
  341. package/kit/.claude/skills/mobile-flutter.md +259 -0
  342. package/kit/.claude/skills/mobile-react-native.md +238 -0
  343. package/kit/.claude/skills/monitoring-apm.md +50 -0
  344. package/kit/.claude/skills/monitoring-error-tracking.md +217 -0
  345. package/kit/.claude/skills/nodejs-streams.md +168 -0
  346. package/kit/.claude/skills/oauth-integration.md +50 -0
  347. package/kit/.claude/skills/patterns-dependency-injection.md +218 -0
  348. package/kit/.claude/skills/patterns-factory-singleton.md +209 -0
  349. package/kit/.claude/skills/patterns-observer-pubsub.md +210 -0
  350. package/kit/.claude/skills/payment-lemonsqueezy.md +101 -0
  351. package/kit/.claude/skills/payment-square.md +178 -0
  352. package/kit/.claude/skills/payment-stripe.md +206 -0
  353. package/kit/.claude/skills/perf-bundle.md +100 -0
  354. package/kit/.claude/skills/perf-web-vitals.md +102 -0
  355. package/kit/.claude/skills/performance-database-connection-pooling.md +67 -0
  356. package/kit/.claude/skills/performance-metrics.md +73 -0
  357. package/kit/.claude/skills/performance-optimization.md +208 -0
  358. package/kit/.claude/skills/performance-web-vitals.md +169 -0
  359. package/kit/.claude/skills/rate-limiting.md +77 -0
  360. package/kit/.claude/skills/reactive-programming.md +50 -0
  361. package/kit/.claude/skills/realtime-database.md +50 -0
  362. package/kit/.claude/skills/realtime-subscriptions.md +218 -0
  363. package/kit/.claude/skills/saas-ab-testing.md +90 -0
  364. package/kit/.claude/skills/saas-analytics.md +113 -0
  365. package/kit/.claude/skills/saas-billing.md +106 -0
  366. package/kit/.claude/skills/saas-email.md +88 -0
  367. package/kit/.claude/skills/saas-feature-flags.md +83 -0
  368. package/kit/.claude/skills/saas-onboarding.md +96 -0
  369. package/kit/.claude/skills/saas-user-onboarding.md +207 -0
  370. package/kit/.claude/skills/security-encryption.md +216 -0
  371. package/kit/.claude/skills/security-owasp.md +212 -0
  372. package/kit/.claude/skills/security-secrets-rotation.md +64 -0
  373. package/kit/.claude/skills/seo-content.md +94 -0
  374. package/kit/.claude/skills/seo-technical.md +101 -0
  375. package/kit/.claude/skills/serverless-framework.md +151 -0
  376. package/kit/.claude/skills/sharding-scaling.md +50 -0
  377. package/kit/.claude/skills/styling-css-modules.md +219 -0
  378. package/kit/.claude/skills/styling-styled-components.md +206 -0
  379. package/kit/.claude/skills/styling-tailwind.md +206 -0
  380. package/kit/.claude/skills/test-e2e.md +86 -0
  381. package/kit/.claude/skills/test-integration.md +216 -0
  382. package/kit/.claude/skills/test-performance.md +162 -0
  383. package/kit/.claude/skills/test-tdd.md +170 -0
  384. package/kit/.claude/skills/test-unit.md +301 -0
  385. package/kit/.claude/skills/testing-accessibility.md +117 -0
  386. package/kit/.claude/skills/testing-contract.md +75 -0
  387. package/kit/.claude/skills/testing-e2e-advanced.md +50 -0
  388. package/kit/.claude/skills/testing-load-stress.md +79 -0
  389. package/kit/.claude/skills/testing-mutation.md +92 -0
  390. package/kit/.claude/skills/testing-snapshot.md +50 -0
  391. package/kit/.claude/skills/testing-vitest.md +172 -0
  392. package/kit/.claude/skills/tooling-biome.md +91 -0
  393. package/kit/.claude/skills/tooling-build-tools.md +166 -0
  394. package/kit/.claude/skills/tooling-bun.md +94 -0
  395. package/kit/.claude/skills/tooling-eslint.md +103 -0
  396. package/kit/.claude/skills/tooling-git.md +79 -0
  397. package/kit/.claude/skills/tooling-monorepo.md +162 -0
  398. package/kit/.claude/skills/tooling-testing-frameworks.md +207 -0
  399. package/kit/.claude/skills/tooling-typescript.md +156 -0
  400. package/kit/.claude/skills/ui-a11y.md +106 -0
  401. package/kit/.claude/skills/ui-framer.md +106 -0
  402. package/kit/.claude/skills/ui-gsap.md +102 -0
  403. package/kit/.claude/skills/ui-radix.md +82 -0
  404. package/kit/.claude/skills/ui-shadcn.md +463 -0
  405. package/kit/.claude/skills/ui-tailwind.md +98 -0
  406. package/kit/.claude/skills/ui-threejs.md +110 -0
  407. package/kit/.claude/skills/ui-tokens.md +97 -0
  408. package/kit/.claude/skills/utilities-date-time.md +170 -0
  409. package/kit/.claude/skills/validation-schemas.md +110 -0
  410. package/kit/.claude/skills/version-control-git.md +144 -0
  411. package/kit/.claude/skills/web-accessibility-wcag.md +102 -0
  412. package/kit/.claude/skills/web-astro.md +197 -0
  413. package/kit/.claude/skills/web-html-css.md +224 -0
  414. package/kit/.claude/skills/web-htmx.md +99 -0
  415. package/kit/.claude/skills/web-nextjs-advanced.md +202 -0
  416. package/kit/.claude/skills/web-remix.md +194 -0
  417. package/kit/.claude/skills/web-seo.md +99 -0
  418. package/kit/.claude/skills/web-svelte.md +234 -0
  419. package/kit/.claude/skills/websocket-server.md +50 -0
  420. package/kit/.claude/skills/writing-marketing.md +89 -0
  421. package/kit/.claude/skills/writing-technical.md +119 -0
  422. package/kit/CLAUDE.md +206 -0
  423. package/kit/README.md +150 -0
  424. package/kit/SKILLS_INDEX.md +188 -0
  425. package/kit/docs/README.md +3 -0
  426. package/kit/journals/README.md +3 -0
  427. package/kit/plans/README.md +3 -0
  428. package/package.json +3 -1
@@ -0,0 +1,179 @@
1
+ # LLamaIndex (formerly GPT Index)
2
+
3
+ Framework for building production-grade LLM applications with data connectors and indexing.
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ npm install llamaindex openai dotenv
9
+ ```
10
+
11
+ ## Document Indexing
12
+
13
+ ```typescript
14
+ import { VectorStoreIndex, Document } from 'llamaindex';
15
+ import { OpenAI } from 'llamaindex/llm/openai';
16
+
17
+ const documents = [
18
+ new Document({
19
+ text: 'React is a JavaScript library for building user interfaces.',
20
+ metadata: { source: 'docs' }
21
+ }),
22
+ new Document({
23
+ text: 'Vue is a progressive framework for building web interfaces.',
24
+ metadata: { source: 'docs' }
25
+ })
26
+ ];
27
+
28
+ const llm = new OpenAI({ model: 'gpt-3.5-turbo' });
29
+
30
+ const index = await VectorStoreIndex.fromDocuments(documents, {
31
+ llm
32
+ });
33
+
34
+ // Query
35
+ const query = 'What is React?';
36
+ const response = await index.asRetriever().retrieve(query);
37
+
38
+ console.log(response);
39
+ ```
40
+
41
+ ## Loading Documents
42
+
43
+ ```typescript
44
+ import { SimpleDirectoryReader } from 'llamaindex';
45
+
46
+ // Load markdown files from directory
47
+ const documents = await new SimpleDirectoryReader().loadData({
48
+ directoryPath: './data'
49
+ });
50
+
51
+ // Load PDF
52
+ import { PDFReader } from 'llamaindex/readers';
53
+
54
+ const pdfDocs = await new PDFReader().loadData({
55
+ filePath: 'document.pdf'
56
+ });
57
+ ```
58
+
59
+ ## RAG (Retrieval-Augmented Generation)
60
+
61
+ ```typescript
62
+ import { VectorStoreIndex, Document, PromptTemplate } from 'llamaindex';
63
+
64
+ const documents = [
65
+ new Document({ text: 'Your company policies...' }),
66
+ new Document({ text: 'Product documentation...' })
67
+ ];
68
+
69
+ const index = await VectorStoreIndex.fromDocuments(documents);
70
+ const retriever = index.asRetriever();
71
+
72
+ // Custom prompt
73
+ const promptTemplate = new PromptTemplate({
74
+ template: `Answer the question using the context:
75
+ {context_str}
76
+
77
+ Question: {query_str}`
78
+ });
79
+
80
+ const queryEngine = index.asQueryEngine({
81
+ preFilters: { field: 'source', operator: 'eq', value: 'docs' }
82
+ });
83
+
84
+ const response = await queryEngine.query({
85
+ query: 'What are the payment terms?'
86
+ });
87
+
88
+ console.log(response.response);
89
+ ```
90
+
91
+ ## Chat with Memory
92
+
93
+ ```typescript
94
+ import { VectorStoreIndex, Document, ChatMemoryBuffer } from 'llamaindex';
95
+
96
+ const documents = [
97
+ new Document({ text: 'Product features...' })
98
+ ];
99
+
100
+ const index = await VectorStoreIndex.fromDocuments(documents);
101
+ const memory = new ChatMemoryBuffer({ tokenLimit: 3000 });
102
+
103
+ const chatEngine = index.asChatEngine({ memory });
104
+
105
+ // Multi-turn conversation
106
+ const response1 = await chatEngine.chat({
107
+ message: 'Tell me about your products'
108
+ });
109
+
110
+ const response2 = await chatEngine.chat({
111
+ message: 'What about pricing?' // Has context from previous messages
112
+ });
113
+
114
+ console.log(response2.response);
115
+ ```
116
+
117
+ ## Custom Retrievers
118
+
119
+ ```typescript
120
+ import { BaseRetriever, SimilarityType } from 'llamaindex';
121
+
122
+ class CustomRetriever extends BaseRetriever {
123
+ async retrieve(query: string) {
124
+ // Custom retrieval logic (e.g., BM25, graph-based)
125
+ const results = await this.customSearch(query);
126
+ return results.map(r => ({
127
+ text: r.content,
128
+ score: r.relevance
129
+ }));
130
+ }
131
+ }
132
+
133
+ const customRetriever = new CustomRetriever();
134
+ const queryEngine = index.asQueryEngine({
135
+ retriever: customRetriever
136
+ });
137
+ ```
138
+
139
+ ## Agents
140
+
141
+ ```typescript
142
+ import { createOpenAIAgent, Tool } from 'llamaindex/agent';
143
+ import { ToolMetadata } from 'llamaindex';
144
+
145
+ const tools = [
146
+ new Tool({
147
+ metadata: {
148
+ name: 'search_documents',
149
+ description: 'Search company documentation'
150
+ },
151
+ fn: async (query: string) => {
152
+ const index = await loadIndex();
153
+ return await index.asRetriever().retrieve(query);
154
+ }
155
+ })
156
+ ];
157
+
158
+ const agent = createOpenAIAgent({
159
+ tools,
160
+ model: 'gpt-4'
161
+ });
162
+
163
+ const response = await agent.chat({
164
+ message: 'What are our refund policies?'
165
+ });
166
+ ```
167
+
168
+ ## Best Practices
169
+
170
+ ✅ **Chunking** - Split documents appropriately
171
+ ✅ **Metadata** - Include source and date
172
+ ✅ **Evaluation** - Measure retrieval quality
173
+ ✅ **Caching** - Cache embeddings
174
+ ✅ **Error handling** - Handle API failures gracefully
175
+
176
+ ## Resources
177
+
178
+ - [LLamaIndex Docs](https://docs.llamaindex.ai/)
179
+ - [Data Connectors](https://docs.llamaindex.ai/en/stable/module_guides/data_loaders/root.html)
@@ -0,0 +1,101 @@
1
+ # MCP Server Builder
2
+
3
+ ## Overview
4
+ Build custom Model Context Protocol servers to extend Claude Code with your own tools, resources, and data sources.
5
+
6
+ ## Setup
7
+
8
+ ```bash
9
+ npm install @modelcontextprotocol/sdk
10
+ npx @modelcontextprotocol/create-server my-mcp-server
11
+ ```
12
+
13
+ ## Basic MCP Server
14
+
15
+ ```typescript
16
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
17
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
18
+ import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
19
+
20
+ const server = new Server(
21
+ { name: "my-tools", version: "1.0.0" },
22
+ { capabilities: { tools: {} } }
23
+ );
24
+
25
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
26
+ tools: [
27
+ {
28
+ name: "get_user",
29
+ description: "Fetch a user from the database by ID",
30
+ inputSchema: {
31
+ type: "object",
32
+ properties: {
33
+ id: { type: "string", description: "User ID" }
34
+ },
35
+ required: ["id"]
36
+ }
37
+ }
38
+ ]
39
+ }));
40
+
41
+ server.setRequestHandler(CallToolRequestSchema, async (req) => {
42
+ if (req.params.name === "get_user") {
43
+ const { id } = req.params.arguments as { id: string };
44
+ const user = await db.findUser(id);
45
+ return {
46
+ content: [{ type: "text", text: JSON.stringify(user, null, 2) }]
47
+ };
48
+ }
49
+ throw new Error(`Unknown tool: ${req.params.name}`);
50
+ });
51
+
52
+ const transport = new StdioServerTransport();
53
+ await server.connect(transport);
54
+ ```
55
+
56
+ ## Register in Claude Code
57
+
58
+ ```json
59
+ // ~/.claude/claude_desktop_config.json
60
+ {
61
+ "mcpServers": {
62
+ "my-tools": {
63
+ "command": "node",
64
+ "args": ["/path/to/my-mcp-server/dist/index.js"],
65
+ "env": {
66
+ "DATABASE_URL": "postgresql://..."
67
+ }
68
+ }
69
+ }
70
+ }
71
+ ```
72
+
73
+ ## MCP with Resources (File/Data Provider)
74
+
75
+ ```typescript
76
+ import { ListResourcesRequestSchema, ReadResourceRequestSchema } from "@modelcontextprotocol/sdk/types.js";
77
+
78
+ server.setRequestHandler(ListResourcesRequestSchema, async () => ({
79
+ resources: [
80
+ { uri: "db://users/list", name: "All Users", mimeType: "application/json" }
81
+ ]
82
+ }));
83
+
84
+ server.setRequestHandler(ReadResourceRequestSchema, async (req) => {
85
+ if (req.params.uri === "db://users/list") {
86
+ const users = await db.findAll();
87
+ return { contents: [{ uri: req.params.uri, mimeType: "application/json", text: JSON.stringify(users) }] };
88
+ }
89
+ throw new Error("Resource not found");
90
+ });
91
+ ```
92
+
93
+ ## Best Practices
94
+ - Keep tools focused — one tool does one thing well
95
+ - Return structured JSON text for complex data
96
+ - Validate all inputs with proper error messages
97
+ - Use environment variables for secrets, never hardcode
98
+
99
+ ## Resources
100
+ - [MCP SDK docs](https://modelcontextprotocol.io/docs)
101
+ - [MCP server examples](https://github.com/modelcontextprotocol/servers)
@@ -0,0 +1,250 @@
1
+ # OpenAI API
2
+
3
+ Access GPT models, embeddings, and other AI services.
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ npm install openai
9
+ ```
10
+
11
+ ## Chat Completions
12
+
13
+ ```typescript
14
+ import OpenAI from 'openai';
15
+
16
+ const client = new OpenAI({
17
+ apiKey: process.env.OPENAI_API_KEY
18
+ });
19
+
20
+ async function chat(userMessage: string) {
21
+ const response = await client.chat.completions.create({
22
+ model: 'gpt-4-turbo',
23
+ messages: [
24
+ {
25
+ role: 'system',
26
+ content: 'You are a helpful programming assistant.'
27
+ },
28
+ {
29
+ role: 'user',
30
+ content: userMessage
31
+ }
32
+ ],
33
+ temperature: 0.7,
34
+ max_tokens: 500
35
+ });
36
+
37
+ return response.choices[0].message.content;
38
+ }
39
+
40
+ // Usage
41
+ const answer = await chat('How do I implement caching in Node.js?');
42
+ console.log(answer);
43
+ ```
44
+
45
+ ## Streaming Responses
46
+
47
+ ```typescript
48
+ async function streamChat(userMessage: string) {
49
+ const stream = client.chat.completions.create({
50
+ model: 'gpt-4-turbo',
51
+ messages: [{ role: 'user', content: userMessage }],
52
+ stream: true
53
+ });
54
+
55
+ for await (const chunk of await stream) {
56
+ if (chunk.choices[0].delta.content) {
57
+ process.stdout.write(chunk.choices[0].delta.content);
58
+ }
59
+ }
60
+ }
61
+ ```
62
+
63
+ ## Embeddings
64
+
65
+ ```typescript
66
+ async function getEmbedding(text: string) {
67
+ const response = await client.embeddings.create({
68
+ model: 'text-embedding-3-small',
69
+ input: text
70
+ });
71
+
72
+ return response.data[0].embedding;
73
+ }
74
+
75
+ // Usage for semantic search
76
+ const query = 'How to build a REST API?';
77
+ const queryEmbedding = await getEmbedding(query);
78
+
79
+ const documents = [
80
+ 'REST API with Express and Node.js',
81
+ 'GraphQL server setup',
82
+ 'WebSocket real-time communication'
83
+ ];
84
+
85
+ const docEmbeddings = await Promise.all(
86
+ documents.map(doc => getEmbedding(doc))
87
+ );
88
+
89
+ // Find most similar document
90
+ const similarities = docEmbeddings.map((emb, idx) => ({
91
+ idx,
92
+ similarity: cosineSimilarity(queryEmbedding, emb)
93
+ }));
94
+
95
+ const mostSimilar = similarities.sort((a, b) => b.similarity - a.similarity)[0];
96
+ console.log(`Most similar: ${documents[mostSimilar.idx]}`);
97
+ ```
98
+
99
+ ## Vision (Image Analysis)
100
+
101
+ ```typescript
102
+ async function analyzeImage(imageUrl: string) {
103
+ const response = await client.chat.completions.create({
104
+ model: 'gpt-4-vision',
105
+ messages: [
106
+ {
107
+ role: 'user',
108
+ content: [
109
+ {
110
+ type: 'image_url',
111
+ image_url: { url: imageUrl }
112
+ },
113
+ {
114
+ type: 'text',
115
+ text: 'Describe this image in detail'
116
+ }
117
+ ]
118
+ }
119
+ ]
120
+ });
121
+
122
+ return response.choices[0].message.content;
123
+ }
124
+
125
+ // Local image
126
+ async function analyzeLocalImage(imagePath: string) {
127
+ const fs = require('fs');
128
+ const base64 = fs.readFileSync(imagePath).toString('base64');
129
+
130
+ const response = await client.chat.completions.create({
131
+ model: 'gpt-4-vision',
132
+ messages: [
133
+ {
134
+ role: 'user',
135
+ content: [
136
+ {
137
+ type: 'image_url',
138
+ image_url: {
139
+ url: `data:image/jpeg;base64,${base64}`
140
+ }
141
+ },
142
+ {
143
+ type: 'text',
144
+ text: 'What is in this image?'
145
+ }
146
+ ]
147
+ }
148
+ ]
149
+ });
150
+
151
+ return response.choices[0].message.content;
152
+ }
153
+ ```
154
+
155
+ ## Function Calling
156
+
157
+ ```typescript
158
+ const tools = [
159
+ {
160
+ type: 'function',
161
+ function: {
162
+ name: 'get_current_weather',
163
+ description: 'Get the current weather in a location',
164
+ parameters: {
165
+ type: 'object',
166
+ properties: {
167
+ location: {
168
+ type: 'string',
169
+ description: 'The city and state, e.g. San Francisco, CA'
170
+ },
171
+ unit: {
172
+ type: 'string',
173
+ enum: ['celsius', 'fahrenheit']
174
+ }
175
+ },
176
+ required: ['location']
177
+ }
178
+ }
179
+ }
180
+ ];
181
+
182
+ async function getWeatherAndRespond(query: string) {
183
+ const response = await client.chat.completions.create({
184
+ model: 'gpt-4-turbo',
185
+ messages: [{ role: 'user', content: query }],
186
+ tools: tools,
187
+ tool_choice: 'auto'
188
+ });
189
+
190
+ if (response.choices[0].message.tool_calls) {
191
+ const toolCall = response.choices[0].message.tool_calls[0];
192
+
193
+ // Execute function based on tool_call.function.name
194
+ const result = await executeFunction(
195
+ toolCall.function.name,
196
+ JSON.parse(toolCall.function.arguments)
197
+ );
198
+
199
+ // Send result back for final response
200
+ const finalResponse = await client.chat.completions.create({
201
+ model: 'gpt-4-turbo',
202
+ messages: [
203
+ { role: 'user', content: query },
204
+ response.choices[0].message,
205
+ {
206
+ role: 'tool',
207
+ tool_call_id: toolCall.id,
208
+ content: JSON.stringify(result)
209
+ }
210
+ ]
211
+ });
212
+
213
+ return finalResponse.choices[0].message.content;
214
+ }
215
+ }
216
+ ```
217
+
218
+ ## Error Handling
219
+
220
+ ```typescript
221
+ try {
222
+ const response = await client.chat.completions.create({
223
+ model: 'gpt-4-turbo',
224
+ messages: [{ role: 'user', content: 'Hello' }],
225
+ max_tokens: 10
226
+ });
227
+ } catch (error) {
228
+ if (error instanceof OpenAI.APIError) {
229
+ console.error(`API Error: ${error.status} - ${error.message}`);
230
+ } else if (error instanceof OpenAI.RateLimitError) {
231
+ console.error('Rate limit exceeded');
232
+ } else if (error instanceof OpenAI.AuthenticationError) {
233
+ console.error('Invalid API key');
234
+ }
235
+ }
236
+ ```
237
+
238
+ ## Best Practices
239
+
240
+ ✅ **Use streaming** - Better UX for long responses
241
+ ✅ **Set temperature** - 0.7 for balanced, 0 for deterministic
242
+ ✅ **Token limits** - Monitor usage and costs
243
+ ✅ **Error handling** - Handle rate limits and API errors
244
+ ✅ **Caching** - Cache embeddings for reuse
245
+
246
+ ## Resources
247
+
248
+ - [OpenAI API Documentation](https://platform.openai.com/docs/api-reference)
249
+ - [Model Pricing](https://openai.com/pricing)
250
+ - [Best Practices](https://platform.openai.com/docs/guides/gpt-best-practices)
@@ -0,0 +1,173 @@
1
+ # Prompt Engineering
2
+
3
+ Techniques for effective LLM prompting and optimization.
4
+
5
+ ## Basic Prompting
6
+
7
+ ```typescript
8
+ import { openai } from '@ai-sdk/openai';
9
+ import { generateText } from 'ai';
10
+
11
+ // Simple prompt
12
+ const result = await generateText({
13
+ model: openai('gpt-4'),
14
+ prompt: 'Explain quantum computing in simple terms'
15
+ });
16
+
17
+ console.log(result.text);
18
+ ```
19
+
20
+ ## Few-Shot Prompting
21
+
22
+ ```typescript
23
+ const examples = `
24
+ Example 1:
25
+ Question: What is 2 + 2?
26
+ Answer: 4
27
+
28
+ Example 2:
29
+ Question: What is 5 * 3?
30
+ Answer: 15
31
+
32
+ Question: What is 10 - 3?
33
+ `;
34
+
35
+ const result = await generateText({
36
+ model: openai('gpt-4'),
37
+ prompt: examples
38
+ });
39
+ ```
40
+
41
+ ## Role-Based Prompting
42
+
43
+ ```typescript
44
+ const systemPrompt = `You are an expert JavaScript developer.
45
+ Provide clear, concise code examples with explanations.
46
+ Focus on best practices and performance.
47
+ Use TypeScript for type safety.`;
48
+
49
+ const messages = [
50
+ {
51
+ role: 'system',
52
+ content: systemPrompt
53
+ },
54
+ {
55
+ role: 'user',
56
+ content: 'How do I optimize array operations in JavaScript?'
57
+ }
58
+ ];
59
+
60
+ const result = await generateText({
61
+ model: openai('gpt-4'),
62
+ messages
63
+ });
64
+ ```
65
+
66
+ ## Chain of Thought
67
+
68
+ ```typescript
69
+ const prompt = `Answer the question by thinking step by step.
70
+
71
+ Question: A train leaves New York traveling at 60 mph.
72
+ Another train leaves Boston traveling at 80 mph.
73
+ They are 215 miles apart.
74
+ When will they meet?
75
+
76
+ Think through:
77
+ 1. Combined speed
78
+ 2. Time to meet
79
+ 3. Distance each travels`;
80
+
81
+ const result = await generateText({
82
+ model: openai('gpt-4'),
83
+ prompt
84
+ });
85
+ ```
86
+
87
+ ## Structured Output
88
+
89
+ ```typescript
90
+ import { generateObject } from 'ai';
91
+
92
+ const { object } = await generateObject({
93
+ model: openai('gpt-4'),
94
+ prompt: 'Extract contact information from: "Contact John Doe at john@example.com, phone: 555-1234"',
95
+ schema: z.object({
96
+ name: z.string(),
97
+ email: z.string().email(),
98
+ phone: z.string()
99
+ })
100
+ });
101
+
102
+ console.log(object); // { name: 'John Doe', email: 'john@example.com', phone: '555-1234' }
103
+ ```
104
+
105
+ ## Temperature & Sampling
106
+
107
+ ```typescript
108
+ // Deterministic (temperature=0)
109
+ const response1 = await generateText({
110
+ model: openai('gpt-4'),
111
+ temperature: 0, // Always the same answer
112
+ prompt: 'What is the capital of France?'
113
+ });
114
+
115
+ // Creative (temperature=1)
116
+ const response2 = await generateText({
117
+ model: openai('gpt-4'),
118
+ temperature: 1, // More varied responses
119
+ prompt: 'Write a creative story about a robot'
120
+ });
121
+ ```
122
+
123
+ ## Token Management
124
+
125
+ ```typescript
126
+ import { countTokens } from 'js-tiktoken';
127
+ import { encoding_for_model } from 'js-tiktoken';
128
+
129
+ const enc = encoding_for_model('gpt-4');
130
+
131
+ const text = 'This is a sample text to count tokens';
132
+ const tokens = enc.encode(text);
133
+ const tokenCount = tokens.length;
134
+
135
+ console.log(`Token count: ${tokenCount}`);
136
+
137
+ // Truncate if needed
138
+ const maxTokens = 1000;
139
+ if (tokenCount > maxTokens) {
140
+ const truncated = text.slice(0, Math.floor(text.length * (maxTokens / tokenCount)));
141
+ }
142
+ ```
143
+
144
+ ## Prompt Optimization
145
+
146
+ ```typescript
147
+ // Bad: Vague prompt
148
+ 'Write some code'
149
+
150
+ // Good: Specific prompt
151
+ 'Write a TypeScript function that validates email addresses using regex.
152
+ The function should handle edge cases like subdomains and return true/false.'
153
+
154
+ // Better: Include examples
155
+ 'Write a TypeScript function that validates email addresses.
156
+ Examples:
157
+ - "user@example.com" → true
158
+ - "invalid@" → false
159
+ - "user+tag@example.co.uk" → true'
160
+ ```
161
+
162
+ ## Best Practices
163
+
164
+ ✅ **Be specific** - Describe exactly what you want
165
+ ✅ **Use examples** - Show expected input/output
166
+ ✅ **Assign role** - Give context to the AI
167
+ ✅ **Set temperature** - Control creativity vs determinism
168
+ ✅ **Monitor tokens** - Manage costs and latency
169
+
170
+ ## Resources
171
+
172
+ - [OpenAI Prompt Engineering Guide](https://platform.openai.com/docs/guides/prompt-engineering)
173
+ - [Vercel AI SDK](https://sdk.vercel.ai/)