create-hook

Create and manage Claude Code automation hooks for predefined events.

1|1|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/hoanghd218/aws-kdp --skill create-hook-hoanghd218
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-hook
Source: https://github.com/hoanghd218/aws-kdp/tree/main/.claude/skills/create-hook
Command: npx skills add https://github.com/hoanghd218/aws-kdp --skill create-hook-hoanghd218

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates workflows by allowing Claude to trigger actions based on specific events, making Claude proactive rather than just reactive.

Core Features & Use Cases

  • Event-Driven Automation: Set up hooks to run automatically when certain events occur (e.g., before a tool runs, after a tool runs, when Claude stops responding).
  • Custom Actions: Define actions as either prompts for Claude to think through or as bash commands to execute.
  • Use Case: Automatically lint code after every file write, or remind the user to commit changes if many files are modified.

Quick Start

Guide the user through creating a new hook by asking about the trigger, action, and configuration.

Frequently Asked Questions about create-hook

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

FAQPage Schema
How do I automate Claude Code with custom triggers?

You can automate Claude Code by setting up custom hooks triggered by predefined events like PreToolUse, PostToolUse, or Stop, configuring either prompt-based or command-based actions.

What are Claude hooks and how do they work?

Claude hooks are event-driven automation triggers that execute custom actions, such as running bash commands or sending prompts, automatically before or after specific tool usage events.

Can I run a bash command automatically after a file write in Claude Code?

Yes, you can configure a PostToolUse hook with a command-based action and a file write matcher to automatically execute bash commands like linting after files are modified.

How do I persist Claude Code automation settings?

Claude Code hook configurations are persisted and managed directly within the .claude/settings.json file, ensuring your automation triggers remain active across sessions.

How do I filter Claude Code hooks to only trigger for specific tools?

You can use configurable matchers when creating your hooks to filter tool usage, ensuring the automation actions only execute when specific tools are invoked during your workflow.

What is the best way to remind users to commit changes after modifying multiple files?

Setting up a Stop hook with a prompt-based action allows Claude to proactively remind users to commit changes when many files have been modified during the session.