cc-query 0.4.0 → 0.4.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/README.md +48 -16
- package/bin/cc-query +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,24 @@ SQL REPL for querying Claude Code session data using DuckDB.
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
+
### As a Claude Code Plugin
|
|
8
|
+
|
|
9
|
+
1. Add the marketplace:
|
|
10
|
+
```
|
|
11
|
+
/plugin marketplace add dannycoates/cc-query
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
2. Install the plugin:
|
|
15
|
+
```
|
|
16
|
+
/plugin install cc-query@dannycoates-cc-query
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The plugin automatically runs `npm install` on first session start.
|
|
20
|
+
|
|
21
|
+
### Manual Installation
|
|
22
|
+
|
|
23
|
+
For use outside of Claude Code
|
|
24
|
+
|
|
7
25
|
```bash
|
|
8
26
|
npm install -g cc-query
|
|
9
27
|
```
|
|
@@ -31,7 +49,12 @@ echo "SELECT count(*) FROM messages;" | cc-query .
|
|
|
31
49
|
- `messages` - All messages with parsed fields
|
|
32
50
|
- `user_messages` - User messages only
|
|
33
51
|
- `assistant_messages` - Assistant responses only
|
|
34
|
-
- `
|
|
52
|
+
- `human_messages` - Human-typed messages (no tool results)
|
|
53
|
+
- `tool_uses` - Tool invocations from assistant messages
|
|
54
|
+
- `tool_results` - Tool results with duration and error status
|
|
55
|
+
- `token_usage` - Token consumption per message
|
|
56
|
+
- `bash_commands` - Bash command details
|
|
57
|
+
- `file_operations` - File read/write/edit operations
|
|
35
58
|
- `raw_messages` - Unparsed JSONL data
|
|
36
59
|
|
|
37
60
|
## REPL Commands
|
|
@@ -40,27 +63,36 @@ echo "SELECT count(*) FROM messages;" | cc-query .
|
|
|
40
63
|
- `.schema` - Show table schema
|
|
41
64
|
- `.quit` - Exit
|
|
42
65
|
|
|
43
|
-
##
|
|
66
|
+
## Skills
|
|
44
67
|
|
|
45
|
-
|
|
68
|
+
The plugin includes two skills for session analysis:
|
|
46
69
|
|
|
47
|
-
|
|
70
|
+
### `/reflect`
|
|
48
71
|
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
|
|
72
|
+
Query and analyze Claude Code session history. Use for:
|
|
73
|
+
- Token usage analysis
|
|
74
|
+
- Tool patterns across projects
|
|
75
|
+
- Finding user corrections/preferences
|
|
76
|
+
- Weekly summaries
|
|
77
|
+
|
|
78
|
+
See [skills/reflect/SKILL.md](skills/reflect/SKILL.md) for query reference.
|
|
79
|
+
|
|
80
|
+
### `/handoff`
|
|
55
81
|
|
|
56
|
-
|
|
82
|
+
Create detailed handoff documents for work continuation. Produces:
|
|
83
|
+
- Task status and progress
|
|
84
|
+
- Files modified with change summaries
|
|
85
|
+
- Key conversation flow
|
|
86
|
+
- Actionable next steps
|
|
57
87
|
|
|
58
|
-
|
|
88
|
+
See [skills/handoff/SKILL.md](skills/handoff/SKILL.md) for output format.
|
|
59
89
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
90
|
+
### Example Questions
|
|
91
|
+
|
|
92
|
+
- Across all projects what bash commands return the most errors?
|
|
93
|
+
- Let's analyze the last session and identify how we might improve the CLAUDE.md file
|
|
94
|
+
- Give me a summary of what we worked on this past week
|
|
95
|
+
- Create a handoff document for this session
|
|
64
96
|
|
|
65
97
|
## License
|
|
66
98
|
|
package/bin/cc-query
ADDED