Create Git Hook
Claude Code git hook creation workflow with project analysis, intelligent suggestions for TypeScript/Prettier/ESLint/security, auto-configuration, and testing
What is it?
Hooks let you run code at key points in Claude Code's lifecycle: format files after edits, block commands before they execute, send notifications when Claude needs input, inject context at session start, and more. For the full list of hook events, see the Hooks reference.
Each example includes a ready-to-use configuration block that you add to a settings file. The most common patterns:
- Get notified when Claude needs input
- Auto-format code after edits
- Block edits to protected files
- Re-inject context after compaction
How to use it?
Hook events fire at specific lifecycle points in Claude Code. When an event fires, all matching hooks run in parallel, and identical hook commands are automatically deduplicated. The table below shows each event and when it triggers:
| Event | When it fires |
|---|---|
SessionStart | When a session begins or resumes |
UserPromptSubmit | When you submit a prompt, before Claude processes it |
PreToolUse | Before a tool call executes. Can block it |
PermissionRequest | When a permission dialog appears |
PostToolUse | After a tool call succeeds |
PostToolUseFailure | After a tool call fails |
Notification | When Claude Code sends a notification |
SubagentStart | When a subagent is spawned |
SubagentStop | When a subagent finishes |
Stop | When Claude finishes responding |
| `Pr |
Key Features
- Claude Code git hook creation workflow with project analysis, intelligent suggestions for TypeScript/Prettier/ESLint/security, auto-configuration, and testing
- Automated workflow execution for repetitive tasks
- Seamless integration with Claude's development workflow
Related Skills
More from Developer ToolsProject Bootstrapper
Sets up new projects with best practices across 8 areas: structure, git config, documentation, testing, code quality tools, dependencies, dev workflow, and CI/CD
n8n Workflow Skills
Enables AI assistants to directly understand and operate n8n workflows
git-pushing
Automate git operations and repository interactions