SKILL

Writing Hookify Rules

适用于创建或编写 hookify 规则、配置 hookify、添加规则,或需要 hookify 规则语法与模式指导的情形。

译文已校对
查看英文原文

This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.

适用对象:对象待分类。自动收录 · 待核查。

原作者说明节选

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

查看英文原文

原文涵盖的主题

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

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. name (required): Unique identifier for the rule Use kebab-case: warn-dangerous-rm, block-console-log Be descriptive and action-oriented Start with verb: warn, prevent, block, require, check enabled (required): Boolean to activate/deactivate true: Rule is active false: Rule is disabled (won't trigger) Can toggle without deleting rule event (required): Which hook event to trigger on bash: Bash tool commands file: Edit, Write, MultiEdit tools stop: When agent wants to stop prompt: When user submits a prompt all: All events action (optional): What to do when rule matches warn: Show message but allow operation (default) block: Prevent operation (PreToolUse) or stop session (Stop events) If omitted, defaults to warn pattern (simple format): Regex pattern to match Used for simple single-condition rules Matches against command (bash) or newtext (file) Python regex syntax Example: For complex rules with multiple conditions: Condition fields: field: Which field to check For bash: command For fi

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

来源仓库
davila7/claude-code-templates
源文件
cli-tool/components/skills/productivity/writing-rules/SKILL.md
固定版本
21be197f100a12b8d0dd9a211cc244c8179f84d3
阅读完整原作者说明 ↗

来源与内容状态

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

原作者:davila7/claude-code-templates · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T15:01:39.828Z。

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

许可与权利归属

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

许可原文 ↗

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

限制与注意事项

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