claude-hooks-manager

Create and manage Claude Code hooks for lifecycle events.

Updated Nov 11, 2025
One-click install
npx skills add https://github.com/shredbx/demo-3d-model --skill claude-hooks-manager
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-hooks-manager
Source: https://github.com/shredbx/demo-3d-model/tree/main/.claude/skills/claude-hooks-manager
Command: npx skills add https://github.com/shredbx/demo-3d-model --skill claude-hooks-manager

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq.

What problem does it solve?

This Skill provides a structured guide for creating and managing Claude Code hooks, enabling users to automate repetitive tasks, enforce coding standards, and customize Claude's behavior with deterministic reliability.

Core Features & Use Cases

  • Event-Driven Automation: Register shell commands to execute at various points in Claude's lifecycle (e.g., PreToolUse, PostToolUse).
  • Code Formatting & Validation: Automatically format code, fix markdown, or block edits to sensitive files.
  • Use Case: Implement a PostToolUse hook to automatically run prettier --write on any .ts file Claude edits, ensuring consistent code formatting without manual intervention.

Quick Start

Use the claude-hooks-manager skill to create a PreToolUse hook that logs all Bash commands Claude executes to a file.

Frequently Asked Questions about claude-hooks-manager

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

FAQPage Schema
How do I automate code formatting when Claude edits files?

Claude hooks enable you to register PostToolUse events that automatically run formatters like prettier on edited files. Configure a hook in .claude/hooks to execute formatting commands after each file modification, ensuring consistent code style without manual intervention.

What are Claude Code hooks and when should I use them?

Claude hooks are shell commands triggered at specific lifecycle events—PreToolUse, PostToolUse, UserPromptSubmit, and others—allowing you to automate tasks, enforce standards, log activity, and customize Claude's behavior deterministically across your projects.

How do I set up a hook to log all commands Claude executes?

Create a PreToolUse hook in your .claude/hooks folder with a shell script that captures and logs Bash commands to a file. The hook executes before each tool use, recording all commands Claude runs for audit and debugging purposes.

Can I use hooks to prevent Claude from editing sensitive files?

Yes. Configure a PreToolUse hook that evaluates file paths and blocks edits to sensitive files by returning a non-zero exit code. Hooks support access control logic to protect restricted files before Claude applies changes.

What dependencies do I need to create and manage hooks?

The claude-hooks-manager skill requires jq for JSON processing of hook configurations. Shell scripting knowledge is needed to write hook commands; no additional runtime dependencies are required beyond a standard shell environment.

What hook events are available for automation?

Nine hook events are supported: PreToolUse, PostToolUse, UserPromptSubmit, Notification, Stop, SubagentStop, PreCompact, SessionStart, and SessionEnd. Each event fires at a specific point in Claude's lifecycle, enabling precise automation and monitoring.