hooks-automation
自动化 Claude Code Hooks
手动 hook 设置可能难以在 agents、sessions、Git 和 memory tools 之间协调。此 skill 为使用 Claude Flow 和 MCP workflows 进行 Claude Code hook 自动化提供结构化示例。
安装前请停下并请求确认。
请审查安装计划,并在更改文件前获得用户明确同意。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "hooks-automation" from https://skillstore.io/skills/dnyoussef-hooks-automation.md and its manifest at https://skillstore.io/api/skills/dnyoussef-hooks-automation/manifest. Verify the artifact. Stop and obtain explicit user consent before installing or changing files.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“hooks-automation”。 为一个小型 JavaScript 项目设置 hooks。
预期结果:
一个推荐的 hook 计划,包含 edit 验证、post-edit 格式化、测试触发器,以及关于安全参数处理的说明。
正在使用“hooks-automation”。 在重构期间协调三个 agents。
预期结果:
一个分阶段 workflow,使用 pre-task 准备、memory keys、post-task 摘要和 session 持久化。
正在使用“hooks-automation”。 排查超时的 hooks。
预期结果:
一份检查清单,涵盖 timeout settings、async hooks、command 性能、MCP 连接性和 debug logs。
安全审计
高风险Most static findings are false positives caused by Markdown code fences, inline command examples, and documentation-only shell snippets. The main security issue is that several hook configuration examples interpolate tool parameters into shell command strings, which can create command injection risk if copied directly.
已确认安全问题 (1)
能力复核项 (4)
这些是真实的本地能力,对此技能可能是预期行为,因此需要复核,但不会按已确认恶意行为计分。
风险因素
⚙️ 外部命令 (50)
📁 文件系统访问 (1)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/dnyoussef-hooks-automation/audits/11?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/dnyoussef-hooks-automation?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/dnyoussef-hooks-automation?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/dnyoussef-hooks-automation/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/dnyoussef-hooks-automation.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
DNYoussef. (2026). hooks-automation security audit report (audit version 11) [Author version unspecified]. Skillstore. https://skillstore.io/skills/dnyoussef-hooks-automation/audits/11BibTeX 引用
@techreport{dnyoussef-dnyoussef-hooks-automation-2026,
author = {DNYoussef},
title = {hooks-automation security audit report (audit version 11)},
institution = {Skillstore},
year = {2026},
number = {11},
url = {https://skillstore.io/skills/dnyoussef-hooks-automation/audits/11},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "hooks-automation security audit report (audit version 11)"
version: "unspecified"
type: report
authors:
- name: "DNYoussef"
date-released: "2026-07-09"
url: "https://skillstore.io/skills/dnyoussef-hooks-automation/audits/11"
identifiers:
- type: other
value: "skillstore:dnyoussef-hooks-automation:audit:11"
description: "Skillstore immutable audit report identifier"
比较变体
2 个可安装变体每位作者的技能都保持为独立的可安装项。推荐变体按 Skillstore 证据排序。
为什么此变体排名第一
Skillstore 评分
评分依据 证据置信度: 中你能构建什么
标准化团队 hook 设置
为格式化、验证和 session 跟踪创建共享的 Claude Code hook 配置。
协调多 agent workflows
使用 hook events 存储 task context、更新 agent state,并在 sessions 之间持久化决策。
添加 Git 质量门禁
将 pre-commit 和 pre-push 检查连接到验证、格式化、测试和报告 flows。
试试这些提示
使用 hooks-automation skill,为我的项目说明最简单且安全的 Claude Code hook 设置。
使用 hooks-automation,起草一个安全的 PreToolUse 和 PostToolUse 计划,用于验证和格式化已编辑文件。
使用 hooks-automation 设计一个 session-start 和 session-end workflow,用于保存摘要并恢复 context。
使用 hooks-automation 审查我拟定的 Claude Code hook 配置,并识别命令注入或 secret logging 风险。
最佳实践
- 在共享 repository 中启用每个 hook command 前都要进行审查。
- 使用 wrapper scripts 或结构化输入,而不是直接 shell interpolation。
- 保持 hooks 快速、可观测,并限制在所需的最小自动化范围内。
避免
- 不要在没有转义和验证的情况下,将 shell interpolation 示例复制到生产环境。
- 默认情况下不要记录 secrets、environment file contents 或完整 command output。
- 当 asynchronous hooks 可行时,不要让繁重检查阻塞每一次 tool call。