Hook Development

作者: anthropic

基于提示和命令钩子的Claude Code插件事件驱动自动化,覆盖开发生命周期。支持9种钩子事件(PreToolUse、PostToolUse、Stop、SubagentStop、UserPromptSubmit、SessionStart、SessionEnd、PreCompact、Notification),用于验证、策略执行和工作流自动化。推荐使用基于提示的钩子进行上下文感知决策,使用命令钩子通过bash脚本进行确定性检查。提供两种配置格式:plugin hooks/hooks.json...

npx skills add https://github.com/anthropics/claude-code --skill 'Hook Development'