hook-creator

Create plugin hooks for PreToolUse, PostToolUse, and session events.

6|1|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/shiiman/claude-code-plugins --skill hook-creator-shiiman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hook-creator
Source: https://github.com/shiiman/claude-code-plugins/tree/main/.claude/skills/hook-creator
Command: npx skills add https://github.com/shiiman/claude-code-plugins --skill hook-creator-shiiman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

この Skill は、プラグインに新しいフックを作成する手順を自動化します。イベントの選択、マッチャーの指定、フックファイルの作成・README 更新を統合します。

Core Features & Use Cases

  • イベントの選択: PreToolUse, PostToolUse などのイベントを定義。
  • マッチャーの設定: イベントごとに適切なツールマッチャーを指定。
  • フックファイルの作成と更新: hooks.json への追加・更新、README の反映。

Quick Start

対象プラグインとイベントを指定すると、フックを作成します。例: 'shiiman-common に PreToolUse フックを追加して'。

Frequently Asked Questions about hook-creator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create hooks for plugin events like PreToolUse and PostToolUse?

Create hooks by specifying your target plugin, selecting an event type (PreToolUse, PostToolUse, SessionStart, etc.), defining tool matchers, and providing the command to execute. The Skill generates and updates your hooks.json file and plugin README automatically.

What is the hooks.json format and why do plugins need it?

hooks.json is a structured file format that defines plugin hooks—code that runs before tool execution, after tool execution, or during session events. It enables plugins to automate workflows and integrate with external tools seamlessly.

Can I add multiple hooks to the same plugin?

Yes. You can create and update multiple hooks in a single plugin by repeating the process for different events and tool matchers. Each hook is added to the same hooks.json file and tracked in your README.

Do I need to manually edit hooks.json, or does the Skill handle it?

The Skill handles hooks.json creation and updates automatically. You specify the event, matchers, and command; the Skill constructs the JSON structure and updates your plugin's documentation.

What plugin events and matchers can I configure with hooks?

You can configure PreToolUse, PostToolUse, SessionStart, and related events. For each event, you define tool matchers to target specific tools and set the command to execute when conditions are met.

Is automation experience required to use plugin hooks?

No. The Skill guides you through event selection, matcher specification, and hook creation step by step. You provide the target plugin and desired command; the Skill enforces the correct hooks.json structure.