Hooks Automation
Skill96k starsChanged 9 months agoMITView on GitHub
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.
- Reads credentials
- Deletes or force-pushes
- Installs packages
12 other projects use a version of this, 2 of them edited; 1 of 2 edited versions we compared changed its rules.
How people change it
1 of 2 edited versions changed its rules.
Of the 2 edited versions we compared: 1 keep every rule, 1 made changes of their own.
Rules people drop
- Default hook handlers for common operationsdropped by 1 of 1
- pre-bash - Check command safety and resource requirementsdropped by 1 of 1
- agent-spawned - Update agent roster and memorydropped by 1 of 1
- Add protection for sensitive files:dropped by 1 of 1
- Run tests after file modifications:dropped by 1 of 1
- All hooks follow a standardized memory coordination pattern:dropped by 1 of 1
- Create custom hooks for specific workflows:dropped by 1 of 1
- Use Async for Heavy Operations - Don't block the main flowdropped by 1 of 1
We split this file and each edited version into the rules they give an agent and match them by wording. A version that adds no rule of its own and has not changed since this file last did reads as an older text, so what it lacks is not counted as dropped. We keep no past texts of a file, so that is inferred, and an edited version that started from an older text still counts its gaps as drops.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- echo-mem/echo-memword for word, first seen Sep 11, 2026
- ruvnet/rufloword for word, first seen Sep 10, 2026
- Soulcynics404/AgentForgeword for word, first seen Aug 24, 2026
- shyftlabs/continuumword for word, first seen May 28, 2026
- jazz-max/ruflo-hubword for word, first seen Apr 19, 2026
- Zekiog/rufloedited, first seen Apr 8, 2026
Who's talking about ruvnet/RuView
- A Hacker News story“Top trending repo claims to detect movement via WiFi, yet no one can run it”Hacker News · Mar 9, 2026 · 10 points
- @bearstech.com“RuView : un projet Open Source qui transforme les signaux Wi-Fi en système de détection spatiale temps …”Bluesky · May 16, 2026 · 7 likes
- @anthonymoser.com“i'm thinking about corporate /govt locations where they can deploy as desired and dial in a new kind of …”Bluesky · Oct 2, 2026 · 6 likes
- A Hacker News story“Show HN: Turn commodity WiFi signals into real-time spatial intelligence”Hacker News · Jul 7, 2026 · 6 points
- A Hacker News story“WiFi-DensePose – open-source software that sees you through walls using wifi”Hacker News · Mar 8, 2026 · 6 points
The biggest 5 of 109 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 109
Talked about on GitHub, Bluesky and Hacker News (109 times).
On GitHub · 50
- Nov 26, 2026claude-code-marketplaces.github.ruvnet.ruview: 3815 → 3853 — sudosubin/agents.nix0 reactions
- Nov 25, 2026agent-skills.github.ruvnet.ruview: 3815 → 3853 — sudosubin/agents.nix0 reactions
- Nov 25, 2026claude-code-plugins.github.ruvnet.ruview: 3815 → 3853 — sudosubin/agents.nix0 reactions
- Nov 24, 2026fix: add a Codex hook shim for claude-terminal-mod — stuinfla/ruvnet-brain0 reactions · 1 comment
- Nov 23, 2026feat: governed Reality conditioning and Vast Serverless canary client (ADR 210) — ruvnet/worldgraph0 reactions · 1 comment
45 more on GitHub
- Nov 21, 2026claude-code-plugins.github.ruvnet.ruview: 3809 → 3815 — sudosubin/agents.nix0 reactions
- Nov 21, 2026agent-skills.github.ruvnet.ruview: 3809 → 3815 — sudosubin/agents.nix0 reactions
- Nov 21, 2026claude-code-marketplaces.github.ruvnet.ruview: 3809 → 3815 — sudosubin/agents.nix0 reactions
- Nov 21, 2026claude-code-plugins.github.ruvnet.ruview: 3750 → 3809 — sudosubin/agents.nix0 reactions
- Nov 21, 2026agent-skills.github.ruvnet.ruview: 3750 → 3809 — sudosubin/agents.nix0 reactions
- Nov 21, 2026claude-code-marketplaces.github.ruvnet.ruview: 3750 → 3809 — sudosubin/agents.nix0 reactions
- Nov 19, 2026Import RuView from upstream with full history — UncleWeapon/see_through_walls0 reactions · 1 comment
- Nov 18, 2026Backport collector dependency and firmware CSI fixes — ha-homelab/ruview-home-sensing0 reactions
- Nov 18, 2026agent-skills.github.ruvnet.ruview: 3727 → 3750 — sudosubin/agents.nix0 reactions
- Nov 18, 2026claude-code-plugins.github.ruvnet.ruview: 3727 → 3750 — sudosubin/agents.nix0 reactions
- Nov 18, 2026claude-code-marketplaces.github.ruvnet.ruview: 3727 → 3750 — sudosubin/agents.nix0 reactions
- Nov 14, 2026claude-code-plugins.github.ruvnet.ruview: 3702 → 3727 — sudosubin/agents.nix0 reactions
- Nov 14, 2026agent-skills.github.ruvnet.ruview: 3702 → 3727 — sudosubin/agents.nix0 reactions
- Nov 14, 2026claude-code-marketplaces.github.ruvnet.ruview: 3702 → 3727 — sudosubin/agents.nix0 reactions
- Nov 12, 2026agent-skills.github.ruvnet.ruview: 3691 → 3702 — sudosubin/agents.nix0 reactions
- Nov 12, 2026claude-code-marketplaces.github.ruvnet.ruview: 3691 → 3702 — sudosubin/agents.nix0 reactions
- Nov 12, 2026claude-code-plugins.github.ruvnet.ruview: 3664 → 3702 — sudosubin/agents.nix0 reactions
- Nov 12, 2026agent-skills.github.ruvnet.ruview: 3669 → 3691 — sudosubin/agents.nix0 reactions
- Nov 12, 2026claude-code-marketplaces.github.ruvnet.ruview: 3664 → 3691 — sudosubin/agents.nix0 reactions
- Nov 11, 2026agent-skills.github.ruvnet.ruview: 3664 → 3669 — sudosubin/agents.nix0 reactions
- Nov 11, 2026claude-code-marketplaces.github.ruvnet.ruview: 3659 → 3664 — sudosubin/agents.nix0 reactions
- Nov 11, 2026claude-code-plugins.github.ruvnet.ruview: 3659 → 3664 — sudosubin/agents.nix0 reactions
- Nov 11, 2026agent-skills.github.ruvnet.ruview: 3632 → 3664 — sudosubin/agents.nix0 reactions
- Nov 11, 2026claude-code-marketplaces.github.ruvnet.ruview: 3632 → 3659 — sudosubin/agents.nix0 reactions
- Nov 11, 2026claude-code-plugins.github.ruvnet.ruview: 3632 → 3659 — sudosubin/agents.nix0 reactions
- Nov 10, 2026Add GhostView: rebranded RuView fork with one-command demo — Ghostfreakxx/3dmap-wartime-visual3dvideo0 reactions · 1 comment
- Nov 10, 2026claude-code-marketplaces.github.ruvnet.ruview: 3622 → 3632 — sudosubin/agents.nix0 reactions
- Nov 10, 2026agent-skills.github.ruvnet.ruview: 3614 → 3632 — sudosubin/agents.nix0 reactions
- Nov 10, 2026claude-code-plugins.github.ruvnet.ruview: 3614 → 3632 — sudosubin/agents.nix0 reactions
- Nov 9, 2026claude-code-marketplaces.github.ruvnet.ruview: 3600 → 3622 — sudosubin/agents.nix0 reactions
- Nov 9, 2026RuView update ready: v0.8.18-esp32 — giusemc1988/stock-predict0 reactions
- Nov 9, 2026agent-skills.github.ruvnet.ruview: 3600 → 3614 — sudosubin/agents.nix0 reactions
- Nov 9, 2026claude-code-plugins.github.ruvnet.ruview: 3600 → 3614 — sudosubin/agents.nix0 reactions
- Nov 9, 2026مرشحون جدد للدليل (2026-11-09) — mgrd281/Skill-0 reactions
- Nov 9, 2026claude-code-plugins.github.ruvnet.ruview: 3558 → 3600 — sudosubin/agents.nix0 reactions
- Nov 9, 2026agent-skills.github.ruvnet.ruview: 3558 → 3600 — sudosubin/agents.nix0 reactions
- Nov 9, 2026claude-code-marketplaces.github.ruvnet.ruview: 3558 → 3600 — sudosubin/agents.nix0 reactions
- Nov 7, 2026`npm update --package-lock-only` drops lock entries for unpublished optional dependencies, then `npm ci` rejects the lock — npm/cli0 reactions · 1 comment
- Nov 7, 2026agent-skills.github.ruvnet.ruview: 3548 → 3558 — sudosubin/agents.nix0 reactions
- Nov 7, 2026claude-code-plugins.github.ruvnet.ruview: 3548 → 3558 — sudosubin/agents.nix0 reactions
- Nov 7, 2026claude-code-marketplaces.github.ruvnet.ruview: 3446 → 3558 — sudosubin/agents.nix0 reactions
- Nov 6, 2026claude-code-plugins.github.ruvnet.ruview: 3446 → 3548 — sudosubin/agents.nix0 reactions
- Nov 6, 2026agent-skills.github.ruvnet.ruview: 3446 → 3548 — sudosubin/agents.nix0 reactions
- Oct 29, 2026RuView update ready: v0.8.17-esp32 — giusemc1988/stock-predict0 reactions
- Oct 28, 2026claude-code-plugins.github.ruvnet.ruview: init at 3446 — sudosubin/agents.nix0 reactions
On Bluesky · 50
- May 16, 2026RuView : un projet Open Source qui transforme les signaux Wi-Fi en système de détection spatiale temps réel… Selon vous, où se situe-t-on… — @bearstech.com7 likes and reposts · 2 replies
- Oct 2, 2026i'm thinking about corporate /govt locations where they can deploy as desired and dial in a new kind of surveillance the amount this… — @anthonymoser.com6 likes and reposts
- Nov 11, 2026wifi が発する信号で壁越しに室内を観察する技術もオープンソースで公開中∠(`・ω・´) 以前、お掃除ロボットで室内の位置情報を取得していたお話もありました。 便利なものに逃げ場所なし(・・*)。。oO(想像中)… — @t-tanaka3.bsky.social5 likes and reposts
- Mar 31, 2026ruvnet / RuView: π RuView: WiFi DensePose turns commodity WiFi signals into real-time human pose estimation, vital sign monitoring, and… — @rusttrending.bsky.social5 likes and reposts · 1 reply
- Jun 15, 2026ruvnet / RuView: π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection —… — @rusttrending.bsky.social4 likes and reposts · 1 reply
45 more on Bluesky
- Jul 5, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 ruvnet / RuView ⭐ 76,521 (+133) 🗒 Rust π RuView turns commodity WiFi signals into real-time spatial… — @github-trending.bsky.social3 likes and reposts
- Sep 7, 2026ruvnet / RuView: π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection —… — @rusttrending.bsky.social2 likes and reposts
- Aug 10, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 ruvnet / RuView ⭐ 89,169 (+156) 🗒 Rust π RuView turns commodity WiFi signals into real-time spatial… — @github-trending.bsky.social2 likes and reposts
- Jun 8, 2026https://github.com/ruvnet/RuView — @tom-doerr.bsky.social2 likes and reposts
- May 22, 2026📈 Today's GitHub Trending: 1. https://github.com/anthropics/claude-plugins-official - Python, 2556 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy2 likes and reposts
- May 14, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 ruvnet / RuView ⭐ 55,045 (+1,757) 🗒 Rust π RuView turns commodity WiFi signals into real-time… — @github-trending.bsky.social2 likes and reposts · 1 reply
- Mar 19, 2026based it off of this, but added in the visual reinforcement because I started with the wrong little esp doodads. github.com/ruvnet/RuView — @doeshapedclouds.com2 likes and reposts
- Mar 16, 2026ruvnet / RuView: π RuView: WiFi DensePose turns commodity WiFi signals into real-time human pose estimation, vital sign monitoring, and… — @rusttrending.bsky.social2 likes and reposts
- Nov 9, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 ruvnet / RuView ⭐ 103,150 (+203) 🗒 Rust π RuView turns commodity WiFi signals into real-time… — @github-trending.bsky.social1 likes and repost · 1 reply
- Oct 20, 2026🚀 GitHub Intelligence Drop angular (TypeScript • 🟢) ⭐ 101.1K → https://github.com/angular/angular RuView (Rust • 🟢) ⭐ 98.8K →… — @githubfeed.bsky.social1 likes and repost
- Sep 14, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 ruvnet / RuView ⭐ 93,642 (+370) 🗒 Rust π RuView turns commodity WiFi signals into real-time… — @github-trending.bsky.social1 likes and repost · 1 reply
- Sep 13, 2026そして wifi が発する信号で壁越しに室内を観察する技術もオープンソースで公開中∠(`・ω・´) 以前、お掃除ロボットで室内の位置情報を取得していたお話もありました。 便利なものに逃げ場所なし(・・*)。。oO(想像中) github.com/ruvnet/RuView — @t-tanaka3.bsky.social1 likes and repost · 1 reply
- Aug 21, 2026🔓 Open Source Tool of the Week: RuView RuView uses Wi-Fi CSI + low-cost ESP32 hardware to detect presence, movement and even breathing —… — @linuxassociation.bsky.social1 likes and repost
- Aug 9, 2026ruvnet / RuView: π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection —… — @rusttrending.bsky.social1 likes and repost
- Jul 22, 2026ruvnet / RuView: π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection —… — @rusttrending.bsky.social1 likes and repost
- Jul 11, 2026@timb_machine On an unrelated note, have you come across this before? https://github.com/ruvnet/RuView — @snkhan.infosec.exchange.ap.brid.gy1 likes and repost
- May 30, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 ruvnet / RuView ⭐ 68,541 (+656) 🗒 Rust π RuView turns commodity WiFi signals into real-time spatial… — @github-trending.bsky.social1 likes and repost · 1 reply
- May 23, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 ruvnet / RuView ⭐ 63,707 (+992) 🗒 Rust π RuView turns commodity WiFi signals into real-time spatial… — @github-trending.bsky.social1 likes and repost · 1 reply
- May 18, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 ruvnet / RuView ⭐ 59,591 (+963) 🗒 Rust π RuView turns commodity WiFi signals into real-time spatial… — @github-trending-rs.bsky.social1 likes and repost
- May 17, 2026ruvnet / RuView: π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection —… — @rusttrending.bsky.social1 likes and repost
- May 3, 2026ruvnet / RuView: π RuView: WiFi DensePose turns commodity WiFi signals into real-time human pose estimation, vital sign monitoring, and… — @rusttrending.bsky.social1 likes and repost
- Apr 19, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 ruvnet / RuView ⭐ 47,163 (+118) 🗒 Rust π RuView: WiFi DensePose turns commodity WiFi signals into… — @github-trending.bsky.social1 likes and repost
- Apr 14, 2026https://github.com/ruvnet/RuView — @tom-doerr.bsky.social1 likes and repost
- Mar 18, 2026😳 "Instead of relying on cameras or cloud models, it observes whatever signals exist in a space such as WiFi, radio waves across the… — @pauldokas.bsky.social1 likes and repost · 1 reply
- Oct 30, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 ruvnet / RuView ⭐ 101,679 (+849) 🗒 Rust π RuView turns commodity WiFi signals into real-time… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- Oct 28, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 ruvnet / RuView ⭐ 100,546 (+415) 🗒 Rust π RuView turns commodity WiFi signals into real-time… — @github-trending.bsky.social0 likes and reposts · 1 reply
- Oct 13, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 ruvnet / RuView ⭐ 97,722 (+263) 🗒 Rust π RuView turns commodity WiFi signals into real-time… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- Sep 30, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 ruvnet / RuView ⭐ 95,669 (+272) 🗒 Rust π RuView turns commodity WiFi signals into real-time… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- Sep 14, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 ruvnet / RuView ⭐ 93,642 (+370) 🗒 Rust π RuView turns commodity WiFi signals into real-time… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- Aug 19, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 ruvnet / RuView ⭐ 90,903 (+299) 🗒 Rust π RuView turns commodity WiFi signals into real-time… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- Jul 25, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 ruvnet / RuView ⭐ 86,218 (+615) 🗒 Rust π RuView turns commodity WiFi signals into real-time spatial… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- Jul 22, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 ruvnet / RuView ⭐ 82,984 (+1,114) 🗒 Rust π RuView turns commodity WiFi signals into real-time… — @github-trending.bsky.social0 likes and reposts · 1 reply
- Jul 21, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 ruvnet / RuView ⭐ 82,241 (+902) 🗒 Rust π RuView turns commodity WiFi signals into real-time spatial… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- Jul 8, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 ruvnet / RuView ⭐ 78,888 (+793) 🗒 Rust π RuView turns commodity WiFi signals into real-time spatial… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- Jul 8, 2026📈 Today's GitHub Trending: 1. https://github.com/MadsLorentzen/ai-job-search - TypeScript, 5071 stars today 2.… — @ghtrend.newsmast.social.ap.brid.gy0 likes and reposts · 1 reply
- Jun 10, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 ruvnet / RuView ⭐ 72,645 (+439) 🗒 Rust π RuView turns commodity WiFi signals into real-time… — @github-trending.bsky.social0 likes and reposts · 1 reply
- Jun 9, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 ruvnet / RuView ⭐ 72,251 (+444) 🗒 Rust π RuView turns commodity WiFi signals into real-time… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- May 30, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 ruvnet / RuView ⭐ 68,541 (+656) 🗒 Rust π RuView turns commodity WiFi signals into real-time spatial… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- May 22, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 ruvnet / RuView ⭐ 63,707 (+992) 🗒 Rust π RuView turns commodity WiFi signals into real-time spatial… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- May 19, 2026🎉 Celebrating! 🎉 (500+ new stars) 📦 ruvnet / RuView ⭐ 59,591 (+963) 🗒 Rust π RuView turns commodity WiFi signals into real-time spatial… — @github-trending.bsky.social0 likes and reposts · 1 reply
- May 14, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 ruvnet / RuView ⭐ 55,045 (+1,757) 🗒 Rust π RuView turns commodity WiFi signals into real-time… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- May 3, 2026I found an open-source program on GitHub that allows you to monitor people through walls using Wi-Fi. It is powered by AI and turns… — @madinflation.bsky.social0 likes and reposts · 2 replies
- May 1, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 ruvnet / RuView ⭐ 51,185 (+263) 🗒 Rust π RuView: WiFi DensePose turns commodity WiFi signals into… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- Apr 23, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 ruvnet / RuView ⭐ 49,632 (+427) 🗒 Rust π RuView: WiFi DensePose turns commodity WiFi signals into… — @github-trending-rs.bsky.social0 likes and reposts · 1 reply
- Apr 23, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 ruvnet / RuView ⭐ 49,632 (+427) 🗒 Rust π RuView: WiFi DensePose turns commodity WiFi signals into… — @github-trending.bsky.social0 likes and reposts · 1 reply
On Hacker News · 9
- Mar 9, 2026Top trending repo claims to detect movement via WiFi, yet no one can run it10 points · 2 comments
- Jul 7, 2026Show HN: Turn commodity WiFi signals into real-time spatial intelligence6 points · 3 comments
- Mar 8, 2026WiFi-DensePose – open-source software that sees you through walls using wifi6 points · 1 comment
- Mar 3, 2026RuView – WiFi DensePose: See Through Walls with WiFi5 points · 2 comments
- May 28, 2026RuView: See Through Walls with WiFi4 points
4 more on Hacker News
- Aug 21, 2026See Through Walls with WiFi2 points · 1 comment
- May 20, 2026WiFi Spatial Sensing2 points
- Apr 22, 2026Π RuView: turn WiFi into realtime human detection,vitals monitoring, and more2 points
- Apr 20, 2026DensePose turns commodity WiFi signals into real-time human pose estimation2 points · 1 comment
Other versions12 projects use a version of this.
Word for word · 10
- ruvnet/ruflo★ 74k100% same
- ruvnet/agentic-flow★ 815100% same
- spencermarx/open-code-review★ 371100% same
- shyftlabs/continuum★ 84100% same
- justSteve/XState-Skill★ 19100% same
- jazz-max/ruflo-hub★ 4100% same
- Blockchainpreneur/CLAUDEMAX★ 2100% same
- echo-mem/echo-mem★ 2100% same
- get-proofpilot/claude-skills-catalog★ 1100% same
- Soulcynics404/AgentForge★ 1100% same
Edited · 2
- the-hugin/RSIm★ 261% same
- Zekiog/ruflo★ 2100% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/commands/monitoring/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- AgentDB Advanced FeaturesSkill
- AgentDB Learning PluginsSkill
- AgentDB Memory PatternsSkill
- AgentDB Performance OptimizationSkill
- AgentDB Vector SearchSkill
- browserSkill
- github-code-reviewSkill
- github-multi-repoSkill
- github-project-managementSkill
- github-release-managementSkill
- github-workflow-automationSkill
- Pair ProgrammingSkill
- ReasoningBank with AgentDBSkill
- ReasoningBank IntelligenceSkill
- Skill BuilderSkill
- sparc-methodologySkill
- stream-chainSkill
- swarm-advancedSkill
- Swarm OrchestrationSkill
- V3 CLI ModernizationSkill
- V3 Core ImplementationSkill
- V3 DDD ArchitectureSkill
- V3 Deep IntegrationSkill
- V3 MCP OptimizationSkill
- V3 Memory UnificationSkill
- V3 Performance OptimizationSkill
- V3 Security OverhaulSkill
- V3 Swarm CoordinationSkill
- Verification & Quality AssuranceSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 16 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 47
Default hook handlers for common operations
- Distinctive: line 95
pre-bash: - Check command safety and resource requirements
- Distinctive: line 260
agent-spawned: - Update agent roster and memory
- Distinctive: line 551
Add protection for sensitive files:
- Distinctive: line 573
Run tests after file modifications:
- Distinctive: line 668
All hooks follow a standardized memory coordination pattern:
- Distinctive: line 910
Create custom hooks for specific workflows:
- Distinctive: line 1104
Use Async for Heavy Operations: - Don't block the main flow
- Distinctive: line 1109
Parallelize When Possible: - Run independent hooks concurrently
- Distinctive: line 1151
Validate Configuration: - Test hooks before production use
- Distinctive: line 1154
Handle Errors Gracefully: - Use continueOnError when appropriate
- Distinctive: line 1161
Check hook matcher patterns
- Distinctive: line 1164
Ensure claude-flow CLI is in PATH
- Distinctive: line 1170
Check network connectivity for MCP tools
- Distinctive: line 1175
Use memory namespaces effectively
- Distinctive: line 1180
Use caching for repeated operations
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.jsonwith 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 --hooksThis creates:
.claude/settings.jsonwith 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-metricsComplete 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-conflictsFeatures:
- 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-resourcesFeatures:
- 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-topologyFeatures:
- Automatic agent spawning based on task analysis
- Memory loading for context continuity
- Topology optimization for task structure
- Complexity estimation and time prediction
pre-search - Prepare and optimize search operations
npx claude-flow hook pre-search --query <query>
Options:
--query, -q <text> Search query
--check-cache Check cache first (default: true)
--optimize-query Optimize search pattern
Examples:
npx claude-flow hook pre-search -q "authentication middleware"Features:
- Cache checking for faster results
- Query optimization
- Search pattern improvement
Post-Operation Hooks
Hooks that execute AFTER operations to process and learn:
post-edit - Auto-format, validate, and update memory
npx claude-flow hook post-edit [options]
Options:
--file, -f <path> File path that was edited
--auto-format Automatically format code (default: true)
--memory-key, -m <key> Store edit context in memory
--train-patterns Train neural patterns from edit
--validate-output Validate edited file
Examples:
npx claude-flow hook post-edit --file "src/components/Button.jsx"
npx claude-flow hook post-edit -f "api/auth.js" --memory-key "auth/login"
npx claude-flow hook post-edit -f "utils/helpers.ts" --train-patternsFeatures:
- Language-specific auto-formatting (Prettier, Black, gofmt)
- Memory storage for edit context and decisions
- Neural pattern training for continuous improvement
- Output validation with linting
post-bash - Log execution and update metrics
npx claude-flow hook post-bash --command <cmd>
Options:
--command, -c <cmd> Command that was executed
--log-output Log command output (default: true)
--update-metrics Update performance metrics
--store-result Store result in memory
Examples:
npx claude-flow hook post-bash -c "npm test" --update-metricsFeatures:
- Command execution logging
- Performance metric tracking
- Result storage for analysis
- Error pattern detection
post-task - Performance analysis and decision storage
npx claude-flow hook post-task [options]
Options:
--task-id, -t <id> Task identifier for tracking
--analyze-performance Generate performance metrics (default: true)
--store-decisions Save task decisions to memory
--export-learnings Export neural pattern learnings
--generate-report Create task completion report
Examples:
npx claude-flow hook post-task --task-id "auth-implementation"
npx claude-flow hook post-task -t "api-refactor" --analyze-performance
npx claude-flow hook post-task -t "bug-fix-123" --store-decisionsFeatures:
- Execution time and token usage measurement
- Decision and implementation choice recording
- Neural learning pattern export
- Completion report generation
post-search - Cache results and improve patterns
npx claude-flow hook post-search --query <query> --results <path>
Options:
--query, -q <text> Original search query
--results, -r <path> Results file path
--cache-results Cache for future use (default: true)
--train-patterns Improve search patterns
Examples:
npx claude-flow hook post-search -q "auth" -r "results.json" --train-patternsFeatures:
- Result caching for faster subsequent searches
- Search pattern improvement
- Relevance scoring
MCP Integration Hooks
Hooks that coordinate with MCP swarm tools:
mcp-initialized - Persist swarm configuration
npx claude-flow hook mcp-initialized --swarm-id <id>
Features:
- Save swarm topology and configuration
- Store agent roster in memory
- Initialize coordination namespaceagent-spawned - Update agent roster and memory
npx claude-flow hook agent-spawned --agent-id <id> --type <type>
Features:
- Register agent in coordination memory
- Update agent roster
- Initialize agent-specific memory namespacetask-orchestrated - Monitor task progress
npx claude-flow hook task-orchestrated --task-id <id>
Features:
- Track task progress through memory
- Monitor agent assignments
- Update coordination stateneural-trained - Save pattern improvements
npx claude-flow hook neural-trained --pattern <name>
Features:
- Export trained neural patterns
- Update coordination models
- Share learning across agentsMemory Coordination Hooks
memory-write - Triggered when agents write to coordination memory
Features:
- Validate memory key format
- Update cross-agent indexes
- Trigger dependent hooks
- Notify subscribed agentsmemory-read - Triggered when agents read from coordination memory
Features:
- Log access patterns
- Update popularity metrics
- Preload related data
- Track usage statisticsmemory-sync - Synchronize memory across swarm agents
npx claude-flow hook memory-sync --namespace <ns>
Features:
- Sync memory state across agents
- Resolve conflicts
- Propagate updates
- Maintain consistencySession Hooks
session-start - Initialize new session
npx claude-flow hook session-start --session-id <id>
Options:
--session-id, -s <id> Session identifier
--load-context Load context from previous session
--init-agents Initialize required agents
Features:
- Create session directory
- Initialize metrics tracking
- Load previous context
- Set up coordination namespacesession-restore - Load previous session state
npx claude-flow hook session-restore --session-id <id>
Options:
--session-id, -s <id> Session to restore
--restore-memory Restore memory state (default: true)
--restore-agents Restore agent configurations
Examples:
npx claude-flow hook session-restore --session-id "swarm-20241019"
npx claude-flow hook session-restore -s "feature-auth" --restore-memoryFeatures:
- Load previous session context
- Restore memory state and decisions
- Reconfigure agents to previous state
- Resume in-progress tasks
session-end - Cleanup and persist session state
npx claude-flow hook session-end [options]
Options:
--session-id, -s <id> Session identifier to end
--save-state Save current session state (default: true)
--export-metrics Export session metrics
--generate-summary Create session summary
--cleanup-temp Remove temporary files
Examples:
npx claude-flow hook session-end --session-id "dev-session-2024"
npx claude-flow hook session-end -s "feature-auth" --export-metrics --generate-summary
npx claude-flow hook session-end -s "quick-fix" --cleanup-tempFeatures:
- Save current context and progress
- Export session metrics (duration, commands, tokens, files)
- Generate work summary with decisions and next steps
- Cleanup temporary files and optimize storage
notify - Custom notifications with swarm status
npx claude-flow hook notify --message <msg>
Options:
--message, -m <text> Notification message
--level <level> Notification level (info|warning|error)
--swarm-status Include swarm status (default: true)
--broadcast Send to all agents
Examples:
npx claude-flow hook notify -m "Task completed" --level info
npx claude-flow hook notify -m "Critical error" --level error --broadcastFeatures:
- Send notifications to coordination system
- Include swarm status and metrics
- Broadcast to all agents
- Log important events
Configuration
Basic Configuration
Edit .claude/settings.json to configure hooks:
{
"hooks": {
"PreToolUse": [
{
"matcher": "^(Write|Edit|MultiEdit)$",
"hooks": [{
"type": "command",
"command": "npx claude-flow hook pre-edit --file '${tool.params.file_path}' --memory-key 'swarm/editor/current'"
}]
},
{
"matcher": "^Bash$",
"hooks": [{
"type": "command",
"command": "npx claude-flow hook pre-bash --command '${tool.params.command}'"
}]
}
],
"PostToolUse": [
{
"matcher": "^(Write|Edit|MultiEdit)$",
"hooks": [{
"type": "command",
"command": "npx claude-flow hook post-edit --file '${tool.params.file_path}' --memory-key 'swarm/editor/complete' --auto-format --train-patterns"
}]
},
{
"matcher": "^Bash$",
"hooks": [{
"type": "command",
"command": "npx claude-flow hook post-bash --command '${tool.params.command}' --update-metrics"
}]
}
]
}
}Advanced Configuration
Complete hook configuration with all features:
{
"hooks": {
"enabled": true,
"debug": false,
"timeout": 5000,
"PreToolUse": [
{
"matcher": "^(Write|Edit|MultiEdit)$",
"hooks": [
{
"type": "command",
"command": "npx claude-flow hook pre-edit --file '${tool.params.file_path}' --auto-assign-agent --validate-syntax",
"timeout": 3000,
"continueOnError": true
}
]
},
{
"matcher": "^Task$",
"hooks": [
{
"type": "command",
"command": "npx claude-flow hook pre-task --description '${tool.params.task}' --auto-spawn-agents --load-memory",
"async": true
}
]
},
{
"matcher": "^Grep$",
"hooks": [
{
"type": "command",
"command": "npx claude-flow hook pre-search --query '${tool.params.pattern}' --check-cache"
}
]
}
],
"PostToolUse": [
{
"matcher": "^(Write|Edit|MultiEdit)$",
"hooks": [
{
"type": "command",
"command": "npx claude-flow hook post-edit --file '${tool.params.file_path}' --memory-key 'edits/${tool.params.file_path}' --auto-format --train-patterns",
"async": true
}
]
},
{
"matcher": "^Task$",
"hooks": [
{
"type": "command",
"command": "npx claude-flow hook post-task --task-id '${result.task_id}' --analyze-performance --store-decisions --export-learnings",
"async": true
}
]
},
{
"matcher": "^Grep$",
"hooks": [
{
"type": "command",
"command": "npx claude-flow hook post-search --query '${tool.params.pattern}' --cache-results --train-patterns"
}
]
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "npx claude-flow hook session-start --session-id '${session.id}' --load-context"
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "npx claude-flow hook session-end --session-id '${session.id}' --export-metrics --generate-summary --cleanup-temp"
}
]
}
]
}
}Protected File Patterns
Add protection for sensitive files:
{
"hooks": {
"PreToolUse": [
{
"matcher": "^(Write|Edit|MultiEdit)$",
"hooks": [
{
"type": "command",
"command": "npx claude-flow hook check-protected --file '${tool.params.file_path}'"
}
]
}
]
}
}Automatic Testing
Run tests after file modifications:
{
"hooks": {
"PostToolUse": [
{
"matcher": "^Write$",
"hooks": [
{
"type": "command",
"command": "test -f '${tool.params.file_path%.js}.test.js' && npm test '${tool.params.file_path%.js}.test.js'",
"continueOnError": true
}
]
}
]
}
}MCP Tool Integration
Hooks automatically integrate with MCP tools for coordination:
Pre-Task Hook with Agent Spawning
// Hook command
npx claude-flow hook pre-task --description "Build REST API"
// Internally calls MCP tools:
mcp__claude-flow__agent_spawn {
type: "backend-dev",
capabilities: ["api", "database", "testing"]
}
mcp__claude-flow__memory_usage {
action: "store",
key: "swarm/task/api-build/context",
namespace: "coordination",
value: JSON.stringify({
description: "Build REST API",
agents: ["backend-dev"],
started: Date.now()
})
}Post-Edit Hook with Memory Storage
// Hook command
npx claude-flow hook post-edit --file "api/auth.js"
// Internally calls MCP tools:
mcp__claude-flow__memory_usage {
action: "store",
key: "swarm/edits/api/auth.js",
namespace: "coordination",
value: JSON.stringify({
file: "api/auth.js",
timestamp: Date.now(),
changes: { added: 45, removed: 12 },
formatted: true,
linted: true
})
}
mcp__claude-flow__neural_train {
pattern_type: "coordination",
training_data: { /* edit patterns */ }
}Session End Hook with State Persistence
// Hook command
npx claude-flow hook session-end --session-id "dev-2024"
// Internally calls MCP tools:
mcp__claude-flow__memory_persist {
sessionId: "dev-2024"
}
mcp__claude-flow__swarm_status {
swarmId: "current"
}
// Generates metrics and summaryMemory Coordination Protocol
All hooks follow a standardized memory coordination pattern:
Three-Phase Memory Protocol
Phase 1: STATUS - Hook starts
mcp__claude-flow__memory_usage {
action: "store",
key: "swarm/hooks/pre-edit/status",
namespace: "coordination",
value: JSON.stringify({
status: "running",
hook: "pre-edit",
file: "src/auth.js",
timestamp: Date.now()
})
}Phase 2: PROGRESS - Hook processes
mcp__claude-flow__memory_usage {
action: "store",
key: "swarm/hooks/pre-edit/progress",
namespace: "coordination",
value: JSON.stringify({
progress: 50,
action: "validating syntax",
file: "src/auth.js"
})
}Phase 3: COMPLETE - Hook finishes
mcp__claude-flow__memory_usage {
action: "store",
key: "swarm/hooks/pre-edit/complete",
namespace: "coordination",
value: JSON.stringify({
status: "complete",
result: "success",
agent_assigned: "backend-dev",
syntax_valid: true,
backup_created: true
})
}Hook Response Format
Hooks return JSON responses to control operation flow:
Continue Response
{
"continue": true,
"reason": "All validations passed",
"metadata": {
"agent_assigned": "backend-dev",
"syntax_valid": true,
"file": "src/auth.js"
}
}Block Response
{
"continue": false,
"reason": "Protected file - manual review required",
"metadata": {
"file": ".env.production",
"protection_level": "high",
"requires": "manual_approval"
}
}Warning Response
{
"continue": true,
"reason": "Syntax valid but complexity high",
"warnings": [
"Cyclomatic complexity: 15 (threshold: 10)",
"Consider refactoring for better maintainability"
],
"metadata": {
"complexity": 15,
"threshold": 10
}
}Git Integration
Hooks can integrate with Git operations for quality control:
Pre-Commit Hook
# Add to .git/hooks/pre-commit or use husky
#!/bin/bash
# Run quality checks before commit
# Get staged files
FILES=$(git diff --cached --name-only --diff-filter=ACM)
for FILE in $FILES; do
# Run pre-edit hook for validation
npx claude-flow hook pre-edit --file "$FILE" --validate-syntax
if [ $? -ne 0 ]; then
echo "Validation failed for $FILE"
exit 1
fi
# Run post-edit hook for formatting
npx claude-flow hook post-edit --file "$FILE" --auto-format
done
# Run tests
npm test
exit $?Post-Commit Hook
# Add to .git/hooks/post-commit
#!/bin/bash
# Track commit metrics
COMMIT_HASH=$(git rev-parse HEAD)
COMMIT_MSG=$(git log -1 --pretty=%B)
npx claude-flow hook notify \
--message "Commit completed: $COMMIT_MSG" \
--level info \
--swarm-statusPre-Push Hook
# Add to .git/hooks/pre-push
#!/bin/bash
# Quality gate before push
# Run full test suite
npm run test:all
# Run quality checks
npx claude-flow hook session-end \
--generate-report \
--export-metrics
# Verify quality thresholds
TRUTH_SCORE=$(npx claude-flow metrics score --format json | jq -r '.truth_score')
if (( $(echo "$TRUTH_SCORE < 0.95" | bc -l) )); then
echo "Truth score below threshold: $TRUTH_SCORE < 0.95"
exit 1
fi
exit 0Agent Coordination Workflow
How agents use hooks for coordination:
Agent Workflow Example
# Agent 1: Backend Developer
# STEP 1: Pre-task preparation
npx claude-flow hook pre-task \
--description "Implement user authentication API" \
--auto-spawn-agents \
--load-memory
# STEP 2: Work begins - pre-edit validation
npx claude-flow hook pre-edit \
--file "api/auth.js" \
--auto-assign-agent \
--validate-syntax
# STEP 3: Edit file (via Claude Code Edit tool)
# ... code changes ...
# STEP 4: Post-edit processing
npx claude-flow hook post-edit \
--file "api/auth.js" \
--memory-key "swarm/backend/auth-api" \
--auto-format \
--train-patterns
# STEP 5: Notify coordination system
npx claude-flow hook notify \
--message "Auth API implementation complete" \
--swarm-status \
--broadcast
# STEP 6: Task completion
npx claude-flow hook post-task \
--task-id "auth-api" \
--analyze-performance \
--store-decisions \
--export-learnings# Agent 2: Test Engineer (receives notification)
# STEP 1: Check memory for API details
npx claude-flow hook session-restore \
--session-id "swarm-current" \
--restore-memory
# Memory contains: swarm/backend/auth-api with implementation details
# STEP 2: Generate tests
npx claude-flow hook pre-task \
--description "Write tests for auth API" \
--load-memory
# STEP 3: Create test file
npx claude-flow hook post-edit \
--file "api/auth.test.js" \
--memory-key "swarm/testing/auth-api-tests" \
--train-patterns
# STEP 4: Share test results
npx claude-flow hook notify \
--message "Auth API tests complete - 100% coverage" \
--broadcastCustom Hook Creation
Create custom hooks for specific workflows:
Custom Hook Template
// .claude/hooks/custom-quality-check.js
module.exports = {
name: 'custom-quality-check',
type: 'pre',
matcher: /\.(ts|js)$/,
async execute(context) {
const { file, content } = context;
// Custom validation logic
const complexity = await analyzeComplexity(content);
const securityIssues = await scanSecurity(content);
// Store in memory
await storeInMemory({
key: `quality/${file}`,
value: { complexity, securityIssues }
});
// Return decision
if (complexity > 15 || securityIssues.length > 0) {
return {
continue: false,
reason: 'Quality checks failed',
warnings: [
`Complexity: ${complexity} (max: 15)`,
`Security issues: ${securityIssues.length}`
]
};
}
return {
continue: true,
reason: 'Quality checks passed',
metadata: { complexity, securityIssues: 0 }
};
}
};Register Custom Hook
{
"hooks": {
"PreToolUse": [
{
"matcher": "^(Write|Edit)$",
"hooks": [
{
"type": "script",
"script": ".claude/hooks/custom-quality-check.js"
}
]
}
]
}
}Real-World Examples
Example 1: Full-Stack Development Workflow
# Session start - initialize coordination
npx claude-flow hook session-start --session-id "fullstack-feature"
# Pre-task planning
npx claude-flow hook pre-task \
--description "Build user profile feature - frontend + backend + tests" \
--auto-spawn-agents \
--optimize-topology
# Backend work
npx claude-flow hook pre-edit --file "api/profile.js"
# ... implement backend ...
npx claude-flow hook post-edit \
--file "api/profile.js" \
--memory-key "profile/backend" \
--train-patterns
# Frontend work (reads backend details from memory)
npx claude-flow hook pre-edit --file "components/Profile.jsx"
# ... implement frontend ...
npx claude-flow hook post-edit \
--file "components/Profile.jsx" \
--memory-key "profile/frontend" \
--train-patterns
# Testing (reads both backend and frontend from memory)
npx claude-flow hook pre-task \
--description "Test profile feature" \
--load-memory
# Session end - export everything
npx claude-flow hook session-end \
--session-id "fullstack-feature" \
--export-metrics \
--generate-summaryExample 2: Debugging with Hooks
# Start debugging session
npx claude-flow hook session-start --session-id "debug-memory-leak"
# Pre-task: analyze issue
npx claude-flow hook pre-task \
--description "Debug memory leak in event handlers" \
--load-memory \
--estimate-complexity
# Search for event emitters
npx claude-flow hook pre-search --query "EventEmitter"
# ... search executes ...
npx claude-flow hook post-search \
--query "EventEmitter" \
--cache-results
# Fix the issue
npx claude-flow hook pre-edit \
--file "services/events.js" \
--backup-file
# ... fix code ...
npx claude-flow hook post-edit \
--file "services/events.js" \
--memory-key "debug/memory-leak-fix" \
--validate-output
# Verify fix
npx claude-flow hook post-task \
--task-id "memory-leak-fix" \
--analyze-performance \
--generate-report
# End session
npx claude-flow hook session-end \
--session-id "debug-memory-leak" \
--export-metricsExample 3: Multi-Agent Refactoring
# Initialize swarm for refactoring
npx claude-flow hook pre-task \
--description "Refactor legacy codebase to modern patterns" \
--auto-spawn-agents \
--optimize-topology
# Agent 1: Code Analyzer
npx claude-flow hook pre-task --description "Analyze code complexity"
# ... analysis ...
npx claude-flow hook post-task \
--task-id "analysis" \
--store-decisions
# Agent 2: Refactoring (reads analysis from memory)
npx claude-flow hook session-restore \
--session-id "swarm-refactor" \
--restore-memory
for file in src/**/*.js; do
npx claude-flow hook pre-edit --file "$file" --backup-file
# ... refactor ...
npx claude-flow hook post-edit \
--file "$file" \
--memory-key "refactor/$file" \
--auto-format \
--train-patterns
done
# Agent 3: Testing (reads refactored code from memory)
npx claude-flow hook pre-task \
--description "Generate tests for refactored code" \
--load-memory
# Broadcast completion
npx claude-flow hook notify \
--message "Refactoring complete - all tests passing" \
--broadcastPerformance Tips
- Keep Hooks Lightweight - Target < 100ms execution time
- Use Async for Heavy Operations - Don't block the main flow
- Cache Aggressively - Store frequently accessed data
- Batch Related Operations - Combine multiple actions
- Use Memory Wisely - Set appropriate TTLs
- Monitor Hook Performance - Track execution times
- Parallelize When Possible - Run independent hooks concurrently
Debugging Hooks
Enable debug mode for troubleshooting:
# Enable debug output
export CLAUDE_FLOW_DEBUG=true
# Test specific hook with verbose output
npx claude-flow hook pre-edit --file "test.js" --debug
# Check hook execution logs
cat .claude-flow/logs/hooks-$(date +%Y-%m-%d).log
# Validate configuration
npx claude-flow hook validate-configBenefits
- Automatic Agent Assignment: Right agent for every file type
- Consistent Code Formatting: Language-specific formatters
- Continuous Learning: Neural patterns improve over time
- Cross-Session Memory: Context persists between sessions
- Performance Tracking: Comprehensive metrics and analytics
- Automatic Coordination: Agents sync via memory
- Smart Agent Spawning: Task-based agent selection
- Quality Gates: Pre-commit validation and verification
- Error Prevention: Syntax validation before edits
- Knowledge Sharing: Decisions stored and shared
- Reduced Manual Work: Automation of repetitive tasks
- Better Collaboration: Seamless multi-agent coordination
Best Practices
- Configure Hooks Early - Set up during project initialization
- Use Memory Keys Strategically - Organize with clear namespaces
- Enable Auto-Formatting - Maintain code consistency
- Train Patterns Continuously - Learn from successful operations
- Monitor Performance - Track hook execution times
- Validate Configuration - Test hooks before production use
- Document Custom Hooks - Maintain hook documentation
- Set Appropriate Timeouts - Prevent hanging operations
- Handle Errors Gracefully - Use continueOnError when appropriate
- Review Metrics Regularly - Optimize based on usage patterns
Troubleshooting
Hooks Not Executing
- Verify
.claude/settings.jsonsyntax - Check hook matcher patterns
- Enable debug mode
- Review permission settings
- Ensure claude-flow CLI is in PATH
Hook Timeouts
- Increase timeout values in configuration
- Make hooks asynchronous for heavy operations
- Optimize hook logic
- Check network connectivity for MCP tools
Memory Issues
- Set appropriate TTLs for memory keys
- Clean up old memory entries
- Use memory namespaces effectively
- Monitor memory usage
Performance Problems
- Profile hook execution times
- Use caching for repeated operations
- Batch operations when possible
- Reduce hook complexity
Related Commands
npx claude-flow init --hooks- Initialize hooks systemnpx claude-flow hook --list- List available hooksnpx claude-flow hook --test <hook>- Test specific hooknpx claude-flow memory usage- Manage memorynpx claude-flow agent spawn- Spawn agentsnpx claude-flow swarm init- Initialize swarm
Integration with Other Skills
This skill works seamlessly with:
- SPARC Methodology - Hooks enhance SPARC workflows
- Pair Programming - Automated quality in pairing sessions
- Verification Quality - Truth-score validation in hooks
- GitHub Workflows - Git integration for commits/PRs
- Performance Analysis - Metrics collection in hooks
- Swarm Advanced - Multi-agent coordination via hooks
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

