SKILL

hookify-rules

创建和配置 hookify 规则——带 YAML 前置元数据的 markdown 文件,通过正则或条件匹配 bash、文件、提示或停止事件,并向智能体显示警告/阻止消息。当创建 hookify 规则、编写 hook 规则语法、配置 hookify,或添加模式护栏(例如阻止危险命令、.env 编辑或调试代码)时使用。

机器翻译
查看英文原文

Create and configure hookify rules — markdown files with YAML frontmatter that match bash, file, prompt, or stop events by regex or conditions and show warn/block messages to the agent. Use when creating a hookify rule, writing hook rule syntax, configuring hookify, or adding pattern guardrails such as blocking dangerous commands, .env edits, or debug code.

适用对象:软件开发与测试。自动收录 · 待核查。

原作者说明节选

从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。

查看英文原文

原文涵盖的主题

  • Writing Hookify Rules
  • Overview
  • Rule File Format
  • Basic Structure
  • Frontmatter Fields
  • Advanced Format (Multiple Conditions)
  • Event Type Guide
  • bash Events

ECC evaluates project-local Hookify rules with its built-in Node runtime. No separate Hookify plugin or Python installation is required when ECC hooks are enabled. Hookify rules are markdown files with YAML frontmatter that define patterns to watch for and messages to show when those patterns match. Rules are stored in .claude/hookify.{rule-name}.local.md files. | Field | Required | Values | Description | |-------|----------|--------|-------------| | name | Yes | kebab-case string | Unique identifier (verb-first: warn-, block-, require-) | | enabled | Yes | true/false | Toggle without deleting | | event | Yes | bash/file/stop/prompt/all | Which hook event triggers this | | action | No | warn/block | warn (default) shows message; block prevents operation | | pattern | Yes | regex string | Pattern to match (or use conditions for complex rules) | Condition fields by event: bash: command file: filepath, newtext, oldtext, content prompt: userprompt Operators: regexmatch, contains, equals, notcontains, startswith, endswith All conditions must match for rule to trigger. Match Bash command patterns: Dangerous commands: rm\s+-rf, dd\s+if=, mkfs Privilege escalation: sudo\s+, su\s+ Permissio

这里只展示节选,请以完整原文和当前要求为准。

来源仓库
affaan-m/ECC
源文件
skills/hookify-rules/SKILL.md
固定版本
d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
阅读完整原作者说明 ↗

来源与内容状态

本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。

原作者:affaan-m/ECC · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T15:01:43.885Z。

分类由名称、说明与路径规则生成,分类不代表已核实适配。

许可与权利归属

MIT。第三方内容及版权归原作者,使用条件以原文为准。

许可原文 ↗

本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。

限制与注意事项

  • 元数据收录不代表本站已经安装、适配、实测或进行安全审查。