Zum Inhalt springen
Skillpedia
Agenten102k · #834

Hooks Automation

Was er macht

Dieser Skill richtet automatische Hooks ein, die vor und nach den Programmieraktionen der KI laufen, etwa um Dateien zu formatieren oder den Sitzungsstand zu speichern. Er ist für Entwickler gedacht, die Routineschritte automatisch erledigen lassen wollen.

Wann du ihn nutzt

  • ✓Wenn du willst, dass Code nach jeder Änderung der KI automatisch formatiert wird.
  • ✓Wenn die KI in einer neuen Sitzung dort weitermachen soll, wo sie aufgehört hat.
  • ✓Wenn Routineprüfungen vor jedem Aufgabenstart laufen sollen.

Link zum Skill

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

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/ruvnet/RuView/blob/main/.claude/skills/hooks-automation/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Richte es so ein, dass mein Code jedes Mal automatisch formatiert wird, wenn du eine Datei bearbeitest, und speichere Notizen, wenn eine Sitzung endet.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Hooks sind kleine Befehle in einer Einstellungsdatei, die zu gewählten Zeitpunkten laufen, etwa vor einer Aufgabe oder nach einer Bearbeitung. Der Skill zeigt, wie man sie konfiguriert und mit den claude-flow-Werkzeugen verbindet.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von 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
Häufige Fragen

Wo werden Hooks eingerichtet?

In einer Einstellungsdatei im Projekt, etwa .claude/settings.json.

Was brauche ich vorher?

Claude Code mit aktivierten Hooks, das Tool claude-flow und eine Einstellungsdatei mit Hook-Konfigurationen.

Kann er den Sitzungsspeicher sichern?

Ja. Der Skill behandelt die Sitzungsverwaltung und einen Speicher, der über Sitzungen hinweg geteilt wird.

Details

Originalbeschreibung des Autors

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

Beliebtheit

GitHub-Sterne
102k
Platz im Ranking
#834
Lizenz
MIT
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills