@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
@@ -1,914 +1,13 @@
1
1
  #!/usr/bin/env bun
2
2
 
3
3
  import * as fs from "fs";
4
- import * as path from "path";
5
- import minimist from "minimist";
6
- import OpenAI from "openai";
7
4
 
8
- // Types
9
- interface ToolDef {
10
- name: string;
11
- description: string;
12
- parameters: Record<string, ParameterDef>;
13
- }
14
-
15
- interface ParameterDef {
16
- type: "string" | "number" | "boolean" | "array" | "object";
17
- description: string;
18
- required?: boolean;
19
- default?: any;
20
- items?: { type: string };
21
- }
22
-
23
- interface ResourceDef {
24
- uri: string;
25
- name: string;
26
- description: string;
27
- mimeType?: string;
28
- }
29
-
30
- interface PromptDef {
31
- name: string;
32
- description: string;
33
- arguments?: { name: string; description: string; required?: boolean }[];
34
- }
35
-
36
- interface BuildOptions {
37
- name: string;
38
- language: "typescript" | "python";
39
- template: string | null;
40
- tools: ToolDef[];
41
- resources: ResourceDef[];
42
- prompts: PromptDef[];
43
- output: string;
44
- overwrite: boolean;
45
- aiDescriptions: boolean;
46
- withTests: boolean;
47
- withDocker: boolean;
48
- }
49
-
50
- // Templates
51
- const TEMPLATES: Record<string, { tools: ToolDef[]; resources: ResourceDef[]; prompts: PromptDef[] }> = {
52
- weather: {
53
- tools: [
54
- {
55
- name: "get_current_weather",
56
- description: "Get current weather conditions for a location",
57
- parameters: {
58
- location: { type: "string", description: "City name or coordinates", required: true },
59
- units: { type: "string", description: "Temperature units: celsius or fahrenheit", default: "celsius" },
60
- },
61
- },
62
- {
63
- name: "get_forecast",
64
- description: "Get weather forecast for the next few days",
65
- parameters: {
66
- location: { type: "string", description: "City name or coordinates", required: true },
67
- days: { type: "number", description: "Number of days to forecast", default: 5 },
68
- },
69
- },
70
- ],
71
- resources: [{ uri: "weather://locations", name: "Saved Locations", description: "List of saved weather locations", mimeType: "application/json" }],
72
- prompts: [{ name: "weather_summary", description: "Generate a weather summary", arguments: [{ name: "location", description: "Location to summarize", required: true }] }],
73
- },
74
- database: {
75
- tools: [
76
- {
77
- name: "query",
78
- description: "Execute a SQL query and return results",
79
- parameters: {
80
- sql: { type: "string", description: "SQL query to execute", required: true },
81
- params: { type: "array", description: "Query parameters", items: { type: "string" } },
82
- },
83
- },
84
- {
85
- name: "insert",
86
- description: "Insert a record into a table",
87
- parameters: {
88
- table: { type: "string", description: "Table name", required: true },
89
- data: { type: "object", description: "Data to insert", required: true },
90
- },
91
- },
92
- {
93
- name: "update",
94
- description: "Update records in a table",
95
- parameters: {
96
- table: { type: "string", description: "Table name", required: true },
97
- data: { type: "object", description: "Data to update", required: true },
98
- where: { type: "string", description: "WHERE clause", required: true },
99
- },
100
- },
101
- {
102
- name: "delete",
103
- description: "Delete records from a table",
104
- parameters: {
105
- table: { type: "string", description: "Table name", required: true },
106
- where: { type: "string", description: "WHERE clause", required: true },
107
- },
108
- },
109
- ],
110
- resources: [
111
- { uri: "db://schema", name: "Database Schema", description: "Database schema information", mimeType: "application/json" },
112
- { uri: "db://tables", name: "Tables List", description: "List of all tables", mimeType: "application/json" },
113
- ],
114
- prompts: [],
115
- },
116
- api: {
117
- tools: [
118
- {
119
- name: "get",
120
- description: "Make a GET request to an API endpoint",
121
- parameters: {
122
- url: { type: "string", description: "API endpoint URL", required: true },
123
- headers: { type: "object", description: "Request headers" },
124
- },
125
- },
126
- {
127
- name: "post",
128
- description: "Make a POST request to an API endpoint",
129
- parameters: {
130
- url: { type: "string", description: "API endpoint URL", required: true },
131
- body: { type: "object", description: "Request body", required: true },
132
- headers: { type: "object", description: "Request headers" },
133
- },
134
- },
135
- {
136
- name: "put",
137
- description: "Make a PUT request to an API endpoint",
138
- parameters: {
139
- url: { type: "string", description: "API endpoint URL", required: true },
140
- body: { type: "object", description: "Request body", required: true },
141
- headers: { type: "object", description: "Request headers" },
142
- },
143
- },
144
- {
145
- name: "delete",
146
- description: "Make a DELETE request to an API endpoint",
147
- parameters: {
148
- url: { type: "string", description: "API endpoint URL", required: true },
149
- headers: { type: "object", description: "Request headers" },
150
- },
151
- },
152
- ],
153
- resources: [],
154
- prompts: [],
155
- },
156
- filesystem: {
157
- tools: [
158
- {
159
- name: "read_file",
160
- description: "Read contents of a file",
161
- parameters: {
162
- path: { type: "string", description: "File path", required: true },
163
- encoding: { type: "string", description: "File encoding", default: "utf-8" },
164
- },
165
- },
166
- {
167
- name: "write_file",
168
- description: "Write contents to a file",
169
- parameters: {
170
- path: { type: "string", description: "File path", required: true },
171
- content: { type: "string", description: "Content to write", required: true },
172
- encoding: { type: "string", description: "File encoding", default: "utf-8" },
173
- },
174
- },
175
- {
176
- name: "list_directory",
177
- description: "List contents of a directory",
178
- parameters: {
179
- path: { type: "string", description: "Directory path", required: true },
180
- recursive: { type: "boolean", description: "List recursively", default: false },
181
- },
182
- },
183
- {
184
- name: "search_files",
185
- description: "Search for files matching a pattern",
186
- parameters: {
187
- pattern: { type: "string", description: "Search pattern (glob)", required: true },
188
- path: { type: "string", description: "Starting directory", default: "." },
189
- },
190
- },
191
- ],
192
- resources: [{ uri: "file://{path}", name: "File Content", description: "Content of a file", mimeType: "text/plain" }],
193
- prompts: [],
194
- },
195
- };
196
-
197
- // Parse arguments
198
- const args = minimist(process.argv.slice(2), {
199
- string: ["language", "template", "tools", "tool-file", "resources", "resource-file", "prompts", "prompt-file", "output"],
200
- boolean: ["overwrite", "ai-descriptions", "with-tests", "with-docker", "help"],
201
- default: {
202
- language: "typescript",
203
- },
204
- alias: {
205
- o: "output",
206
- h: "help",
207
- },
208
- });
209
-
210
- // Show help
211
- if (args.help || args._.length === 0) {
212
- console.log(`
213
- MCP Builder - Generate MCP server projects
214
-
215
- Usage:
216
- skills run mcp-builder -- <name> [options]
217
-
218
- Basic Options:
219
- <name> Server name (required)
220
- --language <lang> Language: typescript, python (default: typescript)
221
- --template <name> Template: weather, database, api, filesystem
222
-
223
- Tool Options:
224
- --tools <list> Comma-separated tool names
225
- --tool-file <path> JSON file with tool definitions
226
-
227
- Resource Options:
228
- --resources <list> Comma-separated resource URIs
229
- --resource-file <path> JSON file with resource definitions
230
-
231
- Prompt Options:
232
- --prompts <list> Comma-separated prompt names
233
- --prompt-file <path> JSON file with prompt definitions
234
-
235
- Output Options:
236
- -o, --output <path> Output directory (default: ./<name>)
237
- --overwrite Overwrite existing files
238
-
239
- Generation Options:
240
- --ai-descriptions Generate descriptions with AI
241
- --with-tests Include test files
242
- --with-docker Include Dockerfile
243
- -h, --help Show this help message
244
-
245
- Examples:
246
- skills run mcp-builder -- my-server --tools "search,fetch,analyze"
247
- skills run mcp-builder -- weather-mcp --template weather
248
- skills run mcp-builder -- api-server --tool-file tools.json --language python
249
- `);
250
- process.exit(0);
251
- }
252
-
253
- // Get server name
254
- const serverName = args._[0] as string;
255
- if (!serverName) {
256
- console.error("Error: Server name is required");
257
- process.exit(1);
258
- }
259
-
260
- // Validate name
261
- if (!/^[a-z][a-z0-9-]*$/.test(serverName)) {
262
- console.error("Error: Server name must start with a letter and contain only lowercase letters, numbers, and hyphens");
263
- process.exit(1);
264
- }
265
-
266
- // Parse tool names into definitions
267
- function parseToolNames(names: string): ToolDef[] {
268
- return names.split(",").map((name) => ({
269
- name: name.trim().replace(/\s+/g, "_"),
270
- description: `TODO: Add description for ${name.trim()}`,
271
- parameters: {},
272
- }));
273
- }
274
-
275
- // Parse resource URIs into definitions
276
- function parseResourceURIs(uris: string): ResourceDef[] {
277
- return uris.split(",").map((uri) => ({
278
- uri: uri.trim(),
279
- name: uri.trim().split("://")[1] || uri.trim(),
280
- description: `TODO: Add description`,
281
- mimeType: "application/json",
282
- }));
283
- }
284
-
285
- // Parse prompt names into definitions
286
- function parsePromptNames(names: string): PromptDef[] {
287
- return names.split(",").map((name) => ({
288
- name: name.trim().replace(/\s+/g, "_"),
289
- description: `TODO: Add description for ${name.trim()}`,
290
- arguments: [],
291
- }));
292
- }
293
-
294
- // Load definitions from file
295
- function loadFromFile<T>(filePath: string): T[] {
296
- if (!fs.existsSync(filePath)) {
297
- console.error(`Error: File not found: ${filePath}`);
298
- process.exit(1);
299
- }
300
- const content = fs.readFileSync(filePath, "utf-8");
301
- const data = JSON.parse(content);
302
- return Array.isArray(data) ? data : data.tools || data.resources || data.prompts || [];
303
- }
304
-
305
- // Build options
306
- const options: BuildOptions = {
307
- name: serverName,
308
- language: args.language as BuildOptions["language"],
309
- template: args.template || null,
310
- tools: [],
311
- resources: [],
312
- prompts: [],
313
- output: args.output || `./${serverName}`,
314
- overwrite: args.overwrite,
315
- aiDescriptions: args["ai-descriptions"],
316
- withTests: args["with-tests"],
317
- withDocker: args["with-docker"],
318
- };
319
-
320
- // Load template if specified
321
- if (options.template) {
322
- const template = TEMPLATES[options.template];
323
- if (!template) {
324
- console.error(`Error: Unknown template: ${options.template}`);
325
- console.error(`Available templates: ${Object.keys(TEMPLATES).join(", ")}`);
326
- process.exit(1);
327
- }
328
- options.tools = [...template.tools];
329
- options.resources = [...template.resources];
330
- options.prompts = [...template.prompts];
331
- }
332
-
333
- // Add tools from arguments
334
- if (args.tools) {
335
- options.tools.push(...parseToolNames(args.tools));
336
- }
337
- if (args["tool-file"]) {
338
- options.tools.push(...loadFromFile<ToolDef>(args["tool-file"]));
339
- }
340
-
341
- // Add resources from arguments
342
- if (args.resources) {
343
- options.resources.push(...parseResourceURIs(args.resources));
344
- }
345
- if (args["resource-file"]) {
346
- options.resources.push(...loadFromFile<ResourceDef>(args["resource-file"]));
347
- }
348
-
349
- // Add prompts from arguments
350
- if (args.prompts) {
351
- options.prompts.push(...parsePromptNames(args.prompts));
352
- }
353
- if (args["prompt-file"]) {
354
- options.prompts.push(...loadFromFile<PromptDef>(args["prompt-file"]));
355
- }
356
-
357
- // Generate AI descriptions
358
- async function generateDescriptions(): Promise<void> {
359
- const apiKey = process.env.OPENAI_API_KEY;
360
- if (!apiKey) {
361
- console.warn("Warning: OPENAI_API_KEY not set, skipping AI descriptions");
362
- return;
363
- }
364
-
365
- const openai = new OpenAI({ apiKey });
366
-
367
- console.log("Generating AI descriptions...");
368
-
369
- for (const tool of options.tools) {
370
- if (tool.description.startsWith("TODO:")) {
371
- const response = await openai.chat.completions.create({
372
- model: "gpt-4o-mini",
373
- messages: [
374
- {
375
- role: "system",
376
- content: "Generate a concise, clear description for an MCP tool. One sentence, no markdown.",
377
- },
378
- {
379
- role: "user",
380
- content: `Tool name: ${tool.name}\nParameters: ${JSON.stringify(tool.parameters)}`,
381
- },
382
- ],
383
- max_tokens: 100,
384
- });
385
- tool.description = response.choices[0]?.message?.content || tool.description;
386
- }
387
- }
388
- }
389
-
390
- // Convert name to various formats
391
- function toPascalCase(name: string): string {
392
- return name
393
- .split(/[-_]/)
394
- .map((w) => w.charAt(0).toUpperCase() + w.slice(1))
395
- .join("");
396
- }
397
-
398
- function toSnakeCase(name: string): string {
399
- return name.replace(/-/g, "_");
400
- }
401
-
402
- // Generate TypeScript project
403
- function generateTypeScript(): void {
404
- const dir = options.output;
405
- const srcDir = path.join(dir, "src");
406
- const toolsDir = path.join(srcDir, "tools");
407
- const resourcesDir = path.join(srcDir, "resources");
408
- const promptsDir = path.join(srcDir, "prompts");
409
-
410
- // Create directories
411
- [dir, srcDir, toolsDir, resourcesDir, promptsDir].forEach((d) => {
412
- if (!fs.existsSync(d)) {
413
- fs.mkdirSync(d, { recursive: true });
414
- }
415
- });
416
-
417
- // package.json
418
- const packageJson = {
419
- name: options.name,
420
- version: "1.0.0",
421
- description: `MCP server: ${options.name}`,
422
- type: "module",
423
- main: "dist/index.js",
424
- scripts: {
425
- build: "tsc",
426
- start: "node dist/index.js",
427
- dev: "tsx src/index.ts",
428
- ...(options.withTests ? { test: "vitest" } : {}),
429
- },
430
- dependencies: {
431
- "@modelcontextprotocol/sdk": "^1.0.0",
432
- },
433
- devDependencies: {
434
- "@types/node": "^20.0.0",
435
- typescript: "^5.0.0",
436
- tsx: "^4.0.0",
437
- ...(options.withTests ? { vitest: "^1.0.0" } : {}),
438
- },
439
- };
440
- fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify(packageJson, null, 2));
441
-
442
- // tsconfig.json
443
- const tsconfig = {
444
- compilerOptions: {
445
- target: "ES2022",
446
- module: "NodeNext",
447
- moduleResolution: "NodeNext",
448
- outDir: "./dist",
449
- rootDir: "./src",
450
- strict: true,
451
- esModuleInterop: true,
452
- skipLibCheck: true,
453
- declaration: true,
454
- },
455
- include: ["src/**/*"],
456
- exclude: ["node_modules", "dist"],
457
- };
458
- fs.writeFileSync(path.join(dir, "tsconfig.json"), JSON.stringify(tsconfig, null, 2));
459
-
460
- // src/index.ts
461
- const indexTs = `#!/usr/bin/env node
462
- import { Server } from "@modelcontextprotocol/sdk/server/index.js";
463
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
464
- import { setupTools } from "./tools/index.js";
465
- import { setupResources } from "./resources/index.js";
466
- import { setupPrompts } from "./prompts/index.js";
467
-
468
- const server = new Server(
469
- {
470
- name: "${options.name}",
471
- version: "1.0.0",
472
- },
473
- {
474
- capabilities: {
475
- tools: {},
476
- resources: {},
477
- prompts: {},
478
- },
479
- }
480
- );
481
-
482
- // Setup handlers
483
- setupTools(server);
484
- setupResources(server);
485
- setupPrompts(server);
486
-
487
- // Start server
488
- async function main() {
489
- const transport = new StdioServerTransport();
490
- await server.connect(transport);
491
- console.error("${options.name} MCP server running on stdio");
492
- }
493
-
494
- main().catch(console.error);
495
- `;
496
- fs.writeFileSync(path.join(srcDir, "index.ts"), indexTs);
497
-
498
- // src/tools/index.ts
499
- const toolImports = options.tools.map((t) => `import { ${t.name} } from "./${t.name}.js";`).join("\n");
500
- const toolHandlers = options.tools
501
- .map(
502
- (t) => `
503
- case "${t.name}":
504
- return await ${t.name}(args);`
505
- )
506
- .join("");
507
-
508
- const toolsIndexTs = `import { Server } from "@modelcontextprotocol/sdk/server/index.js";
509
- import {
510
- CallToolRequestSchema,
511
- ListToolsRequestSchema,
512
- } from "@modelcontextprotocol/sdk/types.js";
513
-
514
- ${toolImports}
515
-
516
- export const tools = [
517
- ${options.tools
518
- .map(
519
- (t) => ` {
520
- name: "${t.name}",
521
- description: "${t.description}",
522
- inputSchema: {
523
- type: "object",
524
- properties: {
525
- ${Object.entries(t.parameters)
526
- .map(
527
- ([name, param]) => ` ${name}: {
528
- type: "${param.type}",
529
- description: "${param.description}",
530
- ${param.default !== undefined ? `default: ${JSON.stringify(param.default)},` : ""}
531
- }`
532
- )
533
- .join(",\n")}
534
- },
535
- required: [${Object.entries(t.parameters)
536
- .filter(([, p]) => p.required)
537
- .map(([n]) => `"${n}"`)
538
- .join(", ")}],
539
- },
540
- }`
541
- )
542
- .join(",\n")}
543
- ];
544
-
545
- export function setupTools(server: Server) {
546
- server.setRequestHandler(ListToolsRequestSchema, async () => ({
547
- tools,
548
- }));
549
-
550
- server.setRequestHandler(CallToolRequestSchema, async (request) => {
551
- const { name, arguments: args } = request.params;
552
-
553
- switch (name) {${toolHandlers}
554
- default:
555
- throw new Error(\`Unknown tool: \${name}\`);
556
- }
557
- });
558
- }
559
- `;
560
- fs.writeFileSync(path.join(toolsDir, "index.ts"), toolsIndexTs);
561
-
562
- // Individual tool files
563
- for (const tool of options.tools) {
564
- const paramTypes = Object.entries(tool.parameters)
565
- .map(([name, param]) => `${name}${param.required ? "" : "?"}: ${param.type === "array" ? "string[]" : param.type}`)
566
- .join("; ");
567
-
568
- const toolTs = `export async function ${tool.name}(args: { ${paramTypes} }) {
569
- // TODO: Implement ${tool.name}
570
- return {
571
- content: [
572
- {
573
- type: "text",
574
- text: \`${tool.name} called with: \${JSON.stringify(args)}\`,
575
- },
576
- ],
577
- };
578
- }
579
- `;
580
- fs.writeFileSync(path.join(toolsDir, `${tool.name}.ts`), toolTs);
581
- }
5
+ import { generateDescriptions } from "./ai-descriptions";
6
+ import { generatePython, generateTypeScript } from "./generators";
7
+ import { parseBuildOptions } from "./options";
582
8
 
583
- // src/resources/index.ts
584
- const resourcesIndexTs = `import { Server } from "@modelcontextprotocol/sdk/server/index.js";
585
- import {
586
- ListResourcesRequestSchema,
587
- ReadResourceRequestSchema,
588
- } from "@modelcontextprotocol/sdk/types.js";
589
-
590
- export const resources = [
591
- ${options.resources.map((r) => ` { uri: "${r.uri}", name: "${r.name}", description: "${r.description}", mimeType: "${r.mimeType || "application/json"}" }`).join(",\n")}
592
- ];
593
-
594
- export function setupResources(server: Server) {
595
- server.setRequestHandler(ListResourcesRequestSchema, async () => ({
596
- resources,
597
- }));
598
-
599
- server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
600
- const { uri } = request.params;
601
-
602
- // TODO: Implement resource handlers
603
- return {
604
- contents: [
605
- {
606
- uri,
607
- mimeType: "application/json",
608
- text: JSON.stringify({ message: "Resource content for " + uri }),
609
- },
610
- ],
611
- };
612
- });
613
- }
614
- `;
615
- fs.writeFileSync(path.join(resourcesDir, "index.ts"), resourcesIndexTs);
616
-
617
- // src/prompts/index.ts
618
- const promptsIndexTs = `import { Server } from "@modelcontextprotocol/sdk/server/index.js";
619
- import {
620
- GetPromptRequestSchema,
621
- ListPromptsRequestSchema,
622
- } from "@modelcontextprotocol/sdk/types.js";
623
-
624
- export const prompts = [
625
- ${options.prompts.map((p) => ` { name: "${p.name}", description: "${p.description}", arguments: ${JSON.stringify(p.arguments || [])} }`).join(",\n")}
626
- ];
627
-
628
- export function setupPrompts(server: Server) {
629
- server.setRequestHandler(ListPromptsRequestSchema, async () => ({
630
- prompts,
631
- }));
632
-
633
- server.setRequestHandler(GetPromptRequestSchema, async (request) => {
634
- const { name, arguments: args } = request.params;
635
-
636
- // TODO: Implement prompt handlers
637
- return {
638
- description: \`Prompt: \${name}\`,
639
- messages: [
640
- {
641
- role: "user",
642
- content: {
643
- type: "text",
644
- text: \`Executing prompt \${name} with args: \${JSON.stringify(args)}\`,
645
- },
646
- },
647
- ],
648
- };
649
- });
650
- }
651
- `;
652
- fs.writeFileSync(path.join(promptsDir, "index.ts"), promptsIndexTs);
653
-
654
- // README.md
655
- const readme = `# ${options.name}
656
-
657
- MCP server generated by skills.md/mcp-builder.
658
-
659
- ## Installation
660
-
661
- \`\`\`bash
662
- npm install
663
- npm run build
664
- \`\`\`
665
-
666
- ## Usage
667
-
668
- Add to your Claude configuration:
669
-
670
- \`\`\`json
671
- {
672
- "mcpServers": {
673
- "${options.name}": {
674
- "command": "node",
675
- "args": ["${path.resolve(dir)}/dist/index.js"]
676
- }
677
- }
678
- }
679
- \`\`\`
680
-
681
- ## Tools
682
-
683
- ${options.tools.map((t) => `- **${t.name}**: ${t.description}`).join("\n")}
684
-
685
- ## Resources
686
-
687
- ${options.resources.map((r) => `- **${r.uri}**: ${r.description}`).join("\n") || "None"}
688
-
689
- ## Prompts
690
-
691
- ${options.prompts.map((p) => `- **${p.name}**: ${p.description}`).join("\n") || "None"}
692
- `;
693
- fs.writeFileSync(path.join(dir, "README.md"), readme);
694
-
695
- // Dockerfile
696
- if (options.withDocker) {
697
- const dockerfile = `FROM node:20-slim
698
-
699
- WORKDIR /app
700
-
701
- COPY package*.json ./
702
- RUN npm ci
703
-
704
- COPY . .
705
- RUN npm run build
706
-
707
- CMD ["node", "dist/index.js"]
708
- `;
709
- fs.writeFileSync(path.join(dir, "Dockerfile"), dockerfile);
710
- }
711
- }
712
-
713
- // Generate Python project
714
- function generatePython(): void {
715
- const dir = options.output;
716
- const srcDir = path.join(dir, "src", toSnakeCase(options.name));
717
-
718
- // Create directories
719
- [dir, path.join(dir, "src"), srcDir].forEach((d) => {
720
- if (!fs.existsSync(d)) {
721
- fs.mkdirSync(d, { recursive: true });
722
- }
723
- });
724
-
725
- // pyproject.toml
726
- const pyproject = `[build-system]
727
- requires = ["hatchling"]
728
- build-backend = "hatchling.build"
729
-
730
- [project]
731
- name = "${options.name}"
732
- version = "1.0.0"
733
- description = "MCP server: ${options.name}"
734
- requires-python = ">=3.10"
735
- dependencies = [
736
- "mcp>=1.0.0",
737
- ]
738
-
739
- [project.scripts]
740
- ${options.name} = "${toSnakeCase(options.name)}:main"
741
- `;
742
- fs.writeFileSync(path.join(dir, "pyproject.toml"), pyproject);
743
-
744
- // __init__.py
745
- const initPy = `from .server import main
746
-
747
- __all__ = ["main"]
748
- `;
749
- fs.writeFileSync(path.join(srcDir, "__init__.py"), initPy);
750
-
751
- // __main__.py
752
- const mainPy = `from .server import main
753
-
754
- if __name__ == "__main__":
755
- main()
756
- `;
757
- fs.writeFileSync(path.join(srcDir, "__main__.py"), mainPy);
758
-
759
- // server.py
760
- const serverPy = `import asyncio
761
- from mcp.server import Server
762
- from mcp.server.stdio import stdio_server
763
-
764
- from .tools import setup_tools
765
- from .resources import setup_resources
766
- from .prompts import setup_prompts
767
-
768
- server = Server("${options.name}")
769
-
770
- setup_tools(server)
771
- setup_resources(server)
772
- setup_prompts(server)
773
-
774
-
775
- def main():
776
- asyncio.run(run_server())
777
-
778
-
779
- async def run_server():
780
- async with stdio_server() as (read_stream, write_stream):
781
- await server.run(read_stream, write_stream, server.create_initialization_options())
782
- `;
783
- fs.writeFileSync(path.join(srcDir, "server.py"), serverPy);
784
-
785
- // tools.py
786
- const toolFunctions = options.tools
787
- .map(
788
- (t) => `
789
- @server.tool()
790
- async def ${t.name}(${Object.entries(t.parameters)
791
- .map(([name, param]) => `${name}: ${param.type === "number" ? "float" : param.type === "boolean" ? "bool" : param.type === "array" ? "list" : "str"}${param.required ? "" : " = None"}`)
792
- .join(", ")}):
793
- """${t.description}"""
794
- # TODO: Implement ${t.name}
795
- return f"${t.name} called"
796
- `
797
- )
798
- .join("\n");
799
-
800
- const toolsPy = `from mcp.server import Server
801
-
802
- server: Server = None
803
-
804
-
805
- def setup_tools(s: Server):
806
- global server
807
- server = s
808
- ${toolFunctions}
809
- `;
810
- fs.writeFileSync(path.join(srcDir, "tools.py"), toolsPy);
811
-
812
- // resources.py
813
- const resourcesPy = `from mcp.server import Server
814
-
815
- server: Server = None
816
-
817
-
818
- def setup_resources(s: Server):
819
- global server
820
- server = s
821
-
822
- @server.list_resources()
823
- async def list_resources():
824
- return [
825
- ${options.resources.map((r) => ` {"uri": "${r.uri}", "name": "${r.name}", "description": "${r.description}"}`).join(",\n")}
826
- ]
827
-
828
- @server.read_resource()
829
- async def read_resource(uri: str):
830
- # TODO: Implement resource handlers
831
- return f"Resource content for {uri}"
832
- `;
833
- fs.writeFileSync(path.join(srcDir, "resources.py"), resourcesPy);
834
-
835
- // prompts.py
836
- const promptsPy = `from mcp.server import Server
837
-
838
- server: Server = None
839
-
840
-
841
- def setup_prompts(s: Server):
842
- global server
843
- server = s
844
-
845
- @server.list_prompts()
846
- async def list_prompts():
847
- return [
848
- ${options.prompts.map((p) => ` {"name": "${p.name}", "description": "${p.description}"}`).join(",\n")}
849
- ]
850
-
851
- @server.get_prompt()
852
- async def get_prompt(name: str, arguments: dict = None):
853
- # TODO: Implement prompt handlers
854
- return {
855
- "messages": [
856
- {"role": "user", "content": f"Prompt {name} with {arguments}"}
857
- ]
858
- }
859
- `;
860
- fs.writeFileSync(path.join(srcDir, "prompts.py"), promptsPy);
861
-
862
- // README.md
863
- const readme = `# ${options.name}
864
-
865
- MCP server generated by skills.md/mcp-builder.
866
-
867
- ## Installation
868
-
869
- \`\`\`bash
870
- pip install -e .
871
- \`\`\`
872
-
873
- ## Usage
874
-
875
- Add to your Claude configuration:
876
-
877
- \`\`\`json
878
- {
879
- "mcpServers": {
880
- "${options.name}": {
881
- "command": "python",
882
- "args": ["-m", "${toSnakeCase(options.name)}"]
883
- }
884
- }
885
- }
886
- \`\`\`
887
-
888
- ## Tools
889
-
890
- ${options.tools.map((t) => `- **${t.name}**: ${t.description}`).join("\n")}
891
- `;
892
- fs.writeFileSync(path.join(dir, "README.md"), readme);
893
-
894
- // Dockerfile
895
- if (options.withDocker) {
896
- const dockerfile = `FROM python:3.11-slim
897
-
898
- WORKDIR /app
899
-
900
- COPY pyproject.toml .
901
- COPY src/ src/
902
-
903
- RUN pip install -e .
904
-
905
- CMD ["python", "-m", "${toSnakeCase(options.name)}"]
906
- `;
907
- fs.writeFileSync(path.join(dir, "Dockerfile"), dockerfile);
908
- }
909
- }
9
+ const options = parseBuildOptions();
910
10
 
911
- // Main execution
912
11
  async function main(): Promise<void> {
913
12
  console.log("\nMCP Builder");
914
13
  console.log("===========\n");
@@ -922,7 +21,7 @@ async function main(): Promise<void> {
922
21
 
923
22
  // Generate AI descriptions if requested
924
23
  if (options.aiDescriptions) {
925
- await generateDescriptions();
24
+ await generateDescriptions(options);
926
25
  }
927
26
 
928
27
  console.log(`Server name: ${options.name}`);
@@ -934,9 +33,9 @@ async function main(): Promise<void> {
934
33
 
935
34
  // Generate project
936
35
  if (options.language === "typescript") {
937
- generateTypeScript();
36
+ generateTypeScript(options);
938
37
  } else {
939
- generatePython();
38
+ generatePython(options);
940
39
  }
941
40
 
942
41
  // Summary