@sentry/warden 0.21.0 → 0.23.0

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 (326) hide show
  1. package/.oxlintrc.json +169 -0
  2. package/CHANGELOG.md +390 -0
  3. package/README.md +4 -4
  4. package/dist/cli/args.d.ts +6 -2
  5. package/dist/cli/args.d.ts.map +1 -1
  6. package/dist/cli/args.js +175 -207
  7. package/dist/cli/args.js.map +1 -1
  8. package/dist/cli/commands/add.d.ts.map +1 -1
  9. package/dist/cli/commands/add.js +16 -5
  10. package/dist/cli/commands/add.js.map +1 -1
  11. package/dist/cli/commands/build.d.ts +13 -0
  12. package/dist/cli/commands/build.d.ts.map +1 -0
  13. package/dist/cli/commands/build.js +384 -0
  14. package/dist/cli/commands/build.js.map +1 -0
  15. package/dist/cli/commands/init.d.ts.map +1 -1
  16. package/dist/cli/commands/init.js +10 -2
  17. package/dist/cli/commands/init.js.map +1 -1
  18. package/dist/cli/commands/runs.d.ts.map +1 -1
  19. package/dist/cli/commands/runs.js +79 -15
  20. package/dist/cli/commands/runs.js.map +1 -1
  21. package/dist/cli/commands/sync.d.ts.map +1 -1
  22. package/dist/cli/commands/sync.js +4 -1
  23. package/dist/cli/commands/sync.js.map +1 -1
  24. package/dist/cli/context.d.ts.map +1 -1
  25. package/dist/cli/context.js +8 -1
  26. package/dist/cli/context.js.map +1 -1
  27. package/dist/cli/files.d.ts.map +1 -1
  28. package/dist/cli/files.js +27 -9
  29. package/dist/cli/files.js.map +1 -1
  30. package/dist/cli/help.d.ts +4 -0
  31. package/dist/cli/help.d.ts.map +1 -0
  32. package/dist/cli/help.js +448 -0
  33. package/dist/cli/help.js.map +1 -0
  34. package/dist/cli/index.js +2 -13
  35. package/dist/cli/index.js.map +1 -1
  36. package/dist/cli/input.d.ts +12 -0
  37. package/dist/cli/input.d.ts.map +1 -1
  38. package/dist/cli/input.js +60 -0
  39. package/dist/cli/input.js.map +1 -1
  40. package/dist/cli/log-cleanup.d.ts.map +1 -1
  41. package/dist/cli/log-cleanup.js +4 -0
  42. package/dist/cli/log-cleanup.js.map +1 -1
  43. package/dist/cli/main.d.ts +39 -2
  44. package/dist/cli/main.d.ts.map +1 -1
  45. package/dist/cli/main.js +482 -100
  46. package/dist/cli/main.js.map +1 -1
  47. package/dist/cli/output/box.js +1 -1
  48. package/dist/cli/output/formatters.d.ts +10 -2
  49. package/dist/cli/output/formatters.d.ts.map +1 -1
  50. package/dist/cli/output/formatters.js +32 -9
  51. package/dist/cli/output/formatters.js.map +1 -1
  52. package/dist/cli/output/index.d.ts +2 -2
  53. package/dist/cli/output/index.d.ts.map +1 -1
  54. package/dist/cli/output/index.js +2 -2
  55. package/dist/cli/output/index.js.map +1 -1
  56. package/dist/cli/output/ink-runner.d.ts +3 -1
  57. package/dist/cli/output/ink-runner.d.ts.map +1 -1
  58. package/dist/cli/output/ink-runner.js +79 -25
  59. package/dist/cli/output/ink-runner.js.map +1 -1
  60. package/dist/cli/output/jsonl-schema-gen.d.ts.map +1 -1
  61. package/dist/cli/output/jsonl-schema-gen.js +4 -2
  62. package/dist/cli/output/jsonl-schema-gen.js.map +1 -1
  63. package/dist/cli/output/jsonl.d.ts +147 -4
  64. package/dist/cli/output/jsonl.d.ts.map +1 -1
  65. package/dist/cli/output/jsonl.js +183 -7
  66. package/dist/cli/output/jsonl.js.map +1 -1
  67. package/dist/cli/output/live-status.d.ts +48 -0
  68. package/dist/cli/output/live-status.d.ts.map +1 -0
  69. package/dist/cli/output/live-status.js +173 -0
  70. package/dist/cli/output/live-status.js.map +1 -0
  71. package/dist/cli/output/reporter.d.ts +4 -0
  72. package/dist/cli/output/reporter.d.ts.map +1 -1
  73. package/dist/cli/output/reporter.js +20 -3
  74. package/dist/cli/output/reporter.js.map +1 -1
  75. package/dist/cli/output/tasks.d.ts +11 -5
  76. package/dist/cli/output/tasks.d.ts.map +1 -1
  77. package/dist/cli/output/tasks.js +126 -68
  78. package/dist/cli/output/tasks.js.map +1 -1
  79. package/dist/cli/signals.d.ts +15 -0
  80. package/dist/cli/signals.d.ts.map +1 -0
  81. package/dist/cli/signals.js +26 -0
  82. package/dist/cli/signals.js.map +1 -0
  83. package/dist/config/loader.d.ts +48 -7
  84. package/dist/config/loader.d.ts.map +1 -1
  85. package/dist/config/loader.js +228 -32
  86. package/dist/config/loader.js.map +1 -1
  87. package/dist/config/schema.d.ts +55 -0
  88. package/dist/config/schema.d.ts.map +1 -1
  89. package/dist/config/schema.js +34 -2
  90. package/dist/config/schema.js.map +1 -1
  91. package/dist/diff/context.d.ts +9 -2
  92. package/dist/diff/context.d.ts.map +1 -1
  93. package/dist/diff/context.js +65 -17
  94. package/dist/diff/context.js.map +1 -1
  95. package/dist/evals/runner.d.ts.map +1 -1
  96. package/dist/evals/runner.js +16 -0
  97. package/dist/evals/runner.js.map +1 -1
  98. package/dist/event/context.d.ts.map +1 -1
  99. package/dist/event/context.js +1 -0
  100. package/dist/event/context.js.map +1 -1
  101. package/dist/event/schedule-context.d.ts.map +1 -1
  102. package/dist/event/schedule-context.js +1 -0
  103. package/dist/event/schedule-context.js.map +1 -1
  104. package/dist/index.d.ts +6 -6
  105. package/dist/index.d.ts.map +1 -1
  106. package/dist/index.js +3 -3
  107. package/dist/index.js.map +1 -1
  108. package/dist/output/dedup.d.ts +8 -11
  109. package/dist/output/dedup.d.ts.map +1 -1
  110. package/dist/output/dedup.js +39 -37
  111. package/dist/output/dedup.js.map +1 -1
  112. package/dist/output/github-checks.d.ts +1 -0
  113. package/dist/output/github-checks.d.ts.map +1 -1
  114. package/dist/output/github-checks.js +9 -7
  115. package/dist/output/github-checks.js.map +1 -1
  116. package/dist/sdk/analyze.d.ts.map +1 -1
  117. package/dist/sdk/analyze.js +166 -276
  118. package/dist/sdk/analyze.js.map +1 -1
  119. package/dist/sdk/circuit-breaker.d.ts +26 -0
  120. package/dist/sdk/circuit-breaker.d.ts.map +1 -0
  121. package/dist/sdk/circuit-breaker.js +53 -0
  122. package/dist/sdk/circuit-breaker.js.map +1 -0
  123. package/dist/sdk/errors.d.ts +5 -0
  124. package/dist/sdk/errors.d.ts.map +1 -1
  125. package/dist/sdk/errors.js +27 -0
  126. package/dist/sdk/errors.js.map +1 -1
  127. package/dist/sdk/extract.d.ts +18 -9
  128. package/dist/sdk/extract.d.ts.map +1 -1
  129. package/dist/sdk/extract.js +95 -87
  130. package/dist/sdk/extract.js.map +1 -1
  131. package/dist/sdk/fix-quality.d.ts +5 -0
  132. package/dist/sdk/fix-quality.d.ts.map +1 -1
  133. package/dist/sdk/fix-quality.js +42 -23
  134. package/dist/sdk/fix-quality.js.map +1 -1
  135. package/dist/sdk/haiku.d.ts +6 -0
  136. package/dist/sdk/haiku.d.ts.map +1 -1
  137. package/dist/sdk/haiku.js +75 -49
  138. package/dist/sdk/haiku.js.map +1 -1
  139. package/dist/sdk/json-output.d.ts +31 -0
  140. package/dist/sdk/json-output.d.ts.map +1 -0
  141. package/dist/sdk/json-output.js +98 -0
  142. package/dist/sdk/json-output.js.map +1 -0
  143. package/dist/sdk/model-pricing.json +56 -16
  144. package/dist/sdk/post-process.d.ts +29 -0
  145. package/dist/sdk/post-process.d.ts.map +1 -0
  146. package/dist/sdk/post-process.js +65 -0
  147. package/dist/sdk/post-process.js.map +1 -0
  148. package/dist/sdk/prepare.d.ts.map +1 -1
  149. package/dist/sdk/prepare.js +4 -1
  150. package/dist/sdk/prepare.js.map +1 -1
  151. package/dist/sdk/pricing.d.ts +18 -0
  152. package/dist/sdk/pricing.d.ts.map +1 -1
  153. package/dist/sdk/pricing.js +108 -3
  154. package/dist/sdk/pricing.js.map +1 -1
  155. package/dist/sdk/prompt-sections.d.ts +56 -0
  156. package/dist/sdk/prompt-sections.d.ts.map +1 -0
  157. package/dist/sdk/prompt-sections.js +118 -0
  158. package/dist/sdk/prompt-sections.js.map +1 -0
  159. package/dist/sdk/prompt.d.ts +2 -17
  160. package/dist/sdk/prompt.d.ts.map +1 -1
  161. package/dist/sdk/prompt.js +15 -37
  162. package/dist/sdk/prompt.js.map +1 -1
  163. package/dist/sdk/report-files.d.ts +15 -0
  164. package/dist/sdk/report-files.d.ts.map +1 -0
  165. package/dist/sdk/report-files.js +20 -0
  166. package/dist/sdk/report-files.js.map +1 -0
  167. package/dist/sdk/runner.d.ts +9 -1
  168. package/dist/sdk/runner.d.ts.map +1 -1
  169. package/dist/sdk/runner.js +6 -0
  170. package/dist/sdk/runner.js.map +1 -1
  171. package/dist/sdk/runtimes/claude.d.ts +3 -0
  172. package/dist/sdk/runtimes/claude.d.ts.map +1 -0
  173. package/dist/sdk/runtimes/claude.js +376 -0
  174. package/dist/sdk/runtimes/claude.js.map +1 -0
  175. package/dist/sdk/runtimes/index.d.ts +12 -0
  176. package/dist/sdk/runtimes/index.d.ts.map +1 -0
  177. package/dist/sdk/runtimes/index.js +22 -0
  178. package/dist/sdk/runtimes/index.js.map +1 -0
  179. package/dist/sdk/runtimes/types.d.ts +116 -0
  180. package/dist/sdk/runtimes/types.d.ts.map +1 -0
  181. package/dist/sdk/runtimes/types.js +17 -0
  182. package/dist/sdk/runtimes/types.js.map +1 -0
  183. package/dist/sdk/types.d.ts +42 -2
  184. package/dist/sdk/types.d.ts.map +1 -1
  185. package/dist/sdk/types.js.map +1 -1
  186. package/dist/sdk/usage.d.ts +21 -6
  187. package/dist/sdk/usage.d.ts.map +1 -1
  188. package/dist/sdk/usage.js +36 -23
  189. package/dist/sdk/usage.js.map +1 -1
  190. package/dist/sdk/verify.d.ts +25 -0
  191. package/dist/sdk/verify.d.ts.map +1 -0
  192. package/dist/sdk/verify.js +226 -0
  193. package/dist/sdk/verify.js.map +1 -0
  194. package/dist/skill-builder/agentic.d.ts +33 -0
  195. package/dist/skill-builder/agentic.d.ts.map +1 -0
  196. package/dist/skill-builder/agentic.js +240 -0
  197. package/dist/skill-builder/agentic.js.map +1 -0
  198. package/dist/skill-builder/authoring-provider.d.ts +5 -0
  199. package/dist/skill-builder/authoring-provider.d.ts.map +1 -0
  200. package/dist/skill-builder/authoring-provider.js +70 -0
  201. package/dist/skill-builder/authoring-provider.js.map +1 -0
  202. package/dist/skill-builder/definition.d.ts +46 -0
  203. package/dist/skill-builder/definition.d.ts.map +1 -0
  204. package/dist/skill-builder/definition.js +171 -0
  205. package/dist/skill-builder/definition.js.map +1 -0
  206. package/dist/skill-builder/outline-contract.d.ts +113 -0
  207. package/dist/skill-builder/outline-contract.d.ts.map +1 -0
  208. package/dist/skill-builder/outline-contract.js +73 -0
  209. package/dist/skill-builder/outline-contract.js.map +1 -0
  210. package/dist/skill-builder/outline-state.d.ts +158 -0
  211. package/dist/skill-builder/outline-state.d.ts.map +1 -0
  212. package/dist/skill-builder/outline-state.js +87 -0
  213. package/dist/skill-builder/outline-state.js.map +1 -0
  214. package/dist/skill-builder/outline.d.ts +36 -0
  215. package/dist/skill-builder/outline.d.ts.map +1 -0
  216. package/dist/skill-builder/outline.js +345 -0
  217. package/dist/skill-builder/outline.js.map +1 -0
  218. package/dist/skill-builder/skill-contract.d.ts +97 -0
  219. package/dist/skill-builder/skill-contract.d.ts.map +1 -0
  220. package/dist/skill-builder/skill-contract.js +58 -0
  221. package/dist/skill-builder/skill-contract.js.map +1 -0
  222. package/dist/skill-builder/skill-prompts.d.ts +61 -0
  223. package/dist/skill-builder/skill-prompts.d.ts.map +1 -0
  224. package/dist/skill-builder/skill-prompts.js +285 -0
  225. package/dist/skill-builder/skill-prompts.js.map +1 -0
  226. package/dist/skill-builder/skill.d.ts +23 -0
  227. package/dist/skill-builder/skill.d.ts.map +1 -0
  228. package/dist/skill-builder/skill.js +563 -0
  229. package/dist/skill-builder/skill.js.map +1 -0
  230. package/dist/skills/index.d.ts +2 -2
  231. package/dist/skills/index.d.ts.map +1 -1
  232. package/dist/skills/index.js +1 -1
  233. package/dist/skills/index.js.map +1 -1
  234. package/dist/skills/loader.d.ts +20 -6
  235. package/dist/skills/loader.d.ts.map +1 -1
  236. package/dist/skills/loader.js +88 -141
  237. package/dist/skills/loader.js.map +1 -1
  238. package/dist/skills/remote.d.ts +11 -7
  239. package/dist/skills/remote.d.ts.map +1 -1
  240. package/dist/skills/remote.js +62 -162
  241. package/dist/skills/remote.js.map +1 -1
  242. package/dist/triggers/matcher.d.ts.map +1 -1
  243. package/dist/triggers/matcher.js +28 -15
  244. package/dist/triggers/matcher.js.map +1 -1
  245. package/dist/types/index.d.ts +41 -0
  246. package/dist/types/index.d.ts.map +1 -1
  247. package/dist/types/index.js +24 -0
  248. package/dist/types/index.js.map +1 -1
  249. package/dist/utils/index.d.ts +1 -0
  250. package/dist/utils/index.d.ts.map +1 -1
  251. package/dist/utils/index.js +1 -0
  252. package/dist/utils/index.js.map +1 -1
  253. package/dist/utils/path.d.ts +17 -0
  254. package/dist/utils/path.d.ts.map +1 -0
  255. package/dist/utils/path.js +36 -0
  256. package/dist/utils/path.js.map +1 -0
  257. package/package.json +8 -8
  258. package/policies/README.md +22 -0
  259. package/policies/code-comments.md +20 -0
  260. package/policies/policy-template.md +14 -0
  261. package/skills/warden/SKILL.md +5 -5
  262. package/skills/warden/SOURCES.md +39 -0
  263. package/skills/warden/SPEC.md +112 -0
  264. package/skills/warden/references/cli-reference.md +11 -4
  265. package/skills/warden/references/config-schema.md +38 -13
  266. package/skills/warden/references/configuration.md +29 -8
  267. package/skills/warden-sweep/SKILL.md +43 -365
  268. package/skills/warden-sweep/SOURCES.md +43 -0
  269. package/skills/warden-sweep/SPEC.md +126 -0
  270. package/skills/warden-sweep/references/issue-phase.md +24 -0
  271. package/skills/warden-sweep/references/organize-phase.md +31 -0
  272. package/skills/warden-sweep/references/patch-phase.md +142 -0
  273. package/skills/warden-sweep/references/resume-and-artifacts.md +51 -0
  274. package/skills/warden-sweep/references/scan-phase.md +46 -0
  275. package/skills/warden-sweep/references/script-interfaces.md +127 -0
  276. package/skills/warden-sweep/references/verify-phase.md +69 -0
  277. package/src/builtin-skills/security-review/SKILL.md +81 -0
  278. package/src/builtin-skills/security-review/SPEC.md +77 -0
  279. package/src/builtin-skills/security-review/references/github-workflows.md +186 -0
  280. package/src/builtin-skills/security-review/references/javascript-typescript.md +69 -0
  281. package/src/builtin-skills/security-review/references/python.md +70 -0
  282. package/src/internal-skills/skill-writer/EVAL.md +124 -0
  283. package/src/internal-skills/skill-writer/SKILL.md +159 -0
  284. package/src/internal-skills/skill-writer/SOURCES.md +94 -0
  285. package/src/internal-skills/skill-writer/SPEC.md +153 -0
  286. package/src/internal-skills/skill-writer/references/artifact-layouts/argument-driven-skill-layout.md +32 -0
  287. package/src/internal-skills/skill-writer/references/artifact-layouts/asset-template-skill-layout.md +30 -0
  288. package/src/internal-skills/skill-writer/references/artifact-layouts/inline-skill-layout.md +28 -0
  289. package/src/internal-skills/skill-writer/references/artifact-layouts/reference-backed-skill-layout.md +35 -0
  290. package/src/internal-skills/skill-writer/references/artifact-layouts/script-backed-skill-layout.md +31 -0
  291. package/src/internal-skills/skill-writer/references/authoring-path.md +91 -0
  292. package/src/internal-skills/skill-writer/references/claude-code/argument-substitutions.md +20 -0
  293. package/src/internal-skills/skill-writer/references/claude-code/dynamic-context.md +16 -0
  294. package/src/internal-skills/skill-writer/references/claude-code/frontmatter-and-invocation.md +33 -0
  295. package/src/internal-skills/skill-writer/references/claude-code/hook-backed-skills.md +28 -0
  296. package/src/internal-skills/skill-writer/references/claude-code/subagent-fork-skills.md +22 -0
  297. package/src/internal-skills/skill-writer/references/description-optimization.md +28 -0
  298. package/src/internal-skills/skill-writer/references/design-principles.md +74 -0
  299. package/src/internal-skills/skill-writer/references/evaluation-path.md +73 -0
  300. package/src/internal-skills/skill-writer/references/examples/documentation-skill.md +70 -0
  301. package/src/internal-skills/skill-writer/references/examples/evaluator-loop-skill.md +38 -0
  302. package/src/internal-skills/skill-writer/references/examples/hook-backed-skill.md +39 -0
  303. package/src/internal-skills/skill-writer/references/examples/router-skill.md +41 -0
  304. package/src/internal-skills/skill-writer/references/examples/security-review-skill.md +69 -0
  305. package/src/internal-skills/skill-writer/references/examples/subagent-fork-skill.md +39 -0
  306. package/src/internal-skills/skill-writer/references/examples/workflow-process-skill.md +65 -0
  307. package/src/internal-skills/skill-writer/references/execution-shapes.md +68 -0
  308. package/src/internal-skills/skill-writer/references/iteration-evidence.md +82 -0
  309. package/src/internal-skills/skill-writer/references/iteration-path.md +40 -0
  310. package/src/internal-skills/skill-writer/references/mode-selection.md +67 -0
  311. package/src/internal-skills/skill-writer/references/output-contracts.md +68 -0
  312. package/src/internal-skills/skill-writer/references/reference-architecture.md +71 -0
  313. package/src/internal-skills/skill-writer/references/registration-validation.md +67 -0
  314. package/src/internal-skills/skill-writer/references/source-discovery.md +60 -0
  315. package/src/internal-skills/skill-writer/references/spec-template.md +118 -0
  316. package/src/internal-skills/skill-writer/references/structure-troubleshooting.md +111 -0
  317. package/src/internal-skills/skill-writer/references/synthesis-path.md +119 -0
  318. package/src/internal-skills/skill-writer/references/workflow-mechanics/evaluator-loops.md +25 -0
  319. package/src/internal-skills/skill-writer/references/workflow-mechanics/orchestrator-workers.md +25 -0
  320. package/src/internal-skills/skill-writer/references/workflow-mechanics/parallel-workflows.md +21 -0
  321. package/src/internal-skills/skill-writer/references/workflow-mechanics/plan-validate-execute.md +26 -0
  322. package/src/internal-skills/skill-writer/references/workflow-mechanics/prompt-chaining.md +24 -0
  323. package/src/internal-skills/skill-writer/references/workflow-mechanics/routing-workflows.md +28 -0
  324. package/src/internal-skills/skill-writer/references/workflow-mechanics/validation-loops.md +26 -0
  325. package/src/internal-skills/skill-writer/scripts/quick_validate.py +158 -0
  326. package/src/internal-skills/skill-writer/scripts/quick_validate_test.py +79 -0
@@ -0,0 +1,94 @@
1
+ # Sources
2
+
3
+ This file tracks source material synthesized into `skill-writer`, plus iterative changes over time.
4
+
5
+ ## Current source inventory
6
+
7
+ | Source | Type | Trust tier | Retrieved | Confidence | Contribution | Usage constraints | Notes |
8
+ |---|---|---|---|---|---|---|---|
9
+ | `SKILL.md` | local canonical | canonical | 2026-05-01 | high | Baseline orchestration, path model, and runtime contract | local active skill root | Primary source of current behavior |
10
+ | `references/**/*.md` | local canonical | canonical | 2026-05-01 | high | Detailed path guidance, examples, routed leaf references, and validation requirements | local active skill root | Includes shape, synthesis, iteration, evaluation, provider-specific guidance, and lookup-oriented subfolders |
11
+ | `SPEC.md` | local canonical | canonical | 2026-05-01 | high | Canonical maintenance contract for intent, scope, evidence model, evaluation, and limitations | local active skill root | Updated to treat `skill-writer` as a meta-router |
12
+ | `https://agentskills.io/specification` | external canonical spec | canonical | 2026-05-01 | high | Portable skill structure, frontmatter, progressive disclosure, optional directories, and file-reference rules | spec-level constraints take precedence over local preferences | Cross-agent compatibility baseline |
13
+ | `https://agentskills.io/skill-creation/best-practices` | external official docs | canonical | 2026-05-01 | high | Coherent unit design, moderate detail, progressive disclosure, defaults over menus, validation loops, plan-validate-execute | skill-authoring guidance, not provider-specific runtime semantics | Informed shape-selection and workflow guidance |
14
+ | `https://agentskills.io/skill-creation/using-scripts` | external official docs | canonical | 2026-05-01 | high | Script bundling, non-interactive requirements, `--help`, structured output, and safe script interfaces | script examples are illustrative, adapt to local tooling | Informed script-backed workflow requirements |
15
+ | `https://code.claude.com/docs/en/skills` | external official docs | canonical | 2026-05-01 | high | Current Claude Code skill lifecycle, frontmatter fields, argument features, `context: fork`, `allowed-tools`, and hooks-in-skills support | provider-specific; do not generalize to portable Agent Skills behavior | Replaced stale local assumptions about Claude-specific fields |
16
+ | `https://code.claude.com/docs/en/sub-agents` | external official docs | canonical | 2026-05-01 | high | Automatic delegation, focused subagents, explicit invocation modes, and subagent lifecycle integration | provider-specific | Informed `subagent-fork` shape guidance |
17
+ | `https://code.claude.com/docs/en/hooks` | external official docs | canonical | 2026-05-01 | high | Hook lifecycle, hooks in skills and agents, async constraints, and security requirements | provider-specific and security-sensitive | Informed `hook-backed` shape guidance and safety notes |
18
+ | `https://www.anthropic.com/engineering/building-effective-agents` | external official engineering guidance | canonical | 2026-05-01 | high | Simplicity-first design and workflow taxonomy: prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer | conceptual guidance; adapt to skill authoring rather than full app orchestration | Core source for execution-shape taxonomy |
19
+ | `https://developers.openai.com/api/docs/guides/reasoning-best-practices` | external official docs | canonical | 2026-05-01 | high | Planner/doer distinction, reasoning-vs-GPT model tradeoffs, and avoiding explicit chain-of-thought prompting | provider-specific model guidance; use only as general orchestration input unless exact product syntax matters | Informed reasoning-model and evaluator-loop notes |
20
+ | `https://openai.com/business/guides-and-resources/a-practical-guide-to-building-ai-agents/` | external official guidance | canonical | 2026-05-01 | high | Maximize a single agent first, use multi-agent only when needed, manager-vs-handoff split, layered guardrails | product-level guidance, not a skills standard | Informed simplicity rule and advanced-shape escalation criteria |
21
+ | `https://openai.github.io/openai-agents-python/agents/` | external official SDK docs | canonical | 2026-05-01 | medium | Manager-vs-handoff distinction and structured-output support | SDK-specific implementation details | Informed router/orchestrator language and contract expectations |
22
+ | `https://openai.github.io/openai-agents-python/handoffs/` | external official SDK docs | canonical | 2026-05-01 | medium | Handoff metadata, input filters, and receiving-agent history control | SDK-specific implementation details | Informed route/handoff contract guidance |
23
+ | `https://huggingface.co/docs/hub/model-cards` | external documentation pattern | secondary | 2026-04-26 | high | Model-card sections for intended use, data, evaluation, limitations, and reproducibility | adapted as documentation prior art, not a skill standard | Inspired `SPEC.md` maintenance contract shape |
24
+ | `https://huggingface.co/docs/hub/en/model-card-annotated` | external documentation pattern | secondary | 2026-04-26 | high | Annotated intended-use, out-of-scope, risks, limitations, and evaluation sections | adapted as documentation prior art, not a skill standard | Informed SPEC scope and limitations sections |
25
+ | `https://cacm.acm.org/research/datasheets-for-datasets/` | research/documentation pattern | secondary | 2026-04-26 | high | Data provenance, collection, composition, intended use, and maintenance transparency | adapted from dataset documentation to skill evidence documentation | Informed source/evidence model and privacy rules |
26
+ | `https://diataxis.fr/` | documentation framework | secondary | 2026-04-26 | high | User-need-centered documentation types: tutorial, how-to, reference, explanation | adapted as information architecture prior art, not a skill standard | Informed reference files as lookup needs rather than topic buckets |
27
+ | `https://dita-lang.org/` | documentation standard | secondary | 2026-04-26 | high | Topic-oriented technical content patterns: task, concept, reference, troubleshooting | adapted as documentation architecture prior art | Informed reference type table and troubleshooting matrix guidance |
28
+ | `https://www.writethedocs.org/guide/writing/docs-principles/` | documentation guidance | secondary | 2026-04-26 | medium | Documentation should be structured for findability, reuse, and user participation | general writing guidance | Cross-check for reference architecture usability |
29
+ | `AGENTS.md` | repo convention | canonical | 2026-05-01 | high | Repository-specific workflow requirements and registration checklist | repository-local policy | Registration + validator expectations |
30
+ | `README.md` | repo convention | canonical | 2026-05-01 | high | Skill table format and authoring conventions | repository-local policy | Registration and discoverability source |
31
+
32
+ ## Decisions
33
+
34
+ 1. `skill-writer` is a meta-router: it must choose both a skill class and an execution shape before authoring.
35
+ 2. Default to the simplest adequate shape. Advanced mechanics require evidence and an explicit reason simpler shapes were rejected.
36
+ 3. Skill class and execution shape are independent axes. Class drives coverage requirements; shape drives runtime mechanics and artifact layout.
37
+ 4. `SKILL.md` remains the orchestration/index layer; references, scripts, assets, hooks, and subagents are leaves selected by that router.
38
+ 5. Provider-specific Claude Code features are valuable but not default. Use them only when justified and record portability implications.
39
+ 6. Claude-specific frontmatter guidance should track the current `code.claude.com/docs/en/skills` fields, including `when_to_use`, `arguments`, `effort`, `paths`, `shell`, `context`, `agent`, and `hooks`.
40
+ 7. Router, parallel/orchestrator, evaluator-loop, subagent-fork, and hook-backed shapes each require explicit contracts, not just prose.
41
+ 8. Hooks are deterministic enforcement and need narrow scope plus security notes because command hooks run with full user permissions.
42
+ 9. Multi-agent guidance should distinguish manager/orchestrator, handoff, and isolated subagent execution instead of collapsing them into one pattern.
43
+ 10. Reasoning-model guidance is a design option, not a universal default: planner/doer splits are useful when complexity warrants them.
44
+ 11. Authoring review should check architectural choices qualitatively; the quick validator remains mechanical.
45
+ 12. Reference files remain split by lookup need rather than topic buckets, even as the set of supported shapes expands.
46
+ 13. Subfolders inside `references/` are acceptable when they create clearer lookup leaves, but every bundled reference should still be directly discoverable from `SKILL.md`.
47
+ 14. The validator should enforce durable SKILL.md frontmatter/YAML identity guarantees, but should not hardcode provider-specific optional frontmatter keys or markdown-content opinions.
48
+ 15. `skill-writer` should default to dense structures such as tables, checklists, templates, and I/O examples, and should cut explanatory prose unless it prevents a concrete mistake.
49
+ 16. `SKILL.md` should stay a thin router; repeated policy belongs in routed references rather than always-loaded step prose.
50
+ 17. Evaluation is conditional and should not be part of the default authoring path unless the user asks for it or the change is genuinely risky.
51
+
52
+ ## Coverage matrix
53
+
54
+ | Dimension | Coverage status | Evidence |
55
+ |---|---|---|
56
+ | SKILL.md vs references placement | complete | Agent Skills spec, local reference architecture |
57
+ | Reference splitting heuristics | complete | Agent Skills best practices, Diataxis, DITA, local reference architecture and artifact-layout guidance |
58
+ | Long reference navigation | complete | local design principles |
59
+ | Source discovery beyond docs | complete | local synthesis depth gates, repository history practices |
60
+ | Commit log as source material | complete | local source-discovery guidance |
61
+ | Positive/negative evidence storage | complete | local iteration path, prior eval guidance |
62
+ | Skill maintenance specification | complete | model cards, datasheets, local `SPEC.md` reference implementation |
63
+ | Shape-selection framework | complete | Anthropic effective agents, OpenAI practical guide, local execution-shapes guidance |
64
+ | Router/orchestrator/evaluator patterns | complete | Anthropic effective agents, OpenAI agent guides, local workflow-mechanics guidance |
65
+ | Current Claude skill frontmatter and lifecycle mechanics | complete | Claude Code skills docs |
66
+ | Subagent-fork guidance | complete | Claude Code skills docs, subagents docs |
67
+ | Hook-backed guidance and security constraints | complete | Claude Code hooks docs |
68
+ | Script-backed workflow design | complete | Agent Skills using scripts guide |
69
+ | Planner/doer reasoning guidance | complete | OpenAI reasoning best practices |
70
+ | Lookup-oriented reference architecture | complete | Diataxis user needs, DITA topic types, local reference architecture |
71
+
72
+ ## Open gaps
73
+
74
+ 1. This repository still has few real shipped examples using `hooks`, `context: fork`, `when_to_use`, `arguments`, `paths`, or `effort`.
75
+ 2. Public repo docs outside `skill-writer` may need follow-up updates to fully reflect the current Claude-specific skill fields.
76
+
77
+ ## Changelog
78
+
79
+ - 2026-03-05: Initialized `SOURCES.md` with baseline source pack (local canonical, Codex upstream, Claude upstream, spec, and repo conventions).
80
+ - 2026-03-19: Clarified path-resolution guidance so bundled skill references stay skill-root-relative while registration steps are resolved from the repository's active layout.
81
+ - 2026-03-19: Made portability a default authoring rule and emphasized avoiding host-specific absolute filesystem paths.
82
+ - 2026-04-19: Updated path guidance to preserve repository-standard root variables such as `${CLAUDE_SKILL_ROOT}` instead of banning them outright.
83
+ - 2026-04-19: Restored `.agents/skills` as the default authoring target and kept repository-specific layouts as an inspected override rather than the default.
84
+ - 2026-04-19: Added explicit prior-art inspection and user-confirmation guidance when the correct skill root is unclear.
85
+ - 2026-04-26: Added reference architecture, source discovery, and iteration evidence guidance; updated synthesis, authoring, and iteration paths to prevent overloaded `SKILL.md` and catch-all reference files.
86
+ - 2026-04-26: Added `SPEC.md` as the canonical `skill-writer` maintenance specification and added `references/spec-template.md` for future skills.
87
+ - 2026-04-26: Removed fixed integration reference filename validation and added length-based reference warnings.
88
+ - 2026-04-26: Reworked reference architecture around concrete lookup needs instead of generic topic buckets.
89
+ - 2026-05-01: Reworked `skill-writer` around explicit execution-shape routing, added shape-specific example profiles, refreshed Claude Code provider mechanics from current official docs, and added eval/source guidance for routing, delegation, hooks, and evaluator loops.
90
+ - 2026-05-01: Replaced generic pattern bucket references with routed leaf files under `references/artifact-layouts/`, `references/workflow-mechanics/`, and `references/claude-code/`; made `SKILL.md` enumerate every bundled reference file with a direct open-when reason.
91
+ - 2026-05-01: Removed the validator's hardcoded optional frontmatter allowlist so provider-specific field drift does not create noisy false warnings.
92
+ - 2026-05-01: Reduced prose-heavy guidance in `skill-writer`, rewrote the main runtime refs into denser tables/checklists, and made compact runtime guidance an explicit contract.
93
+ - 2026-05-01: Thinned `SKILL.md` back toward a true router, removed duplicated execution-shape detail from `mode-selection.md`, and made evaluation conditional instead of a default workflow path.
94
+ - 2026-05-05: Reduced `quick_validate.py` to mechanical SKILL.md frontmatter/YAML and identity checks; markdown content quality now belongs to authoring review.
@@ -0,0 +1,153 @@
1
+ # Skill Writer Specification
2
+
3
+ ## Intent
4
+
5
+ `skill-writer` is the canonical workflow for creating, updating, synthesizing, and iteratively improving agent skills in this repository.
6
+
7
+ Its primary purpose is to prevent shallow skill authoring by forcing high-value source coverage, explicit provenance, focused runtime instructions, and validation before completion.
8
+ It is also a meta-router: before authoring, it must choose the simplest adequate execution shape for the target skill and only then decide which artifacts are needed.
9
+
10
+ ## Scope
11
+
12
+ In scope:
13
+
14
+ - New skill creation from local, external, or mixed sources.
15
+ - Existing skill updates that affect runtime behavior, structure, trigger precision, references, or validation.
16
+ - Research-first synthesis for proposed skills.
17
+ - Iteration from positive examples, negative examples, review feedback, eval results, and observed agent behavior.
18
+ - Registration and validation for this repository's canonical `skills/<skill-name>/` layout and other discovered layouts.
19
+ - Choosing between execution shapes such as inline guidance, reference-backed expert, script-backed workflow, router, evaluator loop, subagent-fork, hook-backed, asset-template, or hybrids.
20
+ - Assessing when provider-specific mechanics are justified and documenting portability constraints.
21
+
22
+ Out of scope:
23
+
24
+ - Acting as the runtime instructions for the skills it creates.
25
+ - Storing full source inventories, raw examples, or changelog history directly in `SKILL.md`.
26
+ - Replacing repository-level instructions in `AGENTS.md`, `README.md`, or `CONTRIBUTING.md`.
27
+ - Creating per-skill aliases or symlink skills in this repository.
28
+ - Guaranteeing compatibility with provider-specific skill extensions unless they are explicitly scoped and documented.
29
+
30
+ ## Users And Trigger Context
31
+
32
+ - Primary users: agents and humans authoring or maintaining reusable agent skills.
33
+ - Common user requests: "create a skill", "write a skill", "update this skill", "improve from examples", "synthesize a skill from docs", "maintain skill docs", or "validate/register this skill".
34
+ - Should not trigger for: ordinary code review, generic documentation edits, PR writing, commit creation, or implementation work that does not create or modify an agent skill.
35
+
36
+ ## Runtime Contract
37
+
38
+ - Required first actions:
39
+ - Resolve the target skill root and operation.
40
+ - Inspect local repository conventions before deciding where files belong.
41
+ - Classify the skill and select the minimum required workflow paths.
42
+ - Select a primary execution shape and default to the simplest adequate option.
43
+ - Treat evaluation as conditional rather than a default path.
44
+ - Required outputs:
45
+ - Summary.
46
+ - Changes Made.
47
+ - Validation Results.
48
+ - Open Gaps.
49
+ - Non-negotiable constraints:
50
+ - `SKILL.md` frontmatter is first line and `name` matches the directory.
51
+ - `description` contains realistic trigger language.
52
+ - `SKILL.md` remains an orchestration/index layer for complex skills.
53
+ - Runtime guidance should prefer dense structures such as tables, checklists, templates, and examples over explanatory prose.
54
+ - Material skill changes explicitly name the selected execution shape.
55
+ - Advanced mechanics are justified and include portability notes.
56
+ - Supporting references are focused and loaded conditionally.
57
+ - Source provenance and decisions live in `SOURCES.md`.
58
+ - Durable positive/negative examples live in `references/evidence/`.
59
+ - `SPEC.md` records the maintenance contract for new or materially changed skills.
60
+ - Validation runs before completion.
61
+ - Expected bundled files loaded at runtime:
62
+ - `references/mode-selection.md`
63
+ - `references/execution-shapes.md`
64
+ - `references/synthesis-path.md`
65
+ - `references/iteration-path.md`
66
+ - `references/authoring-path.md`
67
+ - `references/reference-architecture.md`
68
+ - `references/spec-template.md`
69
+ - `references/description-optimization.md`
70
+ - `references/evaluation-path.md` when the user asks for evaluation, the change is high-risk, or the architecture choice is non-obvious
71
+ - `references/registration-validation.md`
72
+ - `references/artifact-layouts/*.md`
73
+ - `references/workflow-mechanics/*.md`
74
+ - `references/claude-code/*.md`
75
+ - `references/examples/*.md`
76
+ - `scripts/quick_validate.py`
77
+
78
+ ## Source And Evidence Model
79
+
80
+ Authoritative sources:
81
+
82
+ - Local `skill-writer` runtime files: `SKILL.md`, `references/**/*.md`, `scripts/quick_validate.py`.
83
+ - Repository policy: `AGENTS.md`, `README.md`, `CONTRIBUTING.md`, plugin manifests, and registration settings.
84
+ - Agent Skills specification and official skill authoring guidance.
85
+ - Current official provider docs for any provider-specific mechanics being recommended.
86
+ - Official orchestration guidance for routing, delegation, evaluation loops, and reasoning-model planning patterns.
87
+
88
+ Useful improvement sources:
89
+
90
+ - positive examples: successful generated skills, review-approved skill changes, and eval passes that demonstrate desired behavior
91
+ - negative examples: shallow generated skills, overloaded `SKILL.md` files, catch-all references, missing provenance, failed validation, false triggers, or review feedback
92
+ - commit logs/changelogs: repeated fixes, reversions, migrations, and changes that explain why a rule exists
93
+ - issue or PR feedback: reviewer comments about missing coverage, confusing trigger language, poor file placement, or insufficient evaluation
94
+ - eval results: fixed prompt sets in `EVAL.md`, qualitative depth checks, and optional baseline-vs-with-skill runs
95
+
96
+ Data that must not be stored:
97
+
98
+ - secrets, credentials, or tokens
99
+ - raw customer data
100
+ - private URLs or identifiers that are not needed for reproduction
101
+ - large copied source documents or long copyrighted excerpts
102
+ - unredacted personal data from examples, logs, issues, or commits
103
+
104
+ ## Reference Architecture
105
+
106
+ - `SKILL.md` contains the top-level workflow, path-loading table, branch points, universal constraints, and output contract.
107
+ - `SKILL.md` acts as a meta-router for the authoring process: class selection, shape selection, and path selection happen before writing.
108
+ - `SPEC.md` contains this maintenance specification.
109
+ - `SOURCES.md` contains source inventory, decisions, coverage matrix, open gaps, and changelog.
110
+ - `EVAL.md` contains reusable evaluation prompts and deeper eval runbooks.
111
+ - `references/` contains focused workflow guidance, routed leaf references, templates, rubrics, and class-specific authoring requirements.
112
+ - `references/` may use subfolders when they create clearer leaf routing, but every bundled reference should still be directly routed from `SKILL.md`.
113
+ - `references/evidence/` contains durable positive/negative examples when future iterations need them.
114
+ - `scripts/` contains validation automation.
115
+ - `assets/` is unused unless a future skill-authoring workflow needs static templates or media.
116
+
117
+ ## Evaluation
118
+
119
+ - Lightweight validation:
120
+ - Run `uv run <skill-writer-root>/scripts/quick_validate.py <skill-writer-root> --skill-class skill-authoring --strict-depth` as a frontmatter/YAML smoke check.
121
+ - Inspect changed references qualitatively for focused scope, direct discoverability, and absence of host-specific paths.
122
+ - Verify that the selected execution shape is explicit and that advanced mechanics, if any, are justified.
123
+ - Deeper evaluation:
124
+ - Use `references/evaluation-path.md` and `EVAL.md` only when the user requests it, the change is high-risk, or the architectural choice needs verification.
125
+ - Compare behavior before and after changes with representative positive and negative prompts.
126
+ - Include shape-selection prompts when the change affects routing, delegation, hooks, or evaluator loops.
127
+ - Holdout examples:
128
+ - Keep durable holdout examples in `references/evidence/holdout-set.md` when repeated regressions appear.
129
+ - Do not tune directly against holdout examples until they are intentionally moved to the working set.
130
+ - Acceptance gates:
131
+ - Validator passes with no errors for SKILL.md frontmatter/YAML and identity fields.
132
+ - New or changed workflow rules are represented in the correct artifact.
133
+ - `SOURCES.md` records source-backed decisions and any remaining gaps.
134
+ - `SPEC.md` is updated when intent, scope, evidence model, evaluation, or maintenance expectations change.
135
+
136
+ ## Known Limitations
137
+
138
+ - The validator intentionally checks only SKILL.md frontmatter/YAML and identity fields; markdown content quality belongs to authoring review.
139
+ - The validator does not verify advanced-shape contracts, reference completeness, source depth, prose density, or `SPEC.md` heading templates.
140
+ - The validator intentionally does not hardcode or exhaustively validate provider-specific optional frontmatter fields.
141
+ - Deeper evals are opt-in unless risk or user request justifies the extra cost.
142
+ - Source discovery can still miss private operational knowledge if it is not present in local files, accessible issue/PR history, or supplied context.
143
+ - Provider-specific skill extensions may drift; `skill-writer` treats them as compatibility guidance unless a skill is intentionally provider-specific.
144
+
145
+ ## Maintenance Notes
146
+
147
+ - Update `SKILL.md` when the required runtime workflow, branch conditions, or output contract changes.
148
+ - Update `references/execution-shapes.md` when new skill mechanics or orchestration patterns become important.
149
+ - Update the relevant file under `references/artifact-layouts/`, `references/workflow-mechanics/`, or `references/claude-code/` when a specific routed leaf changes.
150
+ - Update `SPEC.md` when intent, scope, user/trigger context, evidence model, evaluation gates, limitations, or maintenance rules change.
151
+ - Update `SOURCES.md` when source inventory, decisions, coverage, gaps, or changelog entries change.
152
+ - Update `EVAL.md` when reusable evaluation prompts or runbooks change.
153
+ - Update `references/evidence/` when preserving examples for future iteration or regression tracking.
@@ -0,0 +1,32 @@
1
+ # Argument-Driven Skill Layout
2
+
3
+ Use this layout when the skill is normally invoked with explicit inputs such as issue numbers, paths, modes, or targets.
4
+
5
+ ## Choose this layout when
6
+
7
+ - the user supplies parameters directly
8
+ - empty-input behavior needs to be defined
9
+ - manual invocation is safer than automatic activation
10
+
11
+ ## Common layout
12
+
13
+ ```yaml
14
+ ---
15
+ name: fix-issue
16
+ description: Fix a GitHub issue by number. Use when asked to fix or resolve a specific issue.
17
+ argument-hint: "[issue-number]"
18
+ disable-model-invocation: true
19
+ ---
20
+ ```
21
+
22
+ ## Required contract
23
+
24
+ 1. Document expected arguments and empty-input behavior.
25
+ 2. Use manual-only invocation when side effects are substantial.
26
+ 3. Use named or positional arguments only when they improve clarity.
27
+ 4. Add portability notes if the argument syntax depends on provider-specific mechanics.
28
+
29
+ ## Also load
30
+
31
+ - `references/claude-code/argument-substitutions.md` when using Claude Code substitutions or named arguments
32
+ - `references/claude-code/frontmatter-and-invocation.md` when invocation control needs provider-specific fields
@@ -0,0 +1,30 @@
1
+ # Asset-Template Skill Layout
2
+
3
+ Use this layout when reusable templates, schemas, or static artifacts carry most of the skill's value.
4
+
5
+ ## Choose this layout when
6
+
7
+ - the skill fills in or adapts reusable artifacts
8
+ - the runtime procedure is small compared to the bundled assets
9
+ - output quality depends on stable templates or schemas
10
+
11
+ ## File layout
12
+
13
+ ```text
14
+ my-skill/
15
+ ├── SKILL.md
16
+ └── assets/
17
+ ├── template.md
18
+ └── schema.json
19
+ ```
20
+
21
+ ## Required contract
22
+
23
+ 1. `SKILL.md` tells the agent when to load each asset.
24
+ 2. The skill explains how to adapt placeholders or fields.
25
+ 3. Add a validation checklist when filled-in output can silently drift.
26
+
27
+ ## Avoid this layout when
28
+
29
+ - the template is small enough to stay inline
30
+ - the asset is just an attachment with no routing or reuse value
@@ -0,0 +1,28 @@
1
+ # Inline Skill Layout
2
+
3
+ Use this layout when one coherent policy, checklist, or procedure fits directly in `SKILL.md`.
4
+
5
+ ## Choose this layout when
6
+
7
+ - the skill has one dominant path
8
+ - every invocation needs roughly the same instructions
9
+ - deep optional knowledge is not the main problem
10
+
11
+ ## File layout
12
+
13
+ ```text
14
+ my-skill/
15
+ └── SKILL.md
16
+ ```
17
+
18
+ ## Required contract
19
+
20
+ 1. Keep the body small enough to scan in one read.
21
+ 2. Put all universal steps in `SKILL.md`.
22
+ 3. Add references only if a real branch or lookup need appears.
23
+
24
+ ## Avoid this layout when
25
+
26
+ - most invocations need only a subset of a large knowledge base
27
+ - scripts or validators carry important runtime behavior
28
+ - routing or iterative evaluation is central to the skill
@@ -0,0 +1,35 @@
1
+ # Reference-Backed Skill Layout
2
+
3
+ Use this layout when the skill needs deep knowledge, but most runs only need one branch or subset of that knowledge.
4
+
5
+ ## Choose this layout when
6
+
7
+ - `SKILL.md` can act as a router
8
+ - bundled references can stay focused by lookup need
9
+ - the complexity is optional knowledge, not heavy automation
10
+
11
+ ## File layout
12
+
13
+ ```text
14
+ my-skill/
15
+ ├── SKILL.md
16
+ └── references/
17
+ ├── focused-topic-a.md
18
+ ├── focused-topic-b.md
19
+ └── troubleshooting.md
20
+ ```
21
+
22
+ Subfolders are acceptable when they make the lookup path clearer, for example `references/api/` or `references/examples/`.
23
+
24
+ ## Required contract
25
+
26
+ 1. `SKILL.md` tells the agent exactly when to open each reference.
27
+ 2. Reference filenames predict their contents.
28
+ 3. No reference mixes routing, troubleshooting, examples, and source notes without a clear reason.
29
+ 4. Large references include navigation or are split further.
30
+
31
+ ## Avoid this layout when
32
+
33
+ - the skill is small enough to stay inline
34
+ - scripts or validators are central to execution
35
+ - the references would only exist as vague topic buckets
@@ -0,0 +1,31 @@
1
+ # Script-Backed Skill Layout
2
+
3
+ Use this layout when parsing, validation, APIs, or repeatable transformations are fragile in plain shell or prose alone.
4
+
5
+ ## Choose this layout when
6
+
7
+ - the skill benefits from deterministic automation
8
+ - repeated shell snippets would be brittle
9
+ - validation or data extraction should be reusable
10
+
11
+ ## File layout
12
+
13
+ ```text
14
+ my-skill/
15
+ ├── SKILL.md
16
+ └── scripts/
17
+ ├── fetch.py
18
+ └── validate.py
19
+ ```
20
+
21
+ ## Required contract
22
+
23
+ 1. Every script is named in `SKILL.md` with arguments, outputs, and fallback behavior.
24
+ 2. Scripts are non-interactive.
25
+ 3. Standard output is structured when practical.
26
+ 4. The skill explains what to do if a script fails or is unavailable.
27
+
28
+ ## Avoid this layout when
29
+
30
+ - one simple shell command is enough
31
+ - the "script" would only wrap trivial shell for no reliability gain
@@ -0,0 +1,91 @@
1
+ # Authoring Path
2
+
3
+ Use this path to create or update skill files.
4
+
5
+ ## Runtime Writing Rules
6
+
7
+ 1. Frontmatter must be first line.
8
+ 2. `name` must match the directory.
9
+ 3. `description` must contain realistic trigger language.
10
+ 4. Keep runtime guidance imperative and compact.
11
+ 5. Prefer tables, checklists, templates, and examples over prose.
12
+ 6. Use `SKILL.md` as the runtime decision layer for complex skills.
13
+
14
+ ## Path Rules
15
+
16
+ 1. Treat the skill directory as the root for bundled files.
17
+ 2. Use `references/...`, `scripts/...`, and `assets/...` paths by default.
18
+ 3. Reserve repo-root paths for registration instructions only.
19
+ 4. Follow repo prior art if the workspace already standardizes on a provider-specific path variable.
20
+ 5. Avoid host-specific absolute filesystem paths.
21
+
22
+ ## Supporting Files
23
+
24
+ Create only what the skill needs:
25
+
26
+ | File or dir | Use |
27
+ |-------------|-----|
28
+ | `SPEC.md` | maintenance contract |
29
+ | `references/` | optional depth loaded by route |
30
+ | `references/evidence/` | persistent iteration examples |
31
+ | `scripts/` | repeatable automation or validation |
32
+ | `assets/` | reusable templates or static artifacts |
33
+
34
+ Subfolders inside `references/` are acceptable only when they make the lookup path clearer.
35
+
36
+ ## File Creation Rules
37
+
38
+ 1. Read `references/reference-architecture.md` before adding bundled files.
39
+ 2. Create a new reference only when it has a clear "open when..." reason.
40
+ 3. If you add a bundled reference, add a direct routing entry for it in `SKILL.md`.
41
+ 4. Do not create catch-all docs that mix workflow, source notes, examples, and eval results.
42
+ 5. Keep provenance in `SOURCES.md`, not in runtime files.
43
+ 6. Update `SPEC.md` when the skill contract changes materially.
44
+
45
+ ## Class-Specific Requirements
46
+
47
+ ### `integration-documentation`
48
+
49
+ Require focused coverage for:
50
+
51
+ 1. API surface and behavior contracts
52
+ 2. config/runtime options
53
+ 3. common downstream use cases
54
+ 4. known issues and workarounds
55
+ 5. version or migration variance
56
+
57
+ Default minimum depth:
58
+
59
+ 1. at least 6 concrete downstream use cases
60
+ 2. at least 8 issue/fix or failure/workaround entries
61
+
62
+ ## Shape-Specific Requirements
63
+
64
+ | Shape | Require |
65
+ |-------|---------|
66
+ | `router` | route criteria, fallback, per-route contract, misroute recovery |
67
+ | `script-backed-workflow` | documented scripts, non-interactive execution, structured output, fallback |
68
+ | `parallelization` / `orchestrator-workers` | unit of work, worker output schema, merge rule, stop condition |
69
+ | `evaluator-optimizer` | rubric, stop rule, acceptance condition, evidence handling |
70
+ | `subagent-fork` | actionable task, return contract, isolation reason, portability note |
71
+ | `hook-backed` | event scope, side-effect boundary, fallback, safety note |
72
+ | `asset-template` | asset routing, placeholder guidance, validation checklist when needed |
73
+ | `argument-driven` | expected arguments, empty-input behavior, manual-only use when risky |
74
+
75
+ ## Example Requirements
76
+
77
+ Authoring or generator skills should include:
78
+
79
+ 1. happy-path example
80
+ 2. secure or robust variant
81
+ 3. anti-pattern plus correction
82
+
83
+ Do not accept abstract-only guidance when a concrete example is needed.
84
+
85
+ ## Required Output
86
+
87
+ - updated `SKILL.md`
88
+ - updated `SPEC.md` when required
89
+ - updated or added supporting files
90
+ - explanation of major authoring decisions
91
+ - description-optimization handoff
@@ -0,0 +1,20 @@
1
+ # Claude Argument Substitutions
2
+
3
+ Load this when the skill uses Claude Code argument fields or substitution variables.
4
+
5
+ ## Supported substitutions
6
+
7
+ - `$ARGUMENTS`
8
+ - `$ARGUMENTS[N]`
9
+ - `$N`
10
+ - named arguments such as `$issue` when `arguments` is declared
11
+ - `${CLAUDE_SESSION_ID}`
12
+ - `${CLAUDE_EFFORT}`
13
+ - `${CLAUDE_SKILL_DIR}`
14
+
15
+ ## Required contract
16
+
17
+ 1. Document expected arguments and empty-input behavior.
18
+ 2. Add quoting-aware examples for multi-word input when ambiguity is likely.
19
+ 3. Use manual-only invocation for side-effect-heavy argument-driven skills.
20
+ 4. Add portability notes because this syntax is Claude Code-specific.
@@ -0,0 +1,16 @@
1
+ # Claude Dynamic Context Injection
2
+
3
+ Load this when the skill uses Claude Code shell preprocessing with ``!`command` `` or fenced ````!` blocks.
4
+
5
+ ## Use this file for
6
+
7
+ - stable, high-signal preprocessing
8
+ - small dynamic snippets that are cheaper than adding a full script
9
+
10
+ ## Use sparingly
11
+
12
+ 1. Only inject output that is stable, high-signal, and cheap.
13
+ 2. Never inject large or noisy output.
14
+ 3. Prefer a normal script or tool call when that is easier to reason about.
15
+
16
+ Treat this as preprocessing, not model behavior, and add portability notes because it is Claude Code-specific.
@@ -0,0 +1,33 @@
1
+ # Claude Frontmatter And Invocation
2
+
3
+ Load this when the skill needs Claude Code-specific frontmatter or invocation control.
4
+
5
+ ## Use this file for
6
+
7
+ - extra trigger metadata
8
+ - invocation visibility rules
9
+ - skill-scoped model or effort overrides
10
+ - path or shell activation controls
11
+
12
+ ## Relevant fields
13
+
14
+ | Field | Purpose | Notes |
15
+ |-------|---------|-------|
16
+ | `when_to_use` | extra trigger context for Claude | additive only; keep trigger-rich language in `description` |
17
+ | `disable-model-invocation` | only the user can invoke | good for side-effect-heavy workflows |
18
+ | `user-invocable` | hide from `/` menu and let Claude invoke | good for passive background knowledge |
19
+ | `allowed-tools` | pre-approve tools while skill is active | provider-specific |
20
+ | `model` | skill-scoped model override | provider-specific |
21
+ | `effort` | skill-scoped effort override | provider-specific |
22
+ | `paths` | glob-based activation limits | provider-specific |
23
+ | `shell` | shell for `!` preprocessing | provider-specific |
24
+
25
+ ## Invocation rules
26
+
27
+ 1. If Claude should not decide when to run the skill, set `disable-model-invocation: true`.
28
+ 2. If the skill is not a meaningful command for humans, consider `user-invocable: false`.
29
+ 3. Keep trigger-rich language in `description` even if `when_to_use` is present.
30
+
31
+ ## Portability rule
32
+
33
+ When using any Claude-specific field, say why it is necessary and note that it is not portable Agent Skills behavior.
@@ -0,0 +1,28 @@
1
+ # Claude Hook-Backed Skills
2
+
3
+ Load this when the skill uses Claude Code hooks for deterministic enforcement around tool or lifecycle events.
4
+
5
+ ## Use this file for
6
+
7
+ - pre-tool validation for risky commands
8
+ - post-edit formatting or linting
9
+ - scoped guardrails around specific tool events
10
+
11
+ ## Required contract
12
+
13
+ 1. Narrow event and matcher scope.
14
+ 2. Explicit side-effect boundaries.
15
+ 3. Fallback behavior when hooks are unavailable.
16
+ 4. Security note for shell execution, path handling, and sensitive files.
17
+
18
+ ## Security rules
19
+
20
+ 1. Command hooks run with full user permissions.
21
+ 2. Validate and sanitize inputs.
22
+ 3. Use absolute paths for scripts inside the hook definition.
23
+ 4. Avoid sensitive files such as `.env`, `.git/`, and keys.
24
+ 5. Test hooks before treating them as trusted enforcement.
25
+
26
+ ## Async note
27
+
28
+ Async hooks cannot block the action that triggered them; they are not a substitute for synchronous validation.
@@ -0,0 +1,22 @@
1
+ # Claude Subagent-Fork Skills
2
+
3
+ Load this when the skill should run in isolated context with `context: fork`.
4
+
5
+ ## Use this file for
6
+
7
+ - self-contained delegated investigations
8
+ - isolated context for focus or permission boundaries
9
+ - model or tool specialization where the main thread only needs a summary
10
+
11
+ ## Required contract
12
+
13
+ 1. An actionable task in the skill body.
14
+ 2. Expected return or summary contract.
15
+ 3. Explicit reason isolation is useful.
16
+ 4. Portability note because this is Claude Code-specific.
17
+
18
+ ## Avoid when
19
+
20
+ 1. The skill is passive conventions or reference material.
21
+ 2. The task depends heavily on the current conversation history.
22
+ 3. The main value comes from inline collaboration rather than delegation.