oh-my-claudecode-opencode 0.5.0 → 0.5.2
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/assets/skills/analyze-logs.md +119 -0
- package/assets/skills/update.md +80 -0
- package/package.json +1 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: analyze-logs
|
|
3
|
+
description: Analyze OpenCode logs to find and fix OMCO bugs
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Analyze Logs Skill
|
|
8
|
+
|
|
9
|
+
OpenCode 로그를 분석하여 OMCO 플러그인의 버그를 찾고 수정 방안을 제안합니다.
|
|
10
|
+
|
|
11
|
+
## Invocation
|
|
12
|
+
|
|
13
|
+
User says: "analyze logs", "check logs", "find bugs in logs", "/oh-my-claudecode:analyze-logs"
|
|
14
|
+
|
|
15
|
+
Arguments: $ARGUMENTS
|
|
16
|
+
|
|
17
|
+
## OpenCode Log Location
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
~/.local/share/opencode/log/
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Files are named by timestamp: `YYYY-MM-DDTHHMMSS.log`
|
|
24
|
+
|
|
25
|
+
## Log Format
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
LEVEL TIMESTAMP +XXms service=NAME key=value key=value...
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Levels: INFO, WARN, ERROR
|
|
32
|
+
|
|
33
|
+
## Workflow
|
|
34
|
+
|
|
35
|
+
### Step 1: Find Recent Log Files
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
ls -lt ~/.local/share/opencode/log/ | head -10
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Step 2: Search for OMCO-related Errors
|
|
42
|
+
|
|
43
|
+
Look for patterns:
|
|
44
|
+
- `oh-my-claudecode`
|
|
45
|
+
- `omco`
|
|
46
|
+
- Plugin loading errors
|
|
47
|
+
- Hook execution failures
|
|
48
|
+
- Agent spawn failures
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
grep -i "error.*omco\|error.*oh-my-claudecode\|plugin.*error" ~/.local/share/opencode/log/*.log | tail -50
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Step 3: Analyze Error Patterns
|
|
55
|
+
|
|
56
|
+
Common OMCO issues to look for:
|
|
57
|
+
|
|
58
|
+
| Pattern | Meaning | Fix Location |
|
|
59
|
+
|---------|---------|--------------|
|
|
60
|
+
| `plugin.*load.*error` | Plugin failed to load | Check `src/index.ts` exports |
|
|
61
|
+
| `hook.*error` | Hook threw exception | Check hook files in `src/hooks/` |
|
|
62
|
+
| `agent.*spawn.*fail` | Agent didn't start | Check agent definition in `assets/agents/` |
|
|
63
|
+
| `skill.*not found` | Skill missing | Check `assets/skills/` |
|
|
64
|
+
| `config.*invalid` | Bad configuration | Check `src/config/index.ts` |
|
|
65
|
+
|
|
66
|
+
### Step 4: Find OMCO Source Code
|
|
67
|
+
|
|
68
|
+
After identifying the error, locate the relevant source file:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Find files related to the error
|
|
72
|
+
grep -r "ERROR_MESSAGE_HERE" src/
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Step 5: Propose Fix
|
|
76
|
+
|
|
77
|
+
Based on the error analysis:
|
|
78
|
+
1. Read the relevant source file
|
|
79
|
+
2. Identify the bug
|
|
80
|
+
3. Propose a specific code fix
|
|
81
|
+
4. Optionally implement the fix with user permission
|
|
82
|
+
|
|
83
|
+
## Output Format
|
|
84
|
+
|
|
85
|
+
```markdown
|
|
86
|
+
## OMCO Log Analysis Report
|
|
87
|
+
|
|
88
|
+
### Summary
|
|
89
|
+
- Total errors found: X
|
|
90
|
+
- OMCO-related errors: Y
|
|
91
|
+
- Critical issues: Z
|
|
92
|
+
|
|
93
|
+
### Errors Found
|
|
94
|
+
|
|
95
|
+
#### Error 1: [Brief description]
|
|
96
|
+
- **Log entry**: `[timestamp] ERROR ...`
|
|
97
|
+
- **Source file**: `src/hooks/xxx.ts:123`
|
|
98
|
+
- **Root cause**: [Explanation]
|
|
99
|
+
- **Proposed fix**: [Code change or action]
|
|
100
|
+
|
|
101
|
+
### Recommendations
|
|
102
|
+
|
|
103
|
+
1. [Priority action]
|
|
104
|
+
2. [Secondary action]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Example Usage
|
|
108
|
+
|
|
109
|
+
User: "analyze logs"
|
|
110
|
+
→ Read latest log files
|
|
111
|
+
→ Filter OMCO-related errors
|
|
112
|
+
→ Correlate with source code
|
|
113
|
+
→ Propose fixes
|
|
114
|
+
|
|
115
|
+
User: "analyze logs --last 3"
|
|
116
|
+
→ Analyze last 3 log files
|
|
117
|
+
|
|
118
|
+
User: "analyze logs --error-only"
|
|
119
|
+
→ Only show ERROR level entries
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update
|
|
3
|
+
description: Check for OMCO updates and provide upgrade instructions
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Update Skill
|
|
8
|
+
|
|
9
|
+
OMCO 플러그인의 새 버전을 확인하고 업그레이드 방법을 안내합니다.
|
|
10
|
+
|
|
11
|
+
## Invocation
|
|
12
|
+
|
|
13
|
+
User says: "update", "check for updates", "upgrade omco", "/oh-my-claudecode:update"
|
|
14
|
+
|
|
15
|
+
## Workflow
|
|
16
|
+
|
|
17
|
+
### Step 1: Check Current Version
|
|
18
|
+
|
|
19
|
+
Read the installed version:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
cat ~/.config/opencode/node_modules/oh-my-claudecode-opencode/package.json | grep '"version"'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Step 2: Check Latest Version on npm
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm view oh-my-claudecode-opencode version
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Step 3: Compare Versions
|
|
32
|
+
|
|
33
|
+
If current < latest, show update instructions.
|
|
34
|
+
|
|
35
|
+
## Output Format
|
|
36
|
+
|
|
37
|
+
### Update Available
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
📦 OMCO Update Available
|
|
41
|
+
|
|
42
|
+
Current Version: X.X.X
|
|
43
|
+
Latest Version: Y.Y.Y
|
|
44
|
+
|
|
45
|
+
To update, run:
|
|
46
|
+
|
|
47
|
+
cd ~/.config/opencode && npm update oh-my-claudecode-opencode
|
|
48
|
+
|
|
49
|
+
Then restart OpenCode (Ctrl+C and reopen).
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Already Up to Date
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
✅ OMCO is up to date
|
|
56
|
+
|
|
57
|
+
Current Version: X.X.X
|
|
58
|
+
|
|
59
|
+
You're running the latest version.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Error Handling
|
|
63
|
+
|
|
64
|
+
If npm check fails (network error):
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
⚠️ Could not check for updates
|
|
68
|
+
|
|
69
|
+
Current Version: X.X.X
|
|
70
|
+
|
|
71
|
+
Manual check: npm view oh-my-claudecode-opencode version
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Example
|
|
75
|
+
|
|
76
|
+
User: "/update"
|
|
77
|
+
|
|
78
|
+
1. Read current version from installed package
|
|
79
|
+
2. Query npm for latest version
|
|
80
|
+
3. Compare and show result with upgrade instructions if needed
|