·create-hooks
</>

create-hooks

cfircoo/claude-code-toolkit

創建、配置和使用 Claude Code 掛鉤的專家指南。在使用掛鉤、設置事件偵聽器、驗證命令、自動化工作流程、添加通知或了解掛鉤類型(PreToolUse、PostToolUse、Stop、SessionStart、UserPromptSubmit 等)時使用。

6安裝·0熱度·@cfircoo

安裝

$npx skills add https://github.com/cfircoo/claude-code-toolkit --skill create-hooks

SKILL.md

Hooks are event-driven automation for Claude Code that execute shell commands or LLM prompts in response to tool usage, session events, and user interactions. This skill teaches you how to create, configure, and debug hooks for validating commands, automating workflows, injecting context, and implementing custom completion criteria.

Hooks provide programmatic control over Claude's behavior without modifying core code, enabling project-specific automation, safety checks, and workflow customization.

Hooks are shell commands or LLM-evaluated prompts that execute in response to Claude Code events. They operate within an event hierarchy: events (PreToolUse, PostToolUse, Stop, etc.) trigger matchers (tool patterns) which fire hooks (commands or prompts). Hooks can block actions, modify tool inputs, inject context, or simply observe and log Claude's operations.

創建、配置和使用 Claude Code 掛鉤的專家指南。在使用掛鉤、設置事件偵聽器、驗證命令、自動化工作流程、添加通知或了解掛鉤類型(PreToolUse、PostToolUse、Stop、SessionStart、UserPromptSubmit 等)時使用。 來源:cfircoo/claude-code-toolkit。

查看原文

可引用資訊

為搜尋與 AI 引用準備的穩定欄位與指令。

安裝指令
npx skills add https://github.com/cfircoo/claude-code-toolkit --skill create-hooks
分類
</>開發工具
認證
收錄時間
2026-02-01
更新時間
2026-02-18

快速解答

什麼是 create-hooks?

創建、配置和使用 Claude Code 掛鉤的專家指南。在使用掛鉤、設置事件偵聽器、驗證命令、自動化工作流程、添加通知或了解掛鉤類型(PreToolUse、PostToolUse、Stop、SessionStart、UserPromptSubmit 等)時使用。 來源:cfircoo/claude-code-toolkit。

如何安裝 create-hooks?

開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/cfircoo/claude-code-toolkit --skill create-hooks 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code 或 Cursor 中使用

這個 Skill 的原始碼在哪?

https://github.com/cfircoo/claude-code-toolkit