goatchain-cli-darwin-arm64 0.0.73-beta.9 → 0.1.1

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 (305) hide show
  1. package/bin/goatchain +0 -0
  2. package/bin/node_modules/skills/bin/cli.mjs +14 -0
  3. package/bin/node_modules/skills/dist/_chunks/libs/@clack/core.mjs +767 -0
  4. package/bin/node_modules/skills/dist/_chunks/libs/@clack/prompts.mjs +334 -0
  5. package/bin/node_modules/skills/dist/_chunks/libs/@kwsites/file-exists.mjs +562 -0
  6. package/bin/node_modules/skills/dist/_chunks/libs/@kwsites/promise-deferred.mjs +37 -0
  7. package/bin/node_modules/skills/dist/_chunks/libs/@vercel/detect-agent.mjs +138 -0
  8. package/bin/node_modules/skills/dist/_chunks/libs/simple-git.mjs +3584 -0
  9. package/bin/node_modules/skills/dist/_chunks/libs/xdg-basedir.mjs +14 -0
  10. package/bin/node_modules/skills/dist/_chunks/rolldown-runtime.mjs +24 -0
  11. package/bin/node_modules/skills/dist/cli.d.mts +1 -0
  12. package/bin/node_modules/skills/dist/cli.mjs +6199 -0
  13. package/bin/node_modules/skills/package.json +143 -0
  14. package/bin/node_modules/yaml/LICENSE +13 -0
  15. package/bin/node_modules/yaml/README.md +172 -0
  16. package/bin/node_modules/yaml/bin.mjs +11 -0
  17. package/bin/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
  18. package/bin/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
  19. package/bin/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
  20. package/bin/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
  21. package/bin/node_modules/yaml/browser/dist/compose/composer.js +219 -0
  22. package/bin/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
  23. package/bin/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
  24. package/bin/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
  25. package/bin/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
  26. package/bin/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
  27. package/bin/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +225 -0
  28. package/bin/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
  29. package/bin/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
  30. package/bin/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
  31. package/bin/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
  32. package/bin/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
  33. package/bin/node_modules/yaml/browser/dist/doc/Document.js +335 -0
  34. package/bin/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
  35. package/bin/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
  36. package/bin/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
  37. package/bin/node_modules/yaml/browser/dist/doc/directives.js +176 -0
  38. package/bin/node_modules/yaml/browser/dist/errors.js +57 -0
  39. package/bin/node_modules/yaml/browser/dist/index.js +17 -0
  40. package/bin/node_modules/yaml/browser/dist/log.js +11 -0
  41. package/bin/node_modules/yaml/browser/dist/nodes/Alias.js +116 -0
  42. package/bin/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
  43. package/bin/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
  44. package/bin/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
  45. package/bin/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
  46. package/bin/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
  47. package/bin/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
  48. package/bin/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
  49. package/bin/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
  50. package/bin/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
  51. package/bin/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
  52. package/bin/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
  53. package/bin/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
  54. package/bin/node_modules/yaml/browser/dist/parse/cst.js +98 -0
  55. package/bin/node_modules/yaml/browser/dist/parse/lexer.js +721 -0
  56. package/bin/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
  57. package/bin/node_modules/yaml/browser/dist/parse/parser.js +975 -0
  58. package/bin/node_modules/yaml/browser/dist/public-api.js +102 -0
  59. package/bin/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
  60. package/bin/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
  61. package/bin/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
  62. package/bin/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
  63. package/bin/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
  64. package/bin/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
  65. package/bin/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
  66. package/bin/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
  67. package/bin/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
  68. package/bin/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
  69. package/bin/node_modules/yaml/browser/dist/schema/tags.js +96 -0
  70. package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
  71. package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
  72. package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
  73. package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
  74. package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +67 -0
  75. package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
  76. package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
  77. package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
  78. package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
  79. package/bin/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
  80. package/bin/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
  81. package/bin/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
  82. package/bin/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
  83. package/bin/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
  84. package/bin/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
  85. package/bin/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +25 -0
  86. package/bin/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
  87. package/bin/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
  88. package/bin/node_modules/yaml/browser/dist/util.js +11 -0
  89. package/bin/node_modules/yaml/browser/dist/visit.js +233 -0
  90. package/bin/node_modules/yaml/browser/index.js +5 -0
  91. package/bin/node_modules/yaml/browser/package.json +3 -0
  92. package/bin/node_modules/yaml/dist/cli.d.ts +8 -0
  93. package/bin/node_modules/yaml/dist/cli.mjs +201 -0
  94. package/bin/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
  95. package/bin/node_modules/yaml/dist/compose/compose-collection.js +90 -0
  96. package/bin/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
  97. package/bin/node_modules/yaml/dist/compose/compose-doc.js +45 -0
  98. package/bin/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
  99. package/bin/node_modules/yaml/dist/compose/compose-node.js +112 -0
  100. package/bin/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
  101. package/bin/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
  102. package/bin/node_modules/yaml/dist/compose/composer.d.ts +63 -0
  103. package/bin/node_modules/yaml/dist/compose/composer.js +224 -0
  104. package/bin/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
  105. package/bin/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
  106. package/bin/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
  107. package/bin/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
  108. package/bin/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
  109. package/bin/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
  110. package/bin/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
  111. package/bin/node_modules/yaml/dist/compose/resolve-end.js +39 -0
  112. package/bin/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
  113. package/bin/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
  114. package/bin/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
  115. package/bin/node_modules/yaml/dist/compose/resolve-flow-scalar.js +227 -0
  116. package/bin/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
  117. package/bin/node_modules/yaml/dist/compose/resolve-props.js +148 -0
  118. package/bin/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
  119. package/bin/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
  120. package/bin/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
  121. package/bin/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
  122. package/bin/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
  123. package/bin/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
  124. package/bin/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
  125. package/bin/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
  126. package/bin/node_modules/yaml/dist/doc/Document.d.ts +141 -0
  127. package/bin/node_modules/yaml/dist/doc/Document.js +337 -0
  128. package/bin/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
  129. package/bin/node_modules/yaml/dist/doc/anchors.js +76 -0
  130. package/bin/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
  131. package/bin/node_modules/yaml/dist/doc/applyReviver.js +57 -0
  132. package/bin/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
  133. package/bin/node_modules/yaml/dist/doc/createNode.js +90 -0
  134. package/bin/node_modules/yaml/dist/doc/directives.d.ts +49 -0
  135. package/bin/node_modules/yaml/dist/doc/directives.js +178 -0
  136. package/bin/node_modules/yaml/dist/errors.d.ts +21 -0
  137. package/bin/node_modules/yaml/dist/errors.js +62 -0
  138. package/bin/node_modules/yaml/dist/index.d.ts +25 -0
  139. package/bin/node_modules/yaml/dist/index.js +50 -0
  140. package/bin/node_modules/yaml/dist/log.d.ts +3 -0
  141. package/bin/node_modules/yaml/dist/log.js +19 -0
  142. package/bin/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
  143. package/bin/node_modules/yaml/dist/nodes/Alias.js +118 -0
  144. package/bin/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
  145. package/bin/node_modules/yaml/dist/nodes/Collection.js +151 -0
  146. package/bin/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
  147. package/bin/node_modules/yaml/dist/nodes/Node.js +40 -0
  148. package/bin/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
  149. package/bin/node_modules/yaml/dist/nodes/Pair.js +39 -0
  150. package/bin/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
  151. package/bin/node_modules/yaml/dist/nodes/Scalar.js +27 -0
  152. package/bin/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
  153. package/bin/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
  154. package/bin/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
  155. package/bin/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
  156. package/bin/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
  157. package/bin/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
  158. package/bin/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
  159. package/bin/node_modules/yaml/dist/nodes/identity.js +53 -0
  160. package/bin/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
  161. package/bin/node_modules/yaml/dist/nodes/toJS.js +39 -0
  162. package/bin/node_modules/yaml/dist/options.d.ts +350 -0
  163. package/bin/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
  164. package/bin/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
  165. package/bin/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
  166. package/bin/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
  167. package/bin/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
  168. package/bin/node_modules/yaml/dist/parse/cst-visit.js +99 -0
  169. package/bin/node_modules/yaml/dist/parse/cst.d.ts +109 -0
  170. package/bin/node_modules/yaml/dist/parse/cst.js +112 -0
  171. package/bin/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
  172. package/bin/node_modules/yaml/dist/parse/lexer.js +723 -0
  173. package/bin/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
  174. package/bin/node_modules/yaml/dist/parse/line-counter.js +41 -0
  175. package/bin/node_modules/yaml/dist/parse/parser.d.ts +84 -0
  176. package/bin/node_modules/yaml/dist/parse/parser.js +980 -0
  177. package/bin/node_modules/yaml/dist/public-api.d.ts +44 -0
  178. package/bin/node_modules/yaml/dist/public-api.js +107 -0
  179. package/bin/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
  180. package/bin/node_modules/yaml/dist/schema/Schema.js +39 -0
  181. package/bin/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
  182. package/bin/node_modules/yaml/dist/schema/common/map.js +19 -0
  183. package/bin/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
  184. package/bin/node_modules/yaml/dist/schema/common/null.js +17 -0
  185. package/bin/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
  186. package/bin/node_modules/yaml/dist/schema/common/seq.js +19 -0
  187. package/bin/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
  188. package/bin/node_modules/yaml/dist/schema/common/string.js +16 -0
  189. package/bin/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
  190. package/bin/node_modules/yaml/dist/schema/core/bool.js +21 -0
  191. package/bin/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
  192. package/bin/node_modules/yaml/dist/schema/core/float.js +47 -0
  193. package/bin/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
  194. package/bin/node_modules/yaml/dist/schema/core/int.js +42 -0
  195. package/bin/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
  196. package/bin/node_modules/yaml/dist/schema/core/schema.js +25 -0
  197. package/bin/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
  198. package/bin/node_modules/yaml/dist/schema/json/schema.js +64 -0
  199. package/bin/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
  200. package/bin/node_modules/yaml/dist/schema/tags.d.ts +48 -0
  201. package/bin/node_modules/yaml/dist/schema/tags.js +99 -0
  202. package/bin/node_modules/yaml/dist/schema/types.d.ts +92 -0
  203. package/bin/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
  204. package/bin/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
  205. package/bin/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
  206. package/bin/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
  207. package/bin/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
  208. package/bin/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
  209. package/bin/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
  210. package/bin/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
  211. package/bin/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
  212. package/bin/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
  213. package/bin/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
  214. package/bin/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
  215. package/bin/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
  216. package/bin/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
  217. package/bin/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
  218. package/bin/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
  219. package/bin/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
  220. package/bin/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
  221. package/bin/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
  222. package/bin/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
  223. package/bin/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
  224. package/bin/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
  225. package/bin/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
  226. package/bin/node_modules/yaml/dist/stringify/stringify.js +132 -0
  227. package/bin/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
  228. package/bin/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
  229. package/bin/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
  230. package/bin/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
  231. package/bin/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
  232. package/bin/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
  233. package/bin/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
  234. package/bin/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
  235. package/bin/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
  236. package/bin/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
  237. package/bin/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
  238. package/bin/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
  239. package/bin/node_modules/yaml/dist/test-events.d.ts +4 -0
  240. package/bin/node_modules/yaml/dist/test-events.js +134 -0
  241. package/bin/node_modules/yaml/dist/util.d.ts +16 -0
  242. package/bin/node_modules/yaml/dist/util.js +28 -0
  243. package/bin/node_modules/yaml/dist/visit.d.ts +102 -0
  244. package/bin/node_modules/yaml/dist/visit.js +236 -0
  245. package/bin/node_modules/yaml/package.json +97 -0
  246. package/bin/node_modules/yaml/util.js +2 -0
  247. package/bin/runtime/sandbox/dim-sandbox-runner +0 -0
  248. package/bin/runtime/sandbox/manifest.json +15 -0
  249. package/bin/skills-assets/artifact-static-site/SKILL.md +58 -0
  250. package/bin/skills-assets/artifact-static-site/agents/openai.yaml +6 -0
  251. package/bin/skills-assets/chrome-control/SKILL.md +96 -0
  252. package/bin/skills-assets/computer-use/SKILL.md +34 -0
  253. package/bin/skills-assets/deep-investigate/SKILL.md +101 -0
  254. package/bin/skills-assets/deep-investigate/references/prompts.md +75 -0
  255. package/bin/skills-assets/deep-investigate/references/templates.md +73 -0
  256. package/bin/skills-assets/deep-investigate/references/thinking-tools.md +36 -0
  257. package/bin/skills-assets/dim-modality/SKILL.md +88 -0
  258. package/bin/skills-assets/dim-modality/agents/openai.yaml +4 -0
  259. package/bin/skills-assets/dim-modality/references/cli-recipes.md +137 -0
  260. package/bin/skills-assets/dim-modality/references/model-notes.md +56 -0
  261. package/bin/skills-assets/dim-workflow/SKILL.md +125 -0
  262. package/bin/skills-assets/dim-workflow/agents/openai.yaml +6 -0
  263. package/bin/skills-assets/docs-sprint/SKILL.md +73 -0
  264. package/bin/skills-assets/docs-sprint/agents/openai.yaml +4 -0
  265. package/bin/skills-assets/docs-sprint/references/contract-discipline.md +30 -0
  266. package/bin/skills-assets/docs-sprint/references/delivery-plan.md +162 -0
  267. package/bin/skills-assets/docs-sprint/references/documentation-system.md +109 -0
  268. package/bin/skills-assets/docs-sprint/references/ui-layout.md +73 -0
  269. package/bin/skills-assets/docs-sprint/references/worktree-guide.md +45 -0
  270. package/bin/skills-assets/officecli/SKILL.md +423 -0
  271. package/bin/skills-assets/pdf/README.md +222 -0
  272. package/bin/skills-assets/pdf/SKILL.md +191 -0
  273. package/bin/skills-assets/pdf/design/design.md +381 -0
  274. package/bin/skills-assets/pdf/scripts/cover.py +1579 -0
  275. package/bin/skills-assets/pdf/scripts/fill_inspect.py +200 -0
  276. package/bin/skills-assets/pdf/scripts/fill_write.py +242 -0
  277. package/bin/skills-assets/pdf/scripts/make.sh +491 -0
  278. package/bin/skills-assets/pdf/scripts/merge.py +112 -0
  279. package/bin/skills-assets/pdf/scripts/palette.py +521 -0
  280. package/bin/skills-assets/pdf/scripts/reformat_parse.py +374 -0
  281. package/bin/skills-assets/pdf/scripts/render_body.py +1052 -0
  282. package/bin/skills-assets/pdf/scripts/render_cover.js +111 -0
  283. package/bin/skills-assets/plugin-creator/SKILL.md +148 -0
  284. package/bin/skills-assets/plugin-creator/references/installing-and-updating.md +66 -0
  285. package/bin/skills-assets/plugin-creator/references/plugin-json-spec.md +148 -0
  286. package/bin/skills-assets/plugin-creator/scripts/create_basic_plugin.py +189 -0
  287. package/bin/skills-assets/plugin-creator/scripts/validate_plugin.py +269 -0
  288. package/bin/skills-assets/skill-creator/SKILL.md +368 -0
  289. package/bin/skills-assets/skill-creator/agents/openai.yaml +5 -0
  290. package/bin/skills-assets/skill-creator/assets/skill-creator-small.svg +3 -0
  291. package/bin/skills-assets/skill-creator/assets/skill-creator.png +0 -0
  292. package/bin/skills-assets/skill-creator/license.txt +202 -0
  293. package/bin/skills-assets/skill-creator/references/openai_yaml.md +49 -0
  294. package/bin/skills-assets/skill-creator/scripts/generate_openai_yaml.py +226 -0
  295. package/bin/skills-assets/skill-creator/scripts/init_skill.py +397 -0
  296. package/bin/skills-assets/skill-creator/scripts/quick_validate.py +101 -0
  297. package/bin/skills-assets/skill-installer/LICENSE.txt +202 -0
  298. package/bin/skills-assets/skill-installer/SKILL.md +58 -0
  299. package/bin/skills-assets/skill-installer/agents/openai.yaml +5 -0
  300. package/bin/skills-assets/skill-installer/assets/skill-installer-small.svg +3 -0
  301. package/bin/skills-assets/skill-installer/assets/skill-installer.png +0 -0
  302. package/bin/skills-assets/skill-installer/scripts/github_utils.py +21 -0
  303. package/bin/skills-assets/skill-installer/scripts/install-skill-from-github.py +308 -0
  304. package/bin/skills-assets/skill-installer/scripts/list-skills.py +107 -0
  305. package/package.json +1 -1
@@ -0,0 +1,111 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * render_cover.js — Render cover.html → cover.pdf via Playwright.
4
+ *
5
+ * Usage:
6
+ * node render_cover.js --input cover.html --out cover.pdf
7
+ * node render_cover.js --input cover.html --out cover.pdf --wait 1200
8
+ *
9
+ * Exit codes: 0 success, 1 bad args, 2 dependency missing, 3 render error
10
+ */
11
+
12
+ const path = require("path");
13
+ const fs = require("fs");
14
+
15
+ function usage() {
16
+ console.error("Usage: node render_cover.js --input <file.html> --out <file.pdf> [--wait <ms>]");
17
+ process.exit(1);
18
+ }
19
+
20
+ // ── Arg parsing ────────────────────────────────────────────────────────────────
21
+ const args = process.argv.slice(2);
22
+ let inputFile = null, outFile = null, waitMs = 800;
23
+
24
+ for (let i = 0; i < args.length; i++) {
25
+ if (args[i] === "--input" && args[i + 1]) { inputFile = args[++i]; }
26
+ else if (args[i] === "--out" && args[i + 1]) { outFile = args[++i]; }
27
+ else if (args[i] === "--wait" && args[i + 1]) { waitMs = parseInt(args[++i], 10); }
28
+ }
29
+
30
+ if (!inputFile || !outFile) usage();
31
+ if (!fs.existsSync(inputFile)) {
32
+ console.error(JSON.stringify({ status: "error", error: `File not found: ${inputFile}` }));
33
+ process.exit(1);
34
+ }
35
+
36
+ // ── Playwright loader (tolerates global npm installs) ─────────────────────────
37
+ function loadPlaywright() {
38
+ const { execSync } = require("child_process");
39
+ try { return require("playwright"); } catch (_) {}
40
+ try {
41
+ const root = execSync("npm root -g", { stdio: ["ignore","pipe","ignore"] }).toString().trim();
42
+ return require(path.join(root, "playwright"));
43
+ } catch (_) {}
44
+ console.error(JSON.stringify({
45
+ status: "error",
46
+ error: "playwright not found",
47
+ hint: "Run: npm install -g playwright && npx playwright install chromium"
48
+ }));
49
+ process.exit(2);
50
+ }
51
+
52
+ // ── Main ───────────────────────────────────────────────────────────────────────
53
+ (async () => {
54
+ const { chromium } = loadPlaywright();
55
+
56
+ let browser;
57
+ try {
58
+ browser = await chromium.launch();
59
+ } catch (e) {
60
+ // Chromium binary missing — try installing
61
+ const { spawnSync } = require("child_process");
62
+ const r = spawnSync("npx", ["playwright", "install", "chromium"], { stdio: "inherit", shell: true });
63
+ if (r.status !== 0) {
64
+ console.error(JSON.stringify({
65
+ status: "error",
66
+ error: "Chromium not installed and auto-install failed",
67
+ hint: "Run: npx playwright install chromium"
68
+ }));
69
+ process.exit(2);
70
+ }
71
+ browser = await chromium.launch();
72
+ }
73
+
74
+ try {
75
+ const page = await browser.newPage();
76
+ const fileUrl = "file://" + path.resolve(inputFile);
77
+ await page.goto(fileUrl);
78
+ await page.waitForTimeout(waitMs); // let CSS + any JS settle
79
+
80
+ await page.pdf({
81
+ path: outFile,
82
+ width: "794px",
83
+ height: "1123px",
84
+ printBackground: true,
85
+ });
86
+
87
+ await browser.close();
88
+
89
+ // Basic sanity: output file must exist and be > 5 KB
90
+ const stat = fs.statSync(outFile);
91
+ if (stat.size < 5000) {
92
+ console.error(JSON.stringify({
93
+ status: "error",
94
+ error: "Output PDF is suspiciously small — cover may be blank",
95
+ hint: "Check cover.html for render errors"
96
+ }));
97
+ process.exit(3);
98
+ }
99
+
100
+ console.log(JSON.stringify({
101
+ status: "ok",
102
+ out: outFile,
103
+ size_kb: Math.round(stat.size / 1024),
104
+ }));
105
+
106
+ } catch (e) {
107
+ if (browser) await browser.close().catch(() => {});
108
+ console.error(JSON.stringify({ status: "error", error: String(e) }));
109
+ process.exit(3);
110
+ }
111
+ })();
@@ -0,0 +1,148 @@
1
+ ---
2
+ name: plugin-creator
3
+ description: Create and scaffold Dim plugin directories with a required `.claude-plugin/plugin.json` manifest, optional skills/hooks/MCP components, and valid manifest defaults. Use when the user wants to create a new Dim plugin, add skills/hooks/MCP servers to a plugin, validate a plugin before sharing, or set up a plugin for local development under `~/.agents/plugins`.
4
+ metadata:
5
+ short-description: Create or scaffold a Dim plugin
6
+ ---
7
+
8
+ # Plugin Creator
9
+
10
+ Scaffold a Dim plugin: a directory with a `.claude-plugin/plugin.json` manifest plus
11
+ optional `skills/`, a `hooks` file, and an `.mcp.json`. Dim discovers plugins from
12
+ `~/.agents/plugins/<name>/`: each plugin folder is self-describing, so placing one under
13
+ `~/.agents/plugins` makes its skills, hooks, and MCP servers load on the next session.
14
+
15
+ ## Quick Start
16
+
17
+ 1. Scaffold the plugin. By default it is created live under `~/.agents/plugins/<name>/`,
18
+ so a new session picks it up immediately.
19
+
20
+ ```bash
21
+ # Names are normalized to lower-case hyphen-case (<= 64 chars). The folder name and the
22
+ # manifest `name` are always identical. Run from the skill root (the directory holding
23
+ # this SKILL.md).
24
+ python3 scripts/create_basic_plugin.py <plugin-name>
25
+ ```
26
+
27
+ 2. Edit `<plugin-path>/.claude-plugin/plugin.json` when the request gives specific
28
+ metadata (description, display name, version). The scaffold starts with valid defaults
29
+ and must not contain `[TODO: ...]` placeholders.
30
+
31
+ 3. Add the components the plugin needs:
32
+
33
+ ```bash
34
+ python3 scripts/create_basic_plugin.py <plugin-name> \
35
+ --with-skills --with-hooks --with-mcp --with-assets
36
+ ```
37
+
38
+ - `--with-skills` creates `skills/<plugin-name>/SKILL.md`, a working starter skill, and
39
+ sets manifest `"skills": "./skills/"`.
40
+ - `--with-hooks` creates `hooks.json` and sets manifest `"hooks": "./hooks.json"`.
41
+ - `--with-mcp` creates `.mcp.json` and sets manifest `"mcpServers": "./.mcp.json"`.
42
+ - `--with-assets` creates an `assets/` folder for icons/logos.
43
+
44
+ 4. Build a plugin for git distribution instead of local dev with `--path`:
45
+
46
+ ```bash
47
+ # Create under a repo or scratch directory you will push to git.
48
+ python3 scripts/create_basic_plugin.py <plugin-name> --path <parent-directory>
49
+ ```
50
+
51
+ 5. Validate before handing back or sharing:
52
+
53
+ ```bash
54
+ python3 scripts/validate_plugin.py <plugin-path>
55
+ ```
56
+
57
+ 6. **Tell the user to start a new session/thread.** Dim loads a plugin's skills, hooks, and
58
+ MCP servers when a session starts, so a plugin created or changed in the *current* session
59
+ only becomes usable in the *next* one. If you scaffolded the plugin mid-conversation, the
60
+ skill will not be callable here yet — the user must open a new session to use it.
61
+
62
+ ## What this skill creates
63
+
64
+ - Plugin root at `<parent-directory>/<plugin-name>/` (default parent `~/.agents/plugins`).
65
+ - Always `<plugin-root>/.claude-plugin/plugin.json` with the manifest shape Dim reads.
66
+ - `<plugin-name>` is normalized:
67
+ - `My Plugin` → `my-plugin`
68
+ - `My--Plugin` → `my-plugin`
69
+ - underscores, spaces, and punctuation become `-`; consecutive hyphens collapse; result is
70
+ lower-case.
71
+ - Optional, created only when requested:
72
+ - `skills/<plugin-name>/SKILL.md` (a starter skill)
73
+ - `hooks.json`
74
+ - `.mcp.json`
75
+ - `assets/`
76
+
77
+ ## Manifest
78
+
79
+ Dim reads a small set of fields from `plugin.json`. The scaffold writes valid defaults for
80
+ all of them:
81
+
82
+ ```json
83
+ {
84
+ "name": "my-plugin",
85
+ "version": "0.1.0",
86
+ "description": "My Plugin plugin",
87
+ "interface": {
88
+ "displayName": "My Plugin",
89
+ "shortDescription": "Use My Plugin in Dim."
90
+ },
91
+ "skills": "./skills/",
92
+ "hooks": "./hooks.json",
93
+ "mcpServers": "./.mcp.json"
94
+ }
95
+ ```
96
+
97
+ Component paths (`skills`, `hooks`, `mcpServers`) appear only when their files exist. See
98
+ `references/plugin-json-spec.md` for the full field guide and the exact sample.
99
+
100
+ ## Components
101
+
102
+ - **Skills** — directories under `skills/<name>/` each containing a `SKILL.md` with valid
103
+ frontmatter (`name`, `description`). Dim discovers them automatically and loads them into
104
+ the system prompt.
105
+ - **Hooks** — a JSON file (manifest `hooks` field) mapping lifecycle events to commands. Use
106
+ `${CLAUDE_PLUGIN_ROOT}` in command paths; Dim substitutes the plugin's absolute root at
107
+ runtime, e.g. `node "${CLAUDE_PLUGIN_ROOT}/hooks/on-start.js"`.
108
+ - **MCP** — an `.mcp.json` with an `mcpServers` object. Server ids are namespaced as
109
+ `plugin:<plugin-name>/<serverId>`. Command paths support the same `${CLAUDE_PLUGIN_ROOT}`
110
+ substitution.
111
+
112
+ ## Required behavior
113
+
114
+ - The outer folder name and `plugin.json` `"name"` are always the same normalized name.
115
+ - Keep `.claude-plugin/plugin.json` present; never remove the required manifest.
116
+ - Do not leave `[TODO: ...]` placeholders in the manifest.
117
+ - Add a component path to the manifest only when its file actually exists. Keep `skills`,
118
+ `hooks`, and `mcpServers` out of the manifest when their companion files were not created.
119
+ - Use `--force` only when overwriting an existing plugin path is intentional.
120
+ - After creating or modifying a plugin, end by telling the user to start a new session/thread.
121
+ The current session loaded its skills, hooks, and MCP servers at startup and will not pick up
122
+ the new ones until a fresh session — do not claim the new skill is usable in this session.
123
+
124
+ ## Install and update
125
+
126
+ For the full local-development loop, the git-sharing path, and component toggling, see
127
+ `references/installing-and-updating.md`. In short:
128
+
129
+ - **Local dev** — scaffold into `~/.agents/plugins/<name>/`, then start a new session. Dim
130
+ re-scans the directory and loads the plugin's skills, hooks, and MCP servers. Editing files
131
+ in place and starting another session picks up the changes.
132
+ - **Share** — push the plugin directory to a git repo, then in the Dim desktop app open
133
+ Plugins → Add plugin and paste the git URL (`owner/repo` or a full URL). Dim reads the
134
+ manifest and installs the plugin into `~/.agents/plugins`.
135
+
136
+ ## Validation
137
+
138
+ After editing this `SKILL.md`, run:
139
+
140
+ ```bash
141
+ python3 ../skill-creator/scripts/quick_validate.py .
142
+ ```
143
+
144
+ Before handing back a generated plugin, run:
145
+
146
+ ```bash
147
+ python3 scripts/validate_plugin.py <plugin-path>
148
+ ```
@@ -0,0 +1,66 @@
1
+ # Installing and updating Dim plugins
2
+
3
+ A Dim plugin is a self-describing directory under `~/.agents/plugins/<name>/`. Disk is the
4
+ single source of truth: Dim scans that directory, reads each `.claude-plugin/plugin.json`, and
5
+ loads the plugin's components. Installing a plugin means placing its folder there; removing the
6
+ folder removes the plugin.
7
+
8
+ ## Local development
9
+
10
+ 1. Scaffold the plugin directly under `~/.agents/plugins/<name>/` (the default of
11
+ `scripts/create_basic_plugin.py`):
12
+
13
+ ```bash
14
+ python3 scripts/create_basic_plugin.py my-plugin --with-skills
15
+ ```
16
+
17
+ 2. Edit the manifest and component files.
18
+
19
+ 3. Start a **new session**. Dim re-scans `~/.agents/plugins`, and the plugin's skills, hooks,
20
+ and MCP servers load. A new session is the boundary at which changes are picked up.
21
+
22
+ To iterate, edit files in place and start another session. Removing the plugin directory
23
+ removes the plugin.
24
+
25
+ ## Activation by component
26
+
27
+ - **Skills** — discovered from `~/.agents/plugins/*/skills/` and loaded into the system prompt
28
+ automatically. They also appear in the desktop Skills list.
29
+ - **Hooks** — read from the file named by the manifest `hooks` field and registered on session
30
+ start. Command paths use `${CLAUDE_PLUGIN_ROOT}`, which Dim replaces with the plugin's
31
+ absolute root.
32
+ - **MCP servers** — read from the `.mcp.json` file named by the manifest `mcpServers` field and
33
+ merged into the MCP runtime. An inline `mcpServers` object in `plugin.json` itself is not
34
+ supported — Dim silently ignores it (no error), so the component never loads. Server ids are
35
+ namespaced `plugin:<plugin-name>/<serverId>`.
36
+
37
+ ## Toggling components
38
+
39
+ In the Dim desktop app, open Plugins → select the plugin to see its detail page. Each skill,
40
+ hook, and MCP server has its own on/off switch, plus a master switch to enable or disable all
41
+ components at once.
42
+
43
+ ## Sharing via git
44
+
45
+ To distribute a plugin to other users:
46
+
47
+ 1. Build the plugin in a directory you will push to git (use `--path`):
48
+
49
+ ```bash
50
+ python3 scripts/create_basic_plugin.py my-plugin --path ./plugins --with-skills
51
+ ```
52
+
53
+ 2. Commit and push the plugin directory (including `.claude-plugin/plugin.json`) to a git repo.
54
+
55
+ 3. In the Dim desktop app, open Plugins → Add plugin and paste the git source — either
56
+ `owner/repo` or a full git URL, with an optional ref (branch/tag). Dim clones the repo,
57
+ reads the manifest, and installs the plugin into `~/.agents/plugins/<name>/`, recording the
58
+ source in a `dim-install.json` provenance file.
59
+
60
+ Updating a git-installed plugin is done from the same Add-plugin flow (reinstall from the
61
+ source) or by editing the on-disk copy under `~/.agents/plugins` for local tweaks.
62
+
63
+ The desktop app also has a separate Plugin Store tab that installs from a hosted marketplace
64
+ (a zip archive, not a git clone) and marks the install with its own `.dimcode-market.json`
65
+ provenance file instead of `dim-install.json`. That path is unrelated to plugin *creation* —
66
+ it only matters if you're pointing a user at how to distribute a finished plugin.
@@ -0,0 +1,148 @@
1
+ # Plugin manifest spec (`.claude-plugin/plugin.json`)
2
+
3
+ Dim recognizes a plugin by the presence of `.claude-plugin/plugin.json` at the plugin root (it
4
+ also accepts the Codex-format `.codex-plugin/plugin.json` at the same root — this skill always
5
+ scaffolds the Claude format, which both Dim and Claude Code read). It parses only the fields
6
+ below; any other field is ignored. Keep the manifest minimal and valid.
7
+
8
+ ```json
9
+ {
10
+ "name": "my-plugin",
11
+ "version": "0.1.0",
12
+ "description": "Brief plugin description",
13
+ "interface": {
14
+ "displayName": "My Plugin",
15
+ "shortDescription": "Short subtitle shown in the plugin list",
16
+ "logo": "./assets/logo.png"
17
+ },
18
+ "skills": "./skills/",
19
+ "hooks": "./hooks.json",
20
+ "mcpServers": "./.mcp.json"
21
+ }
22
+ ```
23
+
24
+ ## Field guide
25
+
26
+ ### Top-level fields
27
+
28
+ - `name` (`string`, required): Plugin identifier (lower-case hyphen-case, no spaces). Matches
29
+ the plugin folder name. Sanitized to `[A-Za-z0-9._-]`, max 128 chars.
30
+ - `version` (`string`, optional): Strict semver, e.g. `0.1.0`.
31
+ - `description` (`string`, optional): Short purpose summary. Falls back to
32
+ `interface.shortDescription` in the UI when absent.
33
+ - `interface` (`object`, optional): Presentation metadata (see below).
34
+ - `skills` (`string`, optional): Relative path to the skills directory, normally `./skills/`.
35
+ - `hooks` (`string`, optional): Relative path to the hooks config file, e.g. `./hooks.json`.
36
+ - `mcpServers` (`string`, optional): Relative path to an `.mcp.json` file, e.g. `./.mcp.json`.
37
+ An inline object is not supported — the runtime loads only a path string.
38
+
39
+ ### `interface` fields
40
+
41
+ - `displayName` (`string`): User-facing title. Defaults to `name` when absent.
42
+ - `shortDescription` (`string`): Brief subtitle for compact views.
43
+ - `logo` (`string`): Relative path to a logo asset inside the plugin (for example
44
+ `./assets/logo.png`).
45
+
46
+ ### Path conventions
47
+
48
+ - Component path values are relative to the plugin root and begin with `./`.
49
+ - A component path appears in the manifest only when its file/directory exists. Do not declare
50
+ `skills`, `hooks`, or `mcpServers` when their companion files were not created.
51
+
52
+ ## Components
53
+
54
+ ### Skills
55
+
56
+ Skills live under `skills/<skill-name>/SKILL.md`. Each `SKILL.md` starts with YAML
57
+ frontmatter:
58
+
59
+ ```markdown
60
+ ---
61
+ name: my-skill
62
+ description: What it does and when to use it.
63
+ ---
64
+
65
+ # My Skill
66
+
67
+ Instructions for the assistant.
68
+ ```
69
+
70
+ Dim discovers plugin skills automatically from `~/.agents/plugins/*/skills/` and loads them
71
+ into the system prompt.
72
+
73
+ ### Hooks
74
+
75
+ `hooks` points to a JSON file mapping lifecycle events to commands. Use
76
+ `${CLAUDE_PLUGIN_ROOT}` in command paths — Dim substitutes the plugin's absolute root at
77
+ runtime:
78
+
79
+ ```json
80
+ {
81
+ "hooks": {
82
+ "SessionStart": [
83
+ {
84
+ "matcher": "startup|resume|clear|compact",
85
+ "hooks": [
86
+ { "type": "command", "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/on-start.js\"" }
87
+ ]
88
+ }
89
+ ]
90
+ }
91
+ }
92
+ ```
93
+
94
+ Only these event names are recognized: `SessionStart`, `SubagentStart`, `PreToolUse`,
95
+ `PermissionRequest`, `PostToolUse`, `PreCompact`, `PostCompact`, `UserPromptSubmit`,
96
+ `SubagentStop`, `Stop`. An unrecognized event name is not a partial failure — Dim drops every
97
+ hook in that `hooks.json` file (logs a warning, registers nothing). Do not invent event names;
98
+ when unsure which event fits, ask rather than guess.
99
+
100
+ `type` must be the literal string `"command"` and `command` must be a non-empty string; that is
101
+ the only spec shape Dim parses. Plugin hooks run with the same full host environment as the
102
+ user's own hooks (not a restricted subset), so a plugin hook can read provider keys/tokens from
103
+ the process env — call this out to the user if the plugin's hook touches secrets.
104
+
105
+ ### MCP servers
106
+
107
+ `mcpServers` points to an `.mcp.json` file — a relative path string, never an inline object (an
108
+ inline `mcpServers` object in `plugin.json` is silently ignored, not an error). Server ids are
109
+ namespaced as `plugin:<plugin-name>/<serverId>`. Command paths support the same
110
+ `${CLAUDE_PLUGIN_ROOT}` substitution (it resolves through the same `${VAR}` template mechanism as
111
+ any other env var, so other `${VAR}` references also resolve against the host environment). The
112
+ referenced `.mcp.json` has this shape:
113
+
114
+ ```json
115
+ {
116
+ "mcpServers": {
117
+ "example": {
118
+ "type": "stdio",
119
+ "command": "node",
120
+ "args": ["${CLAUDE_PLUGIN_ROOT}/mcp/server.js"]
121
+ }
122
+ }
123
+ }
124
+ ```
125
+
126
+ `type: "http"` is also supported (`{"type": "http", "url": "...", "headers": {...}}`, optionally
127
+ `"auth": {"type": "bearer", "token": "..."}`); `sse` / `streamable-http` are not supported.
128
+
129
+ ## Validation notes
130
+
131
+ - `name` must be a non-empty string; the folder name must match it. Dim does not verify this
132
+ invariant itself — for a locally-placed plugin, mismatched folder/`name` silently uses the
133
+ folder name for skills/hooks/mcp resolution while the manifest `name` becomes only a display
134
+ label. Keep the two in lockstep.
135
+ - `version`, when present, must be strict semver by this skill's convention. Dim's runtime does
136
+ not itself validate `version` — it accepts any non-empty string — so this rule is a
137
+ authoring-quality convention, not something a load failure would confirm.
138
+ - `interface.logo` and any declared component path must point to real files/directories inside
139
+ the plugin.
140
+ - The manifest `skills` field only toggles a UI "has skills" indicator; skill discovery always
141
+ scans `<plugin-root>/skills` regardless of this field's value or presence. Keep skills at
142
+ `./skills/` — pointing `skills` elsewhere does not relocate discovery.
143
+ - Sub-skill `SKILL.md` files must have non-empty `name` and `description` frontmatter, and a
144
+ non-empty body after the closing `---`. A frontmatter-only file with no body is silently
145
+ dropped (not an error) — the skill just never appears.
146
+ - The manifest must not contain `[TODO: ...]` placeholders.
147
+
148
+ Run `scripts/validate_plugin.py <plugin-path>` before handing back a generated plugin.
@@ -0,0 +1,189 @@
1
+ #!/usr/bin/env python3
2
+ """Scaffold a Dim plugin directory with a `.claude-plugin/plugin.json` manifest.
3
+
4
+ Dim discovers plugins from ``~/.agents/plugins/<name>/``. The default parent is
5
+ ``~/.agents/plugins`` so a scaffolded plugin is live on the next session. Pass ``--path`` to
6
+ build a plugin elsewhere (e.g. a git repo to share).
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import argparse
12
+ import json
13
+ import re
14
+ from pathlib import Path
15
+ from typing import Any
16
+
17
+
18
+ MAX_PLUGIN_NAME_LENGTH = 64
19
+ DEFAULT_PLUGIN_PARENT = Path.home() / ".agents" / "plugins"
20
+ MANIFEST_DIR = ".claude-plugin"
21
+ MANIFEST_FILE = "plugin.json"
22
+
23
+
24
+ def normalize_plugin_name(plugin_name: str) -> str:
25
+ """Normalize a plugin name to lowercase hyphen-case."""
26
+ normalized = plugin_name.strip().lower()
27
+ normalized = re.sub(r"[^a-z0-9]+", "-", normalized)
28
+ normalized = normalized.strip("-")
29
+ normalized = re.sub(r"-{2,}", "-", normalized)
30
+ return normalized
31
+
32
+
33
+ def validate_plugin_name(plugin_name: str) -> None:
34
+ if not plugin_name:
35
+ raise ValueError("Plugin name must include at least one letter or digit.")
36
+ if len(plugin_name) > MAX_PLUGIN_NAME_LENGTH:
37
+ raise ValueError(
38
+ f"Plugin name '{plugin_name}' is too long ({len(plugin_name)} characters). "
39
+ f"Maximum is {MAX_PLUGIN_NAME_LENGTH} characters."
40
+ )
41
+
42
+
43
+ def display_name_from_plugin_name(plugin_name: str) -> str:
44
+ return " ".join(part.capitalize() for part in re.split(r"[-_]+", plugin_name))
45
+
46
+
47
+ def build_plugin_json(
48
+ plugin_name: str,
49
+ *,
50
+ with_skills: bool,
51
+ with_hooks: bool,
52
+ with_mcp: bool,
53
+ ) -> dict[str, Any]:
54
+ """Build the manifest Dim reads. Only the fields Dim parses are written."""
55
+ display_name = display_name_from_plugin_name(plugin_name)
56
+ payload: dict[str, Any] = {
57
+ "name": plugin_name,
58
+ "version": "0.1.0",
59
+ "description": f"{display_name} plugin",
60
+ "interface": {
61
+ "displayName": display_name,
62
+ "shortDescription": f"Use {display_name} in Dim.",
63
+ },
64
+ }
65
+ # Component paths are added only when their companion files are created, so the manifest
66
+ # never points at something that does not exist.
67
+ if with_skills:
68
+ payload["skills"] = "./skills/"
69
+ if with_hooks:
70
+ payload["hooks"] = "./hooks.json"
71
+ if with_mcp:
72
+ payload["mcpServers"] = "./.mcp.json"
73
+ return payload
74
+
75
+
76
+ def build_starter_skill(plugin_name: str) -> str:
77
+ """A minimal, valid starter skill so the plugin contributes something usable."""
78
+ display_name = display_name_from_plugin_name(plugin_name)
79
+ return (
80
+ "---\n"
81
+ f"name: {plugin_name}\n"
82
+ f"description: {display_name} starter skill. Replace this description with the real "
83
+ f"trigger so Dim knows when to use {display_name}.\n"
84
+ "---\n\n"
85
+ f"# {display_name}\n\n"
86
+ "Describe what this skill does and the steps the assistant should follow when it is "
87
+ "invoked. Keep instructions concrete and task-focused.\n"
88
+ )
89
+
90
+
91
+ def write_json(path: Path, data: dict, force: bool) -> None:
92
+ if path.exists() and not force:
93
+ raise FileExistsError(f"{path} already exists. Use --force to overwrite.")
94
+ path.parent.mkdir(parents=True, exist_ok=True)
95
+ with path.open("w", encoding="utf-8") as handle:
96
+ json.dump(data, handle, indent=2)
97
+ handle.write("\n")
98
+
99
+
100
+ def write_text(path: Path, text: str, force: bool) -> None:
101
+ if path.exists() and not force:
102
+ return
103
+ path.parent.mkdir(parents=True, exist_ok=True)
104
+ path.write_text(text, encoding="utf-8")
105
+
106
+
107
+ def parse_args() -> argparse.Namespace:
108
+ parser = argparse.ArgumentParser(
109
+ description="Create a Dim plugin skeleton with a validation-ready plugin.json."
110
+ )
111
+ parser.add_argument("plugin_name")
112
+ parser.add_argument(
113
+ "--path",
114
+ default=str(DEFAULT_PLUGIN_PARENT),
115
+ help=(
116
+ "Parent directory for the plugin (defaults to ~/.agents/plugins, where Dim "
117
+ "discovers plugins). Pass another directory to build a plugin for git sharing."
118
+ ),
119
+ )
120
+ parser.add_argument(
121
+ "--with-skills",
122
+ action="store_true",
123
+ help="Create skills/<name>/SKILL.md starter skill and set manifest `skills`.",
124
+ )
125
+ parser.add_argument(
126
+ "--with-hooks",
127
+ action="store_true",
128
+ help="Create hooks.json and set manifest `hooks`.",
129
+ )
130
+ parser.add_argument(
131
+ "--with-mcp",
132
+ action="store_true",
133
+ help="Create .mcp.json and set manifest `mcpServers`.",
134
+ )
135
+ parser.add_argument(
136
+ "--with-assets",
137
+ action="store_true",
138
+ help="Create an assets/ directory for icons and logos.",
139
+ )
140
+ parser.add_argument("--force", action="store_true", help="Overwrite existing files")
141
+ return parser.parse_args()
142
+
143
+
144
+ def main() -> None:
145
+ args = parse_args()
146
+ raw_plugin_name = args.plugin_name
147
+ plugin_name = normalize_plugin_name(raw_plugin_name)
148
+ if plugin_name != raw_plugin_name:
149
+ print(f"Note: Normalized plugin name from '{raw_plugin_name}' to '{plugin_name}'.")
150
+ validate_plugin_name(plugin_name)
151
+
152
+ plugin_root = Path(args.path).expanduser().resolve() / plugin_name
153
+ plugin_root.mkdir(parents=True, exist_ok=True)
154
+
155
+ manifest_path = plugin_root / MANIFEST_DIR / MANIFEST_FILE
156
+ write_json(
157
+ manifest_path,
158
+ build_plugin_json(
159
+ plugin_name,
160
+ with_skills=args.with_skills,
161
+ with_hooks=args.with_hooks,
162
+ with_mcp=args.with_mcp,
163
+ ),
164
+ args.force,
165
+ )
166
+
167
+ if args.with_skills:
168
+ write_text(
169
+ plugin_root / "skills" / plugin_name / "SKILL.md",
170
+ build_starter_skill(plugin_name),
171
+ args.force,
172
+ )
173
+
174
+ if args.with_hooks:
175
+ # Empty hooks map; fill events with commands that use ${CLAUDE_PLUGIN_ROOT} paths.
176
+ write_json(plugin_root / "hooks.json", {"hooks": {}}, args.force)
177
+
178
+ if args.with_mcp:
179
+ write_json(plugin_root / ".mcp.json", {"mcpServers": {}}, args.force)
180
+
181
+ if args.with_assets:
182
+ (plugin_root / "assets").mkdir(parents=True, exist_ok=True)
183
+
184
+ print(f"Created plugin scaffold: {plugin_root}")
185
+ print(f"plugin manifest: {manifest_path}")
186
+
187
+
188
+ if __name__ == "__main__":
189
+ main()