opencodekit 0.15.21 → 0.16.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 (144) hide show
  1. package/dist/index.js +5 -7
  2. package/dist/template/.opencode/AGENTS.md +85 -23
  3. package/dist/template/.opencode/agent/build.md +88 -7
  4. package/dist/template/.opencode/agent/explore.md +1 -1
  5. package/dist/template/.opencode/agent/general.md +54 -4
  6. package/dist/template/.opencode/agent/looker.md +1 -1
  7. package/dist/template/.opencode/agent/painter.md +1 -1
  8. package/dist/template/.opencode/agent/plan.md +52 -0
  9. package/dist/template/.opencode/agent/review.md +1 -1
  10. package/dist/template/.opencode/agent/scout.md +3 -3
  11. package/dist/template/.opencode/agent/vision.md +1 -1
  12. package/dist/template/.opencode/command/create.md +231 -91
  13. package/dist/template/.opencode/command/design.md +40 -7
  14. package/dist/template/.opencode/command/handoff.md +22 -0
  15. package/dist/template/.opencode/command/init.md +49 -78
  16. package/dist/template/.opencode/command/plan.md +36 -16
  17. package/dist/template/.opencode/command/pr.md +15 -0
  18. package/dist/template/.opencode/command/research.md +3 -0
  19. package/dist/template/.opencode/command/resume.md +8 -18
  20. package/dist/template/.opencode/command/review-codebase.md +30 -0
  21. package/dist/template/.opencode/command/ship.md +199 -0
  22. package/dist/template/.opencode/command/start.md +316 -28
  23. package/dist/template/.opencode/command/status.md +24 -1
  24. package/dist/template/.opencode/command/ui-review.md +36 -7
  25. package/dist/template/.opencode/command/verify.md +307 -0
  26. package/dist/template/.opencode/memory/_templates/prd.md +29 -0
  27. package/dist/template/.opencode/memory/_templates/proposal.md +38 -0
  28. package/dist/template/.opencode/memory/_templates/spec.md +66 -0
  29. package/dist/template/.opencode/memory/_templates/tasks.md +198 -0
  30. package/dist/template/.opencode/memory/_templates/tech-stack.md +50 -0
  31. package/dist/template/.opencode/memory/project/tech-stack.md +53 -0
  32. package/dist/template/.opencode/memory/research/ccpm-analysis.md +334 -0
  33. package/dist/template/.opencode/memory/research/openspec-analysis.md +226 -0
  34. package/dist/template/.opencode/memory.db +0 -0
  35. package/dist/template/.opencode/memory.db-shm +0 -0
  36. package/dist/template/.opencode/memory.db-wal +0 -0
  37. package/dist/template/.opencode/opencode.json +18 -4
  38. package/dist/template/.opencode/package.json +1 -0
  39. package/dist/template/.opencode/plans/1770006237537-mighty-otter.md +418 -0
  40. package/dist/template/.opencode/plans/1770006913647-glowing-forest.md +170 -0
  41. package/dist/template/.opencode/plans/1770013678126-witty-planet.md +278 -0
  42. package/dist/template/.opencode/plugin/lib/memory-db.ts +828 -0
  43. package/dist/template/.opencode/plugin/memory.ts +38 -1
  44. package/dist/template/.opencode/skill/index-knowledge/SKILL.md +76 -31
  45. package/dist/template/.opencode/skill/memory-system/SKILL.md +110 -55
  46. package/dist/template/.opencode/skill/tool-priority/SKILL.md +2 -2
  47. package/dist/template/.opencode/tool/memory-get.ts +143 -0
  48. package/dist/template/.opencode/tool/memory-maintain.ts +167 -0
  49. package/dist/template/.opencode/tool/memory-migrate.ts +319 -0
  50. package/dist/template/.opencode/tool/memory-read.ts +17 -46
  51. package/dist/template/.opencode/tool/memory-search.ts +131 -28
  52. package/dist/template/.opencode/tool/memory-timeline.ts +105 -0
  53. package/dist/template/.opencode/tool/memory-update.ts +21 -26
  54. package/dist/template/.opencode/tool/observation.ts +112 -100
  55. package/dist/template/.opencode/tsconfig.json +19 -19
  56. package/package.json +1 -1
  57. package/dist/template/.opencode/command/accessibility-check.md +0 -331
  58. package/dist/template/.opencode/command/agent-browser.md +0 -21
  59. package/dist/template/.opencode/command/analyze-mockup.md +0 -423
  60. package/dist/template/.opencode/command/analyze-project.md +0 -295
  61. package/dist/template/.opencode/command/brainstorm.md +0 -373
  62. package/dist/template/.opencode/command/cloudflare.md +0 -70
  63. package/dist/template/.opencode/command/commit.md +0 -245
  64. package/dist/template/.opencode/command/complete-next-task.md +0 -77
  65. package/dist/template/.opencode/command/design-audit.md +0 -480
  66. package/dist/template/.opencode/command/edit-image.md +0 -242
  67. package/dist/template/.opencode/command/finish.md +0 -255
  68. package/dist/template/.opencode/command/fix-ci.md +0 -109
  69. package/dist/template/.opencode/command/fix-types.md +0 -104
  70. package/dist/template/.opencode/command/fix-ui.md +0 -117
  71. package/dist/template/.opencode/command/fix.md +0 -168
  72. package/dist/template/.opencode/command/frontend-design.md +0 -21
  73. package/dist/template/.opencode/command/generate-diagram.md +0 -349
  74. package/dist/template/.opencode/command/generate-icon.md +0 -283
  75. package/dist/template/.opencode/command/generate-image.md +0 -246
  76. package/dist/template/.opencode/command/generate-pattern.md +0 -247
  77. package/dist/template/.opencode/command/generate-storyboard.md +0 -250
  78. package/dist/template/.opencode/command/implement.md +0 -609
  79. package/dist/template/.opencode/command/import-plan.md +0 -406
  80. package/dist/template/.opencode/command/index-knowledge.md +0 -25
  81. package/dist/template/.opencode/command/integration-test.md +0 -424
  82. package/dist/template/.opencode/command/issue.md +0 -102
  83. package/dist/template/.opencode/command/new-feature.md +0 -651
  84. package/dist/template/.opencode/command/opensrc.md +0 -58
  85. package/dist/template/.opencode/command/quick-build.md +0 -238
  86. package/dist/template/.opencode/command/ralph.md +0 -41
  87. package/dist/template/.opencode/command/research-and-implement.md +0 -148
  88. package/dist/template/.opencode/command/research-ui.md +0 -466
  89. package/dist/template/.opencode/command/restore-image.md +0 -424
  90. package/dist/template/.opencode/command/revert-feature.md +0 -386
  91. package/dist/template/.opencode/command/skill-create.md +0 -517
  92. package/dist/template/.opencode/command/skill-optimize.md +0 -556
  93. package/dist/template/.opencode/command/summarize.md +0 -412
  94. package/dist/template/.opencode/command/triage.md +0 -398
  95. package/dist/template/.opencode/memory/_templates/README.md +0 -35
  96. package/dist/template/.opencode/memory/_templates/observation.md +0 -39
  97. package/dist/template/.opencode/memory/_templates/project/architecture.md +0 -60
  98. package/dist/template/.opencode/memory/_templates/project/commands.md +0 -72
  99. package/dist/template/.opencode/memory/_templates/project/conventions.md +0 -68
  100. package/dist/template/.opencode/memory/_templates/project/gotchas.md +0 -41
  101. package/dist/template/.opencode/memory/_templates/prompt-engineering.md +0 -333
  102. package/dist/template/.opencode/memory/observations/2026-01-22-decision-agents-md-prompt-engineering-improvement.md +0 -29
  103. package/dist/template/.opencode/memory/observations/2026-01-25-decision-agent-roles-build-orchestrates-general-e.md +0 -14
  104. package/dist/template/.opencode/memory/observations/2026-01-25-decision-simplified-swarm-helper-tool-to-fix-type.md +0 -20
  105. package/dist/template/.opencode/memory/observations/2026-01-25-decision-use-beads-as-swarm-board-source-of-truth.md +0 -14
  106. package/dist/template/.opencode/memory/observations/2026-01-25-learning-user-wants-real-swarm-coordination-guida.md +0 -15
  107. package/dist/template/.opencode/memory/observations/2026-01-28-decision-created-deep-research-skill-for-thorough.md +0 -29
  108. package/dist/template/.opencode/memory/observations/2026-01-28-decision-gh-grep-mcp-wrapper-vs-native-grep-searc.md +0 -21
  109. package/dist/template/.opencode/memory/observations/2026-01-28-decision-oracle-tool-optimal-usage-patterns.md +0 -32
  110. package/dist/template/.opencode/memory/observations/2026-01-28-learning-ampcode-deep-mode-research-integration-w.md +0 -42
  111. package/dist/template/.opencode/memory/observations/2026-01-28-pattern-research-delegation-pattern-explore-for-.md +0 -32
  112. package/dist/template/.opencode/memory/observations/2026-01-29-decision-copilot-auth-plugin-rate-limit-handling.md +0 -27
  113. package/dist/template/.opencode/memory/observations/2026-01-29-decision-spec-driven-approach-for-opencodekit.md +0 -21
  114. package/dist/template/.opencode/memory/observations/2026-01-29-learning-karpathy-llm-coding-insights-dec-2025.md +0 -44
  115. package/dist/template/.opencode/memory/observations/2026-01-30-decision-github-copilot-claude-routing-keep-disab.md +0 -32
  116. package/dist/template/.opencode/memory/observations/2026-01-30-discovery-context-management-research-critical-gap.md +0 -14
  117. package/dist/template/.opencode/memory/observations/2026-01-30-discovery-kimi-k2-5-agent-swarm-architecture-patte.md +0 -45
  118. package/dist/template/.opencode/memory/observations/2026-01-30-pattern-swarm-tools-architecture.md +0 -28
  119. package/dist/template/.opencode/memory/observations/2026-01-31-decision-copilot-auth-plugin-updated-with-baseurl.md +0 -63
  120. package/dist/template/.opencode/memory/observations/2026-01-31-decision-created-dedicated-worker-agent-for-swarm.md +0 -20
  121. package/dist/template/.opencode/memory/observations/2026-01-31-decision-rollback-to-v1-1-47-for-copilot-claude-r.md +0 -21
  122. package/dist/template/.opencode/memory/observations/2026-01-31-decision-simplified-swarm-to-task-tool-pattern.md +0 -44
  123. package/dist/template/.opencode/memory/observations/2026-01-31-decision-swarm-architecture-task-tool-over-tmux.md +0 -33
  124. package/dist/template/.opencode/memory/observations/2026-01-31-decision-worker-skills-defined-for-swarm-delegati.md +0 -30
  125. package/dist/template/.opencode/memory/observations/2026-01-31-learning-gpt-reasoning-config-for-github-copilot.md +0 -51
  126. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-auth-comparison-finding.md +0 -61
  127. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-reasoning-architecture-.md +0 -66
  128. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-custom-tools-api.md +0 -48
  129. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-v1-1-48-skills-as-slash-command.md +0 -21
  130. package/dist/template/.opencode/memory/observations/2026-01-31-learning-swarm-system-simplified-removed-mailbox-.md +0 -30
  131. package/dist/template/.opencode/memory/observations/2026-01-31-learning-v1-1-48-native-copilot-reasoning-via-pr-.md +0 -45
  132. package/dist/template/.opencode/memory/observations/2026-01-31-warning-cannot-add-custom-config-to-opencode-jso.md +0 -18
  133. package/dist/template/.opencode/memory/observations/2026-01-31-warning-copilot-claude-v1-endpoint-returns-404-c.md +0 -48
  134. package/dist/template/.opencode/memory/observations/2026-01-31-warning-opencode-v1-1-48-claude-thinking-block-s.md +0 -51
  135. package/dist/template/.opencode/memory/project/architecture.md +0 -60
  136. package/dist/template/.opencode/memory/project/commands.md +0 -72
  137. package/dist/template/.opencode/memory/project/conventions.md +0 -68
  138. package/dist/template/.opencode/memory/project/gotchas.md +0 -41
  139. package/dist/template/.opencode/skill/notebooklm/SKILL.md +0 -272
  140. package/dist/template/.opencode/skill/notebooklm/references/setup.md +0 -353
  141. package/dist/template/.opencode/tool/notebooklm.ts +0 -488
  142. package/dist/template/.opencode/tool/oracle.ts +0 -240
  143. /package/dist/template/.opencode/memory/{user.example.md → _templates/user.md} +0 -0
  144. /package/dist/template/.opencode/memory/{user.md → project/user.md} +0 -0
@@ -1,517 +0,0 @@
1
- ---
2
- description: Create custom skills for agents using TDD-driven approach
3
- argument-hint: "<skill-name> [--from-observation] [--template=<type>]"
4
- agent: build
5
- ---
6
-
7
- # Create Skill: $ARGUMENTS
8
-
9
- Create a new reusable skill that agents can load to handle specific scenarios.
10
-
11
- ## What is a Skill?
12
-
13
- Skills are process instructions that:
14
-
15
- - Guide agents through complex multi-step workflows
16
- - Encode hard-won knowledge that prevents common mistakes
17
- - Provide guardrails that resist agent rationalization
18
- - Can be loaded on-demand when relevant scenarios arise
19
-
20
- ## Prerequisites
21
-
22
- Load the skill-creator skill first:
23
-
24
- ```typescript
25
- skill({ name: "skill-creator" });
26
- ```
27
-
28
- This provides the framework for skill creation.
29
-
30
- ## Phase 1: Define the Problem
31
-
32
- ### Identify the Trigger
33
-
34
- When should this skill be loaded? Define clear trigger conditions:
35
-
36
- ```markdown
37
- **Use this skill when:**
38
-
39
- - [Specific scenario 1]
40
- - [Specific scenario 2]
41
- - [Observable condition]
42
-
43
- **Do NOT use when:**
44
-
45
- - [Exception 1]
46
- - [Exception 2]
47
- ```
48
-
49
- ### Document the Pain Point
50
-
51
- What goes wrong without this skill?
52
-
53
- ```
54
- PROBLEM STATEMENT
55
- ━━━━━━━━━━━━━━━━━
56
-
57
- Without guidance, agents typically:
58
- 1. [Common mistake 1]
59
- 2. [Common mistake 2]
60
- 3. [Rationalization pattern]
61
-
62
- This leads to:
63
- - [Bad outcome 1]
64
- - [Bad outcome 2]
65
- - [Wasted effort]
66
- ```
67
-
68
- ### Define Success Criteria
69
-
70
- What does correct behavior look like?
71
-
72
- ```
73
- SUCCESS CRITERIA
74
- ━━━━━━━━━━━━━━━━
75
-
76
- An agent following this skill will:
77
- ✓ [Correct behavior 1]
78
- ✓ [Correct behavior 2]
79
- ✓ [Verification step]
80
-
81
- Observable outputs:
82
- - [Artifact 1]
83
- - [Artifact 2]
84
- ```
85
-
86
- ## Phase 2: Design the Skill Structure
87
-
88
- ### Skill Anatomy
89
-
90
- ```
91
- .opencode/skill/$ARGUMENTS/
92
- ├── SKILL.md # Main skill file (loaded by skill tool)
93
- ├── instructions.md # Detailed step-by-step instructions
94
- ├── examples/ # Example scenarios
95
- │ ├── good-example.md # What correct execution looks like
96
- │ └── bad-example.md # What to avoid (anti-patterns)
97
- └── tests/ # Test scenarios for validation
98
- ├── scenario-1.md # Test case 1
99
- └── scenario-2.md # Test case 2
100
- ```
101
-
102
- ### SKILL.md Template
103
-
104
- ```markdown
105
- ---
106
- name: $ARGUMENTS
107
- description: [One-line description]
108
- trigger: [When to use this skill]
109
- agent: build
110
- mcp_servers: [] # Optional: MCP servers to connect
111
- ---
112
-
113
- # $ARGUMENTS
114
-
115
- [Brief description of what this skill does and why it exists]
116
-
117
- ## When to Use
118
-
119
- Use this skill when:
120
-
121
- - [Condition 1]
122
- - [Condition 2]
123
-
124
- Do NOT use when:
125
-
126
- - [Exception 1]
127
-
128
- ## Quick Start
129
-
130
- [3-5 step summary of the core workflow]
131
-
132
- ## Detailed Instructions
133
-
134
- See: [instructions.md](./instructions.md)
135
-
136
- ## Anti-Patterns
137
-
138
- ❌ **[Bad Pattern Name]**
139
- [Description of what NOT to do]
140
-
141
- ❌ **[Another Bad Pattern]**
142
- [Description]
143
-
144
- ## Verification
145
-
146
- Before completing, verify:
147
-
148
- - [ ] [Checklist item 1]
149
- - [ ] [Checklist item 2]
150
- - [ ] [Checklist item 3]
151
- ```
152
-
153
- ### Instructions.md Template
154
-
155
- ````markdown
156
- # $ARGUMENTS: Detailed Instructions
157
-
158
- ## Phase 1: [Setup/Initialization]
159
-
160
- ### Step 1.1: [Action]
161
-
162
- [Detailed instructions]
163
-
164
- ```typescript
165
- // Code example if relevant
166
- ```
167
- ````
168
-
169
- ### Step 1.2: [Action]
170
-
171
- [Detailed instructions]
172
-
173
- **Expected Output:**
174
-
175
- ```
176
- [What the agent should see]
177
- ```
178
-
179
- ## Phase 2: [Core Workflow]
180
-
181
- ### Step 2.1: [Action]
182
-
183
- [Instructions with rationale - WHY this step matters]
184
-
185
- ⚠️ **Common Mistake:** [What agents often do wrong here]
186
-
187
- ✅ **Correct Approach:** [What to do instead]
188
-
189
- ### Step 2.2: [Action]
190
-
191
- [Instructions]
192
-
193
- ## Phase 3: [Verification]
194
-
195
- ### Step 3.1: Verify Results
196
-
197
- [How to confirm success]
198
-
199
- ### Step 3.2: Clean Up
200
-
201
- [Any cleanup steps]
202
-
203
- ## Troubleshooting
204
-
205
- ### [Common Issue 1]
206
-
207
- **Symptom:** [What you observe]
208
- **Cause:** [Why it happens]
209
- **Solution:** [How to fix]
210
-
211
- ### [Common Issue 2]
212
-
213
- **Symptom:** [What you observe]
214
- **Cause:** [Why it happens]
215
- **Solution:** [How to fix]
216
-
217
- ````
218
-
219
- ## Phase 3: Write Tests First (TDD)
220
-
221
- ### Create Test Scenario
222
-
223
- ```markdown
224
- # Test: $ARGUMENTS - [Scenario Name]
225
-
226
- ## Setup
227
- [Initial state before skill execution]
228
-
229
- ## Input
230
- [What triggers the skill]
231
-
232
- ## Expected Behavior
233
- 1. Agent should [action 1]
234
- 2. Agent should [action 2]
235
- 3. Agent should NOT [anti-pattern]
236
-
237
- ## Expected Output
238
- [Artifacts or changes]
239
-
240
- ## Verification
241
- [How to confirm correct behavior]
242
- ````
243
-
244
- ### Run Baseline Test (RED)
245
-
246
- Test without the skill to confirm the problem exists:
247
-
248
- ```typescript
249
- task({
250
- subagent_type: "build",
251
- description: "Baseline test for skill",
252
- prompt: `
253
- [Scenario that triggers the skill need]
254
-
255
- DO NOT load any skills. Just attempt the task naturally.
256
-
257
- Report what you did and any issues encountered.
258
- `,
259
- });
260
- ```
261
-
262
- **Expected Result:** Agent makes the mistakes the skill prevents.
263
-
264
- ## Phase 4: Write the Skill (GREEN)
265
-
266
- ### Core Principles
267
-
268
- 1. **Be Prescriptive, Not Descriptive**
269
- - ❌ "Consider checking for errors"
270
- - ✅ "MUST run `npm test` before proceeding. If tests fail, STOP."
271
-
272
- 2. **Close Rationalization Loopholes**
273
- - ❌ "Usually you should..."
274
- - ✅ "ALWAYS do X. NO EXCEPTIONS."
275
-
276
- 3. **Add Verification Gates**
277
- - After each major step, require observable verification
278
- - "Run [command] and confirm output contains [pattern]"
279
-
280
- 4. **Include Anti-Patterns**
281
- - Explicitly state what NOT to do
282
- - Agents are more likely to avoid named anti-patterns
283
-
284
- 5. **Provide Escape Hatches**
285
- - Define what to do when skill doesn't apply
286
- - "If [condition], exit this skill and [alternative]"
287
-
288
- ### Write SKILL.md
289
-
290
- Create the main skill file with:
291
-
292
- - Clear trigger conditions
293
- - Step-by-step workflow
294
- - Verification checklist
295
- - Anti-patterns section
296
-
297
- ### Write instructions.md
298
-
299
- Create detailed instructions with:
300
-
301
- - Numbered phases and steps
302
- - Code examples where helpful
303
- - Common mistakes highlighted
304
- - Troubleshooting section
305
-
306
- ## Phase 5: Test the Skill (GREEN → PASSING)
307
-
308
- ```typescript
309
- task({
310
- subagent_type: "build",
311
- description: "Test skill execution",
312
- prompt: `
313
- Load the skill: skill({ name: "$ARGUMENTS" })
314
-
315
- Then attempt this scenario:
316
- [Same scenario as baseline]
317
-
318
- Follow the skill instructions exactly.
319
- Report each step you take and verification results.
320
- `,
321
- });
322
- ```
323
-
324
- **Expected Result:** Agent follows skill correctly, avoids mistakes.
325
-
326
- ## Phase 6: Iterate (REFACTOR)
327
-
328
- ### Identify Gaps
329
-
330
- Review test results for:
331
-
332
- - Steps that were unclear
333
- - Rationalizations that slipped through
334
- - Missing edge cases
335
- - Overly verbose instructions
336
-
337
- ### Tighten the Skill
338
-
339
- ```
340
- COMMON REFINEMENTS
341
- ━━━━━━━━━━━━━━━━━━
342
-
343
- 1. Add MUST/NEVER language where agents deviated
344
- 2. Remove ambiguous "usually" or "typically" phrases
345
- 3. Add specific commands instead of "check that..."
346
- 4. Include exact error messages to look for
347
- 5. Add more anti-patterns based on observed failures
348
- ```
349
-
350
- ### Re-Test
351
-
352
- Run test scenarios again until skill guides behavior correctly.
353
-
354
- ## Phase 7: Document Examples
355
-
356
- ### Good Example
357
-
358
- ```markdown
359
- # Example: $ARGUMENTS - Correct Execution
360
-
361
- ## Scenario
362
-
363
- [What triggered the skill]
364
-
365
- ## Execution Trace
366
-
367
- 1. Loaded skill
368
- 2. Checked [precondition] ✓
369
- 3. Ran [step 1]
370
- Output: [what was observed]
371
- 4. Ran [step 2]
372
- Output: [what was observed]
373
- 5. Verified [condition] ✓
374
-
375
- ## Result
376
-
377
- [Successful outcome]
378
- ```
379
-
380
- ### Bad Example
381
-
382
- ```markdown
383
- # Anti-Example: $ARGUMENTS - What NOT to Do
384
-
385
- ## Scenario
386
-
387
- [Same trigger]
388
-
389
- ## What Went Wrong
390
-
391
- ❌ Skipped step 2 because "it seemed unnecessary"
392
- ❌ Didn't verify before proceeding
393
- ❌ Assumed X instead of checking
394
-
395
- ## Consequence
396
-
397
- [What broke]
398
-
399
- ## Lesson
400
-
401
- [Why the skill step matters]
402
- ```
403
-
404
- ## Phase 8: Finalize and Register
405
-
406
- ### File Structure Check
407
-
408
- !`ls -la .opencode/skill/$ARGUMENTS/`
409
-
410
- Expected:
411
-
412
- ```
413
- SKILL.md
414
- instructions.md
415
- examples/
416
- good-example.md
417
- bad-example.md
418
- tests/
419
- scenario-1.md
420
- ```
421
-
422
- ### Test Loading
423
-
424
- ```typescript
425
- skill({ name: "$ARGUMENTS" });
426
- ```
427
-
428
- Verify:
429
-
430
- - Skill loads without error
431
- - Instructions are clear when displayed
432
- - Agent can follow the workflow
433
-
434
- ## Optional: Share Upstream
435
-
436
- If this skill is generally useful:
437
-
438
- ```typescript
439
- skill({ name: "sharing-skills" });
440
- ```
441
-
442
- This guides contributing the skill back to the skills repository.
443
-
444
- ## Templates
445
-
446
- ### Quick Templates
447
-
448
- ```bash
449
- /skill-create debugging --template=debugging
450
- /skill-create deployment --template=deployment
451
- /skill-create code-review --template=review
452
- /skill-create migration --template=migration
453
- ```
454
-
455
- ### Template Types
456
-
457
- | Template | Best For |
458
- | ------------- | ---------------------------- |
459
- | `debugging` | Root cause analysis skills |
460
- | `deployment` | Release and deploy workflows |
461
- | `review` | Code review checklists |
462
- | `migration` | Data or schema migrations |
463
- | `security` | Security audit workflows |
464
- | `testing` | Test creation patterns |
465
- | `refactoring` | Safe refactoring steps |
466
-
467
- ## From Observation
468
-
469
- If creating from an existing observation:
470
-
471
- ```bash
472
- /skill-create my-skill --from-observation
473
- ```
474
-
475
- 1. Search observations for patterns
476
- 2. Extract relevant learnings
477
- 3. Pre-populate skill with discovered knowledge
478
-
479
- ```typescript
480
- memory_search({ query: "$ARGUMENTS", type: "observations" });
481
- ```
482
-
483
- ## Success Criteria
484
-
485
- The skill is ready when:
486
-
487
- - [ ] Baseline test (no skill) shows the problem
488
- - [ ] Skill test shows correct behavior
489
- - [ ] Instructions are unambiguous
490
- - [ ] Anti-patterns are documented
491
- - [ ] At least one good and one bad example
492
- - [ ] Loads without error via `skill()` tool
493
- - [ ] Verified by independent subagent test
494
-
495
- ## Output
496
-
497
- ```
498
- SKILL CREATED: $ARGUMENTS
499
- ━━━━━━━━━━━━━━━━━━━━━━━━━
500
-
501
- Location: .opencode/skill/$ARGUMENTS/
502
-
503
- Files:
504
- ✓ SKILL.md (main definition)
505
- ✓ instructions.md (detailed steps)
506
- ✓ examples/good-example.md
507
- ✓ examples/bad-example.md
508
- ✓ tests/scenario-1.md
509
-
510
- Usage:
511
- skill({ name: "$ARGUMENTS" })
512
-
513
- Next Steps:
514
- - Test with more scenarios
515
- - Share upstream: skill({ name: "sharing-skills" })
516
- - Add to relevant command files
517
- ```