·hook development
</>

hook development

anthropics/claude-plugins-official

當使用者要求「建立掛鉤」、「新增 PreToolUse/PostToolUse/Stop 掛鉤」、「驗證工具使用」、「實作基於提示的掛鉤」、「使用${CLAUDE_PLUGIN_ROOT}」、「設定事件驅動的自動化」、「阻止危險指令」或提及掛鉤事件(PreToolUse、PostToolUse、Stop、SubagentStop、SessionStart、SessionEnd、UserPromptSubmit、預壓縮、通知)。提供創建和實現 Claude Code 插件掛鉤的全面指導,重點是基於提示的高級掛鉤 API。

187安裝·7熱度·@anthropics

安裝

$npx skills add https://github.com/anthropics/claude-plugins-official --skill hook development

SKILL.md

Hooks are event-driven automation scripts that execute in response to Claude Code events. Use hooks to validate operations, enforce policies, add context, and integrate external tools into workflows.

Important: The examples below show the hook event structure that goes inside either format. For plugin hooks.json, wrap these in {"hooks": {...}}.

Execute before any tool runs. Use to approve, deny, or modify tool calls.

當使用者要求「建立掛鉤」、「新增 PreToolUse/PostToolUse/Stop 掛鉤」、「驗證工具使用」、「實作基於提示的掛鉤」、「使用${CLAUDE_PLUGIN_ROOT}」、「設定事件驅動的自動化」、「阻止危險指令」或提及掛鉤事件(PreToolUse、PostToolUse、Stop、SubagentStop、SessionStart、SessionEnd、UserPromptSubmit、預壓縮、通知)。提供創建和實現 Claude Code 插件掛鉤的全面指導,重點是基於提示的高級掛鉤 API。 來源:anthropics/claude-plugins-official。

查看原文

可引用資訊

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

安裝指令
npx skills add https://github.com/anthropics/claude-plugins-official --skill hook development
分類
</>開發工具
認證
收錄時間
2026-02-12
更新時間
2026-02-18

快速解答

什麼是 hook development?

當使用者要求「建立掛鉤」、「新增 PreToolUse/PostToolUse/Stop 掛鉤」、「驗證工具使用」、「實作基於提示的掛鉤」、「使用${CLAUDE_PLUGIN_ROOT}」、「設定事件驅動的自動化」、「阻止危險指令」或提及掛鉤事件(PreToolUse、PostToolUse、Stop、SubagentStop、SessionStart、SessionEnd、UserPromptSubmit、預壓縮、通知)。提供創建和實現 Claude Code 插件掛鉤的全面指導,重點是基於提示的高級掛鉤 API。 來源:anthropics/claude-plugins-official。

如何安裝 hook development?

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

這個 Skill 的原始碼在哪?

https://github.com/anthropics/claude-plugins-official