From bc498d7342eb52df18d8ab29448f89ba72c3d18a Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sat, 29 Nov 2025 18:19:14 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 12 ++++++++ README.md | 3 ++ hooks/hooks.json | 59 ++++++++++++++++++++++++++++++++++++++ plugin.lock.json | 45 +++++++++++++++++++++++++++++ 4 files changed, 119 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 hooks/hooks.json create mode 100644 plugin.lock.json diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..d4ad139 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,12 @@ +{ + "name": "hook-session-summary", + "description": "Track and summarize all files used during a Claude Code session", + "version": "1.1.1", + "author": { + "name": "Dev GOM", + "url": "https://github.com/Dev-GOM/claude-code-marketplace" + }, + "hooks": [ + "./hooks" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..425db17 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# hook-session-summary + +Track and summarize all files used during a Claude Code session diff --git a/hooks/hooks.json b/hooks/hooks.json new file mode 100644 index 0000000..3c8337a --- /dev/null +++ b/hooks/hooks.json @@ -0,0 +1,59 @@ +{ + "description": "Tracks all file operations during a Claude Code session and generates a summary report", + "version": "1.1.1", + "author": "Dev GOM", + "lastUpdated": "2025-10-20", + "hooks": { + "SessionStart": [ + { + "description": "Initialize plugin configuration at session start", + "priority": 100, + "enabled": true, + "hooks": [ + { + "type": "command", + "command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/init-config.js", + "description": "Creates default configuration file if it doesn't exist", + "timeout": 5000, + "continueOnError": true, + "suppressOutput": true + } + ] + } + ], + "PostToolUse": [ + { + "description": "Track file operations in real-time as they happen", + "matcher": "Write|Edit|Read|NotebookEdit", + "priority": 50, + "enabled": true, + "hooks": [ + { + "type": "command", + "command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/track-operation.js", + "description": "Records file operation to accumulated tracking file", + "timeout": 5000, + "continueOnError": true, + "suppressOutput": true + } + ] + } + ], + "Stop": [ + { + "description": "Generate session file operations summary when session ends", + "priority": 70, + "enabled": true, + "hooks": [ + { + "type": "command", + "command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/session-summary.js", + "description": "Reads accumulated file operations and generates directory tree visualization", + "timeout": 10000, + "continueOnError": true + } + ] + } + ] + } +} diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..78ca448 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,45 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:Dev-GOM/claude-code-marketplace:plugins/hook-session-summary", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "903ce55aef13d08273bbe5d096149affc9743185", + "treeHash": "c6319897e8a79e7a15a700b8d8a3141394e5510aac5581ed160784f9a001e9ad", + "generatedAt": "2025-11-28T10:10:16.046821Z", + "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": "hook-session-summary", + "description": "Track and summarize all files used during a Claude Code session", + "version": "1.1.1" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "f9e393cf56e5c8d2c3d041344da3bc1cfef7a7763ef5a6a95d031f3f79e95d7f" + }, + { + "path": "hooks/hooks.json", + "sha256": "4bd81daff822b6ba253ead12abe51064f2f941e4d26532c89f2a50cc1c520ced" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "7df9773a1581dd486af790fb6ce42af0ea0f150699f10a6b8cfe5279452f310f" + } + ], + "dirSha256": "c6319897e8a79e7a15a700b8d8a3141394e5510aac5581ed160784f9a001e9ad" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file