oh-my-claude-sisyphus 3.4.2 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -0
- package/commands/cancel-ultraqa.md +1 -1
- package/dist/__tests__/analytics/analytics-summary.test.d.ts +2 -0
- package/dist/__tests__/analytics/analytics-summary.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/analytics-summary.test.js +267 -0
- package/dist/__tests__/analytics/analytics-summary.test.js.map +1 -0
- package/dist/__tests__/analytics/backfill-dedup.test.d.ts +2 -0
- package/dist/__tests__/analytics/backfill-dedup.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/backfill-dedup.test.js +179 -0
- package/dist/__tests__/analytics/backfill-dedup.test.js.map +1 -0
- package/dist/__tests__/analytics/backfill-engine.test.d.ts +2 -0
- package/dist/__tests__/analytics/backfill-engine.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/backfill-engine.test.js +362 -0
- package/dist/__tests__/analytics/backfill-engine.test.js.map +1 -0
- package/dist/__tests__/analytics/cost-estimator.test.d.ts +2 -0
- package/dist/__tests__/analytics/cost-estimator.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/cost-estimator.test.js +212 -0
- package/dist/__tests__/analytics/cost-estimator.test.js.map +1 -0
- package/dist/__tests__/analytics/output-estimator.test.d.ts +2 -0
- package/dist/__tests__/analytics/output-estimator.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/output-estimator.test.js +106 -0
- package/dist/__tests__/analytics/output-estimator.test.js.map +1 -0
- package/dist/__tests__/analytics/token-extractor.test.d.ts +2 -0
- package/dist/__tests__/analytics/token-extractor.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/token-extractor.test.js +121 -0
- package/dist/__tests__/analytics/token-extractor.test.js.map +1 -0
- package/dist/__tests__/analytics/transcript-parser.test.d.ts +2 -0
- package/dist/__tests__/analytics/transcript-parser.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/transcript-parser.test.js +285 -0
- package/dist/__tests__/analytics/transcript-parser.test.js.map +1 -0
- package/dist/__tests__/analytics/transcript-scanner.test.d.ts +2 -0
- package/dist/__tests__/analytics/transcript-scanner.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/transcript-scanner.test.js +401 -0
- package/dist/__tests__/analytics/transcript-scanner.test.js.map +1 -0
- package/dist/__tests__/analytics/transcript-token-extractor.test.d.ts +2 -0
- package/dist/__tests__/analytics/transcript-token-extractor.test.d.ts.map +1 -0
- package/dist/__tests__/analytics/transcript-token-extractor.test.js +175 -0
- package/dist/__tests__/analytics/transcript-token-extractor.test.js.map +1 -0
- package/dist/__tests__/hud/auto-tracking.integration.test.d.ts +2 -0
- package/dist/__tests__/hud/auto-tracking.integration.test.d.ts.map +1 -0
- package/dist/__tests__/hud/auto-tracking.integration.test.js +12 -0
- package/dist/__tests__/hud/auto-tracking.integration.test.js.map +1 -0
- package/dist/__tests__/learner/auto-learner.test.d.ts +7 -0
- package/dist/__tests__/learner/auto-learner.test.d.ts.map +1 -0
- package/dist/__tests__/learner/auto-learner.test.js +507 -0
- package/dist/__tests__/learner/auto-learner.test.js.map +1 -0
- package/dist/__tests__/learner/matcher.test.d.ts +2 -0
- package/dist/__tests__/learner/matcher.test.d.ts.map +1 -0
- package/dist/__tests__/learner/matcher.test.js +330 -0
- package/dist/__tests__/learner/matcher.test.js.map +1 -0
- package/dist/analytics/analytics-summary.d.ts +47 -0
- package/dist/analytics/analytics-summary.d.ts.map +1 -0
- package/dist/analytics/analytics-summary.js +171 -0
- package/dist/analytics/analytics-summary.js.map +1 -0
- package/dist/analytics/backfill-dedup.d.ts +49 -0
- package/dist/analytics/backfill-dedup.d.ts.map +1 -0
- package/dist/analytics/backfill-dedup.js +115 -0
- package/dist/analytics/backfill-dedup.js.map +1 -0
- package/dist/analytics/backfill-engine.d.ts +59 -0
- package/dist/analytics/backfill-engine.d.ts.map +1 -0
- package/dist/analytics/backfill-engine.js +172 -0
- package/dist/analytics/backfill-engine.js.map +1 -0
- package/dist/analytics/index.d.ts +8 -0
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/index.js +10 -0
- package/dist/analytics/index.js.map +1 -1
- package/dist/analytics/output-estimator.d.ts +26 -0
- package/dist/analytics/output-estimator.d.ts.map +1 -0
- package/dist/analytics/output-estimator.js +61 -0
- package/dist/analytics/output-estimator.js.map +1 -0
- package/dist/analytics/query-engine.d.ts.map +1 -1
- package/dist/analytics/query-engine.js +3 -2
- package/dist/analytics/query-engine.js.map +1 -1
- package/dist/analytics/token-extractor.d.ts +31 -0
- package/dist/analytics/token-extractor.d.ts.map +1 -0
- package/dist/analytics/token-extractor.js +57 -0
- package/dist/analytics/token-extractor.js.map +1 -0
- package/dist/analytics/token-tracker.d.ts +7 -1
- package/dist/analytics/token-tracker.d.ts.map +1 -1
- package/dist/analytics/token-tracker.js +94 -18
- package/dist/analytics/token-tracker.js.map +1 -1
- package/dist/analytics/transcript-parser.d.ts +42 -0
- package/dist/analytics/transcript-parser.d.ts.map +1 -0
- package/dist/analytics/transcript-parser.js +90 -0
- package/dist/analytics/transcript-parser.js.map +1 -0
- package/dist/analytics/transcript-scanner.d.ts +50 -0
- package/dist/analytics/transcript-scanner.d.ts.map +1 -0
- package/dist/analytics/transcript-scanner.js +149 -0
- package/dist/analytics/transcript-scanner.js.map +1 -0
- package/dist/analytics/transcript-token-extractor.d.ts +35 -0
- package/dist/analytics/transcript-token-extractor.d.ts.map +1 -0
- package/dist/analytics/transcript-token-extractor.js +136 -0
- package/dist/analytics/transcript-token-extractor.js.map +1 -0
- package/dist/analytics/types.d.ts +65 -0
- package/dist/analytics/types.d.ts.map +1 -1
- package/dist/analytics/types.js.map +1 -1
- package/dist/cli/analytics.js +26 -1
- package/dist/cli/analytics.js.map +1 -1
- package/dist/cli/commands/backfill.d.ts +15 -0
- package/dist/cli/commands/backfill.d.ts.map +1 -0
- package/dist/cli/commands/backfill.js +146 -0
- package/dist/cli/commands/backfill.js.map +1 -0
- package/dist/cli/commands/stats.d.ts +1 -0
- package/dist/cli/commands/stats.d.ts.map +1 -1
- package/dist/cli/commands/stats.js +67 -31
- package/dist/cli/commands/stats.js.map +1 -1
- package/dist/cli/components/CostDashboard.d.ts +15 -0
- package/dist/cli/components/CostDashboard.d.ts.map +1 -0
- package/dist/cli/components/CostDashboard.js +15 -0
- package/dist/cli/components/CostDashboard.js.map +1 -0
- package/dist/cli/components/LiveStats.d.ts +16 -0
- package/dist/cli/components/LiveStats.d.ts.map +1 -0
- package/dist/cli/components/LiveStats.js +16 -0
- package/dist/cli/components/LiveStats.js.map +1 -0
- package/dist/cli/components/SessionBrowser.d.ts +14 -0
- package/dist/cli/components/SessionBrowser.d.ts.map +1 -0
- package/dist/cli/components/SessionBrowser.js +14 -0
- package/dist/cli/components/SessionBrowser.js.map +1 -0
- package/dist/cli/index.js +159 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/tui.d.ts +21 -0
- package/dist/cli/tui.d.ts.map +1 -0
- package/dist/cli/tui.js +21 -0
- package/dist/cli/tui.js.map +1 -0
- package/dist/hooks/learner/auto-invoke.d.ts +82 -0
- package/dist/hooks/learner/auto-invoke.d.ts.map +1 -0
- package/dist/hooks/learner/auto-invoke.js +234 -0
- package/dist/hooks/learner/auto-invoke.js.map +1 -0
- package/dist/hooks/learner/auto-learner.d.ts +55 -0
- package/dist/hooks/learner/auto-learner.d.ts.map +1 -0
- package/dist/hooks/learner/auto-learner.js +361 -0
- package/dist/hooks/learner/auto-learner.js.map +1 -0
- package/dist/hooks/learner/index.d.ts +3 -0
- package/dist/hooks/learner/index.d.ts.map +1 -1
- package/dist/hooks/learner/index.js +4 -0
- package/dist/hooks/learner/index.js.map +1 -1
- package/dist/hooks/learner/matcher.d.ts +40 -0
- package/dist/hooks/learner/matcher.d.ts.map +1 -0
- package/dist/hooks/learner/matcher.js +230 -0
- package/dist/hooks/learner/matcher.js.map +1 -0
- package/dist/hud/analytics-display.d.ts +16 -0
- package/dist/hud/analytics-display.d.ts.map +1 -1
- package/dist/hud/analytics-display.js +42 -0
- package/dist/hud/analytics-display.js.map +1 -1
- package/dist/hud/index.js +90 -3
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +27 -1
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/types.d.ts +2 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js.map +1 -1
- package/docs/ANALYTICS-SYSTEM.md +150 -0
- package/hooks/keyword-detector.sh +1 -1
- package/package.json +1 -1
- package/scripts/keyword-detector.mjs +1 -1
- package/scripts/persistent-mode.mjs +1 -1
- package/scripts/test-mutual-exclusion.ts +4 -4
- package/scripts/test-remember-tags.ts +6 -6
- package/scripts/test-session-injection.ts +4 -4
- package/skills/cancel-ultraqa/SKILL.md +1 -1
- package/skills/local-skills-setup/SKILL.md +465 -0
- package/skills/omc-setup/SKILL.md +30 -5
- package/skills/skill/SKILL.md +406 -0
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: local-skills-setup
|
|
3
|
+
description: Set up and manage local skills for automatic matching and invocation
|
|
4
|
+
argument-hint: "[list|add|scan]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Local Skills Setup
|
|
8
|
+
|
|
9
|
+
This skill provides a guided wizard for setting up and managing your local learned skills. Skills are reusable problem-solving patterns that Claude automatically applies when it detects matching triggers.
|
|
10
|
+
|
|
11
|
+
## Why Local Skills?
|
|
12
|
+
|
|
13
|
+
Local skills allow you to capture hard-won insights and solutions that are specific to your codebase or workflow:
|
|
14
|
+
- **Project-level skills** (.omc/skills/) - Version-controlled with your repo
|
|
15
|
+
- **User-level skills** (~/.claude/skills/omc-learned/) - Portable across all your projects
|
|
16
|
+
|
|
17
|
+
When you solve a tricky bug or discover a non-obvious workaround, you can extract it as a skill. Claude will automatically detect and apply these skills in future conversations when it sees matching triggers.
|
|
18
|
+
|
|
19
|
+
## Interactive Workflow
|
|
20
|
+
|
|
21
|
+
### Step 1: Directory Check and Setup
|
|
22
|
+
|
|
23
|
+
First, check if skill directories exist and create them if needed:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Check and create user-level skills directory
|
|
27
|
+
USER_SKILLS_DIR="$HOME/.claude/skills/omc-learned"
|
|
28
|
+
if [ -d "$USER_SKILLS_DIR" ]; then
|
|
29
|
+
echo "User skills directory exists: $USER_SKILLS_DIR"
|
|
30
|
+
else
|
|
31
|
+
mkdir -p "$USER_SKILLS_DIR"
|
|
32
|
+
echo "Created user skills directory: $USER_SKILLS_DIR"
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
# Check and create project-level skills directory
|
|
36
|
+
PROJECT_SKILLS_DIR=".omc/skills"
|
|
37
|
+
if [ -d "$PROJECT_SKILLS_DIR" ]; then
|
|
38
|
+
echo "Project skills directory exists: $PROJECT_SKILLS_DIR"
|
|
39
|
+
else
|
|
40
|
+
mkdir -p "$PROJECT_SKILLS_DIR"
|
|
41
|
+
echo "Created project skills directory: $PROJECT_SKILLS_DIR"
|
|
42
|
+
fi
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Step 2: Skill Scan and Inventory
|
|
46
|
+
|
|
47
|
+
Scan both directories and show a comprehensive inventory:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Scan user-level skills
|
|
51
|
+
echo "=== USER-LEVEL SKILLS (~/.claude/skills/omc-learned/) ==="
|
|
52
|
+
if [ -d "$HOME/.claude/skills/omc-learned" ]; then
|
|
53
|
+
USER_COUNT=$(find "$HOME/.claude/skills/omc-learned" -name "*.md" 2>/dev/null | wc -l)
|
|
54
|
+
echo "Total skills: $USER_COUNT"
|
|
55
|
+
|
|
56
|
+
if [ $USER_COUNT -gt 0 ]; then
|
|
57
|
+
echo ""
|
|
58
|
+
echo "Skills found:"
|
|
59
|
+
find "$HOME/.claude/skills/omc-learned" -name "*.md" -type f -exec sh -c '
|
|
60
|
+
FILE="$1"
|
|
61
|
+
NAME=$(grep -m1 "^name:" "$FILE" 2>/dev/null | sed "s/name: //")
|
|
62
|
+
DESC=$(grep -m1 "^description:" "$FILE" 2>/dev/null | sed "s/description: //")
|
|
63
|
+
MODIFIED=$(stat -c "%y" "$FILE" 2>/dev/null || stat -f "%Sm" "$FILE" 2>/dev/null)
|
|
64
|
+
echo " - $NAME"
|
|
65
|
+
[ -n "$DESC" ] && echo " Description: $DESC"
|
|
66
|
+
echo " Modified: $MODIFIED"
|
|
67
|
+
echo ""
|
|
68
|
+
' sh {} \;
|
|
69
|
+
fi
|
|
70
|
+
else
|
|
71
|
+
echo "Directory not found"
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
echo ""
|
|
75
|
+
echo "=== PROJECT-LEVEL SKILLS (.omc/skills/) ==="
|
|
76
|
+
if [ -d ".omc/skills" ]; then
|
|
77
|
+
PROJECT_COUNT=$(find ".omc/skills" -name "*.md" 2>/dev/null | wc -l)
|
|
78
|
+
echo "Total skills: $PROJECT_COUNT"
|
|
79
|
+
|
|
80
|
+
if [ $PROJECT_COUNT -gt 0 ]; then
|
|
81
|
+
echo ""
|
|
82
|
+
echo "Skills found:"
|
|
83
|
+
find ".omc/skills" -name "*.md" -type f -exec sh -c '
|
|
84
|
+
FILE="$1"
|
|
85
|
+
NAME=$(grep -m1 "^name:" "$FILE" 2>/dev/null | sed "s/name: //")
|
|
86
|
+
DESC=$(grep -m1 "^description:" "$FILE" 2>/dev/null | sed "s/description: //")
|
|
87
|
+
MODIFIED=$(stat -c "%y" "$FILE" 2>/dev/null || stat -f "%Sm" "$FILE" 2>/dev/null)
|
|
88
|
+
echo " - $NAME"
|
|
89
|
+
[ -n "$DESC" ] && echo " Description: $DESC"
|
|
90
|
+
echo " Modified: $MODIFIED"
|
|
91
|
+
echo ""
|
|
92
|
+
' sh {} \;
|
|
93
|
+
fi
|
|
94
|
+
else
|
|
95
|
+
echo "Directory not found"
|
|
96
|
+
fi
|
|
97
|
+
|
|
98
|
+
# Summary
|
|
99
|
+
TOTAL=$((USER_COUNT + PROJECT_COUNT))
|
|
100
|
+
echo "=== SUMMARY ==="
|
|
101
|
+
echo "Total skills across all directories: $TOTAL"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Step 3: Quick Actions Menu
|
|
105
|
+
|
|
106
|
+
After scanning, use the AskUserQuestion tool to offer these options:
|
|
107
|
+
|
|
108
|
+
**Question:** "What would you like to do with your local skills?"
|
|
109
|
+
|
|
110
|
+
**Options:**
|
|
111
|
+
1. **Add new skill** - Start the skill creation wizard
|
|
112
|
+
2. **List all skills with details** - Show comprehensive skill inventory with triggers
|
|
113
|
+
3. **Scan conversation for patterns** - Analyze current conversation for skill-worthy patterns
|
|
114
|
+
4. **Import skill** - Import a skill from URL or paste content
|
|
115
|
+
5. **Done** - Exit the wizard
|
|
116
|
+
|
|
117
|
+
#### Option 1: Add New Skill
|
|
118
|
+
|
|
119
|
+
If user chooses "Add new skill", invoke the learner skill:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
Use the Skill tool to invoke: learner
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
This will guide them through the extraction process with quality validation.
|
|
126
|
+
|
|
127
|
+
#### Option 2: List All Skills with Details
|
|
128
|
+
|
|
129
|
+
Show detailed information including trigger keywords:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
echo "=== DETAILED SKILL INVENTORY ==="
|
|
133
|
+
echo ""
|
|
134
|
+
|
|
135
|
+
# Function to show skill details
|
|
136
|
+
show_skill_details() {
|
|
137
|
+
FILE="$1"
|
|
138
|
+
LOCATION="$2"
|
|
139
|
+
|
|
140
|
+
echo "---"
|
|
141
|
+
echo "Location: $LOCATION"
|
|
142
|
+
echo "File: $(basename "$FILE")"
|
|
143
|
+
|
|
144
|
+
# Extract frontmatter
|
|
145
|
+
NAME=$(grep -m1 "^name:" "$FILE" 2>/dev/null | sed "s/name: //")
|
|
146
|
+
DESC=$(grep -m1 "^description:" "$FILE" 2>/dev/null | sed "s/description: //")
|
|
147
|
+
TRIGGERS=$(grep -m1 "^triggers:" "$FILE" 2>/dev/null | sed "s/triggers: //")
|
|
148
|
+
QUALITY=$(grep -m1 "^quality:" "$FILE" 2>/dev/null | sed "s/quality: //")
|
|
149
|
+
|
|
150
|
+
[ -n "$NAME" ] && echo "Name: $NAME"
|
|
151
|
+
[ -n "$DESC" ] && echo "Description: $DESC"
|
|
152
|
+
[ -n "$TRIGGERS" ] && echo "Triggers: $TRIGGERS"
|
|
153
|
+
[ -n "$QUALITY" ] && echo "Quality: $QUALITY"
|
|
154
|
+
|
|
155
|
+
# Last modified
|
|
156
|
+
MODIFIED=$(stat -c "%y" "$FILE" 2>/dev/null | cut -d. -f1 || stat -f "%Sm" "$FILE" 2>/dev/null)
|
|
157
|
+
echo "Last modified: $MODIFIED"
|
|
158
|
+
echo ""
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
# Export function for subshell
|
|
162
|
+
export -f show_skill_details
|
|
163
|
+
|
|
164
|
+
# Show user-level skills
|
|
165
|
+
if [ -d "$HOME/.claude/skills/omc-learned" ]; then
|
|
166
|
+
echo "USER-LEVEL SKILLS:"
|
|
167
|
+
find "$HOME/.claude/skills/omc-learned" -name "*.md" -type f -exec bash -c 'show_skill_details "$0" "user-level"' {} \;
|
|
168
|
+
fi
|
|
169
|
+
|
|
170
|
+
# Show project-level skills
|
|
171
|
+
if [ -d ".omc/skills" ]; then
|
|
172
|
+
echo "PROJECT-LEVEL SKILLS:"
|
|
173
|
+
find ".omc/skills" -name "*.md" -type f -exec bash -c 'show_skill_details "$0" "project-level"' {} \;
|
|
174
|
+
fi
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
#### Option 3: Scan Conversation for Patterns
|
|
178
|
+
|
|
179
|
+
Analyze the current conversation context to identify potential skill-worthy patterns. Look for:
|
|
180
|
+
- Recent debugging sessions with non-obvious solutions
|
|
181
|
+
- Tricky bugs that required investigation
|
|
182
|
+
- Codebase-specific workarounds discovered
|
|
183
|
+
- Error patterns that took time to resolve
|
|
184
|
+
|
|
185
|
+
Report findings and ask if user wants to extract any as skills.
|
|
186
|
+
|
|
187
|
+
#### Option 4: Import Skill
|
|
188
|
+
|
|
189
|
+
Ask user to provide either:
|
|
190
|
+
- **URL**: Download skill from a URL (e.g., GitHub gist)
|
|
191
|
+
- **Paste content**: Paste skill markdown content directly
|
|
192
|
+
|
|
193
|
+
Then ask for scope:
|
|
194
|
+
- **User-level** (~/.claude/skills/omc-learned/) - Available across all projects
|
|
195
|
+
- **Project-level** (.omc/skills/) - Only for this project
|
|
196
|
+
|
|
197
|
+
Validate the skill format and save to the chosen location.
|
|
198
|
+
|
|
199
|
+
### Step 4: Skill Templates
|
|
200
|
+
|
|
201
|
+
Provide quick templates for common skill types. When user wants to create a skill, offer these starting points:
|
|
202
|
+
|
|
203
|
+
#### Error Solution Template
|
|
204
|
+
|
|
205
|
+
```markdown
|
|
206
|
+
---
|
|
207
|
+
id: error-[unique-id]
|
|
208
|
+
name: [Error Name]
|
|
209
|
+
description: Solution for [specific error in specific context]
|
|
210
|
+
source: conversation
|
|
211
|
+
triggers: ["error message fragment", "file path", "symptom"]
|
|
212
|
+
quality: high
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
# [Error Name]
|
|
216
|
+
|
|
217
|
+
## The Insight
|
|
218
|
+
What is the underlying cause of this error? What principle did you discover?
|
|
219
|
+
|
|
220
|
+
## Why This Matters
|
|
221
|
+
What goes wrong if you don't know this? What symptom led here?
|
|
222
|
+
|
|
223
|
+
## Recognition Pattern
|
|
224
|
+
How do you know when this applies? What are the signs?
|
|
225
|
+
- Error message: "[exact error]"
|
|
226
|
+
- File: [specific file path]
|
|
227
|
+
- Context: [when does this occur]
|
|
228
|
+
|
|
229
|
+
## The Approach
|
|
230
|
+
Step-by-step solution:
|
|
231
|
+
1. [Specific action with file/line reference]
|
|
232
|
+
2. [Specific action with file/line reference]
|
|
233
|
+
3. [Verification step]
|
|
234
|
+
|
|
235
|
+
## Example
|
|
236
|
+
\`\`\`typescript
|
|
237
|
+
// Before (broken)
|
|
238
|
+
[problematic code]
|
|
239
|
+
|
|
240
|
+
// After (fixed)
|
|
241
|
+
[corrected code]
|
|
242
|
+
\`\`\`
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
#### Workflow Skill Template
|
|
246
|
+
|
|
247
|
+
```markdown
|
|
248
|
+
---
|
|
249
|
+
id: workflow-[unique-id]
|
|
250
|
+
name: [Workflow Name]
|
|
251
|
+
description: Process for [specific task in this codebase]
|
|
252
|
+
source: conversation
|
|
253
|
+
triggers: ["task description", "file pattern", "goal keyword"]
|
|
254
|
+
quality: high
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
# [Workflow Name]
|
|
258
|
+
|
|
259
|
+
## The Insight
|
|
260
|
+
What makes this workflow different from the obvious approach?
|
|
261
|
+
|
|
262
|
+
## Why This Matters
|
|
263
|
+
What fails if you don't follow this process?
|
|
264
|
+
|
|
265
|
+
## Recognition Pattern
|
|
266
|
+
When should you use this workflow?
|
|
267
|
+
- Task type: [specific task]
|
|
268
|
+
- Files involved: [specific patterns]
|
|
269
|
+
- Indicators: [how to recognize]
|
|
270
|
+
|
|
271
|
+
## The Approach
|
|
272
|
+
1. [Step with specific commands/files]
|
|
273
|
+
2. [Step with specific commands/files]
|
|
274
|
+
3. [Verification]
|
|
275
|
+
|
|
276
|
+
## Gotchas
|
|
277
|
+
- [Common mistake and how to avoid it]
|
|
278
|
+
- [Edge case and how to handle it]
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
#### Code Pattern Template
|
|
282
|
+
|
|
283
|
+
```markdown
|
|
284
|
+
---
|
|
285
|
+
id: pattern-[unique-id]
|
|
286
|
+
name: [Pattern Name]
|
|
287
|
+
description: Pattern for [specific use case in this codebase]
|
|
288
|
+
source: conversation
|
|
289
|
+
triggers: ["code pattern", "file type", "problem domain"]
|
|
290
|
+
quality: high
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
# [Pattern Name]
|
|
294
|
+
|
|
295
|
+
## The Insight
|
|
296
|
+
What's the key principle behind this pattern?
|
|
297
|
+
|
|
298
|
+
## Why This Matters
|
|
299
|
+
What problems does this pattern solve in THIS codebase?
|
|
300
|
+
|
|
301
|
+
## Recognition Pattern
|
|
302
|
+
When do you apply this pattern?
|
|
303
|
+
- File types: [specific files]
|
|
304
|
+
- Problem: [specific problem]
|
|
305
|
+
- Context: [codebase-specific context]
|
|
306
|
+
|
|
307
|
+
## The Approach
|
|
308
|
+
Decision-making heuristic, not just code:
|
|
309
|
+
1. [Principle-based step]
|
|
310
|
+
2. [Principle-based step]
|
|
311
|
+
|
|
312
|
+
## Example
|
|
313
|
+
\`\`\`typescript
|
|
314
|
+
[Illustrative example showing the principle]
|
|
315
|
+
\`\`\`
|
|
316
|
+
|
|
317
|
+
## Anti-Pattern
|
|
318
|
+
What NOT to do and why:
|
|
319
|
+
\`\`\`typescript
|
|
320
|
+
[Common mistake to avoid]
|
|
321
|
+
\`\`\`
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
#### Integration Skill Template
|
|
325
|
+
|
|
326
|
+
```markdown
|
|
327
|
+
---
|
|
328
|
+
id: integration-[unique-id]
|
|
329
|
+
name: [Integration Name]
|
|
330
|
+
description: How [system A] integrates with [system B] in this codebase
|
|
331
|
+
source: conversation
|
|
332
|
+
triggers: ["system name", "integration point", "config file"]
|
|
333
|
+
quality: high
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
# [Integration Name]
|
|
337
|
+
|
|
338
|
+
## The Insight
|
|
339
|
+
What's non-obvious about how these systems connect?
|
|
340
|
+
|
|
341
|
+
## Why This Matters
|
|
342
|
+
What breaks if you don't understand this integration?
|
|
343
|
+
|
|
344
|
+
## Recognition Pattern
|
|
345
|
+
When are you working with this integration?
|
|
346
|
+
- Files: [specific integration files]
|
|
347
|
+
- Config: [specific config locations]
|
|
348
|
+
- Symptoms: [what indicates integration issues]
|
|
349
|
+
|
|
350
|
+
## The Approach
|
|
351
|
+
How to work with this integration correctly:
|
|
352
|
+
1. [Configuration step with file paths]
|
|
353
|
+
2. [Setup step with specific details]
|
|
354
|
+
3. [Verification step]
|
|
355
|
+
|
|
356
|
+
## Gotchas
|
|
357
|
+
- [Integration-specific pitfall #1]
|
|
358
|
+
- [Integration-specific pitfall #2]
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
## Usage Modes
|
|
362
|
+
|
|
363
|
+
### Direct Command Mode
|
|
364
|
+
|
|
365
|
+
When invoked with an argument, skip the interactive wizard:
|
|
366
|
+
|
|
367
|
+
- `/oh-my-claudecode:local-skills-setup list` - Show detailed skill inventory
|
|
368
|
+
- `/oh-my-claudecode:local-skills-setup add` - Start skill creation (invoke learner)
|
|
369
|
+
- `/oh-my-claudecode:local-skills-setup scan` - Scan both skill directories
|
|
370
|
+
|
|
371
|
+
### Interactive Mode
|
|
372
|
+
|
|
373
|
+
When invoked without arguments, run the full guided wizard (Steps 1-4).
|
|
374
|
+
|
|
375
|
+
## Skill Quality Guidelines
|
|
376
|
+
|
|
377
|
+
Remind users that good skills are:
|
|
378
|
+
|
|
379
|
+
1. **Non-Googleable** - Can't easily find via search
|
|
380
|
+
- BAD: "How to read files in TypeScript" ❌
|
|
381
|
+
- GOOD: "This codebase uses custom path resolution requiring fileURLToPath" ✓
|
|
382
|
+
|
|
383
|
+
2. **Context-Specific** - References actual files/errors from THIS codebase
|
|
384
|
+
- BAD: "Use try/catch for error handling" ❌
|
|
385
|
+
- GOOD: "The aiohttp proxy in server.py:42 crashes on ClientDisconnectedError" ✓
|
|
386
|
+
|
|
387
|
+
3. **Actionable with Precision** - Tells exactly WHAT to do and WHERE
|
|
388
|
+
- BAD: "Handle edge cases" ❌
|
|
389
|
+
- GOOD: "When seeing 'Cannot find module' in dist/, check tsconfig.json moduleResolution" ✓
|
|
390
|
+
|
|
391
|
+
4. **Hard-Won** - Required significant debugging effort
|
|
392
|
+
- BAD: Generic programming patterns ❌
|
|
393
|
+
- GOOD: "Race condition in worker.ts - Promise.all at line 89 needs await" ✓
|
|
394
|
+
|
|
395
|
+
## Benefits of Local Skills
|
|
396
|
+
|
|
397
|
+
When introducing the skill system, explain these benefits:
|
|
398
|
+
|
|
399
|
+
**Automatic Application**: Claude detects triggers and applies skills automatically - no need to remember or search for solutions.
|
|
400
|
+
|
|
401
|
+
**Version Control**: Project-level skills (.omc/skills/) are committed with your code, so the whole team benefits.
|
|
402
|
+
|
|
403
|
+
**Evolving Knowledge**: Skills improve over time as you discover better approaches and refine triggers.
|
|
404
|
+
|
|
405
|
+
**Reduced Token Usage**: Instead of re-solving the same problems, Claude applies known patterns efficiently.
|
|
406
|
+
|
|
407
|
+
**Codebase Memory**: Preserves institutional knowledge that would otherwise be lost in conversation history.
|
|
408
|
+
|
|
409
|
+
## Related Skills
|
|
410
|
+
|
|
411
|
+
- `/oh-my-claudecode:learner` - Extract a skill from current conversation
|
|
412
|
+
- `/oh-my-claudecode:note` - Save quick notes (less formal than skills)
|
|
413
|
+
- `/oh-my-claudecode:deepinit` - Generate AGENTS.md codebase hierarchy
|
|
414
|
+
|
|
415
|
+
## Example Session
|
|
416
|
+
|
|
417
|
+
Show users what a typical session looks like:
|
|
418
|
+
|
|
419
|
+
```
|
|
420
|
+
> /oh-my-claudecode:local-skills-setup
|
|
421
|
+
|
|
422
|
+
Checking skill directories...
|
|
423
|
+
✓ User skills directory exists: ~/.claude/skills/omc-learned/
|
|
424
|
+
✓ Project skills directory exists: .omc/skills/
|
|
425
|
+
|
|
426
|
+
Scanning for skills...
|
|
427
|
+
|
|
428
|
+
=== USER-LEVEL SKILLS ===
|
|
429
|
+
Total skills: 3
|
|
430
|
+
- async-network-error-handling
|
|
431
|
+
Description: Pattern for handling independent I/O failures in async network code
|
|
432
|
+
Modified: 2026-01-20 14:32:15
|
|
433
|
+
|
|
434
|
+
- esm-path-resolution
|
|
435
|
+
Description: Custom path resolution in ESM requiring fileURLToPath
|
|
436
|
+
Modified: 2026-01-19 09:15:42
|
|
437
|
+
|
|
438
|
+
=== PROJECT-LEVEL SKILLS ===
|
|
439
|
+
Total skills: 5
|
|
440
|
+
- session-timeout-fix
|
|
441
|
+
Description: Fix for sessionId undefined after restart in session.ts
|
|
442
|
+
Modified: 2026-01-22 16:45:23
|
|
443
|
+
|
|
444
|
+
- build-cache-invalidation
|
|
445
|
+
Description: When to clear TypeScript build cache to fix phantom errors
|
|
446
|
+
Modified: 2026-01-21 11:28:37
|
|
447
|
+
|
|
448
|
+
=== SUMMARY ===
|
|
449
|
+
Total skills: 8
|
|
450
|
+
|
|
451
|
+
What would you like to do?
|
|
452
|
+
1. Add new skill
|
|
453
|
+
2. List all skills with details
|
|
454
|
+
3. Scan conversation for patterns
|
|
455
|
+
4. Import skill
|
|
456
|
+
5. Done
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
## Tips for Users
|
|
460
|
+
|
|
461
|
+
- Run `/oh-my-claudecode:local-skills-setup scan` periodically to review your skill library
|
|
462
|
+
- After solving a tricky bug, immediately run learner to capture it
|
|
463
|
+
- Use project-level skills for codebase-specific knowledge
|
|
464
|
+
- Use user-level skills for general patterns that apply everywhere
|
|
465
|
+
- Review and refine triggers over time to improve matching accuracy
|
|
@@ -266,13 +266,30 @@ echo "Default execution mode set to: USER_CHOICE"
|
|
|
266
266
|
|
|
267
267
|
**Note**: This preference ONLY affects generic keywords ("fast", "parallel"). Explicit keywords ("ulw", "eco") always override this preference.
|
|
268
268
|
|
|
269
|
-
## Step 4:
|
|
269
|
+
## Step 4: Install Analytics CLI Dependencies
|
|
270
|
+
|
|
271
|
+
The analytics CLI requires additional dependencies for beautiful output formatting.
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
# Check if we're in the oh-my-claudecode directory
|
|
275
|
+
if [ -f "package.json" ] && grep -q "oh-my-claude-sisyphus" package.json 2>/dev/null; then
|
|
276
|
+
echo "Installing analytics CLI dependencies..."
|
|
277
|
+
npm install --silent 2>&1 | grep -v "npm WARN" || echo "Dependencies installed"
|
|
278
|
+
echo "Analytics CLI ready: omc"
|
|
279
|
+
else
|
|
280
|
+
echo "Skipping analytics dependencies (not in oh-my-claudecode directory)"
|
|
281
|
+
fi
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**Note:** This step only runs when setup is executed from within the oh-my-claudecode project directory.
|
|
285
|
+
|
|
286
|
+
## Step 5: Verify Plugin Installation
|
|
270
287
|
|
|
271
288
|
```bash
|
|
272
289
|
grep -q "oh-my-claudecode" ~/.claude/settings.json && echo "Plugin verified" || echo "Plugin NOT found - run: claude /install-plugin oh-my-claudecode"
|
|
273
290
|
```
|
|
274
291
|
|
|
275
|
-
## Step
|
|
292
|
+
## Step 6: Offer MCP Server Configuration
|
|
276
293
|
|
|
277
294
|
MCP servers extend Claude Code with additional tools (web search, GitHub, etc.).
|
|
278
295
|
|
|
@@ -285,7 +302,7 @@ If yes, invoke the mcp-setup skill:
|
|
|
285
302
|
|
|
286
303
|
If no, skip to next step.
|
|
287
304
|
|
|
288
|
-
## Step
|
|
305
|
+
## Step 7: Detect Upgrade from 2.x
|
|
289
306
|
|
|
290
307
|
Check if user has existing configuration:
|
|
291
308
|
```bash
|
|
@@ -295,7 +312,7 @@ ls ~/.claude/commands/ralph-loop.md 2>/dev/null || ls ~/.claude/commands/ultrawo
|
|
|
295
312
|
|
|
296
313
|
If found, this is an upgrade from 2.x.
|
|
297
314
|
|
|
298
|
-
## Step
|
|
315
|
+
## Step 8: Show Welcome Message
|
|
299
316
|
|
|
300
317
|
### For New Users:
|
|
301
318
|
|
|
@@ -326,6 +343,10 @@ Combine them: "ralph ulw: migrate the database"
|
|
|
326
343
|
MCP SERVERS:
|
|
327
344
|
Run /oh-my-claudecode:mcp-setup to add tools like web search, GitHub, etc.
|
|
328
345
|
|
|
346
|
+
ANALYTICS CLI:
|
|
347
|
+
Track token usage and costs with: omc | omc stats | omc cost | omc sessions | omc agents
|
|
348
|
+
Run 'omc' alone to see everything (session stats, cost, agents, cache efficiency)
|
|
349
|
+
|
|
329
350
|
HUD STATUSLINE:
|
|
330
351
|
The status bar now shows OMC state. Restart Claude Code to see it.
|
|
331
352
|
|
|
@@ -356,13 +377,17 @@ MAGIC KEYWORDS (power-user shortcuts):
|
|
|
356
377
|
| eco | (new!) | "eco fix all errors" |
|
|
357
378
|
| plan | /planner | "plan the endpoints" |
|
|
358
379
|
|
|
380
|
+
ANALYTICS CLI:
|
|
381
|
+
Track token usage and costs with: omc | omc stats | omc cost | omc sessions | omc agents
|
|
382
|
+
Run 'omc' alone to see everything (session stats, cost, agents, cache efficiency)
|
|
383
|
+
|
|
359
384
|
HUD STATUSLINE:
|
|
360
385
|
The status bar now shows OMC state. Restart Claude Code to see it.
|
|
361
386
|
|
|
362
387
|
Your workflow won't break - it just got easier!
|
|
363
388
|
```
|
|
364
389
|
|
|
365
|
-
## Step
|
|
390
|
+
## Step 9: Ask About Starring Repository
|
|
366
391
|
|
|
367
392
|
First, check if `gh` CLI is available and authenticated:
|
|
368
393
|
|