mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
feat(hooks): add 7 hook templates with full install pipeline and extended trigger types
Extend HookTriggerType from 5 to 12 official events (Notification, SubagentStart, SubagentStop, PreCompact, SessionEnd, PostToolUseFailure, PermissionRequest). Add templates: stop-notify, auto-format-on-write, auto-lint-on-write, block-sensitive-files, git-auto-stage, post-edit-index, session-end-summary across notification/automation/indexing categories. Fix install pipeline to use correct nested settings.json format with _templateId metadata for precise detection. Redesign templates UI as responsive card grid with per-template icons.
This commit is contained in:
@@ -7,7 +7,14 @@
|
||||
"UserPromptSubmit": "User Prompt Submit",
|
||||
"PreToolUse": "Pre Tool Use",
|
||||
"PostToolUse": "Post Tool Use",
|
||||
"Stop": "Stop"
|
||||
"Stop": "Stop",
|
||||
"Notification": "Notification",
|
||||
"SubagentStart": "Subagent Start",
|
||||
"SubagentStop": "Subagent Stop",
|
||||
"PreCompact": "Pre Compact",
|
||||
"SessionEnd": "Session End",
|
||||
"PostToolUseFailure": "Post Tool Use Failure",
|
||||
"PermissionRequest": "Permission Request"
|
||||
},
|
||||
"form": {
|
||||
"name": "Hook Name",
|
||||
@@ -77,6 +84,34 @@
|
||||
"session-state-watch": {
|
||||
"name": "Session State Watch",
|
||||
"description": "Watch for session metadata file changes (workflow-session.json)"
|
||||
},
|
||||
"stop-notify": {
|
||||
"name": "Stop Notify",
|
||||
"description": "Notify dashboard when Claude finishes responding"
|
||||
},
|
||||
"auto-format-on-write": {
|
||||
"name": "Auto Format on Write",
|
||||
"description": "Auto-format files after Claude writes or edits them"
|
||||
},
|
||||
"auto-lint-on-write": {
|
||||
"name": "Auto Lint on Write",
|
||||
"description": "Auto-lint files after Claude writes or edits them"
|
||||
},
|
||||
"block-sensitive-files": {
|
||||
"name": "Block Sensitive Files",
|
||||
"description": "Block modifications to sensitive files (.env, secrets, credentials)"
|
||||
},
|
||||
"git-auto-stage": {
|
||||
"name": "Git Auto Stage",
|
||||
"description": "Auto stage all modified files when Claude finishes responding"
|
||||
},
|
||||
"post-edit-index": {
|
||||
"name": "Post Edit Index",
|
||||
"description": "Notify indexing service when files are modified"
|
||||
},
|
||||
"session-end-summary": {
|
||||
"name": "Session End Summary",
|
||||
"description": "Send session summary to dashboard on session end"
|
||||
}
|
||||
},
|
||||
"actions": {
|
||||
|
||||
@@ -7,7 +7,14 @@
|
||||
"UserPromptSubmit": "用户提交提示",
|
||||
"PreToolUse": "工具使用前",
|
||||
"PostToolUse": "工具使用后",
|
||||
"Stop": "停止"
|
||||
"Stop": "停止",
|
||||
"Notification": "通知",
|
||||
"SubagentStart": "子代理启动",
|
||||
"SubagentStop": "子代理停止",
|
||||
"PreCompact": "压缩前",
|
||||
"SessionEnd": "会话结束",
|
||||
"PostToolUseFailure": "工具使用失败后",
|
||||
"PermissionRequest": "权限请求"
|
||||
},
|
||||
"form": {
|
||||
"name": "钩子名称",
|
||||
@@ -77,6 +84,34 @@
|
||||
"session-state-watch": {
|
||||
"name": "会话状态监控",
|
||||
"description": "监控会话元数据文件变更 (workflow-session.json)"
|
||||
},
|
||||
"stop-notify": {
|
||||
"name": "停止通知",
|
||||
"description": "Claude 完成响应时通知仪表盘"
|
||||
},
|
||||
"auto-format-on-write": {
|
||||
"name": "写入后自动格式化",
|
||||
"description": "Claude 写入或编辑文件后自动格式化"
|
||||
},
|
||||
"auto-lint-on-write": {
|
||||
"name": "写入后自动检查",
|
||||
"description": "Claude 写入或编辑文件后自动执行 lint 检查"
|
||||
},
|
||||
"block-sensitive-files": {
|
||||
"name": "阻止敏感文件修改",
|
||||
"description": "阻止修改敏感文件(.env、密钥、凭证)"
|
||||
},
|
||||
"git-auto-stage": {
|
||||
"name": "Git 自动暂存",
|
||||
"description": "Claude 完成响应时自动暂存所有已修改文件"
|
||||
},
|
||||
"post-edit-index": {
|
||||
"name": "编辑后索引",
|
||||
"description": "文件修改时通知索引服务"
|
||||
},
|
||||
"session-end-summary": {
|
||||
"name": "会话结束摘要",
|
||||
"description": "会话结束时发送摘要到仪表盘"
|
||||
}
|
||||
},
|
||||
"actions": {
|
||||
|
||||
Reference in New Issue
Block a user