Hooks Automation

Enforce pre- and post-operation hook workflows around Claude Code tasks.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/monktui/git-review --skill hooks-automation-monktui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Hooks Automation
Source: https://github.com/monktui/git-review/tree/main/.claude/skills/hooks-automation
Command: npx skills add https://github.com/monktui/git-review --skill hooks-automation-monktui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of making complex, multi-step Claude Code development workflows consistent, safe, and repeatable by automating validation, orchestration, and learning around tool operations.

Core Features & Use Cases

  • Pre-Operation Hooks: Validate, prepare, and auto-assign agents before edits, commands, or tasks to reduce errors and improve execution quality (e.g., pre-edit syntax checks, conflict detection, safe bash validation).
  • Post-Operation Hooks: Auto-format, validate outputs, store outcomes in memory, and train reusable patterns from successful edits to steadily improve later runs (e.g., post-edit formatting + memory training).
  • Session & Memory Coordination: Persist and restore session state, synchronize cross-agent memory, and export summaries/metrics for continuity and review (e.g., session-start/session-restore/session-end plus memory-sync).
  • Git Integration & Quality Gates: Use hooks in Git workflows (pre-commit, post-commit, pre-push) to enforce quality verification before changes land.

Quick Start

Initialize the hooks system by running a single command that generates default configuration and hook command documentation in the project: npx claude-flow init --hooks

Frequently Asked Questions about Hooks Automation

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

FAQPage Schema
How do I automate pre-edit validation and post-edit formatting for Claude Code tasks?

Automate pre-edit validation and post-edit formatting by configuring pre-operation hooks for syntax checks and conflict detection, and post-operation hooks for auto-formatting and memory training. Run npx claude-flow init --hooks to generate default configurations and hook command documentation.

What is the best way to coordinate memory and session state across multiple agents?

Coordinate memory and session state across multiple agents using session lifecycle exports and cross-agent memory synchronization. This Skill supports session-start, session-restore, and session-end hooks to persist state, synchronize memory, and export summaries for continuity.

How do I enforce Git quality gates before commits and pushes using hooks?

Enforce Git quality gates by applying hooks to pre-commit, post-commit, and pre-push workflows to verify changes before they land. The hook system returns structured continue, block, or warning outcomes to control execution flow based on validation results.

Can I use hook matchers to validate bash command execution in multi-agent coding workflows?

Yes, you can use hook matchers for tool phases to validate bash command execution in multi-agent coding workflows. Pre-operation hooks apply safe bash validation, auto-assign agents, and detect conflicts before commands run to reduce errors.

Do I need MCP memory integration to run safe development workflows with hooks?

MCP memory integration is supported for cross-agent memory synchronization and swarm coordination, but the core hook workflows for validation, formatting, and Git quality gates operate independently through the generated configuration files.

Why does my Claude Code session lose context when switching between repeated work sessions?

Session context is lost without persistence hooks that save and restore state. This Skill implements session-start and session-restore hooks that automatically persist and recover session state, ensuring continuity across repeated work sessions.