@hasna/skills 0.1.26 → 0.1.29

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 (491) hide show
  1. package/LICENSE +1 -10
  2. package/README.md +141 -39
  3. package/bin/index.js +30122 -27575
  4. package/bin/mcp.js +22112 -18593
  5. package/dist/cli/cli.test-utils.d.ts +15 -0
  6. package/dist/cli/commands/auth.d.ts +2 -0
  7. package/dist/cli/commands/install.d.ts +1 -1
  8. package/dist/cli/commands/runtime-mcp.d.ts +4 -0
  9. package/dist/index.d.ts +9 -4
  10. package/dist/index.js +11607 -597
  11. package/dist/lib/auth-store.d.ts +13 -0
  12. package/dist/lib/installer.d.ts +58 -55
  13. package/dist/lib/mcp-contracts.d.ts +86 -0
  14. package/dist/lib/project-state.d.ts +43 -0
  15. package/dist/lib/registry-data/business-marketing.d.ts +2 -0
  16. package/dist/lib/registry-data/communication.d.ts +2 -0
  17. package/dist/lib/registry-data/content-generation.d.ts +2 -0
  18. package/dist/lib/registry-data/data-analysis.d.ts +2 -0
  19. package/dist/lib/registry-data/design-branding.d.ts +2 -0
  20. package/dist/lib/registry-data/development-tools.d.ts +2 -0
  21. package/dist/lib/registry-data/education-learning.d.ts +2 -0
  22. package/dist/lib/registry-data/event-management.d.ts +2 -0
  23. package/dist/lib/registry-data/finance-compliance.d.ts +2 -0
  24. package/dist/lib/registry-data/health-wellness.d.ts +2 -0
  25. package/dist/lib/registry-data/index.d.ts +2 -0
  26. package/dist/lib/registry-data/media-processing.d.ts +2 -0
  27. package/dist/lib/registry-data/productivity-organization.d.ts +2 -0
  28. package/dist/lib/registry-data/project-management.d.ts +2 -0
  29. package/dist/lib/registry-data/research-writing.d.ts +2 -0
  30. package/dist/lib/registry-data/science-academic.d.ts +2 -0
  31. package/dist/lib/registry-data/travel-lifestyle.d.ts +2 -0
  32. package/dist/lib/registry-data/web-browser.d.ts +2 -0
  33. package/dist/lib/registry-types.d.ts +27 -0
  34. package/dist/lib/registry.d.ts +6 -18
  35. package/dist/lib/remote-registry.d.ts +3 -0
  36. package/dist/lib/run-state.d.ts +60 -0
  37. package/dist/lib/skill-aliases.d.ts +17 -0
  38. package/dist/lib/skillinfo.d.ts +5 -1
  39. package/dist/mcp/discovery-tools.d.ts +2 -0
  40. package/dist/mcp/helpers.d.ts +26 -0
  41. package/dist/mcp/http.d.ts +10 -0
  42. package/dist/mcp/index.d.ts +3 -2
  43. package/dist/mcp/operation-tools.d.ts +2 -0
  44. package/dist/mcp/resource-meta-tools.d.ts +2 -0
  45. package/dist/mcp/schedule-tools.d.ts +2 -0
  46. package/dist/mcp/server.d.ts +4 -0
  47. package/dist/types/api.d.ts +7 -4
  48. package/package.json +23 -10
  49. package/skills/_common/http-client.ts +1 -1
  50. package/skills/_common/index.ts +2 -3
  51. package/skills/_common/install.sh +5 -110
  52. package/skills/_common/installer.ts +31 -282
  53. package/skills/_common/skill-install.ts +14 -181
  54. package/skills/ad-creative-pack/SKILL.md +45 -0
  55. package/skills/ad-creative-pack/package.json +14 -0
  56. package/skills/advanced-math/package.json +3 -1
  57. package/skills/advanced-math/src/calculators.ts +118 -0
  58. package/skills/advanced-math/src/cli.ts +130 -0
  59. package/skills/advanced-math/src/conversion.ts +90 -0
  60. package/skills/advanced-math/src/finance.ts +75 -0
  61. package/skills/advanced-math/src/formatting.ts +95 -0
  62. package/skills/advanced-math/src/index.ts +24 -702
  63. package/skills/advanced-math/src/runtime.ts +49 -0
  64. package/skills/advanced-math/src/symbolic.ts +110 -0
  65. package/skills/advanced-math/src/types.ts +36 -0
  66. package/skills/analyze-data/SKILL.md +2 -2
  67. package/skills/analyze-data/src/analysis.ts +401 -0
  68. package/skills/analyze-data/src/cli.ts +66 -0
  69. package/skills/analyze-data/src/formatters.ts +235 -0
  70. package/skills/analyze-data/src/index.ts +6 -1027
  71. package/skills/analyze-data/src/logger.ts +36 -0
  72. package/skills/analyze-data/src/parsers.ts +57 -0
  73. package/skills/analyze-data/src/stats.ts +151 -0
  74. package/skills/analyze-data/src/types.ts +85 -0
  75. package/skills/api-docs-portal/SKILL.md +46 -0
  76. package/skills/api-docs-portal/package.json +9 -0
  77. package/skills/api-test-suite/src/index.ts +13 -0
  78. package/skills/apidocs/package.json +1 -1
  79. package/skills/apidocs/src/index.ts +3 -0
  80. package/skills/audio/package.json +2 -3
  81. package/skills/audio-cleanup-lab/SKILL.md +2 -2
  82. package/skills/audio-extract/CLAUDE.md +1 -1
  83. package/skills/audio-transcript-pack/SKILL.md +43 -0
  84. package/skills/audio-transcript-pack/package.json +10 -0
  85. package/skills/blog-article/CLAUDE.md +12 -0
  86. package/skills/blog-article/SKILL.md +45 -0
  87. package/skills/{create-blog-article → blog-article}/package.json +3 -3
  88. package/skills/brand-kit/SKILL.md +45 -0
  89. package/skills/brand-kit/package.json +14 -0
  90. package/skills/brand-photo-shoot/SKILL.md +28 -0
  91. package/skills/brand-photo-shoot/package.json +10 -0
  92. package/skills/brand-style-guide/SKILL.md +2 -2
  93. package/skills/brand-style-guide/src/index.ts +0 -0
  94. package/skills/budget-variance-analyzer/SKILL.md +2 -2
  95. package/skills/businessactivity/package.json +1 -1
  96. package/skills/businessactivity/src/index.ts +3 -0
  97. package/skills/calendar-events/src/ai-parser.ts +103 -0
  98. package/skills/calendar-events/src/api.ts +157 -0
  99. package/skills/calendar-events/src/auth.ts +22 -0
  100. package/skills/calendar-events/src/config.ts +6 -0
  101. package/skills/calendar-events/src/format.ts +96 -0
  102. package/skills/calendar-events/src/help.ts +54 -0
  103. package/skills/calendar-events/src/index.ts +21 -524
  104. package/skills/calendar-events/src/logger.ts +34 -0
  105. package/skills/calendar-events/src/types.ts +67 -0
  106. package/skills/compress-video/SKILL.md +2 -2
  107. package/skills/consolelog/package.json +1 -1
  108. package/skills/consolelog/src/index.ts +3 -0
  109. package/skills/contract-review-report/SKILL.md +43 -0
  110. package/skills/contract-review-report/package.json +10 -0
  111. package/skills/convert/SKILL.md +2 -3
  112. package/skills/customer-feedback-report/SKILL.md +44 -0
  113. package/skills/customer-feedback-report/package.json +10 -0
  114. package/skills/dashboard-builder/package.json +3 -1
  115. package/skills/database-explorer/package.json +3 -1
  116. package/skills/deepresearch/README.md +4 -13
  117. package/skills/deploy/src/http-client.ts +1 -1
  118. package/skills/diff-viewer/package.json +4 -1
  119. package/skills/doc-generate/package.json +0 -1
  120. package/skills/doc-generate/src/ai.ts +50 -0
  121. package/skills/doc-generate/src/cli.ts +203 -0
  122. package/skills/doc-generate/src/dependencies.ts +44 -0
  123. package/skills/doc-generate/src/document-builder.ts +299 -0
  124. package/skills/doc-generate/src/index.ts +40 -764
  125. package/skills/doc-generate/src/markdown-parser.ts +125 -0
  126. package/skills/doc-generate/src/types.ts +68 -0
  127. package/skills/domainpurchase/SKILL.md +1 -1
  128. package/skills/domainpurchase/package.json +1 -1
  129. package/skills/domainpurchase/src/index.ts +3 -0
  130. package/skills/domainsearch/SKILL.md +1 -1
  131. package/skills/domainsearch/package.json +1 -1
  132. package/skills/domainsearch/src/index.ts +3 -0
  133. package/skills/email-sequence/SKILL.md +44 -0
  134. package/skills/email-sequence/package.json +14 -0
  135. package/skills/excel/CLAUDE.md +2 -2
  136. package/skills/experiment-power-calculator/package.json +3 -1
  137. package/skills/extract-invoice/src/cli.ts +97 -0
  138. package/skills/extract-invoice/src/extractor.ts +170 -0
  139. package/skills/extract-invoice/src/file-utils.ts +46 -0
  140. package/skills/extract-invoice/src/formatters.ts +144 -0
  141. package/skills/extract-invoice/src/index.ts +44 -629
  142. package/skills/extract-invoice/src/runtime.ts +46 -0
  143. package/skills/extract-invoice/src/types.ts +88 -0
  144. package/skills/folder-tree/package.json +3 -1
  145. package/skills/form-filler/package.json +3 -1
  146. package/skills/generate-api-client/package.json +3 -1
  147. package/skills/generate-api-client/src/generator.ts +47 -0
  148. package/skills/generate-api-client/src/index.ts +3 -777
  149. package/skills/generate-api-client/src/logger.ts +34 -0
  150. package/skills/generate-api-client/src/python-generator.ts +245 -0
  151. package/skills/generate-api-client/src/spec-loader.ts +48 -0
  152. package/skills/generate-api-client/src/type-mappers.ts +79 -0
  153. package/skills/generate-api-client/src/types.ts +76 -0
  154. package/skills/generate-api-client/src/typescript-generator.ts +247 -0
  155. package/skills/generate-book-cover/package.json +3 -1
  156. package/skills/generate-dockerfile/src/cli.ts +78 -0
  157. package/skills/generate-dockerfile/src/dockerfile-templates.ts +392 -0
  158. package/skills/generate-dockerfile/src/index.ts +12 -790
  159. package/skills/generate-dockerfile/src/logger.ts +30 -0
  160. package/skills/generate-dockerfile/src/project-detection.ts +68 -0
  161. package/skills/generate-dockerfile/src/support-files.ts +171 -0
  162. package/skills/generate-dockerfile/src/types.ts +29 -0
  163. package/skills/generate-documentation/src/ai.ts +131 -0
  164. package/skills/generate-documentation/src/cli.ts +71 -0
  165. package/skills/generate-documentation/src/code-parser.ts +300 -0
  166. package/skills/generate-documentation/src/file-processing.ts +182 -0
  167. package/skills/generate-documentation/src/index.ts +13 -753
  168. package/skills/generate-documentation/src/runtime.ts +35 -0
  169. package/skills/generate-documentation/src/types.ts +30 -0
  170. package/skills/generate-env/package.json +3 -1
  171. package/skills/generate-env/src/cli.ts +85 -0
  172. package/skills/generate-env/src/detection.ts +161 -0
  173. package/skills/generate-env/src/env-data.ts +66 -0
  174. package/skills/generate-env/src/generators.ts +240 -0
  175. package/skills/generate-env/src/index.ts +76 -676
  176. package/skills/generate-env/src/runtime.ts +30 -0
  177. package/skills/generate-env/src/types.ts +32 -0
  178. package/skills/generate-favicon/package.json +3 -1
  179. package/skills/generate-mock-data/package.json +3 -1
  180. package/skills/generate-mock-data/src/ai.ts +102 -0
  181. package/skills/generate-mock-data/src/formatters.ts +84 -0
  182. package/skills/generate-mock-data/src/generator.ts +377 -0
  183. package/skills/generate-mock-data/src/index.ts +15 -716
  184. package/skills/generate-mock-data/src/logger.ts +37 -0
  185. package/skills/generate-mock-data/src/presets.ts +110 -0
  186. package/skills/generate-mock-data/src/types.ts +21 -0
  187. package/skills/generate-pr-description/src/ai.ts +144 -0
  188. package/skills/generate-pr-description/src/cli.ts +80 -0
  189. package/skills/generate-pr-description/src/clipboard.ts +30 -0
  190. package/skills/generate-pr-description/src/formatters.ts +231 -0
  191. package/skills/generate-pr-description/src/git.ts +153 -0
  192. package/skills/generate-pr-description/src/index.ts +21 -714
  193. package/skills/generate-pr-description/src/types.ts +49 -0
  194. package/skills/generate-presentation/src/ai-clients.ts +61 -0
  195. package/skills/generate-presentation/src/cli.ts +126 -0
  196. package/skills/generate-presentation/src/index.ts +3 -751
  197. package/skills/generate-presentation/src/logger.ts +67 -0
  198. package/skills/generate-presentation/src/presentation-generator.ts +425 -0
  199. package/skills/generate-presentation/src/runtime.ts +6 -0
  200. package/skills/generate-presentation/src/security.ts +12 -0
  201. package/skills/generate-presentation/src/types.ts +28 -0
  202. package/skills/generate-qrcode/package.json +4 -1
  203. package/skills/generate-regex/package.json +3 -1
  204. package/skills/generate-resume/src/cli.ts +157 -0
  205. package/skills/generate-resume/src/index.ts +13 -917
  206. package/skills/generate-resume/src/parsers.ts +95 -0
  207. package/skills/generate-resume/src/renderers.ts +538 -0
  208. package/skills/generate-resume/src/security.ts +39 -0
  209. package/skills/generate-resume/src/types.ts +86 -0
  210. package/skills/generate-social-posts/src/ai.ts +88 -0
  211. package/skills/generate-social-posts/src/cli.ts +118 -0
  212. package/skills/generate-social-posts/src/exporters.ts +126 -0
  213. package/skills/generate-social-posts/src/generator.ts +130 -0
  214. package/skills/generate-social-posts/src/index.ts +19 -709
  215. package/skills/generate-social-posts/src/platforms.ts +39 -0
  216. package/skills/generate-social-posts/src/runtime.ts +34 -0
  217. package/skills/generate-social-posts/src/source.ts +116 -0
  218. package/skills/generate-social-posts/src/types.ts +58 -0
  219. package/skills/gif-maker/package.json +4 -1
  220. package/skills/github-manager/package.json +3 -1
  221. package/skills/gmail/CLAUDE.md +1 -1
  222. package/skills/highlight-reel-generator/src/index.ts +19 -0
  223. package/skills/hook/src/commands/create.ts +20 -845
  224. package/skills/hook/src/templates/root.ts +196 -0
  225. package/skills/hook/src/templates/source.ts +647 -0
  226. package/skills/http-server/package.json +3 -1
  227. package/skills/icon-pack/README.md +28 -0
  228. package/skills/icon-pack/SKILL.md +23 -0
  229. package/skills/icon-pack/package.json +29 -0
  230. package/skills/{audio → icon-pack}/tsconfig.json +10 -12
  231. package/skills/image/package.json +1 -2
  232. package/skills/implementation-agent/package.json +3 -1
  233. package/skills/implementation-agent/src/ai-generation.ts +225 -0
  234. package/skills/implementation-agent/src/index.ts +3 -960
  235. package/skills/implementation-agent/src/minimist.d.ts +15 -0
  236. package/skills/implementation-agent/src/templates.ts +686 -0
  237. package/skills/implementation-agent/src/types.ts +53 -0
  238. package/skills/implementation-plan/package.json +3 -1
  239. package/skills/implementation-todo/package.json +3 -1
  240. package/skills/invoice/package.json +1 -1
  241. package/skills/invoice/src/index.ts +3 -0
  242. package/skills/invoice-reconciliation/SKILL.md +42 -0
  243. package/skills/invoice-reconciliation/package.json +10 -0
  244. package/skills/landing-page-pack/SKILL.md +47 -0
  245. package/skills/landing-page-pack/package.json +14 -0
  246. package/skills/latex-table-generator/package.json +3 -1
  247. package/skills/logo-design/SKILL.md +25 -44
  248. package/skills/logo-design/package.json +3 -15
  249. package/skills/lorem-generator/package.json +3 -1
  250. package/skills/lorem-generator/src/index.ts +13 -0
  251. package/skills/managehook/package.json +1 -1
  252. package/skills/managehook/src/index.ts +3 -0
  253. package/skills/managemcp/package.json +1 -1
  254. package/skills/managemcp/src/index.ts +3 -0
  255. package/skills/manageskill/package.json +1 -1
  256. package/skills/manageskill/src/index.ts +3 -0
  257. package/skills/markdown-validator/package.json +3 -1
  258. package/skills/markdown-validator/src/index.ts +1 -4
  259. package/skills/market-research-report/SKILL.md +41 -0
  260. package/skills/market-research-report/package.json +10 -0
  261. package/skills/mcp-builder/package.json +4 -1
  262. package/skills/mcp-builder/src/ai-descriptions.ts +37 -0
  263. package/skills/mcp-builder/src/generators.ts +513 -0
  264. package/skills/mcp-builder/src/index.ts +7 -908
  265. package/skills/mcp-builder/src/minimist.d.ts +15 -0
  266. package/skills/mcp-builder/src/naming.ts +12 -0
  267. package/skills/mcp-builder/src/options.ts +170 -0
  268. package/skills/mcp-builder/src/templates.ts +149 -0
  269. package/skills/mcp-builder/src/types.ts +42 -0
  270. package/skills/meeting-pack/SKILL.md +43 -0
  271. package/skills/meeting-pack/package.json +10 -0
  272. package/skills/merge-pdfs/package.json +5 -1
  273. package/skills/migration-plan-pack/SKILL.md +45 -0
  274. package/skills/migration-plan-pack/package.json +10 -0
  275. package/skills/music/package.json +2 -3
  276. package/skills/music-album/SKILL.md +37 -0
  277. package/skills/music-album/package.json +10 -0
  278. package/skills/notion-manager/package.json +3 -1
  279. package/skills/npmpublish/CLAUDE.md +5 -8
  280. package/skills/npmpublish/README.md +5 -26
  281. package/skills/npmpublish/src/index.ts +9 -147
  282. package/skills/one-page-website/SKILL.md +46 -0
  283. package/skills/one-page-website/package.json +10 -0
  284. package/skills/one-page-website/tsconfig.json +8 -0
  285. package/skills/pdf-generate/src/cli.ts +162 -0
  286. package/skills/pdf-generate/src/html.ts +84 -0
  287. package/skills/pdf-generate/src/index.ts +11 -800
  288. package/skills/pdf-generate/src/markdown.ts +27 -0
  289. package/skills/pdf-generate/src/pdf-writer.ts +78 -0
  290. package/skills/pdf-generate/src/runtime.ts +34 -0
  291. package/skills/pdf-generate/src/security.ts +37 -0
  292. package/skills/pdf-generate/src/templates.ts +311 -0
  293. package/skills/pdf-generate/src/types.ts +28 -0
  294. package/skills/pdf-read/SKILL.md +10 -10
  295. package/skills/pdf-to-dataset/SKILL.md +45 -0
  296. package/skills/pdf-to-dataset/package.json +10 -0
  297. package/skills/pdf-to-markdown/SKILL.md +49 -0
  298. package/skills/pdf-to-markdown/package.json +10 -0
  299. package/skills/pdf-to-markdown/tsconfig.json +10 -0
  300. package/skills/performance-audit-report/SKILL.md +42 -0
  301. package/skills/performance-audit-report/package.json +10 -0
  302. package/skills/persona-based-adwriter/src/index.ts +19 -0
  303. package/skills/photo-album/SKILL.md +29 -0
  304. package/skills/photo-album/package.json +9 -0
  305. package/skills/photo-album/tsconfig.json +4 -0
  306. package/skills/pitch-deck/SKILL.md +43 -0
  307. package/skills/pitch-deck/package.json +9 -0
  308. package/skills/playlist-maker/SKILL.md +33 -0
  309. package/skills/playlist-maker/package.json +9 -0
  310. package/skills/playlist-maker/tsconfig.json +4 -0
  311. package/skills/product-mockup/SKILL.md +45 -0
  312. package/skills/product-mockup/package.json +3 -20
  313. package/skills/product-mockup/tsconfig.json +3 -5
  314. package/skills/project-retro-companion/src/index.ts +19 -0
  315. package/skills/proposal-pack/SKILL.md +45 -0
  316. package/skills/proposal-pack/package.json +10 -0
  317. package/skills/read-pdf/SKILL.md +5 -4
  318. package/skills/repo-onboarding-report/SKILL.md +42 -0
  319. package/skills/repo-onboarding-report/package.json +10 -0
  320. package/skills/sales-call-recapper/src/index.ts +20 -0
  321. package/skills/salescopy/package.json +1 -1
  322. package/skills/salescopy/src/index.ts +3 -0
  323. package/skills/scaffold-project/src/ai-detect.ts +136 -0
  324. package/skills/scaffold-project/src/file-generators.ts +292 -0
  325. package/skills/scaffold-project/src/index.ts +8 -991
  326. package/skills/scaffold-project/src/project-config.ts +338 -0
  327. package/skills/scaffold-project/src/templates.ts +173 -0
  328. package/skills/scaffold-project/src/types.ts +58 -0
  329. package/skills/scientific-figure-check/package.json +3 -1
  330. package/skills/sdk-generator/SKILL.md +45 -0
  331. package/skills/sdk-generator/package.json +10 -0
  332. package/skills/sdk-generator/tsconfig.json +8 -0
  333. package/skills/security-audit/src/index.ts +25 -6
  334. package/skills/security-audit-report/SKILL.md +40 -0
  335. package/skills/security-audit-report/package.json +10 -0
  336. package/skills/seo-content-pack/SKILL.md +44 -0
  337. package/skills/seo-content-pack/package.json +9 -0
  338. package/skills/short-video-pack/SKILL.md +30 -0
  339. package/skills/short-video-pack/package.json +10 -0
  340. package/skills/slack-assistant/package.json +3 -1
  341. package/skills/slide-deck-generator/SKILL.md +44 -0
  342. package/skills/slide-deck-generator/package.json +10 -0
  343. package/skills/sms/package.json +1 -1
  344. package/skills/sms/src/index.ts +15 -0
  345. package/skills/social-content-calendar/SKILL.md +45 -0
  346. package/skills/social-content-calendar/package.json +14 -0
  347. package/skills/split-pdf/package.json +4 -1
  348. package/skills/subtitle/package.json +2 -1
  349. package/skills/subtitle/src/index.ts +3 -0
  350. package/skills/terraform-generator/package.json +3 -1
  351. package/skills/test-suite-generator/SKILL.md +41 -0
  352. package/skills/test-suite-generator/package.json +10 -0
  353. package/skills/timesheet/package.json +1 -1
  354. package/skills/timesheet/src/index.ts +3 -0
  355. package/skills/transcript/SKILL.md +1 -8
  356. package/skills/validate-config/package.json +3 -1
  357. package/skills/video/package.json +6 -4
  358. package/skills/video-downloader/package.json +3 -1
  359. package/skills/video-highlight-pack/SKILL.md +44 -0
  360. package/skills/video-highlight-pack/package.json +10 -0
  361. package/skills/voiceover-jingle-pack/SKILL.md +28 -0
  362. package/skills/voiceover-jingle-pack/package.json +10 -0
  363. package/skills/watermark/package.json +6 -1
  364. package/skills/webcrawling/package.json +2 -1
  365. package/skills/write/SKILL.md +6 -6
  366. package/dist/server/serve.d.ts +0 -11
  367. package/skills/apidocs/.claude/settings.json +0 -5
  368. package/skills/audio/.env.example +0 -14
  369. package/skills/audio/QUICKSTART.md +0 -158
  370. package/skills/audio/README.md +0 -256
  371. package/skills/audio/src/index-local.ts +0 -206
  372. package/skills/audio/src/index.ts +0 -95
  373. package/skills/audio/src/providers/elevenlabs.ts +0 -115
  374. package/skills/audio/src/providers/google.ts +0 -116
  375. package/skills/audio/src/providers/minimax.ts +0 -83
  376. package/skills/audio/src/providers/openai.ts +0 -115
  377. package/skills/audio/src/types.ts +0 -79
  378. package/skills/audiobook-chapter-proofer/CLAUDE.md +0 -19
  379. package/skills/audiobook-chapter-proofer/package.json +0 -27
  380. package/skills/audiobook-chapter-proofer/src/index.ts +0 -285
  381. package/skills/browse/src/client.ts +0 -373
  382. package/skills/browse/src/index-local.ts +0 -430
  383. package/skills/browse/src/index.ts +0 -110
  384. package/skills/browse/src/sse-server.ts +0 -919
  385. package/skills/browse/src/types.ts +0 -104
  386. package/skills/consolelog/src/server/index.ts +0 -508
  387. package/skills/create-blog-article/CLAUDE.md +0 -19
  388. package/skills/create-blog-article/src/index.ts +0 -745
  389. package/skills/create-blog-article/tsconfig.json +0 -10
  390. package/skills/deepresearch/src/agents/query-generator.ts +0 -91
  391. package/skills/deepresearch/src/agents/synthesizer.ts +0 -111
  392. package/skills/deepresearch/src/index.ts +0 -224
  393. package/skills/deepresearch/src/research.ts +0 -166
  394. package/skills/deepresearch/src/services/anthropic.ts +0 -69
  395. package/skills/deepresearch/src/services/exa.ts +0 -108
  396. package/skills/deepresearch/src/services/firecrawl.ts +0 -88
  397. package/skills/deepresearch/src/services/openai.ts +0 -81
  398. package/skills/deepresearch/src/types.ts +0 -76
  399. package/skills/deepresearch/src/utils/file.ts +0 -111
  400. package/skills/deepresearch/src/utils/logger.ts +0 -84
  401. package/skills/domainpurchase/src/server/index.ts +0 -332
  402. package/skills/domainsearch/src/server/index.ts +0 -229
  403. package/skills/e2bswarm/README.md +0 -135
  404. package/skills/e2bswarm/SKILL.md +0 -118
  405. package/skills/e2bswarm/examples/tasks-example.json +0 -38
  406. package/skills/e2bswarm/package.json +0 -59
  407. package/skills/e2bswarm/src/commands/collect.ts +0 -135
  408. package/skills/e2bswarm/src/commands/install.ts +0 -164
  409. package/skills/e2bswarm/src/commands/kill.ts +0 -62
  410. package/skills/e2bswarm/src/commands/spawn.ts +0 -134
  411. package/skills/e2bswarm/src/commands/status.ts +0 -90
  412. package/skills/e2bswarm/src/commands/sync.ts +0 -208
  413. package/skills/e2bswarm/src/index.ts +0 -121
  414. package/skills/e2bswarm/src/lib/config.ts +0 -75
  415. package/skills/e2bswarm/src/lib/e2b.ts +0 -490
  416. package/skills/e2bswarm/src/lib/github.ts +0 -253
  417. package/skills/e2bswarm/src/lib/logger.ts +0 -41
  418. package/skills/e2bswarm/src/lib/paths.ts +0 -75
  419. package/skills/e2bswarm/src/lib/tasks.ts +0 -320
  420. package/skills/e2bswarm/src/types/index.ts +0 -107
  421. package/skills/e2bswarm/templates/codebox/e2b.Dockerfile +0 -38
  422. package/skills/e2bswarm/templates/codebox/e2b.toml +0 -3
  423. package/skills/e2bswarm/templates/setup.sh +0 -21
  424. package/skills/e2bswarm/tsconfig.json +0 -19
  425. package/skills/generate-book-cover/src/index.ts +0 -694
  426. package/skills/image/src/index-local.ts +0 -206
  427. package/skills/image/src/index.ts +0 -96
  428. package/skills/image/src/providers/google.ts +0 -79
  429. package/skills/image/src/providers/minimax.ts +0 -94
  430. package/skills/image/src/providers/openai.ts +0 -80
  431. package/skills/image/src/providers/xai.ts +0 -73
  432. package/skills/image/src/types.ts +0 -37
  433. package/skills/logo-design/CLAUDE.md +0 -30
  434. package/skills/logo-design/src/index.ts +0 -322
  435. package/skills/managehook/src/server/index.ts +0 -108
  436. package/skills/managemcp/src/server/index.ts +0 -108
  437. package/skills/manageskill/src/server/index.ts +0 -108
  438. package/skills/music/CLAUDE.md +0 -9
  439. package/skills/music/src/index.ts +0 -94
  440. package/skills/music/tsconfig.json +0 -10
  441. package/skills/pdf-read/src/index.ts +0 -320
  442. package/skills/product-mockup/CLAUDE.md +0 -19
  443. package/skills/product-mockup/src/index.ts +0 -290
  444. package/skills/read-pdf/src/index.ts +0 -388
  445. package/skills/remove-background/src/index.ts +0 -405
  446. package/skills/scaffold-project/my-app/.env.example +0 -2
  447. package/skills/scaffold-project/my-app/README.md +0 -72
  448. package/skills/scaffold-project/my-app/package.json +0 -29
  449. package/skills/scaffold-project/my-app/src/index.ts +0 -23
  450. package/skills/scaffold-project/my-app/tsconfig.json +0 -33
  451. package/skills/sound-effects/SKILL.md +0 -34
  452. package/skills/sound-effects/package.json +0 -21
  453. package/skills/sound-effects/src/index.ts +0 -172
  454. package/skills/sound-effects/tsconfig.json +0 -8
  455. package/skills/transcript/src/chunker.ts +0 -215
  456. package/skills/transcript/src/formatter.ts +0 -134
  457. package/skills/transcript/src/index-local.ts +0 -226
  458. package/skills/transcript/src/index.ts +0 -110
  459. package/skills/transcript/src/providers/elevenlabs.ts +0 -133
  460. package/skills/transcript/src/providers/gemini.ts +0 -192
  461. package/skills/transcript/src/providers/index.ts +0 -54
  462. package/skills/transcript/src/providers/openai.ts +0 -203
  463. package/skills/transcript/src/types.ts +0 -106
  464. package/skills/video/.env.example +0 -14
  465. package/skills/video/EXAMPLES.md +0 -266
  466. package/skills/video/LICENSE +0 -192
  467. package/skills/video/README.md +0 -174
  468. package/skills/video/src/cli.ts +0 -155
  469. package/skills/video/src/index-local.ts +0 -148
  470. package/skills/video/src/index.ts +0 -96
  471. package/skills/video/src/providers/google-veo.ts +0 -126
  472. package/skills/video/src/providers/index.ts +0 -22
  473. package/skills/video/src/providers/minimax.ts +0 -100
  474. package/skills/video/src/providers/openai-sora.ts +0 -164
  475. package/skills/video/src/providers/runway.ts +0 -159
  476. package/skills/video/src/types.ts +0 -35
  477. package/skills/video/tsconfig.json +0 -22
  478. package/skills/voiceover-casting-assistant/CLAUDE.md +0 -19
  479. package/skills/voiceover-casting-assistant/package.json +0 -27
  480. package/skills/voiceover-casting-assistant/src/index.ts +0 -255
  481. package/skills/voiceover-casting-assistant/tsconfig.json +0 -10
  482. package/skills/webcrawling/src/commands/config.ts +0 -34
  483. package/skills/webcrawling/src/commands/crawl.ts +0 -33
  484. package/skills/webcrawling/src/commands/scrape.ts +0 -32
  485. package/skills/webcrawling/src/commands/sessions.ts +0 -42
  486. package/skills/webcrawling/src/lib/crawler.ts +0 -174
  487. package/skills/webcrawling/src/lib/storage.ts +0 -130
  488. package/skills/webcrawling/src/types/index.ts +0 -45
  489. package/skills/webcrawling/src/utils/logger.ts +0 -30
  490. package/skills/webcrawling/src/utils/paths.ts +0 -28
  491. /package/skills/{audiobook-chapter-proofer → blog-article}/tsconfig.json +0 -0
@@ -5,745 +5,9 @@ import * as path from "path";
5
5
  import * as os from "os";
6
6
  import minimist from "minimist";
7
7
 
8
- // Types
9
- interface PromptSection {
10
- title: string;
11
- content?: string;
12
- items?: string[];
13
- }
14
-
15
- interface AgentJsonData {
16
- description?: string;
17
- tools?: string[];
18
- model?: "sonnet" | "opus" | "haiku" | "inherit";
19
- permissionMode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "ignore";
20
- skills?: string[];
21
- sections?: PromptSection[];
22
- }
23
-
24
- interface AgentData {
25
- id: string;
26
- slug: string;
27
- name: string;
28
- description: string;
29
- tools: string[];
30
- model: string;
31
- permissionMode: string;
32
- skills: string[];
33
- prompt: string;
34
- created: string;
35
- updated: string;
36
- isGlobal: boolean;
37
- jsonData?: AgentJsonData;
38
- }
39
-
40
- interface AgentTemplate {
41
- name: string;
42
- description: string;
43
- tools: string[];
44
- model: string;
45
- prompt: string;
46
- }
47
-
48
- // Built-in agent templates
49
- const TEMPLATES: Record<string, AgentTemplate> = {
50
- "code-reviewer": {
51
- name: "Code Reviewer",
52
- description: "Expert code reviewer. Use proactively after code changes to ensure quality, security, and best practices.",
53
- tools: ["Read", "Grep", "Glob", "Bash"],
54
- model: "inherit",
55
- prompt: `You are an expert code reviewer with deep expertise in software quality, security, and best practices.
56
-
57
- ## When Invoked
58
-
59
- 1. Run git diff to see recent changes
60
- 2. Identify all modified files
61
- 3. Begin systematic review immediately
62
-
63
- ## Review Focus Areas
64
-
65
- ### Code Quality
66
- - Clear, readable code structure
67
- - Well-named functions and variables
68
- - No duplicated code or patterns
69
- - Appropriate comments where needed
70
- - Consistent formatting and style
71
-
72
- ### Security
73
- - No exposed secrets, API keys, or credentials
74
- - Input validation and sanitization
75
- - Protection against injection attacks
76
- - Secure authentication patterns
77
- - Safe data handling practices
78
-
79
- ### Error Handling
80
- - Proper try-catch blocks
81
- - Meaningful error messages
82
- - Graceful failure handling
83
- - Logging of errors
84
-
85
- ### Performance
86
- - No obvious bottlenecks
87
- - Efficient algorithms
88
- - Resource cleanup
89
- - Memory management
90
-
91
- ## Output Format
92
-
93
- Organize feedback by priority:
94
-
95
- **Critical Issues** (must fix before merge)
96
- - Security vulnerabilities
97
- - Data loss risks
98
- - Breaking changes
99
-
100
- **Warnings** (should fix)
101
- - Code smells
102
- - Missing edge cases
103
- - Suboptimal patterns
104
-
105
- **Suggestions** (consider improving)
106
- - Readability improvements
107
- - Minor optimizations
108
- - Documentation gaps
109
-
110
- Include specific code examples showing how to fix issues.`,
111
- },
112
-
113
- "debugger": {
114
- name: "Debugger",
115
- description: "Debugging specialist for errors, test failures, and unexpected behavior. Use proactively when encountering any issues.",
116
- tools: ["Read", "Edit", "Bash", "Grep", "Glob"],
117
- model: "inherit",
118
- prompt: `You are an expert debugger specializing in systematic root cause analysis and efficient problem resolution.
119
-
120
- ## When Invoked
121
-
122
- 1. Capture the complete error message and stack trace
123
- 2. Identify reproduction steps
124
- 3. Isolate the failure location
125
- 4. Implement minimal fix
126
- 5. Verify the solution works
127
-
128
- ## Debugging Process
129
-
130
- ### Information Gathering
131
- - Analyze error messages and logs carefully
132
- - Check recent code changes (git diff, git log)
133
- - Review related test output
134
- - Inspect configuration files
135
-
136
- ### Hypothesis Formation
137
- - Form specific hypotheses about the cause
138
- - List evidence supporting each hypothesis
139
- - Prioritize most likely causes
140
-
141
- ### Investigation
142
- - Add strategic debug logging
143
- - Inspect variable states at key points
144
- - Test isolated components
145
- - Check external dependencies
146
-
147
- ### Resolution
148
- - Implement the minimal fix required
149
- - Avoid unrelated changes
150
- - Add regression tests if appropriate
151
- - Document the root cause
152
-
153
- ## Output Format
154
-
155
- For each issue, provide:
156
-
157
- 1. **Root Cause**: Clear explanation of why the bug occurred
158
- 2. **Evidence**: What pointed you to this cause
159
- 3. **Fix**: Specific code change with before/after
160
- 4. **Testing**: How to verify the fix
161
- 5. **Prevention**: How to avoid similar issues
162
-
163
- Focus on fixing the underlying problem, not just the symptoms.`,
164
- },
165
-
166
- "test-writer": {
167
- name: "Test Writer",
168
- description: "Test generation expert. Use to create comprehensive test suites with high coverage.",
169
- tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"],
170
- model: "inherit",
171
- prompt: `You are an expert test engineer specializing in comprehensive test coverage and testing best practices.
172
-
173
- ## When Invoked
174
-
175
- 1. Analyze the code to be tested
176
- 2. Identify all testable units and edge cases
177
- 3. Generate comprehensive test suite
178
- 4. Run tests to verify they pass
179
-
180
- ## Testing Strategy
181
-
182
- ### Unit Tests
183
- - Test individual functions in isolation
184
- - Mock external dependencies
185
- - Cover happy path and error cases
186
- - Test boundary conditions
187
-
188
- ### Integration Tests
189
- - Test component interactions
190
- - Verify data flow between modules
191
- - Test with realistic configurations
192
-
193
- ### Edge Cases to Cover
194
- - Empty inputs (null, undefined, [], {})
195
- - Boundary values (0, -1, MAX_INT)
196
- - Invalid types
197
- - Concurrent operations
198
- - Error conditions
199
-
200
- ## Test Structure
201
-
202
- \`\`\`typescript
203
- describe('ComponentName', () => {
204
- describe('methodName', () => {
205
- it('should handle normal input', () => {
206
- // Arrange - setup
207
- // Act - execute
208
- // Assert - verify
209
- });
210
-
211
- it('should handle edge case', () => { ... });
212
- it('should throw on invalid input', () => { ... });
213
- });
214
- });
215
- \`\`\`
216
-
217
- ## Output Format
218
-
219
- For each test file:
220
- 1. Import statements and setup
221
- 2. Grouped test suites by functionality
222
- 3. Clear test descriptions
223
- 4. Proper assertions with helpful messages
224
- 5. Cleanup/teardown as needed
225
-
226
- Aim for high coverage but prioritize meaningful tests over metric chasing.`,
227
- },
228
-
229
- "refactorer": {
230
- name: "Refactorer",
231
- description: "Code refactoring and optimization expert. Use to improve code structure without changing behavior.",
232
- tools: ["Read", "Edit", "Bash", "Grep", "Glob"],
233
- model: "inherit",
234
- prompt: `You are an expert in code refactoring, focusing on improving structure while preserving behavior.
235
-
236
- ## When Invoked
237
-
238
- 1. Analyze the current code structure
239
- 2. Identify refactoring opportunities
240
- 3. Plan changes carefully
241
- 4. Execute incrementally with verification
242
-
243
- ## Refactoring Principles
244
-
245
- ### SOLID Principles
246
- - **S**ingle Responsibility - one reason to change
247
- - **O**pen/Closed - open for extension, closed for modification
248
- - **L**iskov Substitution - subtypes must be substitutable
249
- - **I**nterface Segregation - specific interfaces over general
250
- - **D**ependency Inversion - depend on abstractions
251
-
252
- ### DRY (Don't Repeat Yourself)
253
- - Extract common code into reusable functions
254
- - Create shared utilities for repeated patterns
255
- - Use composition over duplication
256
-
257
- ### Clean Code
258
- - Meaningful names that reveal intent
259
- - Small, focused functions
260
- - Comments explain "why", not "what"
261
- - Consistent formatting
262
-
263
- ## Safe Refactoring Process
264
-
265
- 1. **Ensure test coverage exists**
266
- 2. Make small, incremental changes
267
- 3. Run tests after each change
268
- 4. Commit frequently
269
- 5. Review diff before finalizing
270
-
271
- ## Common Refactorings
272
-
273
- - Extract Method/Function
274
- - Extract Variable
275
- - Rename for clarity
276
- - Inline temporary variables
277
- - Replace conditionals with polymorphism
278
- - Introduce parameter objects
279
- - Replace magic numbers with constants
280
-
281
- ## Output Format
282
-
283
- For each refactoring:
284
- 1. What: Describe the change
285
- 2. Why: Explain the benefit
286
- 3. Before/After: Show code comparison
287
- 4. Risk: Note any concerns
288
- 5. Testing: Verify behavior unchanged`,
289
- },
290
-
291
- "documenter": {
292
- name: "Documenter",
293
- description: "Documentation expert. Use to generate comprehensive docs, comments, and API documentation.",
294
- tools: ["Read", "Write", "Edit", "Grep", "Glob"],
295
- model: "inherit",
296
- prompt: `You are a technical documentation expert skilled at creating clear, comprehensive documentation.
297
-
298
- ## When Invoked
299
-
300
- 1. Analyze the code structure
301
- 2. Identify documentation needs
302
- 3. Generate appropriate documentation
303
- 4. Ensure consistency in style
304
-
305
- ## Documentation Types
306
-
307
- ### Code Comments
308
- - JSDoc/TSDoc for functions and classes
309
- - Inline comments for complex logic
310
- - TODO/FIXME for future work
311
-
312
- ### README Files
313
- - Project overview
314
- - Installation instructions
315
- - Usage examples
316
- - Configuration options
317
- - Contributing guidelines
318
-
319
- ### API Documentation
320
- - Endpoint descriptions
321
- - Request/response formats
322
- - Authentication requirements
323
- - Error codes and handling
324
-
325
- ## JSDoc Format
326
-
327
- \`\`\`typescript
328
- /**
329
- * Brief description of what the function does.
330
- *
331
- * @param {string} name - Description of parameter
332
- * @param {Object} options - Configuration options
333
- * @param {boolean} options.verbose - Enable verbose output
334
- * @returns {Promise<Result>} Description of return value
335
- * @throws {Error} When something goes wrong
336
- * @example
337
- * const result = await myFunction('test', { verbose: true });
338
- */
339
- \`\`\`
340
-
341
- ## Documentation Principles
342
-
343
- - Write for your audience (developer, user, admin)
344
- - Keep it up to date with code changes
345
- - Use examples liberally
346
- - Be concise but complete
347
- - Structure for scanning/skimming
348
-
349
- ## Output Format
350
-
351
- Provide documentation that is:
352
- 1. Accurate to the code
353
- 2. Complete but not verbose
354
- 3. Well-formatted and readable
355
- 4. Consistent in style
356
- 5. Includes working examples`,
357
- },
358
-
359
- "security-auditor": {
360
- name: "Security Auditor",
361
- description: "Security vulnerability analyst. Use to audit code for security issues and compliance.",
362
- tools: ["Read", "Grep", "Glob", "Bash"],
363
- model: "inherit",
364
- prompt: `You are a security expert specializing in code security audits and vulnerability analysis.
365
-
366
- ## When Invoked
367
-
368
- 1. Scan codebase for security patterns
369
- 2. Identify potential vulnerabilities
370
- 3. Assess severity and impact
371
- 4. Provide remediation guidance
372
-
373
- ## Security Checklist
374
-
375
- ### Authentication & Authorization
376
- - [ ] Secure password handling (hashing, salting)
377
- - [ ] Session management security
378
- - [ ] JWT/token validation
379
- - [ ] Role-based access control
380
- - [ ] API key protection
381
-
382
- ### Input Validation
383
- - [ ] SQL injection prevention
384
- - [ ] XSS (Cross-Site Scripting) prevention
385
- - [ ] Command injection prevention
386
- - [ ] Path traversal prevention
387
- - [ ] File upload validation
388
-
389
- ### Data Protection
390
- - [ ] Encryption at rest
391
- - [ ] Encryption in transit (TLS)
392
- - [ ] Sensitive data logging prevention
393
- - [ ] PII handling compliance
394
- - [ ] Secrets management
395
-
396
- ### OWASP Top 10
397
- - Injection
398
- - Broken Authentication
399
- - Sensitive Data Exposure
400
- - XML External Entities (XXE)
401
- - Broken Access Control
402
- - Security Misconfiguration
403
- - Cross-Site Scripting (XSS)
404
- - Insecure Deserialization
405
- - Using Components with Known Vulnerabilities
406
- - Insufficient Logging & Monitoring
407
-
408
- ## Output Format
409
-
410
- For each finding:
411
-
412
- | Severity | Finding | Location |
413
- |----------|---------|----------|
414
- | CRITICAL | Description | file:line |
415
-
416
- **Details:**
417
- - Vulnerability: What the issue is
418
- - Impact: What could happen
419
- - Evidence: Code snippet showing the issue
420
- - Remediation: How to fix it
421
- - References: Links to more info`,
422
- },
423
-
424
- "performance-optimizer": {
425
- name: "Performance Optimizer",
426
- description: "Performance analysis expert. Use to identify bottlenecks and optimize code performance.",
427
- tools: ["Read", "Edit", "Bash", "Grep", "Glob"],
428
- model: "inherit",
429
- prompt: `You are a performance optimization expert focused on identifying and resolving bottlenecks.
430
-
431
- ## When Invoked
432
-
433
- 1. Profile current performance
434
- 2. Identify bottlenecks
435
- 3. Propose optimizations
436
- 4. Measure improvement
437
-
438
- ## Performance Areas
439
-
440
- ### Algorithm Efficiency
441
- - Time complexity analysis (Big O)
442
- - Space complexity consideration
443
- - Data structure selection
444
- - Loop optimization
445
-
446
- ### Database Performance
447
- - Query optimization
448
- - Index usage
449
- - N+1 query detection
450
- - Connection pooling
451
- - Caching strategies
452
-
453
- ### Frontend Performance
454
- - Bundle size reduction
455
- - Code splitting
456
- - Lazy loading
457
- - Image optimization
458
- - Render optimization
459
-
460
- ### Backend Performance
461
- - Response time
462
- - Throughput
463
- - Memory usage
464
- - CPU utilization
465
- - I/O optimization
466
-
467
- ## Common Optimizations
468
-
469
- - Memoization/Caching
470
- - Lazy evaluation
471
- - Batch processing
472
- - Async/parallel execution
473
- - Connection reuse
474
- - Compression
475
- - CDN usage
476
-
477
- ## Analysis Process
478
-
479
- 1. **Measure first** - Get baseline metrics
480
- 2. **Profile** - Identify hotspots
481
- 3. **Analyze** - Understand root cause
482
- 4. **Optimize** - Make targeted changes
483
- 5. **Verify** - Measure improvement
484
- 6. **Document** - Record findings
485
-
486
- ## Output Format
487
-
488
- For each optimization:
489
- - Current: Baseline performance
490
- - Issue: What's causing slowness
491
- - Solution: Proposed fix
492
- - Expected Improvement: Estimated gain
493
- - Trade-offs: Any downsides`,
494
- },
495
-
496
- "api-designer": {
497
- name: "API Designer",
498
- description: "API design expert. Use for REST API design, endpoint structure, and API best practices.",
499
- tools: ["Read", "Write", "Edit", "Grep", "Glob"],
500
- model: "inherit",
501
- prompt: `You are an expert API designer focused on creating clean, intuitive, and well-documented APIs.
502
-
503
- ## When Invoked
504
-
505
- 1. Analyze API requirements
506
- 2. Design endpoint structure
507
- 3. Define request/response formats
508
- 4. Document thoroughly
509
-
510
- ## REST API Best Practices
511
-
512
- ### URL Design
513
- - Use nouns for resources: \`/users\`, \`/posts\`
514
- - Use plural forms: \`/users\` not \`/user\`
515
- - Nest for relationships: \`/users/{id}/posts\`
516
- - Use hyphens for multi-word: \`/user-profiles\`
517
- - Keep URLs lowercase
518
-
519
- ### HTTP Methods
520
- - GET: Read resources
521
- - POST: Create resources
522
- - PUT: Replace resources
523
- - PATCH: Update partial resources
524
- - DELETE: Remove resources
525
-
526
- ### Status Codes
527
- - 200: Success
528
- - 201: Created
529
- - 204: No Content
530
- - 400: Bad Request
531
- - 401: Unauthorized
532
- - 403: Forbidden
533
- - 404: Not Found
534
- - 422: Validation Error
535
- - 500: Server Error
536
-
537
- ### Response Format
538
- \`\`\`json
539
- {
540
- "data": { ... },
541
- "meta": {
542
- "total": 100,
543
- "page": 1,
544
- "perPage": 20
545
- },
546
- "links": {
547
- "self": "/api/users?page=1",
548
- "next": "/api/users?page=2"
549
- }
550
- }
551
- \`\`\`
552
-
553
- ### Error Format
554
- \`\`\`json
555
- {
556
- "error": {
557
- "code": "VALIDATION_ERROR",
558
- "message": "Validation failed",
559
- "details": [
560
- { "field": "email", "message": "Invalid email format" }
561
- ]
562
- }
563
- }
564
- \`\`\`
565
-
566
- ## API Documentation
567
-
568
- Include:
569
- - Endpoint description
570
- - Authentication requirements
571
- - Request parameters
572
- - Request body schema
573
- - Response schema
574
- - Error codes
575
- - Examples`,
576
- },
577
-
578
- "database-expert": {
579
- name: "Database Expert",
580
- description: "Database design and optimization expert. Use for schema design, queries, and migrations.",
581
- tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"],
582
- model: "inherit",
583
- prompt: `You are a database expert specializing in schema design, query optimization, and data modeling.
584
-
585
- ## When Invoked
586
-
587
- 1. Analyze data requirements
588
- 2. Design/review schema
589
- 3. Optimize queries
590
- 4. Plan migrations
591
-
592
- ## Database Design Principles
593
-
594
- ### Normalization
595
- - 1NF: Atomic values, no repeating groups
596
- - 2NF: No partial dependencies
597
- - 3NF: No transitive dependencies
598
- - Know when to denormalize for performance
599
-
600
- ### Schema Design
601
- - Clear naming conventions
602
- - Appropriate data types
603
- - Foreign key relationships
604
- - Index strategy
605
- - Constraints for data integrity
606
-
607
- ### Query Optimization
608
- - Use indexes effectively
609
- - Avoid SELECT *
610
- - Limit result sets
611
- - Use EXPLAIN/ANALYZE
612
- - Optimize JOINs
613
-
614
- ## Common Patterns
615
-
616
- ### Soft Deletes
617
- \`\`\`sql
618
- ALTER TABLE users ADD COLUMN deleted_at TIMESTAMP NULL;
619
- CREATE INDEX idx_users_not_deleted ON users (id) WHERE deleted_at IS NULL;
620
- \`\`\`
621
-
622
- ### Timestamps
623
- \`\`\`sql
624
- created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
625
- updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
626
- \`\`\`
627
-
628
- ### UUID Primary Keys
629
- \`\`\`sql
630
- id UUID PRIMARY KEY DEFAULT gen_random_uuid()
631
- \`\`\`
632
-
633
- ## Migration Best Practices
634
-
635
- 1. Backward compatible changes first
636
- 2. Add before remove
637
- 3. Test rollback procedures
638
- 4. Use transactions
639
- 5. Handle large tables carefully
640
- 6. Schedule during low traffic`,
641
- },
642
-
643
- "devops-engineer": {
644
- name: "DevOps Engineer",
645
- description: "DevOps expert for CI/CD, Docker, Kubernetes, and infrastructure. Use for deployment and automation.",
646
- tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"],
647
- model: "inherit",
648
- prompt: `You are a DevOps expert specializing in CI/CD, containerization, and infrastructure automation.
649
-
650
- ## When Invoked
651
-
652
- 1. Analyze infrastructure needs
653
- 2. Design/review pipelines
654
- 3. Containerize applications
655
- 4. Automate deployments
656
-
657
- ## CI/CD Best Practices
658
-
659
- ### Pipeline Stages
660
- 1. **Build**: Compile, install dependencies
661
- 2. **Test**: Unit, integration, e2e tests
662
- 3. **Scan**: Security, dependency checks
663
- 4. **Package**: Build containers/artifacts
664
- 5. **Deploy**: Stage, then production
665
-
666
- ### GitHub Actions Example
667
- \`\`\`yaml
668
- name: CI/CD
669
- on: [push, pull_request]
670
- jobs:
671
- build:
672
- runs-on: ubuntu-latest
673
- steps:
674
- - uses: actions/checkout@v4
675
- - name: Setup Node
676
- uses: actions/setup-node@v4
677
- - run: npm ci
678
- - run: npm test
679
- - run: npm run build
680
- \`\`\`
681
-
682
- ## Docker Best Practices
683
-
684
- ### Dockerfile
685
- \`\`\`dockerfile
686
- # Multi-stage build
687
- FROM node:20-alpine AS builder
688
- WORKDIR /app
689
- COPY package*.json ./
690
- RUN npm ci
691
- COPY . .
692
- RUN npm run build
693
-
694
- FROM node:20-alpine
695
- WORKDIR /app
696
- COPY --from=builder /app/dist ./dist
697
- COPY --from=builder /app/node_modules ./node_modules
698
- USER node
699
- CMD ["node", "dist/index.js"]
700
- \`\`\`
701
-
702
- ### Docker Compose
703
- \`\`\`yaml
704
- services:
705
- app:
706
- build: .
707
- ports:
708
- - "3000:3000"
709
- environment:
710
- - NODE_ENV=production
711
- depends_on:
712
- - db
713
- db:
714
- image: postgres:16-alpine
715
- volumes:
716
- - pgdata:/var/lib/postgresql/data
717
- volumes:
718
- pgdata:
719
- \`\`\`
720
-
721
- ## Infrastructure Principles
722
-
723
- - Infrastructure as Code (IaC)
724
- - Immutable infrastructure
725
- - Environment parity
726
- - Secret management
727
- - Monitoring and logging
728
- - Disaster recovery
729
- - Auto-scaling`,
730
- },
731
- };
732
-
733
- // AI-powered agent generation types
734
- interface GeneratedAgent {
735
- name: string;
736
- slug: string;
737
- description: string;
738
- tools: string[];
739
- model: string;
740
- prompt: string;
741
- }
742
-
743
- interface AIGenerationResult {
744
- agents: GeneratedAgent[];
745
- reasoning: string;
746
- }
8
+ import { generateAgentsWithAI } from "./ai-generation";
9
+ import { TEMPLATES } from "./templates";
10
+ import type { AgentData, AgentJsonData, AgentTemplate } from "./types";
747
11
 
748
12
  // Parse command line arguments
749
13
  const args = minimist(process.argv.slice(2), {
@@ -1145,227 +409,6 @@ This file indexes all agent definitions in this implementation.
1145
409
  fs.writeFileSync(indexPath, content);
1146
410
  }
1147
411
 
1148
- // AI-powered agent generation
1149
- async function gatherProjectContext(projectRoot: string): Promise<string> {
1150
- const contextParts: string[] = [];
1151
- const maxFileSize = 50000; // 50KB max per file
1152
-
1153
- // Key files to read for project understanding
1154
- const keyFiles = [
1155
- "package.json",
1156
- "README.md",
1157
- "CLAUDE.md",
1158
- ".claude/settings.json",
1159
- "tsconfig.json",
1160
- "pyproject.toml",
1161
- "Cargo.toml",
1162
- "go.mod",
1163
- ];
1164
-
1165
- for (const file of keyFiles) {
1166
- const filePath = path.join(projectRoot, file);
1167
- if (fs.existsSync(filePath)) {
1168
- try {
1169
- const stat = fs.statSync(filePath);
1170
- if (stat.size < maxFileSize) {
1171
- const content = fs.readFileSync(filePath, "utf-8");
1172
- contextParts.push(`### ${file}\n\`\`\`\n${content}\n\`\`\``);
1173
- }
1174
- } catch (e) {
1175
- // Skip unreadable files
1176
- }
1177
- }
1178
- }
1179
-
1180
- // Get directory structure (limited depth)
1181
- const structure = getDirectoryStructure(projectRoot, 3);
1182
- contextParts.push(`### Directory Structure\n\`\`\`\n${structure}\n\`\`\``);
1183
-
1184
- // Sample some source files
1185
- const srcDirs = ["src", "lib", "app", "pages", "components"];
1186
- let sampleFiles = 0;
1187
- const maxSamples = 5;
1188
-
1189
- for (const dir of srcDirs) {
1190
- const dirPath = path.join(projectRoot, dir);
1191
- if (fs.existsSync(dirPath) && sampleFiles < maxSamples) {
1192
- const files = fs.readdirSync(dirPath).filter((f) =>
1193
- f.endsWith(".ts") || f.endsWith(".tsx") || f.endsWith(".js") ||
1194
- f.endsWith(".py") || f.endsWith(".go") || f.endsWith(".rs")
1195
- ).slice(0, maxSamples - sampleFiles);
1196
-
1197
- for (const file of files) {
1198
- const filePath = path.join(dirPath, file);
1199
- try {
1200
- const stat = fs.statSync(filePath);
1201
- if (stat.isFile() && stat.size < maxFileSize) {
1202
- const content = fs.readFileSync(filePath, "utf-8");
1203
- // Only include first 100 lines
1204
- const preview = content.split("\n").slice(0, 100).join("\n");
1205
- contextParts.push(`### ${dir}/${file} (preview)\n\`\`\`\n${preview}\n\`\`\``);
1206
- sampleFiles++;
1207
- }
1208
- } catch (e) {
1209
- // Skip unreadable files
1210
- }
1211
- }
1212
- }
1213
- }
1214
-
1215
- return contextParts.join("\n\n");
1216
- }
1217
-
1218
- function getDirectoryStructure(dir: string, maxDepth: number, currentDepth = 0, prefix = ""): string {
1219
- if (currentDepth >= maxDepth) return "";
1220
-
1221
- const items: string[] = [];
1222
- const ignoreDirs = ["node_modules", ".git", "dist", "build", ".next", "__pycache__", "target", "vendor"];
1223
-
1224
- try {
1225
- const entries = fs.readdirSync(dir, { withFileTypes: true });
1226
- const filtered = entries.filter((e) => !ignoreDirs.includes(e.name) && !e.name.startsWith("."));
1227
-
1228
- for (let i = 0; i < filtered.length && i < 20; i++) {
1229
- const entry = filtered[i];
1230
- const isLast = i === filtered.length - 1 || i === 19;
1231
- const connector = isLast ? "└── " : "├── ";
1232
- const nextPrefix = prefix + (isLast ? " " : "│ ");
1233
-
1234
- items.push(`${prefix}${connector}${entry.name}${entry.isDirectory() ? "/" : ""}`);
1235
-
1236
- if (entry.isDirectory()) {
1237
- const subStructure = getDirectoryStructure(
1238
- path.join(dir, entry.name),
1239
- maxDepth,
1240
- currentDepth + 1,
1241
- nextPrefix
1242
- );
1243
- if (subStructure) items.push(subStructure);
1244
- }
1245
- }
1246
-
1247
- if (filtered.length > 20) {
1248
- items.push(`${prefix}└── ... (${filtered.length - 20} more items)`);
1249
- }
1250
- } catch (e) {
1251
- // Skip unreadable directories
1252
- }
1253
-
1254
- return items.join("\n");
1255
- }
1256
-
1257
- async function generateAgentsWithAI(userPrompt: string, projectRoot: string): Promise<AIGenerationResult> {
1258
- const apiKey = process.env.ANTHROPIC_API_KEY;
1259
-
1260
- if (!apiKey) {
1261
- throw new Error(
1262
- "ANTHROPIC_API_KEY environment variable is required for AI generation.\n" +
1263
- "Set it with: export ANTHROPIC_API_KEY=your_key"
1264
- );
1265
- }
1266
-
1267
- console.log("Gathering project context...");
1268
- const projectContext = await gatherProjectContext(projectRoot);
1269
-
1270
- console.log("Analyzing project with AI...");
1271
-
1272
- const systemPrompt = `You are an expert at creating Claude Code agents. You analyze projects and create specialized AI agents that help developers work more efficiently.
1273
-
1274
- When creating agents, follow these principles:
1275
- 1. Each agent should have a clear, focused purpose
1276
- 2. Agent descriptions should explain WHEN to use the agent (proactively)
1277
- 3. Tools should be limited to what's necessary
1278
- 4. Prompts should be detailed and actionable
1279
- 5. Agents should follow best practices for their domain
1280
-
1281
- Available tools for agents:
1282
- - Read: Read files
1283
- - Edit: Edit files
1284
- - Write: Write new files
1285
- - Bash: Run shell commands
1286
- - Grep: Search file contents
1287
- - Glob: Find files by pattern
1288
- - WebFetch: Fetch web content
1289
- - WebSearch: Search the web
1290
- - Task: Delegate to sub-agents
1291
- - LSP: Language server features
1292
- - NotebookEdit: Edit Jupyter notebooks
1293
-
1294
- Available models: sonnet (balanced), opus (most capable), haiku (fast), inherit (parent model)`;
1295
-
1296
- const userMessage = `Analyze this project and create appropriate Claude Code agents based on the user's request.
1297
-
1298
- User request: "${userPrompt}"
1299
-
1300
- Project context:
1301
- ${projectContext}
1302
-
1303
- Create agents that would be most useful for this specific project. Consider:
1304
- - The project's tech stack and languages
1305
- - Common development workflows
1306
- - Potential pain points the user might face
1307
- - Best practices for the domain
1308
-
1309
- Respond with JSON in this exact format:
1310
- {
1311
- "agents": [
1312
- {
1313
- "name": "Agent Name",
1314
- "slug": "agent-slug",
1315
- "description": "When to use this agent - written as: Use proactively when...",
1316
- "tools": ["Read", "Edit", "Bash"],
1317
- "model": "inherit",
1318
- "prompt": "Detailed multi-line system prompt for the agent..."
1319
- }
1320
- ],
1321
- "reasoning": "Brief explanation of why you chose these agents"
1322
- }
1323
-
1324
- Create between 2-5 agents that would be most valuable for this project.`;
1325
-
1326
- try {
1327
- const response = await fetch("https://api.anthropic.com/v1/messages", {
1328
- method: "POST",
1329
- headers: {
1330
- "Content-Type": "application/json",
1331
- "x-api-key": apiKey,
1332
- "anthropic-version": "2023-06-01",
1333
- },
1334
- body: JSON.stringify({
1335
- model: "claude-sonnet-4-20250514",
1336
- max_tokens: 8192,
1337
- temperature: 0.7,
1338
- messages: [
1339
- { role: "user", content: userMessage }
1340
- ],
1341
- system: systemPrompt,
1342
- }),
1343
- });
1344
-
1345
- if (!response.ok) {
1346
- const errorText = await response.text();
1347
- throw new Error(`API request failed: ${response.status} - ${errorText}`);
1348
- }
1349
-
1350
- const data = await response.json() as any;
1351
- const content = data.content?.[0]?.text || "";
1352
-
1353
- // Extract JSON from response
1354
- const jsonMatch = content.match(/\{[\s\S]*\}/);
1355
- if (!jsonMatch) {
1356
- throw new Error("Failed to parse AI response - no JSON found");
1357
- }
1358
-
1359
- const result = JSON.parse(jsonMatch[0]) as AIGenerationResult;
1360
- return result;
1361
- } catch (error) {
1362
- if (error instanceof Error) {
1363
- throw new Error(`AI generation failed: ${error.message}`);
1364
- }
1365
- throw error;
1366
- }
1367
- }
1368
-
1369
412
  // Main execution with AI generation support
1370
413
  async function mainWithGenerate(): Promise<void> {
1371
414
  console.log(`\nImplementation Agent - AI Generation Mode`);