oh-my-claudecode-opencode 0.5.0 → 0.5.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.
- package/assets/skills/analyze-logs.md +119 -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
|