@chigichan24/crune 0.1.3 → 0.1.4
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 +34 -3
- package/dist-cli/cli.js +6 -4
- package/dist-cli/skill-synthesizer.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
<img src="public/favicon.svg" alt="crune logo" width="80" height="80" />
|
|
3
3
|
<h1>crune</h1>
|
|
4
4
|
<p><strong>Claude Code Rune — Traces linger, skills emerge</strong></p>
|
|
5
|
+
<p>
|
|
6
|
+
<a href="https://www.npmjs.com/package/@chigichan24/crune"><img src="https://img.shields.io/npm/v/@chigichan24/crune.svg" alt="npm version" /></a>
|
|
7
|
+
<a href="https://www.npmjs.com/package/@chigichan24/crune"><img src="https://img.shields.io/npm/dm/@chigichan24/crune.svg" alt="npm downloads" /></a>
|
|
8
|
+
<a href="https://github.com/chigichan24/crune/blob/main/LICENSE"><img src="https://img.shields.io/github/license/chigichan24/crune.svg" alt="license" /></a>
|
|
9
|
+
</p>
|
|
5
10
|
</div>
|
|
6
11
|
|
|
7
|
-
Decipher the traces etched in past sessions and resurrect them as reusable skills. crune is a static web dashboard that analyzes Claude Code session logs, providing session playback, analytics, a semantic knowledge graph, and skill synthesis.
|
|
12
|
+
Decipher the traces etched in past sessions and resurrect them as reusable skills. crune is a static web dashboard and CLI tool that analyzes Claude Code session logs, providing session playback, analytics, a semantic knowledge graph, and skill synthesis.
|
|
8
13
|
|
|
9
14
|
## Features
|
|
10
15
|
|
|
@@ -27,7 +32,31 @@ Decipher the traces etched in past sessions and resurrect them as reusable skill
|
|
|
27
32
|
|
|
28
33
|
<img src="docs/rune.png" alt="Knowledge Graph" width="800" />
|
|
29
34
|
|
|
30
|
-
##
|
|
35
|
+
## CLI — Generate Skills via npx
|
|
36
|
+
|
|
37
|
+
Generate reusable Claude Code skill definitions directly from your session logs. No clone required.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx @chigichan24/crune --dry-run # Preview skill candidates
|
|
41
|
+
npx @chigichan24/crune --skip-synthesis # Generate heuristic skills (no LLM)
|
|
42
|
+
npx @chigichan24/crune --count 3 --model haiku # LLM-synthesized skills (requires claude CLI)
|
|
43
|
+
npx @chigichan24/crune --output-dir ~/.claude/skills # Install skills directly
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Output follows the [Claude Code skill format](https://docs.anthropic.com/en/docs/claude-code/skills) (`<name>/SKILL.md`), ready to use as `/skill-name` commands.
|
|
47
|
+
|
|
48
|
+
| Flag | Description |
|
|
49
|
+
|------|-------------|
|
|
50
|
+
| `--sessions-dir <path>` | Session logs directory (default: `~/.claude/projects`) |
|
|
51
|
+
| `--output-dir <path>` | Output directory for skill files (default: `./skills`) |
|
|
52
|
+
| `--count <n>` | Number of skills to generate (default: 5) |
|
|
53
|
+
| `--model <model>` | Claude model for synthesis (e.g. `haiku`, `sonnet`) |
|
|
54
|
+
| `--skip-synthesis` | Skip LLM synthesis, output heuristic skills only |
|
|
55
|
+
| `--dry-run` | Show candidates without writing files |
|
|
56
|
+
|
|
57
|
+
## Web Dashboard
|
|
58
|
+
|
|
59
|
+
### Quick Start
|
|
31
60
|
|
|
32
61
|
```bash
|
|
33
62
|
npm install
|
|
@@ -136,7 +165,9 @@ src/
|
|
|
136
165
|
hooks/ # Data fetching (useSessionIndex, useSessionDetail, useSessionOverview)
|
|
137
166
|
types/ # TypeScript type definitions
|
|
138
167
|
scripts/
|
|
139
|
-
|
|
168
|
+
cli.ts # npx CLI entry point
|
|
169
|
+
session-parser.ts # JSONL parsing, turn building, metadata extraction
|
|
170
|
+
analyze-sessions.ts # Dashboard JSON pipeline
|
|
140
171
|
session-summarizer.ts # Session summarization (local NLP)
|
|
141
172
|
skill-synthesizer.ts # Skill synthesis (claude -p)
|
|
142
173
|
skill-server.ts # Synthesis HTTP server
|
package/dist-cli/cli.js
CHANGED
|
@@ -203,7 +203,9 @@ function extractSkillName(markdown, fallbackLabel) {
|
|
|
203
203
|
.slice(0, 40);
|
|
204
204
|
}
|
|
205
205
|
// ─── Entry point ───────────────────────────────────────────────────
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
206
|
+
if (!process.env.VITEST) {
|
|
207
|
+
main().catch((err) => {
|
|
208
|
+
console.error("Fatal error:", err);
|
|
209
|
+
process.exit(1);
|
|
210
|
+
});
|
|
211
|
+
}
|
|
@@ -136,9 +136,9 @@ export function buildSynthesisPrompt(body) {
|
|
|
136
136
|
return parts.join("\n\n");
|
|
137
137
|
}
|
|
138
138
|
export function synthesizeWithClaude(prompt, options = {}) {
|
|
139
|
-
const timeoutMs = options.timeoutMs ??
|
|
139
|
+
const timeoutMs = options.timeoutMs ?? 300_000;
|
|
140
140
|
return new Promise((resolve) => {
|
|
141
|
-
const args = ["-p", "--output-format", "text"];
|
|
141
|
+
const args = ["-p", "--output-format", "text", "--permission-mode", "acceptEdits"];
|
|
142
142
|
if (options.model) {
|
|
143
143
|
args.push("--model", options.model);
|
|
144
144
|
}
|