@g3nomaly/skills 1.0.0 → 1.0.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 (384) hide show
  1. package/dist/cli/adapter.d.ts +19 -16
  2. package/dist/cli/adapter.d.ts.map +1 -1
  3. package/dist/cli/adapter.js +39 -63
  4. package/dist/cli/adapter.js.map +1 -1
  5. package/dist/cli/commands/add.d.ts +7 -10
  6. package/dist/cli/commands/add.d.ts.map +1 -1
  7. package/dist/cli/commands/add.js +12 -98
  8. package/dist/cli/commands/add.js.map +1 -1
  9. package/dist/cli/commands/ls.d.ts +9 -2
  10. package/dist/cli/commands/ls.d.ts.map +1 -1
  11. package/dist/cli/commands/ls.js +21 -5
  12. package/dist/cli/commands/ls.js.map +1 -1
  13. package/dist/cli/commands/remove.d.ts +7 -7
  14. package/dist/cli/commands/remove.d.ts.map +1 -1
  15. package/dist/cli/commands/remove.js +11 -56
  16. package/dist/cli/commands/remove.js.map +1 -1
  17. package/dist/cli/commands/source.d.ts +29 -0
  18. package/dist/cli/commands/source.d.ts.map +1 -0
  19. package/dist/cli/commands/source.js +31 -0
  20. package/dist/cli/commands/source.js.map +1 -0
  21. package/dist/cli/commands/update.d.ts +6 -6
  22. package/dist/cli/commands/update.d.ts.map +1 -1
  23. package/dist/cli/commands/update.js +9 -43
  24. package/dist/cli/commands/update.js.map +1 -1
  25. package/dist/cli/index.js +79 -58
  26. package/dist/cli/index.js.map +1 -1
  27. package/dist/index.d.ts +2 -8
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +2 -8
  30. package/dist/index.js.map +1 -1
  31. package/dist/packages/index.d.ts +3 -0
  32. package/dist/packages/index.d.ts.map +1 -0
  33. package/dist/packages/index.js +3 -0
  34. package/dist/packages/index.js.map +1 -0
  35. package/dist/packages/install.d.ts +24 -0
  36. package/dist/packages/install.d.ts.map +1 -0
  37. package/dist/packages/install.js +47 -0
  38. package/dist/packages/install.js.map +1 -0
  39. package/dist/registry/index.d.ts +4 -2
  40. package/dist/registry/index.d.ts.map +1 -1
  41. package/dist/registry/index.js +3 -2
  42. package/dist/registry/index.js.map +1 -1
  43. package/dist/registry/locate.d.ts +22 -0
  44. package/dist/registry/locate.d.ts.map +1 -0
  45. package/dist/registry/locate.js +81 -0
  46. package/dist/registry/locate.js.map +1 -0
  47. package/dist/registry/manifest.d.ts +9 -0
  48. package/dist/registry/manifest.d.ts.map +1 -0
  49. package/dist/registry/manifest.js +14 -0
  50. package/dist/registry/manifest.js.map +1 -0
  51. package/dist/registry/readSkillDir.d.ts +8 -6
  52. package/dist/registry/readSkillDir.d.ts.map +1 -1
  53. package/dist/registry/readSkillDir.js +19 -24
  54. package/dist/registry/readSkillDir.js.map +1 -1
  55. package/dist/registry/readSource.d.ts +9 -0
  56. package/dist/registry/readSource.d.ts.map +1 -0
  57. package/dist/registry/readSource.js +30 -0
  58. package/dist/registry/readSource.js.map +1 -0
  59. package/dist/registry/types.d.ts +16 -16
  60. package/dist/registry/types.d.ts.map +1 -1
  61. package/dist/registry/types.js +13 -23
  62. package/dist/registry/types.js.map +1 -1
  63. package/dist/sources/builtins.d.ts +4 -0
  64. package/dist/sources/builtins.d.ts.map +1 -0
  65. package/dist/sources/builtins.js +5 -0
  66. package/dist/sources/builtins.js.map +1 -0
  67. package/dist/sources/index.d.ts +2 -0
  68. package/dist/sources/index.d.ts.map +1 -0
  69. package/dist/sources/index.js +3 -0
  70. package/dist/sources/index.js.map +1 -0
  71. package/dist/utils/frontmatter.d.ts +7 -0
  72. package/dist/utils/frontmatter.d.ts.map +1 -0
  73. package/dist/utils/frontmatter.js +20 -0
  74. package/dist/utils/frontmatter.js.map +1 -0
  75. package/dist/utils/index.d.ts +2 -0
  76. package/dist/utils/index.d.ts.map +1 -0
  77. package/dist/utils/index.js +3 -0
  78. package/dist/utils/index.js.map +1 -0
  79. package/package.json +8 -32
  80. package/dist/cli/commands/hook.d.ts +0 -6
  81. package/dist/cli/commands/hook.d.ts.map +0 -1
  82. package/dist/cli/commands/hook.js +0 -18
  83. package/dist/cli/commands/hook.js.map +0 -1
  84. package/dist/decisions/index.d.ts +0 -6
  85. package/dist/decisions/index.d.ts.map +0 -1
  86. package/dist/decisions/index.js +0 -5
  87. package/dist/decisions/index.js.map +0 -1
  88. package/dist/decisions/paths.d.ts +0 -4
  89. package/dist/decisions/paths.d.ts.map +0 -1
  90. package/dist/decisions/paths.js +0 -12
  91. package/dist/decisions/paths.js.map +0 -1
  92. package/dist/decisions/read.d.ts +0 -18
  93. package/dist/decisions/read.d.ts.map +0 -1
  94. package/dist/decisions/read.js +0 -45
  95. package/dist/decisions/read.js.map +0 -1
  96. package/dist/decisions/write.d.ts +0 -20
  97. package/dist/decisions/write.d.ts.map +0 -1
  98. package/dist/decisions/write.js +0 -48
  99. package/dist/decisions/write.js.map +0 -1
  100. package/dist/filetree/ensure.d.ts +0 -7
  101. package/dist/filetree/ensure.d.ts.map +0 -1
  102. package/dist/filetree/ensure.js +0 -36
  103. package/dist/filetree/ensure.js.map +0 -1
  104. package/dist/filetree/entries.d.ts +0 -9
  105. package/dist/filetree/entries.d.ts.map +0 -1
  106. package/dist/filetree/entries.js +0 -49
  107. package/dist/filetree/entries.js.map +0 -1
  108. package/dist/filetree/frontmatter.d.ts +0 -16
  109. package/dist/filetree/frontmatter.d.ts.map +0 -1
  110. package/dist/filetree/frontmatter.js +0 -43
  111. package/dist/filetree/frontmatter.js.map +0 -1
  112. package/dist/filetree/generate.d.ts +0 -16
  113. package/dist/filetree/generate.d.ts.map +0 -1
  114. package/dist/filetree/generate.js +0 -62
  115. package/dist/filetree/generate.js.map +0 -1
  116. package/dist/filetree/index.d.ts +0 -17
  117. package/dist/filetree/index.d.ts.map +0 -1
  118. package/dist/filetree/index.js +0 -13
  119. package/dist/filetree/index.js.map +0 -1
  120. package/dist/filetree/levels.d.ts +0 -25
  121. package/dist/filetree/levels.d.ts.map +0 -1
  122. package/dist/filetree/levels.js +0 -45
  123. package/dist/filetree/levels.js.map +0 -1
  124. package/dist/filetree/locate.d.ts +0 -44
  125. package/dist/filetree/locate.d.ts.map +0 -1
  126. package/dist/filetree/locate.js +0 -76
  127. package/dist/filetree/locate.js.map +0 -1
  128. package/dist/filetree/paths.d.ts +0 -15
  129. package/dist/filetree/paths.d.ts.map +0 -1
  130. package/dist/filetree/paths.js +0 -38
  131. package/dist/filetree/paths.js.map +0 -1
  132. package/dist/filetree/read.d.ts +0 -23
  133. package/dist/filetree/read.d.ts.map +0 -1
  134. package/dist/filetree/read.js +0 -36
  135. package/dist/filetree/read.js.map +0 -1
  136. package/dist/filetree/remove.d.ts +0 -9
  137. package/dist/filetree/remove.d.ts.map +0 -1
  138. package/dist/filetree/remove.js +0 -17
  139. package/dist/filetree/remove.js.map +0 -1
  140. package/dist/filetree/root.d.ts +0 -9
  141. package/dist/filetree/root.d.ts.map +0 -1
  142. package/dist/filetree/root.js +0 -15
  143. package/dist/filetree/root.js.map +0 -1
  144. package/dist/filetree/status.d.ts +0 -21
  145. package/dist/filetree/status.d.ts.map +0 -1
  146. package/dist/filetree/status.js +0 -55
  147. package/dist/filetree/status.js.map +0 -1
  148. package/dist/hooks/cli.d.ts +0 -29
  149. package/dist/hooks/cli.d.ts.map +0 -1
  150. package/dist/hooks/cli.js +0 -65
  151. package/dist/hooks/cli.js.map +0 -1
  152. package/dist/hooks/index.d.ts +0 -3
  153. package/dist/hooks/index.d.ts.map +0 -1
  154. package/dist/hooks/index.js +0 -3
  155. package/dist/hooks/index.js.map +0 -1
  156. package/dist/plugins/grilling/.claude-plugin/plugin.json +0 -7
  157. package/dist/plugins/grilling/skills/domain-modeling/ADR-FORMAT.md +0 -47
  158. package/dist/plugins/grilling/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
  159. package/dist/plugins/grilling/skills/domain-modeling/SKILL.md +0 -74
  160. package/dist/plugins/grilling/skills/domain-modeling/agents/openai.yaml +0 -3
  161. package/dist/plugins/grilling/skills/grill-me/SKILL.md +0 -7
  162. package/dist/plugins/grilling/skills/grill-me/agents/openai.yaml +0 -5
  163. package/dist/plugins/grilling/skills/grill-with-docs/SKILL.md +0 -7
  164. package/dist/plugins/grilling/skills/grill-with-docs/agents/openai.yaml +0 -5
  165. package/dist/plugins/grilling/skills/grilling/SKILL.md +0 -12
  166. package/dist/plugins/grilling/skills/grilling/agents/openai.yaml +0 -3
  167. package/dist/plugins/speech/.claude-plugin/plugin.json +0 -7
  168. package/dist/plugins/speech/skills/emphasise/SKILL.md +0 -49
  169. package/dist/plugins/speech/skills/emphasise/agents/openai.yaml +0 -5
  170. package/dist/plugins/speech/skills/unslop/SKILL.md +0 -80
  171. package/dist/plugins/task-manager/.claude-plugin/plugin.json +0 -11
  172. package/dist/plugins/task-manager/hooks/hooks.json +0 -19
  173. package/dist/plugins/task-manager/skills/decisions/SKILL.md +0 -39
  174. package/dist/plugins/task-manager/skills/decisions/agents/openai.yaml +0 -5
  175. package/dist/plugins/task-manager/skills/decisions/references/usage.md +0 -26
  176. package/dist/plugins/task-manager/skills/task-manager/SKILL.md +0 -99
  177. package/dist/plugins/task-manager/skills/vocabulary/SKILL.md +0 -42
  178. package/dist/plugins/task-manager/skills/vocabulary/agents/openai.yaml +0 -5
  179. package/dist/plugins/task-manager/skills/vocabulary/references/usage.md +0 -26
  180. package/dist/plugins/using-hooks/.claude-plugin/plugin.json +0 -7
  181. package/dist/plugins/using-hooks/skills/hook-post-tool-use/SKILL.md +0 -79
  182. package/dist/plugins/using-hooks/skills/hook-post-tool-use/agents/openai.yaml +0 -5
  183. package/dist/plugins/using-hooks/skills/hook-pre-tool-use/SKILL.md +0 -84
  184. package/dist/plugins/using-hooks/skills/hook-pre-tool-use/agents/openai.yaml +0 -5
  185. package/dist/plugins/using-hooks/skills/hook-stop/SKILL.md +0 -69
  186. package/dist/plugins/using-hooks/skills/hook-stop/agents/openai.yaml +0 -5
  187. package/dist/plugins/using-hooks/skills/hook-user-prompt-submit/SKILL.md +0 -64
  188. package/dist/plugins/using-hooks/skills/hook-user-prompt-submit/agents/openai.yaml +0 -5
  189. package/dist/plugins/workflow/.claude-plugin/plugin.json +0 -16
  190. package/dist/plugins/workflow/agents/reviewer.md +0 -9
  191. package/dist/plugins/workflow/skills/execute/SKILL.md +0 -21
  192. package/dist/plugins/workflow/skills/execute/agents/openai.yaml +0 -5
  193. package/dist/plugins/workflow/skills/orchestrator/SKILL.md +0 -27
  194. package/dist/plugins/workflow/skills/orchestrator/agents/openai.yaml +0 -5
  195. package/dist/plugins/workflow/skills/plan/SKILL.md +0 -18
  196. package/dist/plugins/workflow/skills/plan/agents/openai.yaml +0 -5
  197. package/dist/plugins/workflow/skills/plan/references/task-frontmatter.md +0 -33
  198. package/dist/plugins/workflow/skills/review/SKILL.md +0 -25
  199. package/dist/plugins/workflow/skills/review/agents/openai.yaml +0 -5
  200. package/dist/plugins/workflow/skills/run/SKILL.md +0 -33
  201. package/dist/plugins/workflow/skills/run/agents/openai.yaml +0 -5
  202. package/dist/plugins/workflow/skills/run/references/sub-agents.md +0 -46
  203. package/dist/plugins/workflow/skills/sync/SKILL.md +0 -18
  204. package/dist/plugins/workflow/skills/sync/agents/openai.yaml +0 -5
  205. package/dist/plugins/workflow/skills/worktree/SKILL.md +0 -38
  206. package/dist/plugins/workflow/skills/worktree/agents/openai.yaml +0 -5
  207. package/dist/plugins/workflow/skills/worktree/references/git-commands.md +0 -27
  208. package/dist/plugins/writing/.claude-plugin/plugin.json +0 -7
  209. package/dist/plugins/writing/skills/writing-great-hooks/SKILL.md +0 -192
  210. package/dist/plugins/writing/skills/writing-great-hooks/agents/openai.yaml +0 -5
  211. package/dist/plugins/writing/skills/writing-great-skills/GLOSSARY.md +0 -201
  212. package/dist/plugins/writing/skills/writing-great-skills/SKILL.md +0 -92
  213. package/dist/plugins/writing/skills/writing-great-skills/agents/openai.yaml +0 -5
  214. package/dist/plugins/writing/skills/writing-great-tasks/SKILL.md +0 -136
  215. package/dist/plugins/writing/skills/writing-great-tasks/agents/openai.yaml +0 -5
  216. package/dist/plugins/writing/skills/writing-great-tasks/templates/template_task.md +0 -108
  217. package/dist/registry/loadPackageRegistry.d.ts +0 -14
  218. package/dist/registry/loadPackageRegistry.d.ts.map +0 -1
  219. package/dist/registry/loadPackageRegistry.js +0 -59
  220. package/dist/registry/loadPackageRegistry.js.map +0 -1
  221. package/dist/registry/userManifest.d.ts +0 -7
  222. package/dist/registry/userManifest.d.ts.map +0 -1
  223. package/dist/registry/userManifest.js +0 -21
  224. package/dist/registry/userManifest.js.map +0 -1
  225. package/dist/remote/fetch.d.ts +0 -16
  226. package/dist/remote/fetch.d.ts.map +0 -1
  227. package/dist/remote/fetch.js +0 -41
  228. package/dist/remote/fetch.js.map +0 -1
  229. package/dist/remote/index.d.ts +0 -7
  230. package/dist/remote/index.d.ts.map +0 -1
  231. package/dist/remote/index.js +0 -5
  232. package/dist/remote/index.js.map +0 -1
  233. package/dist/remote/manifest.d.ts +0 -23
  234. package/dist/remote/manifest.d.ts.map +0 -1
  235. package/dist/remote/manifest.js +0 -116
  236. package/dist/remote/manifest.js.map +0 -1
  237. package/dist/remote/registry.d.ts +0 -18
  238. package/dist/remote/registry.d.ts.map +0 -1
  239. package/dist/remote/registry.js +0 -58
  240. package/dist/remote/registry.js.map +0 -1
  241. package/dist/schemas/config.d.ts +0 -3
  242. package/dist/schemas/config.d.ts.map +0 -1
  243. package/dist/schemas/config.js +0 -3
  244. package/dist/schemas/config.js.map +0 -1
  245. package/dist/schemas/decision.d.ts +0 -43
  246. package/dist/schemas/decision.d.ts.map +0 -1
  247. package/dist/schemas/decision.js +0 -24
  248. package/dist/schemas/decision.js.map +0 -1
  249. package/dist/schemas/index.d.ts +0 -17
  250. package/dist/schemas/index.d.ts.map +0 -1
  251. package/dist/schemas/index.js +0 -10
  252. package/dist/schemas/index.js.map +0 -1
  253. package/dist/schemas/phase.d.ts +0 -46
  254. package/dist/schemas/phase.d.ts.map +0 -1
  255. package/dist/schemas/phase.js +0 -16
  256. package/dist/schemas/phase.js.map +0 -1
  257. package/dist/schemas/plan.d.ts +0 -44
  258. package/dist/schemas/plan.d.ts.map +0 -1
  259. package/dist/schemas/plan.js +0 -15
  260. package/dist/schemas/plan.js.map +0 -1
  261. package/dist/schemas/primitives.d.ts +0 -38
  262. package/dist/schemas/primitives.d.ts.map +0 -1
  263. package/dist/schemas/primitives.js +0 -33
  264. package/dist/schemas/primitives.js.map +0 -1
  265. package/dist/schemas/task.d.ts +0 -70
  266. package/dist/schemas/task.d.ts.map +0 -1
  267. package/dist/schemas/task.js +0 -19
  268. package/dist/schemas/task.js.map +0 -1
  269. package/dist/schemas/term.d.ts +0 -17
  270. package/dist/schemas/term.d.ts.map +0 -1
  271. package/dist/schemas/term.js +0 -22
  272. package/dist/schemas/term.js.map +0 -1
  273. package/dist/schemas/validation.d.ts +0 -24
  274. package/dist/schemas/validation.d.ts.map +0 -1
  275. package/dist/schemas/validation.js +0 -39
  276. package/dist/schemas/validation.js.map +0 -1
  277. package/dist/task-manager/hooks/add-decision.d.ts +0 -2
  278. package/dist/task-manager/hooks/add-decision.d.ts.map +0 -1
  279. package/dist/task-manager/hooks/add-decision.js +0 -19
  280. package/dist/task-manager/hooks/add-decision.js.map +0 -1
  281. package/dist/task-manager/hooks/cleanup.d.ts +0 -2
  282. package/dist/task-manager/hooks/cleanup.d.ts.map +0 -1
  283. package/dist/task-manager/hooks/cleanup.js +0 -27
  284. package/dist/task-manager/hooks/cleanup.js.map +0 -1
  285. package/dist/task-manager/hooks/get-decision.d.ts +0 -2
  286. package/dist/task-manager/hooks/get-decision.d.ts.map +0 -1
  287. package/dist/task-manager/hooks/get-decision.js +0 -11
  288. package/dist/task-manager/hooks/get-decision.js.map +0 -1
  289. package/dist/task-manager/hooks/get-entry.d.ts +0 -2
  290. package/dist/task-manager/hooks/get-entry.d.ts.map +0 -1
  291. package/dist/task-manager/hooks/get-entry.js +0 -20
  292. package/dist/task-manager/hooks/get-entry.js.map +0 -1
  293. package/dist/task-manager/hooks/get-term.d.ts +0 -2
  294. package/dist/task-manager/hooks/get-term.d.ts.map +0 -1
  295. package/dist/task-manager/hooks/get-term.js +0 -13
  296. package/dist/task-manager/hooks/get-term.js.map +0 -1
  297. package/dist/task-manager/hooks/guard-tree.d.ts +0 -2
  298. package/dist/task-manager/hooks/guard-tree.d.ts.map +0 -1
  299. package/dist/task-manager/hooks/guard-tree.js +0 -63
  300. package/dist/task-manager/hooks/guard-tree.js.map +0 -1
  301. package/dist/task-manager/hooks/index.d.ts +0 -4
  302. package/dist/task-manager/hooks/index.d.ts.map +0 -1
  303. package/dist/task-manager/hooks/index.js +0 -32
  304. package/dist/task-manager/hooks/index.js.map +0 -1
  305. package/dist/task-manager/hooks/list-decisions.d.ts +0 -2
  306. package/dist/task-manager/hooks/list-decisions.d.ts.map +0 -1
  307. package/dist/task-manager/hooks/list-decisions.js +0 -20
  308. package/dist/task-manager/hooks/list-decisions.js.map +0 -1
  309. package/dist/task-manager/hooks/list-entries.d.ts +0 -2
  310. package/dist/task-manager/hooks/list-entries.d.ts.map +0 -1
  311. package/dist/task-manager/hooks/list-entries.js +0 -19
  312. package/dist/task-manager/hooks/list-entries.js.map +0 -1
  313. package/dist/task-manager/hooks/list-terms.d.ts +0 -2
  314. package/dist/task-manager/hooks/list-terms.d.ts.map +0 -1
  315. package/dist/task-manager/hooks/list-terms.js +0 -8
  316. package/dist/task-manager/hooks/list-terms.js.map +0 -1
  317. package/dist/task-manager/hooks/next-entry.d.ts +0 -2
  318. package/dist/task-manager/hooks/next-entry.d.ts.map +0 -1
  319. package/dist/task-manager/hooks/next-entry.js +0 -23
  320. package/dist/task-manager/hooks/next-entry.js.map +0 -1
  321. package/dist/task-manager/hooks/remove-term.d.ts +0 -2
  322. package/dist/task-manager/hooks/remove-term.d.ts.map +0 -1
  323. package/dist/task-manager/hooks/remove-term.js +0 -15
  324. package/dist/task-manager/hooks/remove-term.js.map +0 -1
  325. package/dist/task-manager/hooks/set-state.d.ts +0 -2
  326. package/dist/task-manager/hooks/set-state.d.ts.map +0 -1
  327. package/dist/task-manager/hooks/set-state.js +0 -15
  328. package/dist/task-manager/hooks/set-state.js.map +0 -1
  329. package/dist/task-manager/hooks/set-term.d.ts +0 -2
  330. package/dist/task-manager/hooks/set-term.d.ts.map +0 -1
  331. package/dist/task-manager/hooks/set-term.js +0 -27
  332. package/dist/task-manager/hooks/set-term.js.map +0 -1
  333. package/dist/task-manager/hooks/sync-tree.d.ts +0 -2
  334. package/dist/task-manager/hooks/sync-tree.d.ts.map +0 -1
  335. package/dist/task-manager/hooks/sync-tree.js +0 -28
  336. package/dist/task-manager/hooks/sync-tree.js.map +0 -1
  337. package/dist/task-manager/index.d.ts +0 -2
  338. package/dist/task-manager/index.d.ts.map +0 -1
  339. package/dist/task-manager/index.js +0 -3
  340. package/dist/task-manager/index.js.map +0 -1
  341. package/dist/vocabulary/file.d.ts +0 -15
  342. package/dist/vocabulary/file.d.ts.map +0 -1
  343. package/dist/vocabulary/file.js +0 -80
  344. package/dist/vocabulary/file.js.map +0 -1
  345. package/dist/vocabulary/index.d.ts +0 -4
  346. package/dist/vocabulary/index.d.ts.map +0 -1
  347. package/dist/vocabulary/index.js +0 -4
  348. package/dist/vocabulary/index.js.map +0 -1
  349. package/dist/vocabulary/match.d.ts +0 -22
  350. package/dist/vocabulary/match.d.ts.map +0 -1
  351. package/dist/vocabulary/match.js +0 -31
  352. package/dist/vocabulary/match.js.map +0 -1
  353. package/dist/workflow/gates.d.ts +0 -24
  354. package/dist/workflow/gates.d.ts.map +0 -1
  355. package/dist/workflow/gates.js +0 -34
  356. package/dist/workflow/gates.js.map +0 -1
  357. package/dist/workflow/hooks/advance-step.d.ts +0 -2
  358. package/dist/workflow/hooks/advance-step.d.ts.map +0 -1
  359. package/dist/workflow/hooks/advance-step.js +0 -51
  360. package/dist/workflow/hooks/advance-step.js.map +0 -1
  361. package/dist/workflow/hooks/current-step.d.ts +0 -2
  362. package/dist/workflow/hooks/current-step.d.ts.map +0 -1
  363. package/dist/workflow/hooks/current-step.js +0 -24
  364. package/dist/workflow/hooks/current-step.js.map +0 -1
  365. package/dist/workflow/hooks/index.d.ts +0 -4
  366. package/dist/workflow/hooks/index.d.ts.map +0 -1
  367. package/dist/workflow/hooks/index.js +0 -10
  368. package/dist/workflow/hooks/index.js.map +0 -1
  369. package/dist/workflow/hooks/ready-phases.d.ts +0 -2
  370. package/dist/workflow/hooks/ready-phases.d.ts.map +0 -1
  371. package/dist/workflow/hooks/ready-phases.js +0 -15
  372. package/dist/workflow/hooks/ready-phases.js.map +0 -1
  373. package/dist/workflow/index.d.ts +0 -8
  374. package/dist/workflow/index.d.ts.map +0 -1
  375. package/dist/workflow/index.js +0 -6
  376. package/dist/workflow/index.js.map +0 -1
  377. package/dist/workflow/phase.d.ts +0 -16
  378. package/dist/workflow/phase.d.ts.map +0 -1
  379. package/dist/workflow/phase.js +0 -22
  380. package/dist/workflow/phase.js.map +0 -1
  381. package/dist/workflow/steps.d.ts +0 -15
  382. package/dist/workflow/steps.d.ts.map +0 -1
  383. package/dist/workflow/steps.js +0 -32
  384. package/dist/workflow/steps.js.map +0 -1
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "Sync"
3
- short_description: "Merge a reviewed phase, record its decisions and terms, and close it"
4
- policy:
5
- allow_implicit_invocation: false
@@ -1,38 +0,0 @@
1
- ---
2
- name: worktree
3
- description: Set up, merge and remove the git worktrees that tasks are worked in, one per task on its own branch. Use when a task is about to be started, when a finished phase is being merged, when worktrees are left over, or when another skill needs a worktree.
4
- disable-model-invocation: false
5
- ---
6
-
7
- Every task gets its own **worktree**, a second checkout on its own branch, so agents working side by side never share a working directory and a half-finished task never dirties the checkout the user is in.
8
-
9
- ## Names
10
-
11
- | Thing | Pattern | Example |
12
- |---|---|---|
13
- | Phase branch | `<type>/<plan>-<phase>` | `feature/auth-rework-01-schema` |
14
- | Task branch | `<worktree_type>/<task id>-<slug of the title>` | `feature/TASK-012-session-table-migration` |
15
- | Worktree folder | `../<repo folder>.worktrees/<task id>` | `../g3n.worktrees/TASK-012` |
16
-
17
- `worktree_type` comes from the task's frontmatter. The phase branch takes the type most of its tasks carry. The worktree folder sits beside the repository, outside it, so no search or build inside the repo walks into it.
18
-
19
- ## Set up
20
-
21
- Run the commands under **Set up** in [`references/git-commands.md`](references/git-commands.md).
22
-
23
- - **Branch from the phase branch**, so a task sees the tasks it depends on once they are merged. A task whose `depends_on` names a task not merged yet branches from that task's branch instead.
24
- - **Install inside the worktree.** Dependencies are not shared between checkouts.
25
- - **An existing worktree for the task is reused.** `git worktree list` shows it. This is the normal case for a task sent back from review.
26
-
27
- ## Merge
28
-
29
- Run the commands under **Merge** in [`references/git-commands.md`](references/git-commands.md).
30
-
31
- Run them from the main checkout, one task at a time, in the order the phase lists its tasks. `--no-ff` keeps one merge commit per task, which is what lets a single task be reverted later.
32
-
33
- ## Remove
34
-
35
- Run the commands under **Remove** in [`references/git-commands.md`](references/git-commands.md).
36
-
37
- - **Only after the merge.** `git branch -d` refuses an unmerged branch, and that refusal is the safety net. Leave `-D` and `--force` to the user.
38
- - **A worktree with uncommitted changes stays.** Report it and let the user decide.
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "Worktree"
3
- short_description: "Set up, merge and remove one git worktree per task"
4
- policy:
5
- allow_implicit_invocation: false
@@ -1,27 +0,0 @@
1
- # Git commands
2
-
3
- The commands behind each section of the [`worktree`](../SKILL.md) skill. The names follow its **Names** table. Swap in the real plan, phase and task.
4
-
5
- ## Set up
6
-
7
- ```bash
8
- git switch -c feature/auth-rework-01-schema # once per phase, from the base branch
9
- git worktree add -b feature/TASK-012-session-table-migration \
10
- ../g3n.worktrees/TASK-012 feature/auth-rework-01-schema
11
- cd ../g3n.worktrees/TASK-012 && bun install
12
- ```
13
-
14
- ## Merge
15
-
16
- ```bash
17
- git switch feature/auth-rework-01-schema
18
- git merge --no-ff feature/TASK-012-session-table-migration
19
- ```
20
-
21
- ## Remove
22
-
23
- ```bash
24
- git worktree remove ../g3n.worktrees/TASK-012
25
- git branch -d feature/TASK-012-session-table-migration
26
- git worktree prune
27
- ```
@@ -1,7 +0,0 @@
1
- {
2
- "name": "writing",
3
- "description": "How to write skills, hooks and tasks that an agent can follow.",
4
- "version": "0.1.0",
5
- "license": "UNLICENSED",
6
- "skills": ["./skills/writing-great-hooks", "./skills/writing-great-skills", "./skills/writing-great-tasks"]
7
- }
@@ -1,192 +0,0 @@
1
- ---
2
- name: writing-great-hooks
3
- description: How to write hooks — the self-contained scripts that carry deterministic work, both a skill's own hooks/ scripts and the lifecycle hooks the harness fires from settings.json. Use when adding, reviewing, or debugging a hook script, when a skill needs a query/filter/rank helper, when wiring UserPromptSubmit, PreToolUse, PostToolUse or Stop, or when the user asks how hooks should be written, registered, or documented.
4
- disable-model-invocation: false
5
- ---
6
-
7
- A **hook** is a script that carries the part of a job which must come out the same every time. Where prose _steers_ the agent, a hook _replaces_ it: parsing, filtering, ranking, counting and formatting run as code, so the answer does not vary with the run. It is the strongest form of predictability available — reach for one wherever the work is mechanical.
8
-
9
- Two kinds. Everything below applies to both unless a section says otherwise.
10
-
11
- | Kind | Lives in | Fired by | Reach for it when |
12
- |---|---|---|---|
13
- | **Skill hook** | `<skill>/hooks/`, beside its `SKILL.md` | the agent, because the skill told it to | a skill needs a query, filter, or ranking answered the same way every run |
14
- | **Lifecycle hook** | anywhere `settings.json` can name it | the harness, at a fixed event | something must happen on every prompt, tool call, or stop, with no agent deciding to call it |
15
-
16
- The distinction that matters: a **skill hook** answers a question the agent chose to ask, so it can only ever inform. A **lifecycle hook** fires whether the agent wants it or not, which is what lets it inject context, block a tool call, or refuse a stop.
17
-
18
- ## The two invariants
19
-
20
- Everything else here is negotiable. These are not.
21
-
22
- **Self-sufficient.** One file, zero dependencies. No `package.json`, no shared `lib/`, no `import` of a sibling, no install step — copy the file anywhere on the machine and it runs. When two hooks need the same parser or the same types, **each embeds its own copy**. That duplication is the price of the invariant and is paid on purpose: say so in a comment at the top of the shared block, and keep the copies in sync when the format changes. A hook that needs an install is a hook that fails the one time it matters.
23
-
24
- **Co-located.** A **skill hook** lives in `hooks/`, directly beside the `SKILL.md` that documents it — never in a repo-wide `scripts/` folder, never one directory up. The script and its instructions move, get read, and get reviewed as one unit. A hook nobody can find from the skill is a hook the agent will re-implement inline. A **lifecycle hook** belongs to the project rather than to a skill, so it lives in `.claude/hooks/` and is co-located instead with the `settings.json` entry that names it: registration and script are edited together or not at all.
25
-
26
- ```
27
- <skill>/
28
- ├── SKILL.md # documents when to reach for each hook
29
- └── hooks/
30
- ├── do-one-thing.ts
31
- └── do-another-thing.ts
32
- ```
33
-
34
- One hook does one thing and is named for it, in verb-first kebab-case: `get-top-priority-task.ts`, not `tasks.ts --mode=priority`. A flag that changes _what the script is for_ should have been a second file; a flag that narrows _the same job_ belongs where it is.
35
-
36
- ## The skill-hook contract
37
-
38
- A **skill hook** is called by an agent that will not read a stack trace to work out what happened. Make the interface answer for itself.
39
-
40
- - **stdout is data; stderr is prose.** JSON on stdout, nothing else — no progress lines, no banners, no trailing "Done!". Every human-readable word goes to stderr. An agent piping stdout into a parser must never get a surprise.
41
- - **Exit code carries the verdict.** `0` ran, non-zero could not. Whether "nothing matched" is a failure is the script's decision and must be stated in its header: a hook that must return exactly one thing exits `1` with a reason on stderr; a search hook prints `[]` and exits `0`, because empty is a real answer.
42
- - **Flags, not positions**, and every flag defaults to the value that works from the repo root. `--index tasks/index.yaml` is a default, not a requirement. Reserve `--pretty` for indented JSON so the compact form stays pipeable.
43
- - **Deterministic output.** Every sort has an explicit final tie-breaker, so the same input yields the same order on every run. A hook whose output shuffles has given back the variance it existed to remove.
44
- - **Validate at the boundary, fail loudly.** Parse the input yourself, reject anything outside the documented shape, and name the offending line or field in the message. A loud failure costs one turn; a silent default costs the agent acting on a garbled answer.
45
- - **Read-only by default.** A hook that answers a question must not change state. If a hook has to write, say so in its first line of documentation and in the skill's table.
46
-
47
- ## The lifecycle-hook contract
48
-
49
- A **lifecycle hook** never sees a flag. The harness pipes it a JSON **event payload** on stdin and reads three things back: the exit code, stderr, and — on exit `0` — stdout.
50
-
51
- Every payload carries the same four fields, plus whatever its event adds:
52
-
53
- ```json
54
- {
55
- "session_id": "abc123",
56
- "transcript_path": "/home/you/.claude/projects/<slug>/<session>.jsonl",
57
- "cwd": "/home/you/project",
58
- "hook_event_name": "PreToolUse"
59
- }
60
- ```
61
-
62
- Three exit codes, and the meaning of the middle one is the whole reason lifecycle hooks exist:
63
-
64
- | Exit | Means | Where stderr goes |
65
- |---|---|---|
66
- | `0` | ran clean | transcript only; stdout handling is per-event |
67
- | `2` | **blocking error** — the hook is exercising its veto | to the agent, as the reason |
68
- | other | non-blocking error | to the user; the run continues regardless |
69
-
70
- Exit `2` does something different at every event — it erases a prompt, denies a tool call, or refuses a stop — so it is documented per event, not here.
71
-
72
- For anything richer than a veto, print a JSON object on stdout and exit `0`. Four fields work at every event:
73
-
74
- - **`continue`** (default `true`) — `false` halts the agent outright, after this hook.
75
- - **`stopReason`** — the string shown to the user when `continue` is `false`.
76
- - **`suppressOutput`** — keep stdout out of the transcript.
77
- - **`systemMessage`** — a warning surfaced to the user.
78
-
79
- Each event adds its own `hookSpecificOutput` object on top. Those are the per-event skills below.
80
-
81
- _The harness is the authority on payload and output shapes, and they gain fields over time._ Confirm against the live `/hooks` view before relying on a field that changes behaviour.
82
-
83
- ## Registering a lifecycle hook
84
-
85
- Registration is an array per event, each entry pairing an optional **matcher** with the commands to run:
86
-
87
- ```json
88
- {
89
- "hooks": {
90
- "PostToolUse": [
91
- {
92
- "matcher": "Edit|MultiEdit|Write",
93
- "hooks": [
94
- {
95
- "type": "command",
96
- "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/check-types.ts",
97
- "timeout": 60
98
- }
99
- ]
100
- }
101
- ]
102
- }
103
- }
104
- ```
105
-
106
- - **`matcher` selects tools by name**, as a regex — `Edit|Write`, `Bash`, or omitted for every tool. Only `PreToolUse` and `PostToolUse` use it; `UserPromptSubmit` and `Stop` have no tool to match and take an entry with no matcher.
107
- - **Every matching entry runs, in parallel.** Two hooks matching the same tool both fire; neither sees the other's output. Never write one expecting to run after another.
108
- - **`$CLAUDE_PROJECT_DIR` resolves to the project root**, so registrations survive a different working directory. An absolute path outside the project is fine for a machine-wide tool.
109
- - **`timeout` is seconds, and the default is 60.** It bounds one command, and a hook that hits it is killed — a slow hook taxes every single event it is registered on.
110
-
111
- ## The four events
112
-
113
- Each fires at a different moment and buys a different power. Read the one you are writing:
114
-
115
- | Event | Fires | What it can do | Skill |
116
- |---|---|---|---|
117
- | `UserPromptSubmit` | the user submits, before the agent reads it | inject context, rewrite the terms, reject the prompt | [`hook-user-prompt-submit`](../hook-user-prompt-submit/SKILL.md) |
118
- | `PreToolUse` | a tool is chosen, before it runs | allow, deny, or escalate the call to the user | [`hook-pre-tool-use`](../hook-pre-tool-use/SKILL.md) |
119
- | `PostToolUse` | a tool has finished | react to what happened; it cannot undo it | [`hook-post-tool-use`](../hook-post-tool-use/SKILL.md) |
120
- | `Stop` | the agent is about to end its turn | refuse the ending and say what remains | [`hook-stop`](../hook-stop/SKILL.md) |
121
-
122
- ## The header block
123
-
124
- The agent frequently reads a hook before running it — the file has to explain itself without `SKILL.md` present. Directly under the shebang, a block comment with four parts:
125
-
126
- ```ts
127
- #!/usr/bin/env bun
128
- /**
129
- * get-top-priority-task
130
- *
131
- * Returns the open task with the most urgent priority. Ties break by
132
- * creation order, so results are deterministic.
133
- *
134
- * Usage:
135
- * ./get-top-priority-task.ts [--index tasks/index.yaml] [--pretty]
136
- *
137
- * Output:
138
- * One task object as JSON on stdout; exit 1 with a message on stderr
139
- * when there are no open tasks.
140
- */
141
- ```
142
-
143
- Name, one paragraph of behaviour, real invocations, and the output shape with its exit codes. Anything a caller must know to use the script correctly goes here, not only in the skill. A **lifecycle hook** substitutes its event and matcher for the usage line, and states what each exit code makes the harness do.
144
-
145
- ## Writing the script
146
-
147
- TypeScript on Bun, in this repo. The invariants force three specifics that look odd out of context, so comment them where they appear:
148
-
149
- - **`#!/usr/bin/env bun`** on line 1, so the file is directly executable. Still document `bun run hooks/<script>.ts` as an equivalent — the executable bit does not reliably survive a checkout, and that fallback is what keeps the hook runnable when it doesn't.
150
- - **`export {}` as the first statement.** Without a top-level import or export, TypeScript treats a `.ts` file as a global script, so several hooks in one folder collide on every shared name — duplicate `Task`, duplicate `main`, "cannot redeclare" on every constant. The marker scopes each file to itself.
151
- - **Hand-declared runtime globals** instead of `@types/node` or `bun-types`:
152
-
153
- ```ts
154
- declare const process: { readonly argv: string[]; exit(code?: number): never; cwd(): string };
155
- declare const Bun: { file(path: string): { text(): Promise<string> }; stdin: { text(): Promise<string> } };
156
- ```
157
-
158
- This is what lets the file type-check with zero installs. Declare only the members used — a local `declare const` inside a module shadows a real ambient global rather than fighting it, so the file stays correct even in a package that _does_ have the types installed.
159
-
160
- Beyond that, ordinary production rules apply: `strict`-clean, no `any`, explicit types on every function that isn't a one-line local, errors handled rather than swallowed, and a single `main().catch(printError)` at the bottom so no rejection escapes.
161
-
162
- **A lifecycle hook runs with your credentials on input the agent influenced.** Treat every payload field as hostile: never interpolate one into a shell string, resolve any path before comparing it, and decide what an unrecognised shape does before shipping.
163
-
164
- ## Documenting hooks in the skill
165
-
166
- The hook's own header says _what it does_; `SKILL.md` says _which one to reach for_. Give the skill a table with one row per hook:
167
-
168
- | Hook | Does | Use it when |
169
- |---|---|---|
170
-
171
- Then state, once, the facts shared by all of them: how they're invoked, what the common flags default to, and where their behaviour deliberately differs (one returns a single object, another an array; one filters by status implicitly, another doesn't). Every flag named in the table must exist in the script, and every script in `hooks/` must appear in the table.
172
-
173
- A **lifecycle hook** is documented by its registration instead: the event, the matcher, and what each exit code makes the harness do. A reader who cannot predict when it fires cannot debug it.
174
-
175
- ## When not to write a hook
176
-
177
- **A hook computes; it never decides.** Ranking open tasks by priority is computation — the rule is fixed and the tie-breaker is written down. Deciding whether a task is worth doing today is judgement, and judgement in code is a rule nobody can see, argue with, or override. If the answer depends on context the script can't read, it belongs in the skill's prose.
178
-
179
- Nor is a hook worth writing for work the agent already does reliably in one step. Reading a single file, grepping for a string, or reformatting a small blob is cheaper inline than as a script that must be maintained, documented, and kept in sync.
180
-
181
- **A lifecycle hook additionally has to earn its event.** It runs on every prompt, every matching tool call, or every stop, forever, whether or not this session cares — so cost and false positives are paid continuously while the benefit arrives occasionally. A rule that matters only sometimes belongs in prose the agent reads when it applies.
182
-
183
- ## Failure modes
184
-
185
- - _Hidden dependency._ An `import` of a sibling module, a `package.json` in `hooks/`, an assumed global install. The hook works in the repo it was written in and nowhere else, and the breakage surfaces at the call site as a stack trace the agent has no context for.
186
- - _Silent fallback._ Malformed input quietly coerced to a default — a missing field read as `""`, an unparseable line skipped. The script returns a confident wrong answer, and the agent acts on it. Throw instead, naming the input.
187
- - _Chatty stdout._ A log line, a warning, or a human sentence mixed into the JSON. Every caller that parses stdout breaks at once, and on a lifecycle hook the stray text is read as the hook's whole answer.
188
- - _Ambiguous exit._ Exiting `0` on "found nothing" in a hook whose contract is "returns one", or `1` on an empty search result. The caller cannot distinguish "no answer" from "broken", so it guesses. On a lifecycle hook, the near-miss is worse: `1` where `2` was meant is a veto that silently never happened.
189
- - _Unstable order._ A sort with no final tie-breaker, or output built from an unordered map. Two runs disagree and the skill's predictability is gone at exactly the point it was supposed to be guaranteed.
190
- - _Doc drift._ A flag renamed in the script but not the table, a hook added without a row, a registration whose matcher no longer matches the tools it names. The documentation is the interface; an edit to the script that skips it is half an edit.
191
- - _Judgement in code._ A weighting, threshold, or preference hardcoded into a hook where the skill should have stated the rule in prose for the agent to apply.
192
- - _Event tax._ A hook doing real work — a full typecheck, a network call — on an event that fires constantly. Every prompt or tool call now waits on it. Scope by matcher, exit early on the common case, and keep the slow path behind a cheap test.
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "Writing Great Hooks"
3
- short_description: "Self-contained scripts that carry deterministic work, in a skill or on a lifecycle event"
4
- policy:
5
- allow_implicit_invocation: false
@@ -1,201 +0,0 @@
1
- # Glossary — Building Great Skills
2
-
3
- The domain model for what makes a skill great. A skill exists to wrangle determinism out of a stochastic system; the root virtue is **Predictability**, and every term below is a lever on it. This is the disclosed reference for [`writing-great-skills`](SKILL.md).
4
-
5
- The terms are grouped by axis: **Invocation** (how a skill is reached), **Information Hierarchy** (how its content is arranged), **Steering** (how the agent's runtime behaviour is shaped), and **Pruning** (how it is kept lean). Each **failure mode** lives beside the lever that cures it, tagged _failure mode_.
6
-
7
- **Bold terms** in any definition are themselves defined in this glossary; find them by their heading.
8
-
9
- ## Predictability
10
-
11
- The degree to which a skill makes the agent behave the same _way_ on every run — the same process, not the same output (a brainstorming skill should _predictably_ diverge; its tokens vary, its behaviour doesn't). The root virtue every other term serves — cost and maintainability are symptoms of it, not rivals.
12
-
13
- _Avoid_: consistency, reliability, robustness, output-determinism
14
-
15
- ## Invocation
16
-
17
- How a skill is reached — and the two loads you pay for the choice.
18
-
19
- ### Model-Invoked
20
-
21
- A skill that keeps its **description** field, so the agent can see it and fire it autonomously — and the human can still type its name, so model-invocation always _includes_ user reach. There is no model-only state: a description only ever _adds_ agent discovery, never removes the human's. Pays a permanent **context load** on every turn in exchange for that discoverability. Reachable by other skills, because the description that makes it agent-discoverable makes it invocable. A model-invoked skill whose content is all **reference** is also one home for shared reference: another skill can invoke it, so reference needed by several skills lives in one place. Pick model-invocation only when the agent must reach the skill on its own; if it never fires except by hand, drop the description and pay no context load.
22
-
23
- _Avoid_: ability, tool, capability
24
-
25
- ### User-Invoked
26
-
27
- A skill with its **description** stripped — invisible to the agent and reachable only by the human typing its name (user-_only_, where **model-invoked** is user-_and-agent_). Trades agent-discoverability for zero **context load**. Because it has no description, nothing but the human can reach it: no other skill can fire it.
28
-
29
- _Avoid_: procedure, workflow, command
30
-
31
- ### Description
32
-
33
- The skill's machine-readable trigger, and the one **context pointer** a **model-invoked** skill is forced to keep loaded at all times. Its mere presence _is_ the invocation axis: keep it and the skill is model-invoked (and reachable by other skills); delete it and the skill is **user-invoked**, reachable only by the human. The source of a model-invoked skill's **context load**.
34
-
35
- _Avoid_: frontmatter, summary
36
-
37
- ### Context Pointer
38
-
39
- A reference held in the agent's context that names some out-of-context material and encodes the condition for reaching it. The **description** is the top-level context pointer (context window → skill); pointers to disclosed files are the same object one level down. Its wording, not the target, decides _when_ the agent reaches — and _how reliably_. A must-have target behind a weakly worded pointer is a variance bug: fix the wording first, and inline the material only if sharpening fails.
40
-
41
- _Avoid_: link, reference, import
42
-
43
- ### Context Load
44
-
45
- The cost a **model-invoked** skill imposes on the agent's context window — its **description**, always loaded, spending both tokens and attention. What **user-invoked** skills escape by having no description, and the brake on splitting into more model-invoked skills.
46
-
47
- _Avoid_: token cost, context bloat
48
-
49
- ### Cognitive Load
50
-
51
- The cost a **user-invoked** skill imposes on the human — what they must hold in their head: which skills exist and when to reach for each (the human is the index). What **model-invocation** removes by being agent-discoverable, and the brake on splitting into more user-invoked skills. Not a cost to minimise: it is the price of human agency, the reason some skills stay user-invoked. Spend it where human judgement matters; remove it where it does not.
52
-
53
- _Avoid_: human index, burden, overhead
54
-
55
- ### Router Skill
56
-
57
- A **user-invoked** skill whose job is to point at your other user-invoked skills — naming each and when to reach for it — so the human has one skill to remember instead of many. It can only hint, never fire them: user-invoked skills have no **description**, so nothing but the human can reach them. The cure for **cognitive load** when user-invoked skills multiply.
58
-
59
- _Avoid_: dispatcher, menu, registry, index, router procedure
60
-
61
- ### Granularity
62
-
63
- How finely you divide skills. Finer division spends one of the two loads: more **model-invoked** skills spend **context load** (more descriptions crowding the window and competing for attention); more **user-invoked** skills spend **cognitive load** (more for the human to remember and reach for). Two cuts guide the division. By **invocation**, split off a model-invoked skill where you have a distinct **leading word** to trigger it — a trigger word you actually use in your prompts. By **sequence**, split a run of **steps** where a step's **post-completion steps** need hiding, since isolating it in its own context clears what follows. Beware the reverse: merging sequences exposes each step's post-completion steps to what follows, inviting premature completion.
64
-
65
- _Avoid_: chunking, modularity
66
-
67
- ## Information Hierarchy
68
-
69
- How a skill's content is arranged, and how far down the ladder each piece sits.
70
-
71
- ### Information Hierarchy
72
-
73
- A skill's content ranked by how immediately the agent needs it — a single ladder, produced by two cuts: in-file or behind a pointer, and step or reference. The rungs:
74
-
75
- - **Steps** — in-file, primary
76
- - **Reference**, in-file — secondary
77
- - **Reference**, disclosed — behind a **context pointer**
78
-
79
- A skill with no **steps** uses just the bottom two rungs — often a legitimately flat peer-set (e.g. every rule of a review on one rung), which is a fine arrangement, not a smell. The hierarchy is independent of invocation: a skill can be model- or user-invoked whether it is all steps, all reference, or both. When a skill has steps, in-file reference that should be disclosed buries them and turns attending to them into a coin-flip — a variance lever, not just a legibility one. Keep the top of the ladder legible; push down it whatever you can.
80
-
81
- _Avoid_: structure, organization, layout
82
-
83
- ### Steps
84
-
85
- The ordered actions the agent performs — when a skill has them, the primary tier of its content, and the part that earns its place in SKILL.md. Not every skill has steps: a skill can be all steps (`tdd`), all **reference** (a review), or both, independent of invocation. Every step ends on a **completion criterion**, clear or vague.
86
-
87
- _Avoid_: workflow, instructions, choreography
88
-
89
- ### Reference
90
-
91
- Material the agent refers to on demand — definitions, facts, parameters, examples, conditional instructions. When a skill has **steps** it is secondary to them; when a skill has none it is the entire content; or it lives outside any skill entirely — see **External Reference**. Reached via **context pointers**, and the prime candidate for **progressive disclosure**.
92
-
93
- _Avoid_: supporting material, docs, background
94
-
95
- ### External Reference
96
-
97
- **Reference** that lives outside the skill system — a plain file, no **description**, no **steps**, not invocable — that any skill can point at. The home for shared reference that needn't fire on its own, and the only shared home two **user-invoked** skills can use, since neither has a description and so neither can fire the other.
98
-
99
- _Avoid_: doc, resource, knowledge base
100
-
101
- ### Progressive Disclosure
102
-
103
- Moving **reference** down the ladder — out of SKILL.md and behind a **context pointer** — so the top stays legible. Not primarily a token optimisation; it is how the **information hierarchy** is protected. Licensed by **branching**: disclose what only some branches need, inline what every path needs, and if a pointer fires unreliably on must-have material, sharpen its wording, and pull it back inline only if that fails.
104
-
105
- _Avoid_: lazy loading, chunking
106
-
107
- ### Co-location
108
-
109
- Keeping the material an agent needs at once in one place — a concept's definition, rules, and caveats under a single heading, not scattered across the file — so reading one part brings its neighbours with it. The within-file companion to the **Information Hierarchy**: the hierarchy ranks _how far down_ a piece sits; co-location decides _what sits beside it_ once there. There is no formula for the right format of a body of **reference**; the test is that a skill should read like documentation written for the agent, and grouped material reads that way where scattered material does not. Distinct from **Duplication**: that repeats one meaning in two places, where scattering fragments a single meaning across many.
110
-
111
- _Avoid_: grouping, clustering, cohesion
112
-
113
- ### Sprawl
114
-
115
- _Failure mode._ A skill that is simply too long — too many lines in SKILL.md — independent of whether they are stale or repeated. Even an all-live, all-unique skill can sprawl. It costs readability (the agent wades through more before it can act, and attention thins across the excess), maintainability (every extra line is one more to keep **relevant**), and tokens. The cure is the **information hierarchy**: push **reference** down behind **context pointers**, and split by **branch** or sequence so each path carries only what it needs. Distinct from **sediment** (length from stale accumulation) and **duplication** (length from repeated meaning) — sprawl is length itself, whatever its cause.
116
-
117
- _Avoid_: bloat, length, size, verbosity
118
-
119
- ## Steering
120
-
121
- The levers that shape the agent's runtime behaviour toward **Predictability**.
122
-
123
- ### Branch
124
-
125
- A distinct way a skill can be invoked — a case the skill handles — so different runs take different paths through it. A skill with many steps may carry many branches; a linear one has none.
126
-
127
- _Avoid_: path, case, fork
128
-
129
- ### Leading Word
130
-
131
- A compact concept — also called a _Leitwort_ — already living in the model's pretraining, that the agent thinks with while running the skill. It encodes a behavioural principle in the fewest possible tokens by invoking priors the model already holds (e.g. _lesson_, _proximal zone of development_, _fog of war_, _tracer bullets_). Repeated as a token, never as a sentence, it accumulates a distributed definition across the skill and anchors a whole region of behaviour. Coining your own works if you define it clearly, but a made-up word recruits no priors — you pay in definition tokens what a pretrained word gives free. Reach for an existing word first.
132
-
133
- A leading word serves **predictability** twice. In the body it anchors **execution** — the agent reaches for the same behaviour every time the concept appears, and inside flat reference it focuses attention on a class of thing to look for, recruiting the right checks each run. In the **description** it anchors **invocation** — and not only within the skill: when the same word lives in your prompts, your docs, and your codebase, the agent links that shared language to the skill and fires it more reliably. Word a description with the leading words you actually use when you want the skill.
134
-
135
- _Avoid_: keyword, term, motif
136
-
137
- ### Completion Criterion
138
-
139
- The condition that tells the agent a unit of work is done — the target it judges against. Two properties make it a lever, not just a quality. Its **clarity** (can the agent tell done from not-done?) resists **premature completion** — a vague bound ("understanding reached") lets the agent declare done and slip to the next step; this axis needs _steps_ to bite, since premature completion is a between-steps failure. Its **demand** (how much it requires) sets **legwork** — "every modified model accounted for" forces thorough work where "produce a change list" does not — and this axis is _not_ step-bound: it can bind a body of flat reference too, which is how a skill with no steps still carries an exhaustiveness bar ("every rule applied"). The strongest criteria are both checkable and exhaustive.
140
-
141
- _Avoid_: done condition, exit condition, stopping rule
142
-
143
- ### Legwork
144
-
145
- The work an agent does behind the scenes within a single step — reading files, exploring the codebase, making changes, digging up what it needs rather than offloading to the user. It lives below the step structure: never written as its own step, latent in the wording, controlled by the agent rather than the skill. The within-step counterpart to **post-completion steps**' across-step pull. Raised by a **leading word** (_comprehensive_, _thorough_) or a **completion criterion** that demands the work be exhaustive — including the demand axis applied to flat reference, which is what drives a skill of flat reference to cover all its rungs. Goes thin either when that demand is missing or when **premature completion** cuts the step short.
146
-
147
- _Avoid_: scope, effort, diligence, coverage
148
-
149
- ### Post-Completion Steps
150
-
151
- The **steps** that follow the current step. Visible, they pull the agent forward into **premature completion** — the more it sees, the stronger the tug; the defence is to hide them by splitting the sequence of steps into two.
152
-
153
- _Avoid_: horizon, fog of war, lookahead
154
-
155
- ### Premature Completion
156
-
157
- _Failure mode._ Ending the current step before it is genuinely done, because the agent's attention slips to being done rather than to the work. A between-steps failure: it needs **steps** to occur — a skill with no steps that quits early isn't premature completion but thin **legwork** under an unmet demand. A tug-of-war between two forces: visible **post-completion steps** (the pull forward) and the **completion criterion**'s clarity (the resistance — a sharp, checkable bar holds; a vague one gives way). Fuzziness is the necessary condition: a sharp bound resists the pull no matter how many later steps are visible, so a step that never rushes needs no defending. Two levers hold a step that does, but reach for them in order: **sharpen the bound first** — it is local and cheap. Only when the criterion is irreducibly fuzzy _and_ you actually observe the rush do you **hide the later steps** — and hiding only works across a real context boundary (a user-invoked hand-off or a subagent dispatch; an inline model-invoked call leaves the later steps in context and clears nothing). One cause of thin legwork, but distinct from it: legwork can be thin even when a step runs to full completion.
158
-
159
- _Avoid_: premature closure, the rush, rushing, shortcutting
160
-
161
- ### Negation
162
-
163
- _Failure mode._ Steering by prohibition — telling the agent what _not_ to do — which drags the forbidden behaviour into context and makes it _more_ available, not less. _Don't think of an elephant_, and the elephant is all there is; _never write verbose comments_, and verbosity is the pattern the agent has just read. The negation is a weak modifier the strongly-activated concept overruns, so the ban half-reads as an instruction to do the thing. Its **leading word** is the _elephant_: whatever a prohibition names into the frame. Cure: prompt the **positive** — describe the target behaviour ("write one-line comments") so the banned one is never spoken. A prohibition earns its place only as a hard guardrail on a behaviour you cannot phrase positively; even then, pair it with the positive target so attention lands on what to do.
164
-
165
- _Avoid_: ironic rebound, don't-prompting, the pink elephant
166
-
167
- ## Pruning
168
-
169
- Keeping a skill lean — each remedy paired with the failure it cures.
170
-
171
- ### Single Source of Truth
172
-
173
- The desired state where each meaning lives in exactly one authoritative place, so a change to the skill's behaviour is a change in one place. **Duplication** is its violation.
174
-
175
- _Avoid_: home, canonical location
176
-
177
- ### Duplication
178
-
179
- _Failure mode._ The same meaning given more than one **single source of truth**. It costs maintenance (change one place, you must change the others), costs tokens, and inflates prominence — repeating a meaning weights it on the ladder past its real rank. The accidental inverse of a **leading word**, which raises attention on purpose by repeating a token, never the meaning.
180
-
181
- _Avoid_: repetition, redundancy
182
-
183
- ### Relevance
184
-
185
- Whether a line still bears on what the skill does — the lens for what to keep. A line loses relevance either by never bearing on the task (mere exposition, or a **branch** that should be disclosed) or by going stale: drifting out of date as the behaviour or world it describes changes. Shorter skills are easier to keep relevant, because each line is cheaper to check. Distinct from **no-op**: relevance asks whether a line bears on the task, not whether it changes behaviour.
186
-
187
- _Avoid_: load-bearing, staleness, freshness
188
-
189
- ### Sediment
190
-
191
- _Failure mode._ Layers of old content that settle in a skill and are never cleared, because adding feels safe and removing feels risky — so stale and irrelevant lines accumulate and you must core down through them to find what is still live. The default fate of any skill without a pruning discipline; the slow erosion of **relevance**, as opposed to **duplication**'s repeated meaning.
192
-
193
- _Avoid_: accretion, bloat, cruft, rot
194
-
195
- ### No-Op
196
-
197
- _Failure mode._ An instruction that changes nothing because the model already does it by default — you pay load to tell the agent what it would do anyway. The test: does a line change behaviour versus the default? A line can be perfectly **relevant** and still be a no-op. The same priors that make a **leading word** free make a no-op worthless.
198
-
199
- A leading word is a _technique_; No-Op is a _verdict_ on a line — and they cross. A leading word too weak to beat the default is a no-op (_be thorough_ when the agent is already thorough-ish), and the fix is a stronger word that passes the verdict (_relentless_), not a different technique. So the No-Op test — does it change behaviour versus the default? — is also how you grade whether a leading word is earning its repetitions. This is model-relative, not reader-relative: two people disagreeing over whether a line is a no-op disagree about the default, and settle it by running the skill, not by debate.
200
-
201
- _Avoid_: redundant instruction, restating the obvious, belaboring
@@ -1,92 +0,0 @@
1
- ---
2
- name: writing-great-skills
3
- description: Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.
4
- registryDependencies: [emphasise, writing-great-hooks]
5
- disable-model-invocation: false
6
- ---
7
-
8
- A skill exists to wrangle determinism out of a stochastic system. **Predictability** — the agent taking the same _process_ every run, not producing the same output — is the root virtue; every lever below serves it.
9
-
10
- **Bold terms** are defined in [`GLOSSARY.md`](GLOSSARY.md); look them up there for the full meaning.
11
-
12
- ## Invocation
13
-
14
- Two choices, trading different costs:
15
-
16
- - A **model-invoked** skill keeps a **description**, so the agent can fire it autonomously _and_ other skills can reach it (you can still type its name too). It contributes to **context load** — the description sits in the window every turn. Mechanics: omit `disable-model-invocation`, and write a model-facing description with rich trigger phrasing ("Use when the user wants…, mentions…").
17
- - A **user-invoked** skill strips the description from the agent's reach: only you, typing its name, can invoke it — and no other skill can. Zero context load, but it spends **cognitive load**: _you_ are the index that must remember it exists. Mechanics: set `disable-model-invocation: true`; the `description` becomes human-facing — a one-line summary, trigger lists stripped.
18
-
19
- Pick model-invocation only when the agent must reach the skill on its own, or another skill must. If it only ever fires by hand, make it user-invoked and pay no context load.
20
-
21
- When user-invoked skills multiply past what you can remember, that piled-up cognitive load is cured by a **router skill**: one user-invoked skill that names the others and when to reach for each.
22
-
23
- ## Writing the description
24
-
25
- A model-invoked **description** does two jobs — state what the skill is, and list the **branches** that should trigger it. Every word increases **context load**, so a description earns even harder pruning than the body:
26
-
27
- - **Front-load the skill's leading word** — the description is where it does its invocation work.
28
- - **One trigger per branch.** Synonyms that rename a single branch are **duplication** — "build features using TDD … asks for test-first development" is one branch written twice. Collapse them; keep only genuinely distinct branches.
29
- - **Cut identity that's already in the body.** Keep the description to triggers, plus any "when another skill needs…" reach clause.
30
-
31
- ## Information hierarchy
32
-
33
- A skill is built from two content types — **steps** and **reference** — that mix freely: a skill can be all steps, all reference, or both. The core decision is which to use and where each sits on the **information hierarchy**, a ladder ranked by how immediately the agent needs the material:
34
-
35
- 1. **In-skill step** — an ordered action in `SKILL.md`, the primary tier: what the agent does, in order. Each step ends on a **completion criterion**, the condition that tells the agent the work is done. Make it _checkable_ (can the agent tell done from not-done?) and, where it matters, _exhaustive_ ("every modified model accounted for", not "produce a change list") — a vague criterion invites **premature completion**.
36
- 2. **In-skill reference** — a definition, rule, or fact in `SKILL.md`, consulted on demand. Often a legitimately flat peer-set (every rule of a review on one rung) — a fine arrangement, not a smell. _This skill is all reference._
37
- 3. **External reference** — reference pushed out of `SKILL.md` into a separate file, reached by a **context pointer**, loaded only when the pointer fires. (Spans _disclosed_ reference — a sibling file like `GLOSSARY.md`, still part of the skill — through fully **external reference** that lives outside the skill system and any skill can point at.)
38
-
39
- A demanding completion criterion drives thorough **legwork** — the digging the agent does within the work — whether the skill has steps or not, since "every rule applied" binds flat reference just as "every step done" binds a sequence.
40
-
41
- Push too little down and the top bloats; push too much and you hide material the agent actually needs. That tension is the whole decision.
42
-
43
- **Progressive disclosure** is the move down the ladder — out of `SKILL.md` into a linked file — so the top stays legible. Mechanics: a linked `.md` file in the skill folder, named for what it holds (this skill discloses its full definitions to `GLOSSARY.md`). Some skills are used in more than one way, and each distinct way is a **branch** — different runs taking different paths through the skill. Branching is the cleanest disclosure test: inline what every branch needs, and push behind a pointer what only some branches reach. A **context pointer**'s _wording_, not its target, decides when and how reliably the agent reaches the material.
44
-
45
- Where the ladder decides _how far down_ a piece sits, **co-location** decides _what sits beside it_ once there: keep a concept's definition, rules, and caveats under one heading rather than scattered, so reading one part brings its neighbours with it.
46
-
47
- ## When to split
48
-
49
- **Granularity** is how finely you divide skills, and each cut spends one of the two loads, so split only when the cut earns it. Two cuts:
50
-
51
- - **By invocation** — split off a **model-invoked** skill when you have a distinct **leading word** that should trigger it on its own, or another skill must reach it. You pay **context load** for the new always-loaded **description**, so that independent reach has to be worth it.
52
- - **By sequence** — split a run of **steps** when the steps still ahead (a step's **post-completion steps**) tempt the agent to rush the one in front of it (**premature completion**). Keeping them out of view encourages the agent to do more **legwork** on the current task.
53
-
54
- ## Pruning
55
-
56
- Keep each meaning in a **single source of truth**: one authoritative place, so changing the behaviour is a one-place edit.
57
-
58
- Check every line for **relevance**: does it still bear on what the skill does?
59
-
60
- Then hunt **no-ops** sentence by sentence, not just line by line: run the no-op test on each sentence in isolation, and when one fails, delete the whole sentence rather than trim words from it. Be aggressive — most prose that fails should go, not be rewritten.
61
-
62
- ## Leading words
63
-
64
- A **leading word** is a compact concept already living in the model's pretraining that the agent thinks with while running the skill (e.g. _lesson_, _fog of war_, _tracer bullets_). Repeated throughout the text (though not necessarily - a strong leading word might only be needed once), it accumulates a distributed definition and anchors a whole region of behaviour in the fewest tokens, by recruiting priors the model already holds.
65
-
66
- It serves predictability twice. In the body it anchors _execution_: the agent reaches for the same behaviour every time the word appears. In the description it anchors _invocation_: when the same word lives in your prompts, docs, and code, the agent links that shared language to the skill and fires it more reliably.
67
-
68
- Hunt for opportunities to refactor skills to use leading words. A triad spelled out at three sites (**duplication**), a description spending a sentence to gesture at one idea — each is a passage begging to **collapse** into a single token. Examples include:
69
-
70
- - "fast, deterministic, low-overhead" -> _tight_ — one quality restated across a phase — into a single pretrained word (a _tight_ loop).
71
- - "a loop you believe in" -> _red_ — converts a fuzzy gate into a binary observable state (the loop goes _red_ on the bug, or it doesn't).
72
-
73
- You win twice over: fewer tokens, _and_ a sharper hook for the agent to hang its thinking on. Assume every skill is carrying restatements that leading words retire — go find them.
74
-
75
- ## Emphasis
76
-
77
- Bold, italics, and backticks carry fixed meanings across every skill here, and all three work by scarcity. Use the `/emphasise` skill when writing or editing them.
78
-
79
- ## Hooks
80
-
81
- Where work is mechanical, a script replaces the prose — either a script the skill ships in `hooks/`, or one the harness fires from `settings.json` at a lifecycle event. Use the `/writing-great-hooks` skill when adding, documenting, registering, or invoking one.
82
-
83
- ## Failure modes
84
-
85
- Use these to diagnose issues the user may be having with the skill.
86
-
87
- - **Premature completion** — ending a step before it's genuinely done, attention slipping to _being done_. Defence, in order: sharpen the completion criterion first (cheap, local); only if it is irreducibly fuzzy _and_ you observe the rush, hide the post-completion steps by splitting (the sequence cut).
88
- - **Duplication** — the same meaning in more than one place. Costs maintenance and tokens, and inflates a meaning's prominence on the ladder past its real rank.
89
- - **Sediment** — stale layers that settle because adding feels safe and removing feels risky. The default fate of any skill without a pruning discipline.
90
- - **Sprawl** — a skill simply too long, even when every line is live and unique. Hurts readability and maintainability and wastes tokens. The cure is the ladder: disclose **reference** behind pointers, and split by **branch** or sequence so each path carries only what it needs.
91
- - **No-op** — a line the model already obeys by default, so you pay load to say nothing. The test: does it change behaviour versus the default? A weak leading word (_be thorough_ when the agent is already thorough-ish) is a no-op; the fix is a stronger word (_relentless_), not a different technique.
92
- - **Negation** — steering by prohibition backfires: _don't think of an elephant_ names the elephant and makes it more available, not less. Prompt the **positive** — state the target behaviour so the banned one is never spoken; keep a prohibition only as a hard guardrail you can't phrase positively, and even then pair it with what to do instead.
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "Writing Great Skills"
3
- short_description: "Principles for predictable skills"
4
- policy:
5
- allow_implicit_invocation: false