generate-hook

Community

Turn correction rules into enforceable hooks.

Authorshenxingy
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Generate-hook converts mature Claude Code correction rules into practical hook skeletons so you can automatically warn or block problematic tool behavior without manually writing boilerplate.

Core Features & Use Cases

  • Rule-to-hook generation: Creates a PreToolUse or PostToolUse hook template from a selected rule text or rule number.
  • Smart hook-type selection: Infers hook type and matcher (Edit/Write vs Bash) based on rule patterns like “never use…”, “don’t run…”, or “always check…”.
  • Local deployment instructions: Produces a ready-to-add settings.json snippet and places the generated hook script into the expected hooks directory.

Example use case: If your CLAUDE.md rule says “Before deploying, verify tests passed,” generate-hook can scaffold a PreToolUse hook that inspects the relevant deploy-related tool inputs and returns warning feedback by default.

Quick Start

Ask an AI editor to run generate-hook with your rule text or the rule number, then copy the shown settings.json entry into your ~/.claude/settings.json.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: generate-hook
Download link: https://github.com/shenxingy/Clade/archive/main.zip#generate-hook

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.