मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट102k · #834

Hooks Automation

यह क्या करती है

यह स्किल AI के कोडिंग कामों से पहले और बाद में चलने वाले अपने-आप हुक सेट करती है, जैसे फ़ाइलें फ़ॉर्मेट करना या सत्र की स्थिति सहेजना। यह उन डेवलपर के लिए है जो रोज़ के कदम अपने-आप करवाना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप चाहते हैं कि AI के हर बदलाव के बाद कोड अपने-आप फ़ॉर्मेट हो।
  • ✓जब आप चाहते हैं कि AI पिछले सत्र में जहाँ छोड़ा था वहीं से आगे बढ़े।
  • ✓जब हर काम शुरू होने से पहले नियमित जाँचें चलनी चाहिए।

Skill का लिंक

https://github.com/ruvnet/RuView/blob/main/.claude/skills/hooks-automation/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/ruvnet/RuView/blob/main/.claude/skills/hooks-automation/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“ऐसा सेट कीजिए कि आप जब भी कोई फ़ाइल बदलें तो मेरा कोड अपने-आप फ़ॉर्मेट हो, और सत्र खत्म होने पर नोट्स सहेजें।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

हुक सेटिंग्स फ़ाइल में रखे छोटे कमांड होते हैं, जो चुने गए समय पर चलते हैं, जैसे किसी काम से पहले या बदलाव के बाद। स्किल दिखाती है कि इन्हें कैसे कॉन्फ़िगर करें और claude-flow टूल से कैसे जोड़ें।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Hooks Automation

Intelligent automation system that coordinates, validates, and learns from Claude Code operations through hooks integrated with MCP tools and neural pattern training.

What This Skill Does

This skill provides a comprehensive hook system that automatically manages development operations, coordinates swarm agents, maintains session state, and continuously learns from coding patterns. It enables automated agent assignment, code formatting, performance tracking, and cross-session memory persistence.

Key Capabilities:

  • Pre-Operation Hooks: Validate, prepare, and auto-assign agents before operations
  • Post-Operation Hooks: Format, analyze, and train patterns after operations
  • Session Management: Persist state, restore context, generate summaries
  • Memory Coordination: Synchronize knowledge across swarm agents
  • Git Integration: Automated commit hooks with quality verification
  • Neural Training: Continuous learning from successful patterns
  • MCP Integration: Seamless coordination with swarm tools

Prerequisites

Required:

  • Claude Flow CLI installed (npm install -g claude-flow@alpha)
  • Claude Code with hooks enabled
  • .claude/settings.json with hook configurations

Optional:

  • MCP servers configured (claude-flow, ruv-swarm, flow-nexus)
  • Git repository for version control
  • Testing framework for quality verification

Quick Start

Initialize Hooks System

# Initialize with default hooks configuration
npx claude-flow init --hooks

This creates:

  • .claude/settings.json with pre-configured hooks
  • Hook command documentation in .claude/commands/hooks/
  • Default hook handlers for common operations

Basic Hook Usage

# Pre-task hook (auto-spawns agents)
npx claude-flow hook pre-task --description "Implement authentication"

# Post-edit hook (auto-formats and stores in memory)
npx claude-flow hook post-edit --file "src/auth.js" --memory-key "auth/login"

# Session end hook (saves state and metrics)
npx claude-flow hook session-end --session-id "dev-session" --export-metrics

Complete Guide

Available Hooks

Pre-Operation Hooks

Hooks that execute BEFORE operations to prepare and validate:

pre-edit - Validate and assign agents before file modifications

npx claude-flow hook pre-edit [options]

Options:
  --file, -f <path>         File path to be edited
  --auto-assign-agent       Automatically assign best agent (default: true)
  --validate-syntax         Pre-validate syntax before edit
  --check-conflicts         Check for merge conflicts
  --backup-file             Create backup before editing

Examples:
  npx claude-flow hook pre-edit --file "src/auth/login.js"
  npx claude-flow hook pre-edit -f "config/db.js" --validate-syntax
  npx claude-flow hook pre-edit -f "production.env" --backup-file --check-conflicts

Features:

  • Auto agent assignment based on file type
  • Syntax validation to prevent broken code
  • Conflict detection for concurrent edits
  • Automatic file backups for safety

pre-bash - Check command safety and resource requirements

npx claude-flow hook pre-bash --command <cmd>

Options:
  --command, -c <cmd>       Command to validate
  --check-safety            Verify command safety (default: true)
  --estimate-resources      Estimate resource usage
  --require-confirmation    Request user confirmation for risky commands

Examples:
  npx claude-flow hook pre-bash -c "rm -rf /tmp/cache"
  npx claude-flow hook pre-bash --command "docker build ." --estimate-resources

Features:

  • Command safety validation
  • Resource requirement estimation
  • Destructive command confirmation
  • Permission checks

pre-task - Auto-spawn agents and prepare for complex tasks

npx claude-flow hook pre-task [options]

Options:
  --description, -d <text>  Task description for context
  --auto-spawn-agents       Automatically spawn required agents (default: true)
  --load-memory             Load relevant memory from previous sessions
  --optimize-topology       Select optimal swarm topology
  --estimate-complexity     Analyze task complexity

Examples:
  npx claude-flow hook pre-task --description "Implement user authentication"
  npx claude-flow hook pre-task -d "Continue API dev" --load-memory
  npx claude-flow hook pre-task -d "Refactor codebase" --optimize-topology

Features:

  • Automatic agent spawning based on task analysis
  • Memory loading for context continuity
अक्सर पूछे जाने वाले सवाल

हुक कहाँ सेट होते हैं?

आपके प्रोजेक्ट की एक सेटिंग्स फ़ाइल में, जैसे .claude/settings.json।

इस्तेमाल से पहले क्या चाहिए?

हुक चालू वाला Claude Code, claude-flow टूल, और हुक कॉन्फ़िगरेशन वाली सेटिंग्स फ़ाइल।

क्या यह सत्र की मेमोरी सहेज सकती है?

हाँ। स्किल सत्र प्रबंधन और सत्रों के बीच साझा मेमोरी को कवर करती है।

जानकारी

लेखक का मूल विवरण

Automated coordination, formatting, and learning from Claude Code operations using intelligent hooks with MCP integration. Includes pre/post task hooks, session management, Git integration, memory coordination, and neural pattern training for enhanced development workflows.

repo: ruvnet/RuView

लोकप्रियता

GitHub स्टार
102k
रैंकिंग में स्थान
#834
लाइसेंस
MIT
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

AgentDB Advanced Features

102k

यह आपके एजेंट को AgentDB के उन्नत फ़ीचर दिखाती है, जैसे कई मशीनों के बीच डेटाबेस सिंक करना और मेटाडेटा फ़िल्टर के साथ वेक्टर सर्च।

डेटाडेटाबेस

AgentDB Learning Plugins

102k

यह आपके एजेंट को AgentDB के लिए लर्निंग प्लगइन बनाने और ट्रेन करने देती है, जो पिछले अनुभव से सुधरने वाले रीइनफ़ोर्समेंट लर्निंग तरीकों पर चलते हैं।

AI और एजेंटएजेंट

AgentDB Memory Patterns

102k

यह आपके एजेंट को AgentDB को स्थायी मेमोरी स्टोर बनाकर सत्रों के पार बातचीत और संदर्भ याद रखने देती है।

AI और एजेंटएजेंट

AgentDB Performance Optimization

102k

यह आपके एजेंट को AgentDB सर्च तेज़ करने और मेमोरी उपयोग घटाने का तरीका दिखाती है, कंप्रेशन, तेज़ सर्च इंडेक्स और कैशिंग से।

डेटाडेटाबेस

मिलती-जुलती skills