Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:19:10 +08:00
commit 194eac1a97
4 changed files with 101 additions and 0 deletions

41
hooks/hooks.json Normal file
View File

@@ -0,0 +1,41 @@
{
"description": "Automatically creates git commits after each Claude Code session to prevent work loss",
"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
}
]
}
],
"Stop": [
{
"description": "Auto-commit changes when session ends",
"priority": 100,
"enabled": true,
"hooks": [
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/backup.js",
"description": "Creates timestamped git commit with all changes",
"timeout": 10000,
"continueOnError": false
}
]
}
]
}
}