opencode-swarm-plugin 0.44.0 → 0.44.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 (205) hide show
  1. package/bin/swarm.serve.test.ts +6 -4
  2. package/bin/swarm.ts +16 -10
  3. package/dist/compaction-prompt-scoring.js +139 -0
  4. package/dist/eval-capture.js +12811 -0
  5. package/dist/hive.d.ts.map +1 -1
  6. package/dist/index.js +7644 -62599
  7. package/dist/plugin.js +23766 -78721
  8. package/dist/swarm-orchestrate.d.ts.map +1 -1
  9. package/dist/swarm-prompts.d.ts.map +1 -1
  10. package/dist/swarm-review.d.ts.map +1 -1
  11. package/package.json +17 -5
  12. package/.changeset/swarm-insights-data-layer.md +0 -63
  13. package/.hive/analysis/eval-failure-analysis-2025-12-25.md +0 -331
  14. package/.hive/analysis/session-data-quality-audit.md +0 -320
  15. package/.hive/eval-results.json +0 -483
  16. package/.hive/issues.jsonl +0 -138
  17. package/.hive/memories.jsonl +0 -729
  18. package/.opencode/eval-history.jsonl +0 -327
  19. package/.turbo/turbo-build.log +0 -9
  20. package/CHANGELOG.md +0 -2286
  21. package/SCORER-ANALYSIS.md +0 -598
  22. package/docs/analysis/subagent-coordination-patterns.md +0 -902
  23. package/docs/analysis-socratic-planner-pattern.md +0 -504
  24. package/docs/planning/ADR-001-monorepo-structure.md +0 -171
  25. package/docs/planning/ADR-002-package-extraction.md +0 -393
  26. package/docs/planning/ADR-003-performance-improvements.md +0 -451
  27. package/docs/planning/ADR-004-message-queue-features.md +0 -187
  28. package/docs/planning/ADR-005-devtools-observability.md +0 -202
  29. package/docs/planning/ADR-007-swarm-enhancements-worktree-review.md +0 -168
  30. package/docs/planning/ADR-008-worker-handoff-protocol.md +0 -293
  31. package/docs/planning/ADR-009-oh-my-opencode-patterns.md +0 -353
  32. package/docs/planning/ADR-010-cass-inhousing.md +0 -1215
  33. package/docs/planning/ROADMAP.md +0 -368
  34. package/docs/semantic-memory-cli-syntax.md +0 -123
  35. package/docs/swarm-mail-architecture.md +0 -1147
  36. package/docs/testing/context-recovery-test.md +0 -470
  37. package/evals/ARCHITECTURE.md +0 -1189
  38. package/evals/README.md +0 -768
  39. package/evals/compaction-prompt.eval.ts +0 -149
  40. package/evals/compaction-resumption.eval.ts +0 -289
  41. package/evals/coordinator-behavior.eval.ts +0 -307
  42. package/evals/coordinator-session.eval.ts +0 -154
  43. package/evals/evalite.config.ts.bak +0 -15
  44. package/evals/example.eval.ts +0 -31
  45. package/evals/fixtures/cass-baseline.ts +0 -217
  46. package/evals/fixtures/compaction-cases.ts +0 -350
  47. package/evals/fixtures/compaction-prompt-cases.ts +0 -311
  48. package/evals/fixtures/coordinator-sessions.ts +0 -328
  49. package/evals/fixtures/decomposition-cases.ts +0 -105
  50. package/evals/lib/compaction-loader.test.ts +0 -248
  51. package/evals/lib/compaction-loader.ts +0 -320
  52. package/evals/lib/data-loader.evalite-test.ts +0 -289
  53. package/evals/lib/data-loader.test.ts +0 -345
  54. package/evals/lib/data-loader.ts +0 -281
  55. package/evals/lib/llm.ts +0 -115
  56. package/evals/scorers/compaction-prompt-scorers.ts +0 -145
  57. package/evals/scorers/compaction-scorers.ts +0 -305
  58. package/evals/scorers/coordinator-discipline.evalite-test.ts +0 -539
  59. package/evals/scorers/coordinator-discipline.ts +0 -325
  60. package/evals/scorers/index.test.ts +0 -146
  61. package/evals/scorers/index.ts +0 -328
  62. package/evals/scorers/outcome-scorers.evalite-test.ts +0 -27
  63. package/evals/scorers/outcome-scorers.ts +0 -349
  64. package/evals/swarm-decomposition.eval.ts +0 -121
  65. package/examples/commands/swarm.md +0 -745
  66. package/examples/plugin-wrapper-template.ts +0 -2515
  67. package/examples/skills/hive-workflow/SKILL.md +0 -212
  68. package/examples/skills/skill-creator/SKILL.md +0 -223
  69. package/examples/skills/swarm-coordination/SKILL.md +0 -292
  70. package/global-skills/cli-builder/SKILL.md +0 -344
  71. package/global-skills/cli-builder/references/advanced-patterns.md +0 -244
  72. package/global-skills/learning-systems/SKILL.md +0 -644
  73. package/global-skills/skill-creator/LICENSE.txt +0 -202
  74. package/global-skills/skill-creator/SKILL.md +0 -352
  75. package/global-skills/skill-creator/references/output-patterns.md +0 -82
  76. package/global-skills/skill-creator/references/workflows.md +0 -28
  77. package/global-skills/swarm-coordination/SKILL.md +0 -995
  78. package/global-skills/swarm-coordination/references/coordinator-patterns.md +0 -235
  79. package/global-skills/swarm-coordination/references/strategies.md +0 -138
  80. package/global-skills/system-design/SKILL.md +0 -213
  81. package/global-skills/testing-patterns/SKILL.md +0 -430
  82. package/global-skills/testing-patterns/references/dependency-breaking-catalog.md +0 -586
  83. package/opencode-swarm-plugin-0.30.7.tgz +0 -0
  84. package/opencode-swarm-plugin-0.31.0.tgz +0 -0
  85. package/scripts/cleanup-test-memories.ts +0 -346
  86. package/scripts/init-skill.ts +0 -222
  87. package/scripts/migrate-unknown-sessions.ts +0 -349
  88. package/scripts/validate-skill.ts +0 -204
  89. package/src/agent-mail.ts +0 -1724
  90. package/src/anti-patterns.test.ts +0 -1167
  91. package/src/anti-patterns.ts +0 -448
  92. package/src/compaction-capture.integration.test.ts +0 -257
  93. package/src/compaction-hook.test.ts +0 -838
  94. package/src/compaction-hook.ts +0 -1204
  95. package/src/compaction-observability.integration.test.ts +0 -139
  96. package/src/compaction-observability.test.ts +0 -187
  97. package/src/compaction-observability.ts +0 -324
  98. package/src/compaction-prompt-scorers.test.ts +0 -475
  99. package/src/compaction-prompt-scoring.ts +0 -300
  100. package/src/contributor-tools.test.ts +0 -133
  101. package/src/contributor-tools.ts +0 -201
  102. package/src/dashboard.test.ts +0 -611
  103. package/src/dashboard.ts +0 -462
  104. package/src/error-enrichment.test.ts +0 -403
  105. package/src/error-enrichment.ts +0 -219
  106. package/src/eval-capture.test.ts +0 -1015
  107. package/src/eval-capture.ts +0 -929
  108. package/src/eval-gates.test.ts +0 -306
  109. package/src/eval-gates.ts +0 -218
  110. package/src/eval-history.test.ts +0 -508
  111. package/src/eval-history.ts +0 -214
  112. package/src/eval-learning.test.ts +0 -378
  113. package/src/eval-learning.ts +0 -360
  114. package/src/eval-runner.test.ts +0 -223
  115. package/src/eval-runner.ts +0 -402
  116. package/src/export-tools.test.ts +0 -476
  117. package/src/export-tools.ts +0 -257
  118. package/src/hive.integration.test.ts +0 -2241
  119. package/src/hive.ts +0 -1628
  120. package/src/index.ts +0 -940
  121. package/src/learning.integration.test.ts +0 -1815
  122. package/src/learning.ts +0 -1079
  123. package/src/logger.test.ts +0 -189
  124. package/src/logger.ts +0 -135
  125. package/src/mandate-promotion.test.ts +0 -473
  126. package/src/mandate-promotion.ts +0 -239
  127. package/src/mandate-storage.integration.test.ts +0 -601
  128. package/src/mandate-storage.test.ts +0 -578
  129. package/src/mandate-storage.ts +0 -794
  130. package/src/mandates.ts +0 -540
  131. package/src/memory-tools.test.ts +0 -195
  132. package/src/memory-tools.ts +0 -344
  133. package/src/memory.integration.test.ts +0 -334
  134. package/src/memory.test.ts +0 -158
  135. package/src/memory.ts +0 -527
  136. package/src/model-selection.test.ts +0 -188
  137. package/src/model-selection.ts +0 -68
  138. package/src/observability-tools.test.ts +0 -359
  139. package/src/observability-tools.ts +0 -871
  140. package/src/output-guardrails.test.ts +0 -438
  141. package/src/output-guardrails.ts +0 -381
  142. package/src/pattern-maturity.test.ts +0 -1160
  143. package/src/pattern-maturity.ts +0 -525
  144. package/src/planning-guardrails.test.ts +0 -491
  145. package/src/planning-guardrails.ts +0 -438
  146. package/src/plugin.ts +0 -23
  147. package/src/post-compaction-tracker.test.ts +0 -251
  148. package/src/post-compaction-tracker.ts +0 -237
  149. package/src/query-tools.test.ts +0 -636
  150. package/src/query-tools.ts +0 -324
  151. package/src/rate-limiter.integration.test.ts +0 -466
  152. package/src/rate-limiter.ts +0 -774
  153. package/src/replay-tools.test.ts +0 -496
  154. package/src/replay-tools.ts +0 -240
  155. package/src/repo-crawl.integration.test.ts +0 -441
  156. package/src/repo-crawl.ts +0 -610
  157. package/src/schemas/cell-events.test.ts +0 -347
  158. package/src/schemas/cell-events.ts +0 -807
  159. package/src/schemas/cell.ts +0 -257
  160. package/src/schemas/evaluation.ts +0 -166
  161. package/src/schemas/index.test.ts +0 -199
  162. package/src/schemas/index.ts +0 -286
  163. package/src/schemas/mandate.ts +0 -232
  164. package/src/schemas/swarm-context.ts +0 -115
  165. package/src/schemas/task.ts +0 -161
  166. package/src/schemas/worker-handoff.test.ts +0 -302
  167. package/src/schemas/worker-handoff.ts +0 -131
  168. package/src/sessions/agent-discovery.test.ts +0 -137
  169. package/src/sessions/agent-discovery.ts +0 -112
  170. package/src/sessions/index.ts +0 -15
  171. package/src/skills.integration.test.ts +0 -1192
  172. package/src/skills.test.ts +0 -643
  173. package/src/skills.ts +0 -1549
  174. package/src/storage.integration.test.ts +0 -341
  175. package/src/storage.ts +0 -884
  176. package/src/structured.integration.test.ts +0 -817
  177. package/src/structured.test.ts +0 -1046
  178. package/src/structured.ts +0 -762
  179. package/src/swarm-decompose.test.ts +0 -188
  180. package/src/swarm-decompose.ts +0 -1302
  181. package/src/swarm-deferred.integration.test.ts +0 -157
  182. package/src/swarm-deferred.test.ts +0 -38
  183. package/src/swarm-insights.test.ts +0 -214
  184. package/src/swarm-insights.ts +0 -459
  185. package/src/swarm-mail.integration.test.ts +0 -970
  186. package/src/swarm-mail.ts +0 -739
  187. package/src/swarm-orchestrate.integration.test.ts +0 -282
  188. package/src/swarm-orchestrate.test.ts +0 -548
  189. package/src/swarm-orchestrate.ts +0 -3084
  190. package/src/swarm-prompts.test.ts +0 -1270
  191. package/src/swarm-prompts.ts +0 -2077
  192. package/src/swarm-research.integration.test.ts +0 -701
  193. package/src/swarm-research.test.ts +0 -698
  194. package/src/swarm-research.ts +0 -472
  195. package/src/swarm-review.integration.test.ts +0 -285
  196. package/src/swarm-review.test.ts +0 -879
  197. package/src/swarm-review.ts +0 -709
  198. package/src/swarm-strategies.ts +0 -407
  199. package/src/swarm-worktree.test.ts +0 -501
  200. package/src/swarm-worktree.ts +0 -575
  201. package/src/swarm.integration.test.ts +0 -2377
  202. package/src/swarm.ts +0 -38
  203. package/src/tool-adapter.integration.test.ts +0 -1221
  204. package/src/tool-availability.ts +0 -461
  205. package/tsconfig.json +0 -28
@@ -1,202 +0,0 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright [yyyy] [name of copyright owner]
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.
@@ -1,352 +0,0 @@
1
- ---
2
- name: skill-creator
3
- description: Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
4
- license: Complete terms in LICENSE.txt
5
- ---
6
-
7
- # Skill Creator
8
-
9
- This skill provides guidance for creating effective skills.
10
-
11
- ## About Skills
12
-
13
- Skills are modular, self-contained packages that extend Claude's capabilities by providing
14
- specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific
15
- domains or tasks—they transform Claude from a general-purpose agent into a specialized agent
16
- equipped with procedural knowledge that no model can fully possess.
17
-
18
- ### What Skills Provide
19
-
20
- 1. Specialized workflows - Multi-step procedures for specific domains
21
- 2. Tool integrations - Instructions for working with specific file formats or APIs
22
- 3. Domain expertise - Company-specific knowledge, schemas, business logic
23
- 4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks
24
-
25
- ## Core Principles
26
-
27
- ### Concise is Key
28
-
29
- The context window is a public good. Skills share the context window with everything else Claude needs: system prompt, conversation history, other Skills' metadata, and the actual user request.
30
-
31
- **Default assumption: Claude is already very smart.** Only add context Claude doesn't already have. Challenge each piece of information: "Does Claude really need this explanation?" and "Does this paragraph justify its token cost?"
32
-
33
- Prefer concise examples over verbose explanations.
34
-
35
- ### Set Appropriate Degrees of Freedom
36
-
37
- Match the level of specificity to the task's fragility and variability:
38
-
39
- **High freedom (text-based instructions)**: Use when multiple approaches are valid, decisions depend on context, or heuristics guide the approach.
40
-
41
- **Medium freedom (pseudocode or scripts with parameters)**: Use when a preferred pattern exists, some variation is acceptable, or configuration affects behavior.
42
-
43
- **Low freedom (specific scripts, few parameters)**: Use when operations are fragile and error-prone, consistency is critical, or a specific sequence must be followed.
44
-
45
- Think of Claude as exploring a path: a narrow bridge with cliffs needs specific guardrails (low freedom), while an open field allows many routes (high freedom).
46
-
47
- ### Anatomy of a Skill
48
-
49
- Every skill consists of a required SKILL.md file and optional bundled resources:
50
-
51
- ```
52
- skill-name/
53
- ├── SKILL.md (required)
54
- │ ├── YAML frontmatter metadata (required)
55
- │ │ ├── name: (required)
56
- │ │ └── description: (required)
57
- │ └── Markdown instructions (required)
58
- └── Bundled Resources (optional)
59
- ├── scripts/ - Executable code (Python/Bash/etc.)
60
- ├── references/ - Documentation intended to be loaded into context as needed
61
- └── assets/ - Files used in output (templates, icons, fonts, etc.)
62
- ```
63
-
64
- #### SKILL.md (required)
65
-
66
- Every SKILL.md consists of:
67
-
68
- - **Frontmatter** (YAML): Contains `name` and `description` fields. These are the only fields that Claude reads to determine when the skill gets used, thus it is very important to be clear and comprehensive in describing what the skill is, and when it should be used.
69
- - **Body** (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all).
70
-
71
- #### Bundled Resources (optional)
72
-
73
- ##### Scripts (`scripts/`)
74
-
75
- Executable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.
76
-
77
- - **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed
78
- - **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks
79
- - **Benefits**: Token efficient, deterministic, may be executed without loading into context
80
- - **Note**: Scripts may still need to be read by Claude for patching or environment-specific adjustments
81
-
82
- ##### References (`references/`)
83
-
84
- Documentation and reference material intended to be loaded as needed into context to inform Claude's process and thinking.
85
-
86
- - **When to include**: For documentation that Claude should reference while working
87
- - **Examples**: `references/finance.md` for financial schemas, `references/mnda.md` for company NDA template, `references/policies.md` for company policies, `references/api_docs.md` for API specifications
88
- - **Use cases**: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides
89
- - **Benefits**: Keeps SKILL.md lean, loaded only when Claude determines it's needed
90
- - **Best practice**: If files are large (>10k words), include grep search patterns in SKILL.md
91
- - **Avoid duplication**: Information should live in either SKILL.md or references files, not both. Prefer references files for detailed information unless it's truly core to the skill—this keeps SKILL.md lean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance in SKILL.md; move detailed reference material, schemas, and examples to references files.
92
-
93
- ##### Assets (`assets/`)
94
-
95
- Files not intended to be loaded into context, but rather used within the output Claude produces.
96
-
97
- - **When to include**: When the skill needs files that will be used in the final output
98
- - **Examples**: `assets/logo.png` for brand assets, `assets/slides.pptx` for PowerPoint templates, `assets/frontend-template/` for HTML/React boilerplate, `assets/font.ttf` for typography
99
- - **Use cases**: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified
100
- - **Benefits**: Separates output resources from documentation, enables Claude to use files without loading them into context
101
-
102
- #### What to Not Include in a Skill
103
-
104
- A skill should only contain essential files that directly support its functionality. Do NOT create extraneous documentation or auxiliary files, including:
105
-
106
- - README.md
107
- - INSTALLATION_GUIDE.md
108
- - QUICK_REFERENCE.md
109
- - CHANGELOG.md
110
- - etc.
111
-
112
- The skill should only contain the information needed for an AI agent to do the job at hand. It should not contain auxilary context about the process that went into creating it, setup and testing procedures, user-facing documentation, etc. Creating additional documentation files just adds clutter and confusion.
113
-
114
- ### Progressive Disclosure Design Principle
115
-
116
- Skills use a three-level loading system to manage context efficiently:
117
-
118
- 1. **Metadata (name + description)** - Always in context (~100 words)
119
- 2. **SKILL.md body** - When skill triggers (<5k words)
120
- 3. **Bundled resources** - As needed by Claude (Unlimited because scripts can be executed without reading into context window)
121
-
122
- #### Progressive Disclosure Patterns
123
-
124
- Keep SKILL.md body to the essentials and under 500 lines to minimize context bloat. Split content into separate files when approaching this limit. When splitting out content into other files, it is very important to reference them from SKILL.md and describe clearly when to read them, to ensure the reader of the skill knows they exist and when to use them.
125
-
126
- **Key principle:** When a skill supports multiple variations, frameworks, or options, keep only the core workflow and selection guidance in SKILL.md. Move variant-specific details (patterns, examples, configuration) into separate reference files.
127
-
128
- **Pattern 1: High-level guide with references**
129
-
130
- ```markdown
131
- # PDF Processing
132
-
133
- ## Quick start
134
-
135
- Extract text with pdfplumber:
136
- [code example]
137
-
138
- ## Advanced features
139
-
140
- - **Form filling**: See [FORMS.md](FORMS.md) for complete guide
141
- - **API reference**: See [REFERENCE.md](REFERENCE.md) for all methods
142
- - **Examples**: See [EXAMPLES.md](EXAMPLES.md) for common patterns
143
- ```
144
-
145
- Claude loads FORMS.md, REFERENCE.md, or EXAMPLES.md only when needed.
146
-
147
- **Pattern 2: Domain-specific organization**
148
-
149
- For Skills with multiple domains, organize content by domain to avoid loading irrelevant context:
150
-
151
- ```
152
- bigquery-skill/
153
- ├── SKILL.md (overview and navigation)
154
- └── reference/
155
- ├── finance.md (revenue, billing metrics)
156
- ├── sales.md (opportunities, pipeline)
157
- ├── product.md (API usage, features)
158
- └── marketing.md (campaigns, attribution)
159
- ```
160
-
161
- When a user asks about sales metrics, Claude only reads sales.md.
162
-
163
- Similarly, for skills supporting multiple frameworks or variants, organize by variant:
164
-
165
- ```
166
- cloud-deploy/
167
- ├── SKILL.md (workflow + provider selection)
168
- └── references/
169
- ├── aws.md (AWS deployment patterns)
170
- ├── gcp.md (GCP deployment patterns)
171
- └── azure.md (Azure deployment patterns)
172
- ```
173
-
174
- When the user chooses AWS, Claude only reads aws.md.
175
-
176
- **Pattern 3: Conditional details**
177
-
178
- Show basic content, link to advanced content:
179
-
180
- ```markdown
181
- # DOCX Processing
182
-
183
- ## Creating documents
184
-
185
- Use docx-js for new documents. See [DOCX-JS.md](DOCX-JS.md).
186
-
187
- ## Editing documents
188
-
189
- For simple edits, modify the XML directly.
190
-
191
- **For tracked changes**: See [REDLINING.md](REDLINING.md)
192
- **For OOXML details**: See [OOXML.md](OOXML.md)
193
- ```
194
-
195
- Claude reads REDLINING.md or OOXML.md only when the user needs those features.
196
-
197
- **Important guidelines:**
198
-
199
- - **Avoid deeply nested references** - Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md.
200
- - **Structure longer reference files** - For files longer than 100 lines, include a table of contents at the top so Claude can see the full scope when previewing.
201
-
202
- ## Skill Creation Process
203
-
204
- Skill creation involves these steps:
205
-
206
- 1. Understand the skill with concrete examples
207
- 2. Plan reusable skill contents (scripts, references, assets)
208
- 3. Initialize the skill (use `skills_init` tool)
209
- 4. Edit the skill (implement resources and write SKILL.md)
210
- 5. Validate the skill (use `bun scripts/validate-skill.ts`)
211
- 6. Iterate based on real usage
212
-
213
- Follow these steps in order, skipping only if there is a clear reason why they are not applicable.
214
-
215
- ### Step 1: Understanding the Skill with Concrete Examples
216
-
217
- Skip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.
218
-
219
- To create an effective skill, clearly understand concrete examples of how the skill will be used. This understanding can come from either direct user examples or generated examples that are validated with user feedback.
220
-
221
- For example, when building an image-editor skill, relevant questions include:
222
-
223
- - "What functionality should the image-editor skill support? Editing, rotating, anything else?"
224
- - "Can you give some examples of how this skill would be used?"
225
- - "I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?"
226
- - "What would a user say that should trigger this skill?"
227
-
228
- To avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness.
229
-
230
- Conclude this step when there is a clear sense of the functionality the skill should support.
231
-
232
- ### Step 2: Planning the Reusable Skill Contents
233
-
234
- To turn concrete examples into an effective skill, analyze each example by:
235
-
236
- 1. Considering how to execute on the example from scratch
237
- 2. Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly
238
-
239
- Example: When building a `pdf-editor` skill to handle queries like "Help me rotate this PDF," the analysis shows:
240
-
241
- 1. Rotating a PDF requires re-writing the same code each time
242
- 2. A `scripts/rotate_pdf.py` script would be helpful to store in the skill
243
-
244
- Example: When designing a `frontend-webapp-builder` skill for queries like "Build me a todo app" or "Build me a dashboard to track my steps," the analysis shows:
245
-
246
- 1. Writing a frontend webapp requires the same boilerplate HTML/React each time
247
- 2. An `assets/hello-world/` template containing the boilerplate HTML/React project files would be helpful to store in the skill
248
-
249
- Example: When building a `big-query` skill to handle queries like "How many users have logged in today?" the analysis shows:
250
-
251
- 1. Querying BigQuery requires re-discovering the table schemas and relationships each time
252
- 2. A `references/schema.md` file documenting the table schemas would be helpful to store in the skill
253
-
254
- To establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.
255
-
256
- ### Step 3: Initializing the Skill
257
-
258
- At this point, it is time to actually create the skill.
259
-
260
- Skip this step only if the skill being developed already exists, and iteration or packaging is needed. In this case, continue to the next step.
261
-
262
- When creating a new skill from scratch, use the `skills_init` tool. This generates a new template skill directory with everything a skill requires.
263
-
264
- Usage:
265
-
266
- ```
267
- skills_init(name: "my-skill", directory: ".opencode/skills")
268
- ```
269
-
270
- Or from CLI:
271
- ```bash
272
- bun scripts/init-skill.ts my-skill --path .opencode/skills
273
- ```
274
-
275
- The tool:
276
-
277
- - Creates the skill directory at the specified path
278
- - Generates a SKILL.md template with proper frontmatter and TODO placeholders
279
- - Creates `scripts/` and `references/` directories with examples
280
- - Adds example files that can be customized or deleted
281
-
282
- After initialization, customize or remove the generated SKILL.md and example files as needed.
283
-
284
- ### Step 4: Edit the Skill
285
-
286
- When editing the (newly-generated or existing) skill, remember that the skill is being created for another instance of Claude to use. Include information that would be beneficial and non-obvious to Claude. Consider what procedural knowledge, domain-specific details, or reusable assets would help another Claude instance execute these tasks more effectively.
287
-
288
- #### Learn Proven Design Patterns
289
-
290
- Consult these helpful guides based on your skill's needs:
291
-
292
- - **Multi-step processes**: See references/workflows.md for sequential workflows and conditional logic
293
- - **Specific output formats or quality standards**: See references/output-patterns.md for template and example patterns
294
-
295
- These files contain established best practices for effective skill design.
296
-
297
- #### Start with Reusable Skill Contents
298
-
299
- To begin implementation, start with the reusable resources identified above: `scripts/`, `references/`, and `assets/` files. Note that this step may require user input. For example, when implementing a `brand-guidelines` skill, the user may need to provide brand assets or templates to store in `assets/`, or documentation to store in `references/`.
300
-
301
- Added scripts must be tested by actually running them to ensure there are no bugs and that the output matches what is expected. If there are many similar scripts, only a representative sample needs to be tested to ensure confidence that they all work while balancing time to completion.
302
-
303
- Any example files and directories not needed for the skill should be deleted. The initialization script creates example files in `scripts/`, `references/`, and `assets/` to demonstrate structure, but most skills won't need all of them.
304
-
305
- #### Update SKILL.md
306
-
307
- **Writing Guidelines:** Always use imperative/infinitive form.
308
-
309
- ##### Frontmatter
310
-
311
- Write the YAML frontmatter with `name` and `description`:
312
-
313
- - `name`: The skill name
314
- - `description`: This is the primary triggering mechanism for your skill, and helps Claude understand when to use the skill.
315
- - Include both what the Skill does and specific triggers/contexts for when to use it.
316
- - Include all "when to use" information here - Not in the body. The body is only loaded after triggering, so "When to Use This Skill" sections in the body are not helpful to Claude.
317
- - Example description for a `docx` skill: "Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. Use when Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks"
318
-
319
- Do not include any other fields in YAML frontmatter.
320
-
321
- ##### Body
322
-
323
- Write instructions for using the skill and its bundled resources.
324
-
325
- ### Step 5: Validating the Skill
326
-
327
- Before sharing, validate the skill to ensure it meets requirements:
328
-
329
- ```bash
330
- bun scripts/validate-skill.ts .opencode/skills/my-skill
331
- ```
332
-
333
- The validator checks:
334
-
335
- - YAML frontmatter format and required fields (name, description)
336
- - Skill naming conventions match directory name
337
- - Description completeness (no TODO placeholders, appropriate length)
338
- - File organization (no extraneous README.md, etc.)
339
- - Placeholder files that should be removed or customized
340
-
341
- Fix any validation errors before sharing or committing the skill.
342
-
343
- ### Step 6: Iterate
344
-
345
- After testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.
346
-
347
- **Iteration workflow:**
348
-
349
- 1. Use the skill on real tasks
350
- 2. Notice struggles or inefficiencies
351
- 3. Identify how SKILL.md or bundled resources should be updated
352
- 4. Implement changes and test again
@@ -1,82 +0,0 @@
1
- # Output Patterns
2
-
3
- Use these patterns when skills need to produce consistent, high-quality output.
4
-
5
- ## Template Pattern
6
-
7
- Provide templates for output format. Match the level of strictness to your needs.
8
-
9
- **For strict requirements (like API responses or data formats):**
10
-
11
- ```markdown
12
- ## Report structure
13
-
14
- ALWAYS use this exact template structure:
15
-
16
- # [Analysis Title]
17
-
18
- ## Executive summary
19
- [One-paragraph overview of key findings]
20
-
21
- ## Key findings
22
- - Finding 1 with supporting data
23
- - Finding 2 with supporting data
24
- - Finding 3 with supporting data
25
-
26
- ## Recommendations
27
- 1. Specific actionable recommendation
28
- 2. Specific actionable recommendation
29
- ```
30
-
31
- **For flexible guidance (when adaptation is useful):**
32
-
33
- ```markdown
34
- ## Report structure
35
-
36
- Here is a sensible default format, but use your best judgment:
37
-
38
- # [Analysis Title]
39
-
40
- ## Executive summary
41
- [Overview]
42
-
43
- ## Key findings
44
- [Adapt sections based on what you discover]
45
-
46
- ## Recommendations
47
- [Tailor to the specific context]
48
-
49
- Adjust sections as needed for the specific analysis type.
50
- ```
51
-
52
- ## Examples Pattern
53
-
54
- For skills where output quality depends on seeing examples, provide input/output pairs:
55
-
56
- ```markdown
57
- ## Commit message format
58
-
59
- Generate commit messages following these examples:
60
-
61
- **Example 1:**
62
- Input: Added user authentication with JWT tokens
63
- Output:
64
- ```
65
- feat(auth): implement JWT-based authentication
66
-
67
- Add login endpoint and token validation middleware
68
- ```
69
-
70
- **Example 2:**
71
- Input: Fixed bug where dates displayed incorrectly in reports
72
- Output:
73
- ```
74
- fix(reports): correct date formatting in timezone conversion
75
-
76
- Use UTC timestamps consistently across report generation
77
- ```
78
-
79
- Follow this style: type(scope): brief description, then detailed explanation.
80
- ```
81
-
82
- Examples help Claude understand the desired style and level of detail more clearly than descriptions alone.
@@ -1,28 +0,0 @@
1
- # Workflow Patterns
2
-
3
- ## Sequential Workflows
4
-
5
- For complex tasks, break operations into clear, sequential steps. It is often helpful to give Claude an overview of the process towards the beginning of SKILL.md:
6
-
7
- ```markdown
8
- Filling a PDF form involves these steps:
9
-
10
- 1. Analyze the form (run analyze_form.py)
11
- 2. Create field mapping (edit fields.json)
12
- 3. Validate mapping (run validate_fields.py)
13
- 4. Fill the form (run fill_form.py)
14
- 5. Verify output (run verify_output.py)
15
- ```
16
-
17
- ## Conditional Workflows
18
-
19
- For tasks with branching logic, guide Claude through decision points:
20
-
21
- ```markdown
22
- 1. Determine the modification type:
23
- **Creating new content?** → Follow "Creation workflow" below
24
- **Editing existing content?** → Follow "Editing workflow" below
25
-
26
- 2. Creation workflow: [steps]
27
- 3. Editing workflow: [steps]
28
- ```