Skip to main content

hook-development

Canonical guide to authoring Claude Code hooks (prompt-based and command-based). PROACTIVELY activate for: (1) creating a hook, (2) adding a PreToolUse hook, (3) adding a PostToolUse hook, (4) validating tool use before execution, (5) implementing prompt-based hooks, (6) blocking dangerous commands, (7) setting up event-driven automation, (8) configuring hooks.json, (9) using ${CLAUDE_PLUGIN_ROOT} in hook commands for portability, (10) hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification), (11) hook matchers and filtering, (12) debugging hooks that do not fire. Provides: hooks.json schema, event/matcher reference, prompt-vs-command hook patterns, security guidance, validation script, and end-to-end working examples.

跳到安装

来源信息

仓库
deathrashed/agents
最近来源活动
2026年5月17日 07:20
检测到的 SKILL.md 语言
英语
星标
1
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。