claude-session
Claude Code session management. Topics — id (current session UUID), list (enumerate sessions), search (keyword + result validation), import, summarize, analyze (stats), archive (move to ~/.claude/projects/.bak/ with flat naming), classify, clean-profanity (sanitize text in session JSONL), split (topic boundaries), compress (MCP-direct), destroy, dual-sync (Windows/WSL memory path mapping), install (hook), memory-trim (MEMORY.md index byte-budget trim), migrate (project to worktree), move (with cwd update), purge (dead sessions), rename (custom title), repair (chain/tool_result/UUID), url (web URL). Use when: "session id", "current session", "session list", "list sessions", "session search", "find session", "session classify", "session compress", "session migrate", "session move", "session repair", "chain repair", "session rename", "session split", "session purge", "dead session", "session url", "session analyze", "session import", "session summarize", "session archive", "archive session", "session clean", "clean profanity", "sanitize session", "redact session", "worktree session", "session cleanup", "memory trim", "MEMORY.md over budget", "dual sync", "WSL memory", "Windows memory path"
Rank
62
Safety
84
Downloads
2.2k
Updated
Oct 9, 2026
Version
0.8.2
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 2.2K downloads reported by the source. Last updated 10/9/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 9, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 9, 2026
- Adoption signal
- 2.2K downloadsadoption · observed Oct 9, 2026
- Latest release
- 0.8.2release · observed Aug 18, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s17ay1v6v88r2m102pvvc44gz183qcrm:claude-session- Install using `clawhub skill install s17ay1v6v88r2m102pvvc44gz183qcrm:claude-session` in an isolated environment before connecting it to live workloads.
- No published capability contract is available yet, so validate auth and request/response behavior manually.
- Review the upstream CLAWHUB listing at https://clawhub.ai/drumrobot/claude-session before using production credentials.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-claude-session/snapshot"
Documentation
CLAWHUB
159,332 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: claude-session
description: |
Claude Code session management. Topics — id (current session UUID), list (enumerate sessions), search (keyword + result validation), import, summarize, analyze (stats), archive (move to ~/.claude/projects/.bak/ with flat naming), classify, clean-profanity (sanitize text in session JSONL), split (topic boundaries), compress (MCP-direct), destroy, dual-sync (Windows/WSL memory path mapping), install (hook), memory-trim (MEMORY.md index byte-budget trim), migrate (project to worktree), move (with cwd update), purge (dead sessions), rename (custom title), repair (chain/tool_result/UUID), url (web URL). Use when: "session id", "current session", "session list", "list sessions", "session search", "find session", "session classify", "session compress", "session migrate", "session move", "session repair", "chain repair", "session rename", "session split", "session purge", "dead session", "session url", "session analyze", "session import", "session summarize", "session archive", "archive session", "session clean", "clean profanity", "sanitize session", "redact session", "worktree session", "session cleanup", "memory trim", "MEMORY.md over budget", "dual sync", "WSL memory", "Windows memory path"
metadata:
author: es6kr
version: "0.1.5"
depends-on:
- cleanup
- git-repo
---
# Session
Integrated skill for managing Claude Code sessions.
## Topic Dispatch
**When this skill is invoked with a topic specifier (e.g., `/claude-session id` or `Skill("claude-session", "id")`), load and follow only the matching topic file (`id.md`). Do not echo the Topics table or summarize other topics in the response.** The Topics table below is an index for invocations without a topic specifier — it is not user-facing output when a topic is named.
### HARD STOP — unknown topic word + extra args
**When the first token of args does NOT match any topic in the Topics table below, do NOT silently fall back to `rename` (or any other topic) by matching argument-count heuristics.**
The signature `<uuid> <text>` matches both `rename-session.sh <id> <title>` and several other session-content operations (`clean-profanity`, `repair`, `summarize`, etc.). Args alone are not enough to decide.
Decision procedure:
1. If args contain `<uuid>` followed by an **action verb / imperative phrase** (e.g., `<uuid> remove profanity`, `<uuid> remove X`, `<uuid> clean Y`, `<uuid> sanitize Z`), the user wants a session-content operation. Match against `clean-profanity`, `repair`, `summarize` by intent.
2. If args contain `<uuid>` followed by a **noun phrase / descriptive label** (e.g., `<uuid> "Auth refactor PR #42"`), the user likely wants `rename`.
3. If intent is unclear, invoke `AskUserQuestion` listing candidate topics — never default to `rename`.
| # | Don't | Do |
|---|-------|-----|
| 1 | Route `<uuid> remove profanity` to `rename` because the arg signature matches `rename-session.sh <id> <title>` | "remove profanity" reads as action verb → ro_meta.json
{
"ownerId": "kn74k8yfvftx6f062qa8fzyd8h8373jd",
"slug": "claude-session",
"version": "0.8.2",
"publishedAt": 1787018410904
}analyze.md
# Session Analyze
Analyzes Claude Code sessions to provide statistics, tool usage patterns, and optimization insights.
## Quick Start
```
/session analyze # analyze current session
/session analyze <session_id> # analyze specific session
/session analyze --sync # sync to Serena memory
```
## Instructions
### 1. Determine Target Session
If session ID is not provided:
- Extract current session ID from conversation context
- If unavailable, show recent session list and request selection
If session ID is provided:
- Use that session ID directly
### 2. Confirm Project Name
Derive project folder name from current working directory:
- Format: `-Users-username-path-to-project` (path with hyphens)
### 3. Call analyze_session API
Use the claude-sessions-mcp MCP tool:
```
mcp__claude-sessions-mcp__analyze_session({
project_name: "<project-folder-name>",
session_id: "<session-id>"
})
```
### 4. Output Results
Format analysis results in readable tables:
**Session Overview**
| Metric | Value |
|--------|-------|
| Duration | X minutes |
| Total Messages | N |
| User Messages | N |
| Assistant Messages | N |
**Tool Usage**
| Tool | Count | Errors |
|------|-------|--------|
| Bash | N | N |
| Read | N | N |
| ... | ... | ... |
**Files Changed**
- List of modified files
**Detected Patterns**
- Patterns such as high error rate, many snapshots
**Milestones**
- Key checkpoints in the session
### 5. Provide Insights
Suggestions based on analysis results:
- Optimization opportunities (e.g., reduce snapshots)
- Patterns to watch (e.g., high error rate tools)
- Session efficiency metrics
## Example Output
```
## Session Analysis: b06f2f1c
**Overview**
| Metric | Value |
|--------|-------|
| Duration | 10 min |
| Messages | 107 |
| Snapshots | 7 |
**Top Tools**
1. Bash: 13 calls (0 errors)
2. Read: 3 calls (0 errors)
3. Edit: 3 calls (0 errors)
**Files Changed**: 2 files
- ~/.claude/skills/git-repo/scripts/git-fix-worktree.sh
- ~/.claude/skills/git-repo/SKILL.md
**Insights**
- Session was efficient with no tool errors
- 7 snapshots could be compressed to save space
```
## Sync to Serena Memory (--sync)
When the `--sync` flag is provided:
### 1. Extract Project Knowledge
```
mcp__claude-sessions-mcp__extract_project_knowledge({
project_name: "<project-folder-name>"
})
```
### 2. Format as Markdown
```markdown
# Project Knowledge: {project-name}
Last updated: {timestamp}
## Hot Files
- path/to/file.ts - modification count: N
## Common Workflows
- Tool1 → Tool2 → Tool3 (frequency: N)
## Key Decisions
- Context: ... | Decision: ...
```
### 3. Save to Serena Memory
```
mcp__serena__write_memory({
memory_file_name: "project-knowledge-{safe-project-name}.md",
content: "<formatted-markdown>"
})
```
## Requirements
- claude-sessions-mcp MCP server required
- Session must exist in ~/.claude/projects/
- When using --sync: Serena MCP server must be active with the projectarchive.md
# Archive
Move a completed session out of an active project key to a long-term archive location under `~/.claude/projects/.bak/`, preserving the session's `.jsonl` and any associated metadata (custom-title, agent-name records that live inside the file itself).
**Convention parity**: archived sessions live in the **same `projects/.bak/` directory** as transient backups (clean-profanity / ralph-prompt-collapse output), but use the **flat naming** `<project-key>_<uuid>.jsonl` (vs. the timestamped `<uuid>.<timestamp>.jsonl` for transient backups). This keeps a single backup root and avoids splitting session storage across `.archive/` and `projects/.bak/`.
## When to Use
- Session work is finished, but the transcript should be kept (not purged)
- The active project listing is getting noisy (too many old completed sessions)
- A specific session needs to be quoted/referenced later but not auto-loaded by Claude Code
## When NOT to Use
| Situation | Use instead |
|-----------|-------------|
| Session is dead (no assistant response, < 10 lines) | `purge` — permanent deletion is appropriate |
| Active session, just want a custom title | `rename` — keeps it loadable |
| Moving between active projects (not archiving) | `move` |
| Generic file archive (not a session `.jsonl`) | general-purpose `/archive` skill (`.bak/` move) |
## Destination
`~/.claude/projects/.bak/<project-key>_<uuid>.jsonl`
- Under `.bak` (dotfile), so not picked up by Claude Code's session loader, but still readable via `Read` / `jq`
- Filename embeds the original project key as a prefix (e.g., `-Users-david-ghq-github-com-es6kr_a1b2c3d4-....jsonl`) so the source context is retrievable from filename alone — no subdirectory
- UUID portion preserved unchanged — URL references and chain links remain valid
## Procedure
### 1. Identify source
```bash
SESSION_ID="<uuid>"
SRC=$(find ~/.claude/projects -name "${SESSION_ID}.jsonl" -type f 2>/dev/null | head -1)
test -n "$SRC" || { echo "Session not found: $SESSION_ID"; exit 1; }
PROJECT_KEY=$(basename "$(dirname "$SRC")")
echo "Source: $SRC"
echo "Project: $PROJECT_KEY"
```
### 2. Verify session is archive-worthy
| Check | Command | Pass condition |
|-------|---------|----------------|
| File size > 0 | `[ -s "$SRC" ]` | Non-empty |
| Has assistant response | `jq -r 'select(.type=="assistant")' "$SRC" \| head -1` | Output non-empty |
| Not the current session | Compare `SESSION_ID` to `~/.claude/hooks/session-id-inject.sh` output | Must differ |
If the session is the **currently active** session (Claude Code has it open), the harness may rewrite the file at any moment. Defer archive until the user ends that session.
### 2.5. RAG dispatch — auto-supply when a receiver is available (abstract contract)
Archive moves the JSONL out of the active project, so post-archive recall depends on whatever external index the caller wants populated (semantic index, full-text store, summary cache, etc.). This skill stays **vendor-agnostic** — it onCHANGELOG.md
# Changelog ## [0.8.0](https://github.com/es6kr/skills/compare/claude-session-v0.7.1...claude-session-v0.8.0) (2026-08-16) ### Features * **claude-session:** add Antigravity (Gemini IDE) engine support to search/list ([19ecb7a](https://github.com/es6kr/skills/commit/19ecb7ac8b7d604e3c2af42ee31bc70d81eb824e)) * merge next-feat into main ([#313](https://github.com/es6kr/skills/issues/313)) ([2d9308a](https://github.com/es6kr/skills/commit/2d9308ab3e7e0086a88a7f64d3ed4d5c4d36e017)) ### Bug Fixes * **claude-session:** add language tag to Call-tool fences + sanitize personal path ([#251](https://github.com/es6kr/skills/issues/251)) ([acb48ea](https://github.com/es6kr/skills/commit/acb48eaee58263b587777f699fb25b601633c0b0)) * declare undeclared skill-to-skill dependencies (next, claude-session) ([#272](https://github.com/es6kr/skills/issues/272)) ([566d584](https://github.com/es6kr/skills/commit/566d584e41acc89f594b1d66dd712b2cfa4feed5)) ## [0.7.1](https://github.com/es6kr/skills/compare/claude-session-v0.7.0...claude-session-v0.7.1) (2026-08-05) ### Bug Fixes * promote next-fix staging (38 fixes across 16 skills) ([94f8c33](https://github.com/es6kr/skills/commit/94f8c33800ce411ae63e22c5259cdae8435508a4)) ## [0.7.0](https://github.com/es6kr/skills/compare/claude-session-v0.6.0...claude-session-v0.7.0) (2026-08-03) ### Features * **claude-session:** inject current model id in session-id-inject hook ([#175](https://github.com/es6kr/skills/issues/175)) ([1fc3a85](https://github.com/es6kr/skills/commit/1fc3a85dc0fd86a39cfd369f0a85619f5c43ecba)) * promote next-feat to main ([4fbe313](https://github.com/es6kr/skills/commit/4fbe31332c58bf24327d819cc9204ebda2d4afa8)) ## [0.6.0](https://github.com/es6kr/skills/compare/claude-session-v0.5.1...claude-session-v0.6.0) (2026-07-23) ### Features * **hook-kit:** add pre-tool AskUserQuestion context gate ([#123](https://github.com/es6kr/skills/issues/123)) ([271b5b3](https://github.com/es6kr/skills/commit/271b5b37df5e64cf3185b2c81c3d97b66789e9ab)) * **next-feat:** accumulate features for hook-kit context gate ([df4f73a](https://github.com/es6kr/skills/commit/df4f73ae4d27d4919105da70c6c94a14a32e8056)) ### Bug Fixes * **next-fix:** accumulate bug fixes for docxport, wip, fix-plan, and hook-kit ([6eec083](https://github.com/es6kr/skills/commit/6eec083b7fbc429bdabcfcc89d7778b185dd7497)) * skills body bundle — consolidate/fix/hook-kit refinements + English-clean guard hooks (Ralph-loop bypass) ([2e26f41](https://github.com/es6kr/skills/commit/2e26f412a5b963984898e13caaca186c3617ca08)) ## [0.5.1](https://github.com/es6kr/skills/compare/claude-session-v0.5.0...claude-session-v0.5.1) (2026-07-19) ### Bug Fixes * **claude-session,consolidate,next:** promote next-fix staging ([902cfa5](https://github.com/es6kr/skills/commit/902cfa57de68d9f5487425b524ffa4441f81f302)) * **claude-session:** declare depends-on utcp ([#121](https://github.com/es6kr/skills/issues/121)) ([377ea9c](https://github.com/es6kr/skil
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/drumrobot/skills/claude-session",
"sourceUrl": "https://clawhub.ai/drumrobot/skills/claude-session",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T17:38:55.725Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-claude-session/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-claude-session/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-09T17:38:55.725Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "2.2K downloads",
"href": "https://clawhub.ai/drumrobot/claude-session",
"sourceUrl": "https://clawhub.ai/drumrobot/claude-session",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T17:38:55.725Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "0.8.2",
"href": "https://clawhub.ai/drumrobot/claude-session",
"sourceUrl": "https://clawhub.ai/drumrobot/claude-session",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-18T02:00:10.904Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-claude-session/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-drumrobot-claude-session/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 0.8.2",
"description": "claude-session v0.8.2 - No file changes detected in this version. - Behavior and features remain consistent with the previous release.",
"href": "https://clawhub.ai/drumrobot/claude-session",
"sourceUrl": "https://clawhub.ai/drumrobot/claude-session",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-18T02:00:10.904Z",
"isPublic": true
}
]
}Record generated Oct 9, 2026.
