oh-my-codex 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +269 -0
  2. package/bin/omx.js +25 -0
  3. package/dist/agents/definitions.d.ts +22 -0
  4. package/dist/agents/definitions.d.ts.map +1 -0
  5. package/dist/agents/definitions.js +235 -0
  6. package/dist/agents/definitions.js.map +1 -0
  7. package/dist/cli/doctor.d.ts +11 -0
  8. package/dist/cli/doctor.d.ts.map +1 -0
  9. package/dist/cli/doctor.js +157 -0
  10. package/dist/cli/doctor.js.map +1 -0
  11. package/dist/cli/index.d.ts +6 -0
  12. package/dist/cli/index.d.ts.map +1 -0
  13. package/dist/cli/index.js +266 -0
  14. package/dist/cli/index.js.map +1 -0
  15. package/dist/cli/setup.d.ts +12 -0
  16. package/dist/cli/setup.d.ts.map +1 -0
  17. package/dist/cli/setup.js +175 -0
  18. package/dist/cli/setup.js.map +1 -0
  19. package/dist/cli/version.d.ts +2 -0
  20. package/dist/cli/version.d.ts.map +1 -0
  21. package/dist/cli/version.js +17 -0
  22. package/dist/cli/version.js.map +1 -0
  23. package/dist/config/generator.d.ts +14 -0
  24. package/dist/config/generator.d.ts.map +1 -0
  25. package/dist/config/generator.js +106 -0
  26. package/dist/config/generator.js.map +1 -0
  27. package/dist/hooks/__tests__/agents-overlay.test.d.ts +8 -0
  28. package/dist/hooks/__tests__/agents-overlay.test.d.ts.map +1 -0
  29. package/dist/hooks/__tests__/agents-overlay.test.js +148 -0
  30. package/dist/hooks/__tests__/agents-overlay.test.js.map +1 -0
  31. package/dist/hooks/agents-overlay.d.ts +34 -0
  32. package/dist/hooks/agents-overlay.d.ts.map +1 -0
  33. package/dist/hooks/agents-overlay.js +265 -0
  34. package/dist/hooks/agents-overlay.js.map +1 -0
  35. package/dist/hooks/emulator.d.ts +44 -0
  36. package/dist/hooks/emulator.d.ts.map +1 -0
  37. package/dist/hooks/emulator.js +108 -0
  38. package/dist/hooks/emulator.js.map +1 -0
  39. package/dist/hooks/keyword-detector.d.ts +27 -0
  40. package/dist/hooks/keyword-detector.d.ts.map +1 -0
  41. package/dist/hooks/keyword-detector.js +63 -0
  42. package/dist/hooks/keyword-detector.js.map +1 -0
  43. package/dist/hooks/session.d.ts +38 -0
  44. package/dist/hooks/session.d.ts.map +1 -0
  45. package/dist/hooks/session.js +135 -0
  46. package/dist/hooks/session.js.map +1 -0
  47. package/dist/hud/colors.d.ts +26 -0
  48. package/dist/hud/colors.d.ts.map +1 -0
  49. package/dist/hud/colors.js +71 -0
  50. package/dist/hud/colors.js.map +1 -0
  51. package/dist/hud/index.d.ts +12 -0
  52. package/dist/hud/index.d.ts.map +1 -0
  53. package/dist/hud/index.js +107 -0
  54. package/dist/hud/index.js.map +1 -0
  55. package/dist/hud/render.d.ts +9 -0
  56. package/dist/hud/render.d.ts.map +1 -0
  57. package/dist/hud/render.js +192 -0
  58. package/dist/hud/render.js.map +1 -0
  59. package/dist/hud/state.d.ts +21 -0
  60. package/dist/hud/state.d.ts.map +1 -0
  61. package/dist/hud/state.js +101 -0
  62. package/dist/hud/state.js.map +1 -0
  63. package/dist/hud/types.d.ts +87 -0
  64. package/dist/hud/types.d.ts.map +1 -0
  65. package/dist/hud/types.js +8 -0
  66. package/dist/hud/types.js.map +1 -0
  67. package/dist/index.d.ts +18 -0
  68. package/dist/index.d.ts.map +1 -0
  69. package/dist/index.js +18 -0
  70. package/dist/index.js.map +1 -0
  71. package/dist/mcp/code-intel-server.d.ts +7 -0
  72. package/dist/mcp/code-intel-server.d.ts.map +1 -0
  73. package/dist/mcp/code-intel-server.js +567 -0
  74. package/dist/mcp/code-intel-server.js.map +1 -0
  75. package/dist/mcp/memory-server.d.ts +7 -0
  76. package/dist/mcp/memory-server.d.ts.map +1 -0
  77. package/dist/mcp/memory-server.js +359 -0
  78. package/dist/mcp/memory-server.js.map +1 -0
  79. package/dist/mcp/state-server.d.ts +7 -0
  80. package/dist/mcp/state-server.d.ts.map +1 -0
  81. package/dist/mcp/state-server.js +181 -0
  82. package/dist/mcp/state-server.js.map +1 -0
  83. package/dist/mcp/trace-server.d.ts +7 -0
  84. package/dist/mcp/trace-server.d.ts.map +1 -0
  85. package/dist/mcp/trace-server.js +205 -0
  86. package/dist/mcp/trace-server.js.map +1 -0
  87. package/dist/modes/base.d.ts +50 -0
  88. package/dist/modes/base.d.ts.map +1 -0
  89. package/dist/modes/base.js +140 -0
  90. package/dist/modes/base.js.map +1 -0
  91. package/dist/notifications/notifier.d.ts +30 -0
  92. package/dist/notifications/notifier.d.ts.map +1 -0
  93. package/dist/notifications/notifier.js +124 -0
  94. package/dist/notifications/notifier.js.map +1 -0
  95. package/dist/team/orchestrator.d.ts +54 -0
  96. package/dist/team/orchestrator.d.ts.map +1 -0
  97. package/dist/team/orchestrator.js +106 -0
  98. package/dist/team/orchestrator.js.map +1 -0
  99. package/dist/utils/package.d.ts +9 -0
  100. package/dist/utils/package.d.ts.map +1 -0
  101. package/dist/utils/package.js +31 -0
  102. package/dist/utils/package.js.map +1 -0
  103. package/dist/utils/paths.d.ts +27 -0
  104. package/dist/utils/paths.d.ts.map +1 -0
  105. package/dist/utils/paths.js +60 -0
  106. package/dist/utils/paths.js.map +1 -0
  107. package/dist/verification/verifier.d.ts +32 -0
  108. package/dist/verification/verifier.d.ts.map +1 -0
  109. package/dist/verification/verifier.js +81 -0
  110. package/dist/verification/verifier.js.map +1 -0
  111. package/package.json +54 -0
  112. package/prompts/analyst.md +110 -0
  113. package/prompts/api-reviewer.md +98 -0
  114. package/prompts/architect.md +109 -0
  115. package/prompts/build-fixer.md +89 -0
  116. package/prompts/code-reviewer.md +105 -0
  117. package/prompts/critic.md +87 -0
  118. package/prompts/debugger.md +93 -0
  119. package/prompts/deep-executor.md +112 -0
  120. package/prompts/dependency-expert.md +99 -0
  121. package/prompts/designer.md +103 -0
  122. package/prompts/executor.md +99 -0
  123. package/prompts/explore.md +112 -0
  124. package/prompts/git-master.md +92 -0
  125. package/prompts/information-architect.md +267 -0
  126. package/prompts/performance-reviewer.md +94 -0
  127. package/prompts/planner.md +116 -0
  128. package/prompts/product-analyst.md +299 -0
  129. package/prompts/product-manager.md +255 -0
  130. package/prompts/qa-tester.md +98 -0
  131. package/prompts/quality-reviewer.md +105 -0
  132. package/prompts/quality-strategist.md +227 -0
  133. package/prompts/researcher.md +96 -0
  134. package/prompts/scientist.md +92 -0
  135. package/prompts/security-reviewer.md +125 -0
  136. package/prompts/style-reviewer.md +87 -0
  137. package/prompts/test-engineer.md +103 -0
  138. package/prompts/ux-researcher.md +282 -0
  139. package/prompts/verifier.md +95 -0
  140. package/prompts/vision.md +75 -0
  141. package/prompts/writer.md +86 -0
  142. package/scripts/notify-hook.js +237 -0
  143. package/skills/analyze/SKILL.md +93 -0
  144. package/skills/autopilot/SKILL.md +175 -0
  145. package/skills/build-fix/SKILL.md +123 -0
  146. package/skills/cancel/SKILL.md +387 -0
  147. package/skills/code-review/SKILL.md +208 -0
  148. package/skills/configure-discord/SKILL.md +256 -0
  149. package/skills/configure-telegram/SKILL.md +232 -0
  150. package/skills/deepinit/SKILL.md +320 -0
  151. package/skills/deepsearch/SKILL.md +38 -0
  152. package/skills/doctor/SKILL.md +193 -0
  153. package/skills/ecomode/SKILL.md +114 -0
  154. package/skills/frontend-ui-ux/SKILL.md +34 -0
  155. package/skills/git-master/SKILL.md +29 -0
  156. package/skills/help/SKILL.md +192 -0
  157. package/skills/hud/SKILL.md +97 -0
  158. package/skills/learn-about-omx/SKILL.md +37 -0
  159. package/skills/learner/SKILL.md +135 -0
  160. package/skills/note/SKILL.md +62 -0
  161. package/skills/omx-setup/SKILL.md +1147 -0
  162. package/skills/pipeline/SKILL.md +407 -0
  163. package/skills/plan/SKILL.md +223 -0
  164. package/skills/project-session-manager/SKILL.md +560 -0
  165. package/skills/psm/SKILL.md +20 -0
  166. package/skills/ralph/SKILL.md +197 -0
  167. package/skills/ralph-init/SKILL.md +38 -0
  168. package/skills/ralplan/SKILL.md +34 -0
  169. package/skills/release/SKILL.md +83 -0
  170. package/skills/research/SKILL.md +510 -0
  171. package/skills/review/SKILL.md +30 -0
  172. package/skills/security-review/SKILL.md +284 -0
  173. package/skills/skill/SKILL.md +837 -0
  174. package/skills/swarm/SKILL.md +25 -0
  175. package/skills/tdd/SKILL.md +106 -0
  176. package/skills/team/SKILL.md +860 -0
  177. package/skills/trace/SKILL.md +33 -0
  178. package/skills/ultrapilot/SKILL.md +632 -0
  179. package/skills/ultraqa/SKILL.md +130 -0
  180. package/skills/ultrawork/SKILL.md +143 -0
  181. package/skills/writer-memory/SKILL.md +443 -0
  182. package/templates/AGENTS.md +326 -0
@@ -0,0 +1,837 @@
1
+ ---
2
+ name: skill
3
+ description: Manage local skills - list, add, remove, search, edit, setup wizard
4
+ argument-hint: "<command> [args]"
5
+ ---
6
+
7
+ # Skill Management CLI
8
+
9
+ Meta-skill for managing oh-my-codex skills via CLI-like commands.
10
+
11
+ ## Subcommands
12
+
13
+ ### /skill list
14
+
15
+ Show all local skills organized by scope.
16
+
17
+ **Behavior:**
18
+ 1. Scan user skills at `~/.claude/skills/omc-learned/`
19
+ 2. Scan project skills at `.omx/skills/`
20
+ 3. Parse YAML frontmatter for metadata
21
+ 4. Display in organized table format:
22
+
23
+ ```
24
+ USER SKILLS (~/.claude/skills/omc-learned/):
25
+ | Name | Triggers | Quality | Usage | Scope |
26
+ |-------------------|--------------------|---------|-------|-------|
27
+ | error-handler | fix, error | 95% | 42 | user |
28
+ | api-builder | api, endpoint | 88% | 23 | user |
29
+
30
+ PROJECT SKILLS (.omx/skills/):
31
+ | Name | Triggers | Quality | Usage | Scope |
32
+ |-------------------|--------------------|---------|-------|---------|
33
+ | test-runner | test, run | 92% | 15 | project |
34
+ ```
35
+
36
+ **Fallback:** If quality/usage stats not available, show "N/A"
37
+
38
+ ---
39
+
40
+ ### /skill add [name]
41
+
42
+ Interactive wizard for creating a new skill.
43
+
44
+ **Behavior:**
45
+ 1. **Ask for skill name** (if not provided in command)
46
+ - Validate: lowercase, hyphens only, no spaces
47
+ 2. **Ask for description**
48
+ - Clear, concise one-liner
49
+ 3. **Ask for triggers** (comma-separated keywords)
50
+ - Example: "error, fix, debug"
51
+ 4. **Ask for argument hint** (optional)
52
+ - Example: "<file> [options]"
53
+ 5. **Ask for scope:**
54
+ - `user` → `~/.claude/skills/omc-learned/<name>/SKILL.md`
55
+ - `project` → `.omx/skills/<name>/SKILL.md`
56
+ 6. **Create skill file** with template:
57
+
58
+ ```yaml
59
+ ---
60
+ name: <name>
61
+ description: <description>
62
+ triggers:
63
+ - <trigger1>
64
+ - <trigger2>
65
+ argument-hint: "<args>"
66
+ ---
67
+
68
+ # <Name> Skill
69
+
70
+ ## Purpose
71
+
72
+ [Describe what this skill does]
73
+
74
+ ## When to Activate
75
+
76
+ [Describe triggers and conditions]
77
+
78
+ ## Workflow
79
+
80
+ 1. [Step 1]
81
+ 2. [Step 2]
82
+ 3. [Step 3]
83
+
84
+ ## Examples
85
+
86
+ ```
87
+ /oh-my-codex:<name> example-arg
88
+ ```
89
+
90
+ ## Notes
91
+
92
+ [Additional context, edge cases, gotchas]
93
+ ```
94
+
95
+ 7. **Report success** with file path
96
+ 8. **Suggest:** "Edit `/skill edit <name>` to customize content"
97
+
98
+ **Example:**
99
+ ```
100
+ User: /skill add custom-logger
101
+ Assistant: Creating new skill 'custom-logger'...
102
+
103
+ Description: Enhanced logging with structured output
104
+ Triggers (comma-separated): log, logger, logging
105
+ Argument hint (optional): <level> [message]
106
+ Scope (user/project): user
107
+
108
+ ✓ Created skill at ~/.claude/skills/omc-learned/custom-logger/SKILL.md
109
+ → Edit with: /skill edit custom-logger
110
+ ```
111
+
112
+ ---
113
+
114
+ ### /skill remove <name>
115
+
116
+ Remove a skill by name.
117
+
118
+ **Behavior:**
119
+ 1. **Search for skill** in both scopes:
120
+ - `~/.claude/skills/omc-learned/<name>/SKILL.md`
121
+ - `.omx/skills/<name>/SKILL.md`
122
+ 2. **If found:**
123
+ - Display skill info (name, description, scope)
124
+ - **Ask for confirmation:** "Delete '<name>' skill from <scope>? (yes/no)"
125
+ 3. **If confirmed:**
126
+ - Delete entire skill directory (e.g., `~/.claude/skills/omc-learned/<name>/`)
127
+ - Report: "✓ Removed skill '<name>' from <scope>"
128
+ 4. **If not found:**
129
+ - Report: "✗ Skill '<name>' not found in user or project scope"
130
+
131
+ **Safety:** Never delete without explicit user confirmation.
132
+
133
+ **Example:**
134
+ ```
135
+ User: /skill remove old-logger
136
+ Assistant: Found skill 'old-logger' in user scope:
137
+ Description: Legacy logging utility
138
+ Scope: user (~/.claude/skills/omc-learned/)
139
+
140
+ Delete 'old-logger' skill? (yes/no)
141
+
142
+ User: yes
143
+ Assistant: ✓ Removed skill 'old-logger' from user scope
144
+ ```
145
+
146
+ ---
147
+
148
+ ### /skill edit <name>
149
+
150
+ Edit an existing skill interactively.
151
+
152
+ **Behavior:**
153
+ 1. **Find skill** by name (search both scopes)
154
+ 2. **Read current content** via Read tool
155
+ 3. **Display current values:**
156
+ ```
157
+ Current skill 'custom-logger':
158
+ - Description: Enhanced logging with structured output
159
+ - Triggers: log, logger, logging
160
+ - Argument hint: <level> [message]
161
+ - Scope: user
162
+ ```
163
+ 4. **Ask what to change:**
164
+ - `description` - Update description
165
+ - `triggers` - Update trigger keywords
166
+ - `argument-hint` - Update argument hint
167
+ - `content` - Edit full markdown content
168
+ - `rename` - Rename skill (move file)
169
+ - `cancel` - Exit without changes
170
+ 5. **For selected field:**
171
+ - Show current value
172
+ - Ask for new value
173
+ - Update YAML frontmatter or content
174
+ - Write back to file
175
+ 6. **Report success** with summary of changes
176
+
177
+ **Example:**
178
+ ```
179
+ User: /skill edit custom-logger
180
+ Assistant: Current skill 'custom-logger':
181
+ - Description: Enhanced logging with structured output
182
+ - Triggers: log, logger, logging
183
+ - Argument hint: <level> [message]
184
+
185
+ What would you like to edit? (description/triggers/argument-hint/content/rename/cancel)
186
+
187
+ User: triggers
188
+ Assistant: Current triggers: log, logger, logging
189
+ New triggers (comma-separated): log, logger, logging, trace
190
+
191
+ ✓ Updated triggers for 'custom-logger'
192
+ ```
193
+
194
+ ---
195
+
196
+ ### /skill search <query>
197
+
198
+ Search skills by content, triggers, name, or description.
199
+
200
+ **Behavior:**
201
+ 1. **Scan all skills** in both scopes
202
+ 2. **Match query** (case-insensitive) against:
203
+ - Skill name
204
+ - Description
205
+ - Triggers
206
+ - Full markdown content
207
+ 3. **Display matches** with context:
208
+
209
+ ```
210
+ Found 3 skills matching "typescript error":
211
+
212
+ 1. typescript-fixer (user)
213
+ Description: Fix common TypeScript errors
214
+ Match: "typescript error handling patterns"
215
+
216
+ 2. error-handler (user)
217
+ Description: Generic error handling utilities
218
+ Match: "Supports TypeScript and JavaScript errors"
219
+
220
+ 3. lint-fix (project)
221
+ Description: Auto-fix linting errors
222
+ Match: "TypeScript ESLint error resolution"
223
+ ```
224
+
225
+ **Ranking:** Prioritize matches in name/triggers over content matches
226
+
227
+ **Example:**
228
+ ```
229
+ User: /skill search api endpoint
230
+ Assistant: Found 2 skills matching "api endpoint":
231
+
232
+ 1. api-builder (user)
233
+ Description: Generate REST API endpoints
234
+ Triggers: api, endpoint, rest
235
+
236
+ 2. backend-scaffold (project)
237
+ Description: Scaffold backend services
238
+ Match: "Creates API endpoint boilerplate"
239
+ ```
240
+
241
+ ---
242
+
243
+ ### /skill info <name>
244
+
245
+ Show detailed information about a skill.
246
+
247
+ **Behavior:**
248
+ 1. **Find skill** by name (search both scopes)
249
+ 2. **Parse YAML frontmatter** and content
250
+ 3. **Display complete details:**
251
+
252
+ ```
253
+ Skill: custom-logger
254
+ Scope: user (~/.claude/skills/omc-learned/custom-logger/)
255
+ Description: Enhanced logging with structured output
256
+ Triggers: log, logger, logging
257
+ Argument Hint: <level> [message]
258
+ Quality: 95% (if available)
259
+ Usage Count: 42 times (if available)
260
+ File Path: /home/user/.claude/skills/omc-learned/custom-logger/SKILL.md
261
+
262
+ --- FULL CONTENT ---
263
+ [entire markdown content]
264
+ ```
265
+
266
+ **If not found:** Report error with suggestion to use `/skill search`
267
+
268
+ **Example:**
269
+ ```
270
+ User: /skill info custom-logger
271
+ Assistant: Skill: custom-logger
272
+ Scope: user
273
+ Description: Enhanced logging with structured output
274
+ Triggers: log, logger, logging
275
+ File: ~/.claude/skills/omc-learned/custom-logger/SKILL.md
276
+
277
+ --- CONTENT ---
278
+ # Custom Logger Skill
279
+
280
+ ## Purpose
281
+ Enhanced logging with structured JSON output...
282
+ [rest of content]
283
+ ```
284
+
285
+ ---
286
+
287
+ ### /skill sync
288
+
289
+ Sync skills between user and project scopes.
290
+
291
+ **Behavior:**
292
+ 1. **Scan both scopes:**
293
+ - User skills: `~/.claude/skills/omc-learned/`
294
+ - Project skills: `.omx/skills/`
295
+ 2. **Compare and categorize:**
296
+ - User-only skills (not in project)
297
+ - Project-only skills (not in user)
298
+ - Common skills (in both)
299
+ 3. **Display sync opportunities:**
300
+
301
+ ```
302
+ SYNC REPORT:
303
+
304
+ User-only skills (5):
305
+ - error-handler
306
+ - api-builder
307
+ - custom-logger
308
+ - test-generator
309
+ - deploy-helper
310
+
311
+ Project-only skills (2):
312
+ - test-runner
313
+ - backend-scaffold
314
+
315
+ Common skills (3):
316
+ - frontend-ui-ux
317
+ - git-master
318
+ - planner
319
+
320
+ Options:
321
+ [1] Copy user skill to project
322
+ [2] Copy project skill to user
323
+ [3] View differences
324
+ [4] Cancel
325
+ ```
326
+
327
+ 4. **Handle user choice:**
328
+ - Option 1: Select skill(s) to copy to project
329
+ - Option 2: Select skill(s) to copy to user
330
+ - Option 3: Show side-by-side diff for common skills
331
+ - Option 4: Exit
332
+
333
+ **Safety:** Never overwrite without confirmation
334
+
335
+ **Example:**
336
+ ```
337
+ User: /skill sync
338
+ Assistant: Found 5 user-only skills and 2 project-only skills.
339
+
340
+ Copy 'error-handler' from user to project? (yes/no/skip)
341
+ User: yes
342
+ Assistant: ✓ Copied 'error-handler' to .omx/skills/
343
+
344
+ Copy 'api-builder' from user to project? (yes/no/skip)
345
+ User: skip
346
+ ...
347
+ ```
348
+
349
+ ---
350
+
351
+ ### /skill setup
352
+
353
+ Interactive wizard for setting up and managing local skills (formerly local-skills-setup).
354
+
355
+ **Behavior:**
356
+
357
+ #### Step 1: Directory Check and Setup
358
+
359
+ First, check if skill directories exist and create them if needed:
360
+
361
+ ```bash
362
+ # Check and create user-level skills directory
363
+ USER_SKILLS_DIR="$HOME/.claude/skills/omc-learned"
364
+ if [ -d "$USER_SKILLS_DIR" ]; then
365
+ echo "User skills directory exists: $USER_SKILLS_DIR"
366
+ else
367
+ mkdir -p "$USER_SKILLS_DIR"
368
+ echo "Created user skills directory: $USER_SKILLS_DIR"
369
+ fi
370
+
371
+ # Check and create project-level skills directory
372
+ PROJECT_SKILLS_DIR=".omx/skills"
373
+ if [ -d "$PROJECT_SKILLS_DIR" ]; then
374
+ echo "Project skills directory exists: $PROJECT_SKILLS_DIR"
375
+ else
376
+ mkdir -p "$PROJECT_SKILLS_DIR"
377
+ echo "Created project skills directory: $PROJECT_SKILLS_DIR"
378
+ fi
379
+ ```
380
+
381
+ #### Step 2: Skill Scan and Inventory
382
+
383
+ Scan both directories and show a comprehensive inventory:
384
+
385
+ ```bash
386
+ # Scan user-level skills
387
+ echo "=== USER-LEVEL SKILLS (~/.claude/skills/omc-learned/) ==="
388
+ if [ -d "$HOME/.claude/skills/omc-learned" ]; then
389
+ USER_COUNT=$(find "$HOME/.claude/skills/omc-learned" -name "*.md" 2>/dev/null | wc -l)
390
+ echo "Total skills: $USER_COUNT"
391
+
392
+ if [ $USER_COUNT -gt 0 ]; then
393
+ echo ""
394
+ echo "Skills found:"
395
+ find "$HOME/.claude/skills/omc-learned" -name "*.md" -type f -exec sh -c '
396
+ FILE="$1"
397
+ NAME=$(grep -m1 "^name:" "$FILE" 2>/dev/null | sed "s/name: //")
398
+ DESC=$(grep -m1 "^description:" "$FILE" 2>/dev/null | sed "s/description: //")
399
+ MODIFIED=$(stat -c "%y" "$FILE" 2>/dev/null || stat -f "%Sm" "$FILE" 2>/dev/null)
400
+ echo " - $NAME"
401
+ [ -n "$DESC" ] && echo " Description: $DESC"
402
+ echo " Modified: $MODIFIED"
403
+ echo ""
404
+ ' sh {} \;
405
+ fi
406
+ else
407
+ echo "Directory not found"
408
+ fi
409
+
410
+ echo ""
411
+ echo "=== PROJECT-LEVEL SKILLS (.omx/skills/) ==="
412
+ if [ -d ".omx/skills" ]; then
413
+ PROJECT_COUNT=$(find ".omx/skills" -name "*.md" 2>/dev/null | wc -l)
414
+ echo "Total skills: $PROJECT_COUNT"
415
+
416
+ if [ $PROJECT_COUNT -gt 0 ]; then
417
+ echo ""
418
+ echo "Skills found:"
419
+ find ".omx/skills" -name "*.md" -type f -exec sh -c '
420
+ FILE="$1"
421
+ NAME=$(grep -m1 "^name:" "$FILE" 2>/dev/null | sed "s/name: //")
422
+ DESC=$(grep -m1 "^description:" "$FILE" 2>/dev/null | sed "s/description: //")
423
+ MODIFIED=$(stat -c "%y" "$FILE" 2>/dev/null || stat -f "%Sm" "$FILE" 2>/dev/null)
424
+ echo " - $NAME"
425
+ [ -n "$DESC" ] && echo " Description: $DESC"
426
+ echo " Modified: $MODIFIED"
427
+ echo ""
428
+ ' sh {} \;
429
+ fi
430
+ else
431
+ echo "Directory not found"
432
+ fi
433
+
434
+ # Summary
435
+ TOTAL=$((USER_COUNT + PROJECT_COUNT))
436
+ echo "=== SUMMARY ==="
437
+ echo "Total skills across all directories: $TOTAL"
438
+ ```
439
+
440
+ #### Step 3: Quick Actions Menu
441
+
442
+ After scanning, use the AskUserQuestion tool to offer these options:
443
+
444
+ **Question:** "What would you like to do with your local skills?"
445
+
446
+ **Options:**
447
+ 1. **Add new skill** - Start the skill creation wizard (invoke `/skill add`)
448
+ 2. **List all skills with details** - Show comprehensive skill inventory (invoke `/skill list`)
449
+ 3. **Scan conversation for patterns** - Analyze current conversation for skill-worthy patterns
450
+ 4. **Import skill** - Import a skill from URL or paste content
451
+ 5. **Done** - Exit the wizard
452
+
453
+ **Option 3: Scan Conversation for Patterns**
454
+
455
+ Analyze the current conversation context to identify potential skill-worthy patterns. Look for:
456
+ - Recent debugging sessions with non-obvious solutions
457
+ - Tricky bugs that required investigation
458
+ - Codebase-specific workarounds discovered
459
+ - Error patterns that took time to resolve
460
+
461
+ Report findings and ask if user wants to extract any as skills (invoke `/learner` if yes).
462
+
463
+ **Option 4: Import Skill**
464
+
465
+ Ask user to provide either:
466
+ - **URL**: Download skill from a URL (e.g., GitHub gist)
467
+ - **Paste content**: Paste skill markdown content directly
468
+
469
+ Then ask for scope:
470
+ - **User-level** (~/.claude/skills/omc-learned/) - Available across all projects
471
+ - **Project-level** (.omx/skills/) - Only for this project
472
+
473
+ Validate the skill format and save to the chosen location.
474
+
475
+ ---
476
+
477
+ ### /skill scan
478
+
479
+ Quick command to scan both skill directories (subset of `/skill setup`).
480
+
481
+ **Behavior:**
482
+ Run the scan from Step 2 of `/skill setup` without the interactive wizard.
483
+
484
+ ---
485
+
486
+ ## Skill Templates
487
+
488
+ When creating skills via `/skill add` or `/skill setup`, offer quick templates for common skill types:
489
+
490
+ ### Error Solution Template
491
+
492
+ ```markdown
493
+ ---
494
+ id: error-[unique-id]
495
+ name: [Error Name]
496
+ description: Solution for [specific error in specific context]
497
+ source: conversation
498
+ triggers: ["error message fragment", "file path", "symptom"]
499
+ quality: high
500
+ ---
501
+
502
+ # [Error Name]
503
+
504
+ ## The Insight
505
+ What is the underlying cause of this error? What principle did you discover?
506
+
507
+ ## Why This Matters
508
+ What goes wrong if you don't know this? What symptom led here?
509
+
510
+ ## Recognition Pattern
511
+ How do you know when this applies? What are the signs?
512
+ - Error message: "[exact error]"
513
+ - File: [specific file path]
514
+ - Context: [when does this occur]
515
+
516
+ ## The Approach
517
+ Step-by-step solution:
518
+ 1. [Specific action with file/line reference]
519
+ 2. [Specific action with file/line reference]
520
+ 3. [Verification step]
521
+
522
+ ## Example
523
+ \`\`\`typescript
524
+ // Before (broken)
525
+ [problematic code]
526
+
527
+ // After (fixed)
528
+ [corrected code]
529
+ \`\`\`
530
+ ```
531
+
532
+ ### Workflow Skill Template
533
+
534
+ ```markdown
535
+ ---
536
+ id: workflow-[unique-id]
537
+ name: [Workflow Name]
538
+ description: Process for [specific task in this codebase]
539
+ source: conversation
540
+ triggers: ["task description", "file pattern", "goal keyword"]
541
+ quality: high
542
+ ---
543
+
544
+ # [Workflow Name]
545
+
546
+ ## The Insight
547
+ What makes this workflow different from the obvious approach?
548
+
549
+ ## Why This Matters
550
+ What fails if you don't follow this process?
551
+
552
+ ## Recognition Pattern
553
+ When should you use this workflow?
554
+ - Task type: [specific task]
555
+ - Files involved: [specific patterns]
556
+ - Indicators: [how to recognize]
557
+
558
+ ## The Approach
559
+ 1. [Step with specific commands/files]
560
+ 2. [Step with specific commands/files]
561
+ 3. [Verification]
562
+
563
+ ## Gotchas
564
+ - [Common mistake and how to avoid it]
565
+ - [Edge case and how to handle it]
566
+ ```
567
+
568
+ ### Code Pattern Template
569
+
570
+ ```markdown
571
+ ---
572
+ id: pattern-[unique-id]
573
+ name: [Pattern Name]
574
+ description: Pattern for [specific use case in this codebase]
575
+ source: conversation
576
+ triggers: ["code pattern", "file type", "problem domain"]
577
+ quality: high
578
+ ---
579
+
580
+ # [Pattern Name]
581
+
582
+ ## The Insight
583
+ What's the key principle behind this pattern?
584
+
585
+ ## Why This Matters
586
+ What problems does this pattern solve in THIS codebase?
587
+
588
+ ## Recognition Pattern
589
+ When do you apply this pattern?
590
+ - File types: [specific files]
591
+ - Problem: [specific problem]
592
+ - Context: [codebase-specific context]
593
+
594
+ ## The Approach
595
+ Decision-making heuristic, not just code:
596
+ 1. [Principle-based step]
597
+ 2. [Principle-based step]
598
+
599
+ ## Example
600
+ \`\`\`typescript
601
+ [Illustrative example showing the principle]
602
+ \`\`\`
603
+
604
+ ## Anti-Pattern
605
+ What NOT to do and why:
606
+ \`\`\`typescript
607
+ [Common mistake to avoid]
608
+ \`\`\`
609
+ ```
610
+
611
+ ### Integration Skill Template
612
+
613
+ ```markdown
614
+ ---
615
+ id: integration-[unique-id]
616
+ name: [Integration Name]
617
+ description: How [system A] integrates with [system B] in this codebase
618
+ source: conversation
619
+ triggers: ["system name", "integration point", "config file"]
620
+ quality: high
621
+ ---
622
+
623
+ # [Integration Name]
624
+
625
+ ## The Insight
626
+ What's non-obvious about how these systems connect?
627
+
628
+ ## Why This Matters
629
+ What breaks if you don't understand this integration?
630
+
631
+ ## Recognition Pattern
632
+ When are you working with this integration?
633
+ - Files: [specific integration files]
634
+ - Config: [specific config locations]
635
+ - Symptoms: [what indicates integration issues]
636
+
637
+ ## The Approach
638
+ How to work with this integration correctly:
639
+ 1. [Configuration step with file paths]
640
+ 2. [Setup step with specific details]
641
+ 3. [Verification step]
642
+
643
+ ## Gotchas
644
+ - [Integration-specific pitfall #1]
645
+ - [Integration-specific pitfall #2]
646
+ ```
647
+
648
+ ---
649
+
650
+ ## Error Handling
651
+
652
+ **All commands must handle:**
653
+ - File/directory doesn't exist
654
+ - Permission errors
655
+ - Invalid YAML frontmatter
656
+ - Duplicate skill names
657
+ - Invalid skill names (spaces, special chars)
658
+
659
+ **Error format:**
660
+ ```
661
+ ✗ Error: <clear message>
662
+ → Suggestion: <helpful next step>
663
+ ```
664
+
665
+ ---
666
+
667
+ ## Usage Examples
668
+
669
+ ```bash
670
+ # List all skills
671
+ /skill list
672
+
673
+ # Create a new skill
674
+ /skill add my-custom-skill
675
+
676
+ # Remove a skill
677
+ /skill remove old-skill
678
+
679
+ # Edit existing skill
680
+ /skill edit error-handler
681
+
682
+ # Search for skills
683
+ /skill search typescript error
684
+
685
+ # Get detailed info
686
+ /skill info my-custom-skill
687
+
688
+ # Sync between scopes
689
+ /skill sync
690
+
691
+ # Run setup wizard
692
+ /skill setup
693
+
694
+ # Quick scan
695
+ /skill scan
696
+ ```
697
+
698
+ ## Usage Modes
699
+
700
+ ### Direct Command Mode
701
+
702
+ When invoked with an argument, skip the interactive wizard:
703
+
704
+ - `/skill list` - Show detailed skill inventory
705
+ - `/skill add` - Start skill creation (invoke learner)
706
+ - `/skill scan` - Scan both skill directories
707
+
708
+ ### Interactive Mode
709
+
710
+ When invoked without arguments, run the full guided wizard.
711
+
712
+ ---
713
+
714
+ ## Benefits of Local Skills
715
+
716
+ **Automatic Application**: Claude detects triggers and applies skills automatically - no need to remember or search for solutions.
717
+
718
+ **Version Control**: Project-level skills (.omx/skills/) are committed with your code, so the whole team benefits.
719
+
720
+ **Evolving Knowledge**: Skills improve over time as you discover better approaches and refine triggers.
721
+
722
+ **Reduced Token Usage**: Instead of re-solving the same problems, Claude applies known patterns efficiently.
723
+
724
+ **Codebase Memory**: Preserves institutional knowledge that would otherwise be lost in conversation history.
725
+
726
+ ---
727
+
728
+ ## Skill Quality Guidelines
729
+
730
+ Good skills are:
731
+
732
+ 1. **Non-Googleable** - Can't easily find via search
733
+ - BAD: "How to read files in TypeScript"
734
+ - GOOD: "This codebase uses custom path resolution requiring fileURLToPath"
735
+
736
+ 2. **Context-Specific** - References actual files/errors from THIS codebase
737
+ - BAD: "Use try/catch for error handling"
738
+ - GOOD: "The aiohttp proxy in server.py:42 crashes on ClientDisconnectedError"
739
+
740
+ 3. **Actionable with Precision** - Tells exactly WHAT to do and WHERE
741
+ - BAD: "Handle edge cases"
742
+ - GOOD: "When seeing 'Cannot find module' in dist/, check tsconfig.json moduleResolution"
743
+
744
+ 4. **Hard-Won** - Required significant debugging effort
745
+ - BAD: Generic programming patterns
746
+ - GOOD: "Race condition in worker.ts - Promise.all at line 89 needs await"
747
+
748
+ ---
749
+
750
+ ## Related Skills
751
+
752
+ - `/learner` - Extract a skill from current conversation
753
+ - `/note` - Save quick notes (less formal than skills)
754
+ - `/deepinit` - Generate AGENTS.md codebase hierarchy
755
+
756
+ ---
757
+
758
+ ## Example Session
759
+
760
+ ```
761
+ > /skill list
762
+
763
+ Checking skill directories...
764
+ ✓ User skills directory exists: ~/.claude/skills/omc-learned/
765
+ ✓ Project skills directory exists: .omx/skills/
766
+
767
+ Scanning for skills...
768
+
769
+ === USER-LEVEL SKILLS ===
770
+ Total skills: 3
771
+ - async-network-error-handling
772
+ Description: Pattern for handling independent I/O failures in async network code
773
+ Modified: 2026-01-20 14:32:15
774
+
775
+ - esm-path-resolution
776
+ Description: Custom path resolution in ESM requiring fileURLToPath
777
+ Modified: 2026-01-19 09:15:42
778
+
779
+ === PROJECT-LEVEL SKILLS ===
780
+ Total skills: 5
781
+ - session-timeout-fix
782
+ Description: Fix for sessionId undefined after restart in session.ts
783
+ Modified: 2026-01-22 16:45:23
784
+
785
+ - build-cache-invalidation
786
+ Description: When to clear TypeScript build cache to fix phantom errors
787
+ Modified: 2026-01-21 11:28:37
788
+
789
+ === SUMMARY ===
790
+ Total skills: 8
791
+
792
+ What would you like to do?
793
+ 1. Add new skill
794
+ 2. List all skills with details
795
+ 3. Scan conversation for patterns
796
+ 4. Import skill
797
+ 5. Done
798
+ ```
799
+
800
+ ---
801
+
802
+ ## Tips for Users
803
+
804
+ - Run `/skill list` periodically to review your skill library
805
+ - After solving a tricky bug, immediately run learner to capture it
806
+ - Use project-level skills for codebase-specific knowledge
807
+ - Use user-level skills for general patterns that apply everywhere
808
+ - Review and refine triggers over time to improve matching accuracy
809
+
810
+ ---
811
+
812
+ ## Implementation Notes
813
+
814
+ 1. **YAML Parsing:** Use frontmatter extraction for metadata
815
+ 2. **File Operations:** Use Read/Write tools, never Edit for new files
816
+ 3. **User Confirmation:** Always confirm destructive operations
817
+ 4. **Clear Feedback:** Use checkmarks (✓), crosses (✗), arrows (→) for clarity
818
+ 5. **Scope Resolution:** Always check both user and project scopes
819
+ 6. **Validation:** Enforce naming conventions (lowercase, hyphens only)
820
+
821
+ ---
822
+
823
+ ## Related Skills
824
+
825
+ - `/learner` - Extract a skill from current conversation
826
+ - `/note` - Save quick notes (less formal than skills)
827
+ - `/deepinit` - Generate AGENTS.md codebase hierarchy
828
+
829
+ ---
830
+
831
+ ## Future Enhancements
832
+
833
+ - `/skill export <name>` - Export skill as shareable file
834
+ - `/skill import <file>` - Import skill from file
835
+ - `/skill stats` - Show usage statistics across all skills
836
+ - `/skill validate` - Check all skills for format errors
837
+ - `/skill template <type>` - Create from predefined templates