create-hook

Create PDF Framework hooks with a template and validation checklist.

1|Updated Sep 20, 2025
One-click install
npx skills add https://github.com/Alex1980Alex/1C-Enterprise_Framework --skill create-hook-alex1980alex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-hook
Source: https://github.com/Alex1980Alex/1C-Enterprise_Framework/tree/main/.claude/skills/create-hook
Command: npx skills add https://github.com/Alex1980Alex/1C-Enterprise_Framework --skill create-hook-alex1980alex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hooks are the "WHEN" component in the triad Hooks + Skills + MCP. This skill automates the creation of new hooks for the PDF Framework by providing a ready-to-use template, a checklist, and framework examples to guide developers.

Core Features & Use Cases

  • Provides a reusable Hook template that creates a new .claude/hooks/<hook-name>.py file with proper inheritance from BaseHook.
  • Simplifies registration by guiding the addition to .claude/settings.json and event matchers.
  • Includes a checklist and practical examples from the framework to accelerate adoption.

Quick Start

Run the template to generate a new hook by placing the script in the .claude/hooks/ directory and registering it in settings.json.

Frequently Asked Questions about create-hook

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

FAQPage Schema
How do I create a new hook for the PDF Framework automation workflow?

To create a new hook for the PDF Framework, use a template that generates a .claude/hooks/<hook-name>.py script inheriting from BaseHook, then register the hook in settings.json. This ensures proper event matching and framework compliance for automation tasks.

What hook events does the PDF Framework support for developer automation?

The PDF Framework supports hooks for UserPromptSubmit, PreToolUse, PostToolUse, and Stop events. These triggers allow developers to inject automated logic at specific points in the processing lifecycle using guided setup and testing.

How do I register a hook script in settings.json to ensure it runs correctly?

Registering a hook requires adding a registrar entry to the .claude/settings.json file with the appropriate event matchers. This configuration connects your hook script to the specified framework events to activate the automation.

Do I need a specific file structure to add a hook to my developer workflow?

Yes, adding a hook requires placing the script in the .claude/hooks/ directory and ensuring it follows a minimal structure. The setup must include a SKILL.md template and a registrar entry in settings.json to conform to project standards.

What is the best way to test hooks for PreToolUse and PostToolUse events?

The best way to test hooks is by using the included validation checklist and practical framework examples. This guided testing approach verifies that your PreToolUse and PostToolUse hooks function correctly before deployment.

Why does my PDF Framework hook fail to trigger on UserPromptSubmit?

A hook fails to trigger when the script lacks proper BaseHook inheritance, has an incorrect file path in .claude/hooks/, or is missing the event matcher configuration in settings.json. Use the validation checklist to verify setup.