Initial commit
This commit is contained in:
15
.claude-plugin/plugin.json
Normal file
15
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "conversation-saver",
|
||||||
|
"description": "Auto-save and search your Claude Code conversations",
|
||||||
|
"version": "0.0.0-2025.11.28",
|
||||||
|
"author": {
|
||||||
|
"name": "sirkitree",
|
||||||
|
"email": "zhongweili@tubi.tv"
|
||||||
|
},
|
||||||
|
"commands": [
|
||||||
|
"./commands"
|
||||||
|
],
|
||||||
|
"hooks": [
|
||||||
|
"./hooks"
|
||||||
|
]
|
||||||
|
}
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# conversation-saver
|
||||||
|
|
||||||
|
Auto-save and search your Claude Code conversations
|
||||||
9
commands/convo-list.md
Normal file
9
commands/convo-list.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
description: List all saved Claude Code conversations
|
||||||
|
---
|
||||||
|
|
||||||
|
List all saved conversations:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
${CLAUDE_PLUGIN_ROOT}/scripts/search-conversations.sh --list
|
||||||
|
```
|
||||||
9
commands/convo-recent.md
Normal file
9
commands/convo-recent.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
description: Show recent Claude Code conversations
|
||||||
|
---
|
||||||
|
|
||||||
|
Show the {{count:5}} most recent conversations:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
${CLAUDE_PLUGIN_ROOT}/scripts/search-conversations.sh --recent {{count}}
|
||||||
|
```
|
||||||
9
commands/convo-search.md
Normal file
9
commands/convo-search.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
description: Search through saved Claude Code conversations
|
||||||
|
---
|
||||||
|
|
||||||
|
Search for conversations containing: {{term}}
|
||||||
|
|
||||||
|
```bash
|
||||||
|
${CLAUDE_PLUGIN_ROOT}/scripts/search-conversations.sh "{{term}}" --context 5
|
||||||
|
```
|
||||||
37
hooks/stop.sh
Executable file
37
hooks/stop.sh
Executable file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Stop hook - saves conversation after each Claude response
|
||||||
|
# Calls the conversation-logger skill for actual save logic
|
||||||
|
|
||||||
|
# Read hook context from stdin
|
||||||
|
HOOK_DATA=$(cat)
|
||||||
|
|
||||||
|
# Extract session info from the hook data
|
||||||
|
TRANSCRIPT_PATH=$(echo "$HOOK_DATA" | jq -r '.transcript_path // empty' 2>/dev/null)
|
||||||
|
SESSION_ID=$(echo "$HOOK_DATA" | jq -r '.session_id // "unknown"' 2>/dev/null)
|
||||||
|
|
||||||
|
# Check if we have a valid transcript path
|
||||||
|
if [ -z "$TRANSCRIPT_PATH" ] || [ ! -f "$TRANSCRIPT_PATH" ]; then
|
||||||
|
echo "Warning: No valid transcript path found, skipping save" >&2
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Call the conversation-logger skill's save script
|
||||||
|
SKILL_SCRIPT="$HOME/.claude/skills/conversation-logger/scripts/save-conversation.sh"
|
||||||
|
|
||||||
|
if [ -f "$SKILL_SCRIPT" ]; then
|
||||||
|
# Skill is installed, use it
|
||||||
|
bash "$SKILL_SCRIPT" "$TRANSCRIPT_PATH" "$SESSION_ID"
|
||||||
|
else
|
||||||
|
# Skill not found, provide helpful message
|
||||||
|
echo "Warning: conversation-logger skill not found at $SKILL_SCRIPT" >&2
|
||||||
|
echo "Please install the skill: cd ~/.claude/skills && git clone https://github.com/sirkitree/conversation-logger.git" >&2
|
||||||
|
|
||||||
|
# Fall back to basic save (just copy the JSONL)
|
||||||
|
LOG_DIR="$HOME/.claude/conversation-logs"
|
||||||
|
mkdir -p "$LOG_DIR"
|
||||||
|
TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S")
|
||||||
|
cp "$TRANSCRIPT_PATH" "$LOG_DIR/conversation_$TIMESTAMP.jsonl"
|
||||||
|
echo "Conversation saved to: $LOG_DIR/conversation_$TIMESTAMP.jsonl" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
57
plugin.lock.json
Normal file
57
plugin.lock.json
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||||
|
"pluginId": "gh:sirkitree/claude-conversation-saver:.claude-plugin",
|
||||||
|
"normalized": {
|
||||||
|
"repo": null,
|
||||||
|
"ref": "refs/tags/v20251128.0",
|
||||||
|
"commit": "b1fb136789984790ea5d93e94dae25225dd37e66",
|
||||||
|
"treeHash": "c3b3704fd72600a2f5e898b5a34229bcdc77c5e7cf6f6b1a465f00395f01ff2e",
|
||||||
|
"generatedAt": "2025-11-28T10:28:21.761458Z",
|
||||||
|
"toolVersion": "publish_plugins.py@0.2.0"
|
||||||
|
},
|
||||||
|
"origin": {
|
||||||
|
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||||
|
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||||
|
},
|
||||||
|
"manifest": {
|
||||||
|
"name": "conversation-saver",
|
||||||
|
"description": "Auto-save and search your Claude Code conversations",
|
||||||
|
"version": null
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "README.md",
|
||||||
|
"sha256": "ad1ce77d67c21147eb04ebc96da0069948cdafa9dd82a090cc7432a1c1387da4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "hooks/stop.sh",
|
||||||
|
"sha256": "bcf4d428a4f2aaadd75ed1b621696e57ff76ab3bd88b2879c9aff0d04c89c206"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".claude-plugin/plugin.json",
|
||||||
|
"sha256": "c399f7aad026a0ab86107072ee60848b91a5db87a32db5ffb81f1c0ab34da325"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/convo-list.md",
|
||||||
|
"sha256": "daebdc98768d032958b3b88ea069825a3e3ae598193bcf7af1bec9fce683397b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/convo-search.md",
|
||||||
|
"sha256": "87d9817c849f073b9a33166c3358536fdd516c453a12e595c56e23d7ca2b27f4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/convo-recent.md",
|
||||||
|
"sha256": "3ba0f24fba8729cea51b698957064a16e7d65bdd0378aa85c43f4288b9120445"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dirSha256": "c3b3704fd72600a2f5e898b5a34229bcdc77c5e7cf6f6b1a465f00395f01ff2e"
|
||||||
|
},
|
||||||
|
"security": {
|
||||||
|
"scannedAt": null,
|
||||||
|
"scannerVersion": null,
|
||||||
|
"flags": []
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user