claude-session-skill 1.1.6 → 1.1.8
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 +10 -1
- package/SKILL.md +12 -0
- package/dist/mcp-server.js +527 -1261
- package/dist/session.js +49 -1
- package/lib/__tests__/format.test.ts +33 -0
- package/lib/__tests__/mcp-server.test.ts +63 -0
- package/lib/__tests__/mcp-tools.test.ts +989 -0
- package/lib/__tests__/search.test.ts +27 -14
- package/lib/create-server.ts +311 -0
- package/lib/format.ts +31 -1
- package/lib/search.ts +2 -2
- package/mcp-server.ts +2 -250
- package/package.json +1 -1
- package/session.ts +27 -0
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# claude-session-skill
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/claude-session-skill)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
3
6
|
A [Claude Code](https://docs.anthropic.com/en/docs/claude-code) skill for searching, browsing, and naming past sessions. Indexes all session history and generates AI summaries so you can find any session by keyword, project, or name.
|
|
4
7
|
|
|
5
8
|
This package ships two ways to use the same session index:
|
|
@@ -32,6 +35,7 @@ Claude Code discovers the skill automatically via `SKILL.md` triggers. Open any
|
|
|
32
35
|
/session show <id> # Show full session details (partial IDs work)
|
|
33
36
|
/session name <name> # Name the most recent session
|
|
34
37
|
/session name <id> <name> # Name a specific session by ID
|
|
38
|
+
/session autoname [<id>] # Generate title from summary + session start time
|
|
35
39
|
/session unname [<id>] # Clear a session's name
|
|
36
40
|
/session search <query> # Search by keyword
|
|
37
41
|
/session <query> # Shorthand for search
|
|
@@ -48,8 +52,12 @@ Session naming is handled via natural language — you never type or see session
|
|
|
48
52
|
| "Name this session `<name>`" | Names the most recent session |
|
|
49
53
|
| "Name the session where I did `<thing>`" | Claude searches, finds it, names it |
|
|
50
54
|
| After `/session list`: "name the second one `<name>`" | Claude uses the ID from the list output |
|
|
55
|
+
| "Name + summarize that one" | Claude runs `autoname` and creates a timestamped title |
|
|
51
56
|
| "Unname the `<name>` session" | Claude searches, finds it, clears the name |
|
|
52
57
|
|
|
58
|
+
When Claude auto-generates a title from the session summary, the title is prefixed with the
|
|
59
|
+
session start time in `dd/mm/yy HH:MM` format, for example `31/03/26 03:18 Infra fix`.
|
|
60
|
+
|
|
53
61
|
Names are 1–50 characters. Named sessions rank highest in search results. Clearing a name with `unname` preserves the AI summary.
|
|
54
62
|
|
|
55
63
|
## How it works
|
|
@@ -138,6 +146,7 @@ Or with the global install:
|
|
|
138
146
|
| `search_sessions` | `query: string` | Search by keyword or quoted phrase |
|
|
139
147
|
| `show_session` | `id: string` | Detailed view of a specific session |
|
|
140
148
|
| `name_session` | `id?: string, name: string` | Assign a memorable name to a session |
|
|
149
|
+
| `autoname_session` | `id?: string` | Generate a timestamped title from the session summary |
|
|
141
150
|
| `unname_session` | `id?: string` | Remove a session's name |
|
|
142
151
|
| `session_stats` | — | Statistics broken down by project |
|
|
143
152
|
|
|
@@ -151,7 +160,7 @@ bunx @modelcontextprotocol/inspector bun mcp-server.ts
|
|
|
151
160
|
|
|
152
161
|
```
|
|
153
162
|
session.ts # CLI entry point
|
|
154
|
-
mcp-server.ts # MCP server entry point (
|
|
163
|
+
mcp-server.ts # MCP server entry point (7 tools)
|
|
155
164
|
lib/
|
|
156
165
|
indexer.ts # Index builder, summarizer, name persistence
|
|
157
166
|
search.ts # Weighted keyword search
|
package/SKILL.md
CHANGED
|
@@ -26,6 +26,7 @@ triggers:
|
|
|
26
26
|
/session show <id> # Full details (supports partial IDs)
|
|
27
27
|
/session name <name> # Name the most recent session (by last activity)
|
|
28
28
|
/session name <id> <name> # Name a specific session by ID
|
|
29
|
+
/session autoname [<id>] # Generate title from summary + session start time
|
|
29
30
|
/session unname [<id>] # Clear a session's name
|
|
30
31
|
/session rebuild # Force rebuild the index
|
|
31
32
|
/session stats # Index statistics by project
|
|
@@ -51,6 +52,15 @@ Entry point: `bun run ~/.claude/skills/session/session.ts <command> [args]`
|
|
|
51
52
|
3. **Do NOT ask follow-up questions** after `list` or `search`. The output is self-contained.
|
|
52
53
|
4. **If the user references an already-shown list** (e.g., "the most recent", "the third one", "that one") — use the IDs already printed in the previous output. Do NOT re-run `list` or `show` unnecessarily.
|
|
53
54
|
|
|
55
|
+
### Name + summarize requests
|
|
56
|
+
|
|
57
|
+
If the user asks you to **"name + summarize"** a session, or otherwise wants a generated title based on the session itself:
|
|
58
|
+
|
|
59
|
+
1. Use `session.ts autoname [<id>]` instead of asking them for a manual title.
|
|
60
|
+
2. The generated session name MUST start with the session start timestamp in this exact format: `dd/mm/yy HH:MM`
|
|
61
|
+
3. The rest of the title should be a concise summary derived from the session's summary or first bullet.
|
|
62
|
+
4. Keep the final title within the existing 50-character limit.
|
|
63
|
+
|
|
54
64
|
### Naming Sessions
|
|
55
65
|
|
|
56
66
|
Users name sessions in natural language. They will NEVER type IDs. Your job is to resolve which session they mean.
|
|
@@ -62,10 +72,12 @@ Users name sessions in natural language. They will NEVER type IDs. Your job is t
|
|
|
62
72
|
3. **"Name my last session X"** — Run: `session.ts name "<name>"` (defaults to most recent by last activity)
|
|
63
73
|
4. **After `/session list`**, user says **"name the third one X"** — You already have the list output with IDs. Use the ID from the third entry.
|
|
64
74
|
5. **"Clear the name from X"** / **"Unname the clinic bot session"** — Search to find it, then run: `session.ts unname <id>`. Or `session.ts unname` to clear the most recent.
|
|
75
|
+
6. **"Name + summarize this session"** / **"Summarize and title that one"** — Run: `session.ts autoname` (or `session.ts autoname <id>` if the target session is already known)
|
|
65
76
|
|
|
66
77
|
**Key rules:**
|
|
67
78
|
- The user NEVER types or sees session IDs. You handle all ID resolution behind the scenes.
|
|
68
79
|
- Names are 1-50 characters. If the user gives something longer, ask them to shorten it.
|
|
80
|
+
- Auto-generated names for name+summarize requests MUST include the session start time prefix in `dd/mm/yy HH:MM` format.
|
|
69
81
|
- Named sessions show as `Name — summary` in list view and `Name: X` in detail view.
|
|
70
82
|
- Names are searchable — `/session search "Vault Reorg"` finds named sessions with highest relevance.
|
|
71
83
|
- Names can be cleared with `unname` — this removes the name but preserves the AI summary.
|