帮助用户编写、配置与优化 Hookify 规则及语法模式。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "hookify-rules" 技能: 1. 下载 https://raw.githubusercontent.com/affaan-m/ECC/main/skills/hookify-rules/SKILL.md 2. 保存为 ~/.claude/skills/hookify-rules/SKILL.md 3. 装好后重载技能,告诉我可以用了
请帮我为 Hookify 编写一条规则:当检测到 package.json 被修改时,自动提醒我运行依赖检查。请给出规则示例并解释每个字段。
一条可用的 Hookify 规则示例,并附带字段说明与使用建议。
我想配置 Hookify 规则,只在 src/**/*.ts 文件发生变更时触发。请根据 Hookify 语法给出正确写法,并说明通配模式如何匹配。
符合 Hookify 语法的匹配规则,以及对路径模式和触发条件的清晰说明。
这是我写的 Hookify 规则,请帮我检查为什么没有生效,指出语法问题并给出修正版本: [在此粘贴规则内容]
对现有规则的问题诊断、错误原因解释,以及修正后的完整规则。
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: rule-identifier
enabled: true
event: bash|file|stop|prompt|all
pattern: regex-pattern-here
---
Message to show Claude when this rule triggers.
Can include markdown formatting, warnings, suggestions, etc.
| 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) |
---
name: warn-env-api-keys
enabled: true
event: file
conditions:
- field: file_path
operator: regex_match
pattern: \.env$
- field: new_text
operator: contains
pattern: API_KEY
---
You're adding an API key to a .env file. Ensure this file is in .gitignore!
Condition fields by event:
commandfile_path, new_text, old_text, contentuser_promptOperators: regex_match, contains, equals, not_contains, starts_with, ends_with
All conditions must match for rule to trigger.
Match Bash command patterns:
rm\s+-rf, dd\s+if=, mkfssudo\s+, su\s+chmod\s+777Match Edit/Write/MultiEdit operations:
console\.log\(, debuggereval\(, innerHTML\s*=\.env$, credentials, \.pem$Completion checks and reminders. Pattern .* matches always.
Match user prompt content for workflow enforcement.
. to \., ( to \(\s whitespace, \d digit, \w word char+ one or more, * zero or more, ? optional| OR operatorlog matches "login", "dialog" — use console\.log\(rm -rf /tmp — use rm\s+-rf\\spython3 -c "import re; print(re.search(r'your_pattern', 'test text'))"
.claude/ directory in project root.claude/hookify.{descriptive-name}.local.md.claude/*.local.md to .gitignore/hookify [description] - Create new rules (auto-analyzes conversation if no args)/hookify-list - View all rules in table format/hookify-configure - Toggle rules on/off interactively/hookify-help - Full documentationMinimum viable rule:
---
name: my-rule
enabled: true
event: bash
pattern: dangerous_command
---
Warning message here
在本地审查应用上线准备度,快速发现生产环境风险与薄弱环节。
用于把现有可用功能改成新行为,并同步更新测试、实现与提交把关。
自动生成测试场景并分析代理执行过程,量化技能与规则遵循率。
提供 PyTorch 深度学习模式与最佳实践,帮助构建高效可复现的训练流程。
帮助你检索和更新 Jira 工单,分析需求并高效推进协作流程
帮助开发者在认证、输入处理、密钥和敏感功能开发中进行系统安全审查
帮助你编写 Hook 配置文件,以执行策略校验并自动化代理生命周期事件。
将当前对话中的可复用流程整理并保存为可反复调用的技能文件
扫描多项技能并提炼通用规则,自动追加、修订或新建规则文件。
分析并优化原始提示词,补全意图与缺口,生成可直接使用的高质量 prompt。
帮助用户创建或更新技能,扩展 Codex 的知识、流程与工具能力
用于创建、编辑与优化AI技能,并评测其效果与触发准确性。