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

View File

@@ -0,0 +1,12 @@
{
"name": "hook-git-auto-backup",
"description": "Automatically backup your work with git commits after each Claude session",
"version": "1.1.1",
"author": {
"name": "Dev GOM",
"url": "https://github.com/Dev-GOM/claude-code-marketplace"
},
"hooks": [
"./hooks"
]
}

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# hook-git-auto-backup
Automatically backup your work with git commits after each Claude session

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
}
]
}
]
}
}

45
plugin.lock.json Normal file
View File

@@ -0,0 +1,45 @@
{
"$schema": "internal://schemas/plugin.lock.v1.json",
"pluginId": "gh:Dev-GOM/claude-code-marketplace:plugins/hook-git-auto-backup",
"normalized": {
"repo": null,
"ref": "refs/tags/v20251128.0",
"commit": "ab71666564eabdabd805b03b55aeb4e1d2f129ba",
"treeHash": "e960597ada61bbcd5d1c41c1e3c77a16ccd992a4071d452354e57b1a4e4a0595",
"generatedAt": "2025-11-28T10:10:15.262532Z",
"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-git-auto-backup",
"description": "Automatically backup your work with git commits after each Claude session",
"version": "1.1.1"
},
"content": {
"files": [
{
"path": "README.md",
"sha256": "6428213a44e49a4ab2b7765531c0a5b77d5f2fe70e15786cb83575f8301909e6"
},
{
"path": "hooks/hooks.json",
"sha256": "20fadb30c292cc37e7db7ae26d5de1b7956278638e8cd0d5130a40b686b4bf20"
},
{
"path": ".claude-plugin/plugin.json",
"sha256": "25dec50d014aa05bc12327abac05836eb0bf7bf264794d0cf2ede261efb1efda"
}
],
"dirSha256": "e960597ada61bbcd5d1c41c1e3c77a16ccd992a4071d452354e57b1a4e4a0595"
},
"security": {
"scannedAt": null,
"scannerVersion": null,
"flags": []
}
}