hooks-manager

Create, configure, test, and debug Claude Code hooks across nine lifecycle events.

2|2|Updated Sep 16, 2025
One-click install
npx skills add https://github.com/resolve-io/.prism --skill hooks-manager-resolve-io
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hooks-manager
Source: https://github.com/resolve-io/.prism/tree/main/skills/hooks-manager
Command: npx skills add https://github.com/resolve-io/.prism --skill hooks-manager-resolve-io

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solves? Automating repetitive tasks and enforcing best practices within Claude Code workflows can be challenging without a structured way to manage lifecycle events. This skill simplifies the creation, configuration, testing, and debugging of hooks, enabling seamless automation and validation.

Core Features & Use Cases

  • Event-Driven Automation: Configure scripts to run automatically at 9 key lifecycle points (e.g., before tool use, after prompt submission), enabling powerful workflow automation.
  • Security & Validation: Implement hooks for access control, input validation, and enforcing coding standards, blocking unwanted operations and ensuring compliance.
  • Extensive Examples: Access a library of 13 pre-built hook patterns for common tasks like logging, safety checks, auto-formatting, and notifications, accelerating your automation efforts.
  • Use Case: To prevent accidental force pushes in Git, create a PreToolUse hook that checks the Git command and blocks git push --force if it targets a protected branch, ensuring code integrity and preventing costly errors.

Quick Start

Create a hook to log all bash commands. List all configured hooks. Test the 'file-protection' hook with a sample input.

Frequently Asked Questions about hooks-manager

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

FAQPage Schema
How do I automate workflows with Claude Code hooks?

Hooks automate workflows by executing scripts at 9 lifecycle events—PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, SessionEnd, Stop, SubagentStop, PreCompact, and Notification. Configure JSON-based hooks at project or user level to run deterministic automation, validation, and security checks without manual intervention.

What are Claude Code hooks used for?

Claude Code hooks enforce security policies, validate inputs, and automate tasks at specific workflow points. Common uses include blocking dangerous Git commands, logging bash activity, auto-formatting code, and enforcing coding standards to prevent errors and ensure compliance.

Can I use hooks to prevent accidental Git force pushes?

Yes. Create a PreToolUse hook that inspects Git commands and blocks `git push --force` on protected branches. The hook receives tool metadata, evaluates conditions, and returns exit code 2 to block the operation, preventing costly mistakes.

How do I configure and test hooks in Claude Code?

Define hooks as strict JSON configurations stored at project or user level under the ${CLAUDE_PLUGIN_ROOT} convention. Test hooks by submitting sample inputs to validate logic before deployment. The system supports exit codes 0 (success) and 2 (blocking) plus non-blocking errors.

What lifecycle events can I hook into?

Claude Code supports 9 lifecycle events: PreToolUse and PostToolUse for tool execution, UserPromptSubmit for input validation, SessionStart and SessionEnd for setup and cleanup, Stop and SubagentStop for interruption handling, PreCompact for context management, and Notification for alerts.

Do hooks require coding experience to set up?

Hooks use declarative JSON configuration, not complex scripting. The Skill provides 13 pre-built patterns for logging, safety checks, and notifications that you can adapt to your workflow. Quick-start guides help you create your first hook in minutes.