/overview
Automatically coordinate, format, and learn from Claude Code operations using hooks.
> /plugin marketplace add ruvnet/claude-flowHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/overview
Context preview
What this command does when you run it.
Automatically coordinate, format, and learn from Claude Code operations using hooks.
Command definition
overview.mdClaude Code Hooks for claude-flow
Purpose
Automatically coordinate, format, and learn from Claude Code operations using hooks.
Available Hooks
Pre-Operation Hooks
- **pre-edit**: Validate and assign agents before file modifications
- **pre-bash**: Check command safety and resource requirements
- **pre-task**: Auto-spawn agents for complex tasks
Post-Operation Hooks
- **post-edit**: Auto-format code and train neural patterns
- **post-bash**: Log execution and update metrics
- **post-search**: Cache results and improve search patterns
MCP Integration Hooks
- **mcp-initialized**: Persist swarm configuration
- **agent-spawned**: Update agent roster
- **task-orchestrated**: Monitor task progress
- **neural-trained**: Save pattern improvements
Session Hooks
- **notify**: Custom notifications with swarm status
- **session-end**: Generate summary and save state
- **session-restore**: Load previous session state
Configuration
Hooks are configured in `.claude/settings.json`:
{
"hooks": {
"PreToolUse": [
{
"matcher": "^(Write|Edit|MultiEdit)$",
"hooks": [{
"type": "command",
"command": "npx claude-flow hook pre-edit --file '${tool.params.file_path}'"
}]
}
]
}
}Benefits
- ๐ค Automatic agent assignment based on file type
- ๐จ Consistent code formatting
- ๐ง Continuous neural pattern improvement
- ๐พ Cross-session memory persistence
- ๐ Performance metrics tracking
See Also
- [Pre-Edit Hook](./pre-edit.md)
- [Post-Edit Hook](./post-edit.md)
- [Session End Hook](./session-end.md)
Read more
Claude Code Hooks for claude-flow
Purpose
Automatically coordinate, format, and learn from Claude Code operations using hooks.
Available Hooks
Pre-Operation Hooks
- **pre-edit**: Validate and assign agents before file modifications
- **pre-bash**: Check command safety and resource requirements
- **pre-task**: Auto-spawn agents for complex tasks
Post-Operation Hooks
- **post-edit**: Auto-format code and train neural patterns
- **post-bash**: Log execution and update metrics
- **post-search**: Cache results and improve search patterns
MCP Integration Hooks
- **mcp-initialized**: Persist swarm configuration
- **agent-spawned**: Update agent roster
- **task-orchestrated**: Monitor task progress
- **neural-trained**: Save pattern improvements
Session Hooks
- **notify**: Custom notifications with swarm status
- **session-end**: Generate summary and save state
- **session-restore**: Load previous session state
Configuration
Hooks are configured in `.claude/settings.json`:
{
"hooks": {
"PreToolUse": [
{
"matcher": "^(Write|Edit|MultiEdit)$",
"hooks": [{
"type": "command",
"command": "npx claude-flow hook pre-edit --file '${tool.params.file_path}'"
}]
}
]
}
}Benefits
- ๐ค Automatic agent assignment based on file type
- ๐จ Consistent code formatting
- ๐ง Continuous neural pattern improvement
- ๐พ Cross-session memory persistence
- ๐ Performance metrics tracking
See Also
- [Pre-Edit Hook](./pre-edit.md)
- [Post-Edit Hook](./post-edit.md)
- [Session End Hook](./session-end.md)
An agent meta-harness for Claude Code and Codex. Agent = Model + Harness. The model writes; the harness gives it tools, memory, loops, sandboxes, and controls so it can actually work.
Repo: ruvnet/claude-flow
Other commands on claude-flow.
- /agent-capabilities
Matrix of agent capabilities and their specializations.
Open command - /agent-coordination
Coordination patterns for multi-agent collaboration.
Open command - /agent-spawning
Guide to spawning agents with Claude Code's Task tool.
Open command - /agent-types
Complete guide to all 54 available agent types in Claude Flow.
Open command - /COMMAND_COMPLIANCE_REPORT
Reviewed all command files in `.claude/commands/analysis/` directory to ensure proper usage of: - `mcp__claude-flow__*` tools (preferred) - `npx claude-flow` commands (as fallback) - No direct implementation calls
Open command - /bottleneck-detect
Analyze performance bottlenecks in swarm operations and suggest optimizations.
Open command

