hook-creator

Create custom lifecycle hooks for Claude Code with event triggers and shell commands.

Updated Feb 1, 2026
One-click install
npx skills add https://github.com/sabyunrepo/IaaS --skill hook-creator-sabyunrepo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hook-creator
Source: https://github.com/sabyunrepo/IaaS/tree/main/.claude/skills/hook-creator
Command: npx skills add https://github.com/sabyunrepo/IaaS --skill hook-creator-sabyunrepo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the creation and management of custom automation hooks for Claude Code, enabling seamless integration of custom logic into the AI's workflow.

Core Features & Use Cases

  • Hook Creation: Define custom shell commands that execute automatically at specific points in the Claude Code lifecycle (e.g., before tool use, after session start).
  • Event Management: Understand and leverage various hook events like SessionStart, PreToolUse, PostToolUse, and Stop.
  • Use Case: Automatically protect sensitive production files by creating a PreToolUse hook that blocks any Edit or Write operations on files like .env.production.

Quick Start

Create a new hook for Claude Code by defining its event, matcher, and command.

Frequently Asked Questions about hook-creator

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

FAQPage Schema
How do I automate shell commands before or after tool usage in Claude Code?

To automate shell commands before or after tool usage in Claude Code, you create lifecycle hooks. This Skill generates custom hook configurations that trigger predefined shell commands automatically during specific session events or tool operations.

Can I protect sensitive production files like .env.production from edits in Claude Code?

You can protect sensitive production files like .env.production by setting up a PreToolUse hook. This configuration blocks any Edit or Write operations on specified files, preventing accidental modifications to critical environment configurations.

What lifecycle events are available for Claude Code workflow automation?

Available lifecycle events for Claude Code workflow automation include SessionStart, PreToolUse, PostToolUse, and Stop. These events allow you to execute custom shell commands at specific points in the AI's operational cycle.

Where are Claude Code hook configurations stored?

Claude Code hook configurations are stored in the `.claude/settings.local.json` file. This Skill manages hook persistence by integrating directly with this local settings file.

How do I set up a hook trigger with a specific tool matcher in Claude Code?

To set up a hook trigger with a specific tool matcher in Claude Code, you define the event, matcher, and command parameters. This Skill automates creating these configurations to target specific tool operations and execute associated shell commands.