create-hook

Scaffold Claude Code hooks and update .claude/settings.json.

10|2|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/dixus/claudeframework --skill create-hook-dixus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-hook
Source: https://github.com/dixus/claudeframework/tree/main/.claude/skills/create-hook
Command: npx skills add https://github.com/dixus/claudeframework --skill create-hook-dixus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scaffolds robust Claude Code hooks to automate quality checks, formatting, and notifications on tool events, reducing manual setup and errors.

Core Features & Use Cases

  • Detect project tooling indicators (tsconfig.json, .prettierrc, eslint config, etc.), propose hooking strategies (PostToolUse or PreToolUse) and generate ready-to-run hook scaffolds that integrate with .claude/settings.json.
  • Support multiple hook types (command, http, prompt, agent) and create project-scoped or global hooks that merge with existing configurations without overwriting.
  • Validate and document steps to register hooks, test happy-path and sad-path scenarios, and provide usage notes for teams implementing automated quality gates.

Quick Start

Create a new hook by adding a script under .claude/hooks, wire it into .claude/settings.json under the appropriate event, and run a quick smoke test.

Frequently Asked Questions about create-hook

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

FAQPage Schema
How do I automate quality checks and formatting with Claude Code hooks?

You can automate quality checks by creating hook scripts under .claude/hooks and wiring them into .claude/settings.json. This Skill scaffolds those scripts and configures PreToolUse or PostToolUse events while merging with existing settings.

What is a Claude Code hook and when do I need one for my project?

A Claude Code hook is an event-driven script that triggers automated quality checks, formatting, or notifications. You need one when you want to enforce quality gates automatically during tool events across your project using command, http, prompt, or agent hook types.

How do I set up a PreToolUse or PostToolUse hook in .claude/settings.json?

Setting up a PreToolUse or PostToolUse hook in .claude/settings.json involves adding the hook script path under the appropriate event key. This Skill detects project tooling indicators like tsconfig.json or eslint config and generates the correct settings merge for you.

Can I create Claude Code hooks for a project that already has existing settings?

Yes, you can create hooks for a project with existing settings. This Skill safely merges new hook configurations into .claude/settings.json, preserving your existing hooks while adding new command, http, prompt, or agent hooks without overwriting them.

Does this hook scaffolding tool work with TypeScript and ESLint projects?

Yes, this hook scaffolding tool works with TypeScript and ESLint projects by detecting tooling indicators like tsconfig.json and eslint config files. It then proposes appropriate hooking strategies and generates ready-to-run quality check scripts tailored to your stack.

What are the limitations of automating project quality gates with Claude Code hooks?

Limitations of automating project quality gates with Claude Code hooks include the need to validate happy-path and sad-path scenarios manually after scaffolding. The Skill generates scripts and settings merges, but teams must still test event triggers and ensure proper executable permissions on the generated files.