cc-dev-hooks

Create custom hooks for Claude Code event-driven automations.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/choru-k/skills-for-ai --skill cc-dev-hooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cc-dev-hooks
Source: https://github.com/choru-k/skills-for-ai/tree/main/public/claude/cc-dev-hooks
Command: npx skills add https://github.com/choru-k/skills-for-ai --skill cc-dev-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance for creating and implementing hooks—event-driven automations that run on tool calls, permission requests, and other lifecycle events within Claude Code, enabling powerful customization and control.

Core Features & Use Cases

  • Hook Event Mastery: Understand and utilize all 14 hook events (PreToolUse, Stop, SessionStart, etc.).
  • Diverse Hook Types: Implement command, prompt, and agent hooks for various automation needs.
  • Use Case: Automatically validate that all unit tests pass before allowing the agent to stop, or create a hook that blocks any rm -rf commands before they are executed.

Quick Start

Use the cc-dev-hooks skill to learn how to create a PreToolUse hook that blocks dangerous commands.

Frequently Asked Questions about cc-dev-hooks

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

FAQPage Schema
How do I create Claude Code hooks to automate workflows?

Claude Code hooks are event-driven automations triggered by tool calls, permissions, and session lifecycle events. You can develop custom command, prompt, or agent hooks using specific matcher patterns and environment variables to customize workflows.

Can I block dangerous shell commands before they execute in Claude Code?

Yes, you can block dangerous commands by creating a PreToolUse hook. This event-driven automation intercepts tool calls like rm -rf before execution, allowing you to validate inputs and prevent destructive actions within your session.

What are the available hook events for Claude Code session lifecycle?

Claude Code supports 14 hook events covering the session lifecycle, including PreToolUse, Stop, and SessionStart. These events trigger custom automations at specific points, enabling robust control over tool usage and agent behavior.

How do I validate unit tests before an agent stops in Claude Code?

You can validate unit tests by implementing a Stop hook. This event-driven automation runs when the agent attempts to stop, allowing your script to check if tests pass and block the stop event if validation fails.

What hook types does Claude Code support for scripting automations?

Claude Code supports command, prompt, and agent hook types for scripting automations. Each type processes event-driven triggers differently, utilizing matcher patterns and environment variables to format outputs and customize behavior.

Do I need specific dependencies to implement event-driven hooks in Claude Code?

No external dependencies are required to implement Claude Code hooks. The skill provides comprehensive guidance on using scripts and references to build command, prompt, and agent hooks natively using environment variables and output formats.