Directory · Hooks
Claude Code Stop Hook (Task Completion Callback)
Stop/SessionEnd hook and dispatch scripts that save Claude Code task results to JSON and post them to a chat group via OpenClaw.
★ 335 stars · last updated 2026-11-26 · Free (check license) · View on GitHub
Best for
- Getting chat notifications when long-running Claude Code tasks finish
- Dispatching headless Claude Code or Agent Teams jobs from a script
- Feeding task results back to an orchestrating agent via pending-wake files
Our take
README is in Chinese and there are no packaged install steps; you copy hooks/notify-agi.sh to ~/.claude/hooks/ and register it in ~/.claude/settings.json. Paths such as /home/ubuntu/clawd are hardcoded and messaging depends on the openclaw CLI, so expect to adapt it to your setup. It uses a .hook-lock file to dedupe Stop and SessionEnd events within 30 seconds, and the repo has no license.
Similar hooks
- Claude Code Ultimate Guide: Large open guide to Claude Code covering agent workflows, hooks, skills, MCP, security, and team adoption, with reusable templates.
- dcg (Destructive Command Guard): Rust pre-execution hook that blocks destructive shell, git, filesystem, database, and cloud commands run by AI coding agents.
- Claude Code Showcase: Example Claude Code project config with hooks, skills, agents, slash commands, MCP setup, and GitHub Actions workflows to copy from.
- Claude Code Hooks Mastery: Reference project implementing all 13 Claude Code hook events as UV Python scripts, plus sub-agents, status lines, and output styles.
- Continuous Claude v3: Hooks, skills, and agents that keep Claude Code context across sessions via YAML handoffs, ledgers, and a PostgreSQL memory store.
- Build with Claude: Plugin marketplace and discovery hub of agents, commands, hooks, and skills for Claude Code users extending their workflows.