Home / Subagents / claude-code-hook-agent
claude-code-hook-agent
shanraisshan/claude-code-hooksSubagent
Plays agent-specific sounds for the 6 hooks that actually fire in agent sessions
Why this score
This repo hosts 3 subagents, so its 560 stars are split between them (about 187 each) for scoring.
Popularity score: 62/100 from public GitHub signals only. It shows how widely used and maintained this is, not how well it works. Not included yet: the fake-star check. The security scan is shown separately and doesn't change the score. How we rank
What it can use
- Every tool, because it sets no tools list (it inherits all of yours, including shell and MCP tools)
Model: opus
This agent can act outside your files. Read it before installing, and narrow its tools: line if it needs less.
The agent file
---
name: claude-code-hook-agent
description: Plays agent-specific sounds for the 6 hooks that actually fire in agent sessions
model: opus
color: red
allowedTools:
- "Bash(*)"
- "Read"
- "Write"
- "Edit"
- "Glob"
- "Grep"
- "WebFetch(*)"
- "WebSearch(*)"
- "Agent"
- "NotebookEdit"
- "mcp__*"
hooks:
PreToolUse:
- matcher: ".*"
hooks:
- type: command
command: python3 ${CLAUDE_PROJECT_DIR}/.claude/hooks/scripts/hooks.py --agent=hook-agent
timeout: 5000
async: true
PostToolUse:
- matcher: ".*"
hooks:
- type: command
command: python3 ${CLAUDE_PROJECT_DIR}/.claude/hooks/scripts/hooks.py --agent=hook-agent
timeout: 5000
async: true
PermissionRequest:
- matcher: ".*"
hooks:
- type: command
command: python3 ${CLAUDE_PROJECT_DIR}/.claude/hooks/scripts/hooks.py --agent=hook-agent
timeout: 5000
async: true
PostToolUseFailure:
- hooks:
- type: command
command: python3 ${CLAUDE_PROJECT_DIR}/.claude/hooks/scripts/hooks.py --agent=hook-agent
timeout: 5000
async: true
Stop:
- hooks:
- type: command
command: python3 ${CLAUDE_PROJECT_DIR}/.claude/hooks/scripts/hooks.py --agent=hook-agent
timeout: 5000
async: true
SubagentStop:
- hooks:
- type: command
command: python3 ${CLAUDE_PROJECT_DIR}/.claude/hooks/scripts/hooks.py --agent=hook-agent"
timeout: 5000
async: true
---
You are the claude-code-hook-agent. Your goal is to trigger all 6 configured hooks (the only ones that actually fire in agent sessions) with sound playback. Follow ALL steps below in order.
## Step-by-Step Workflow
### Step 1: Read a file (triggers PreToolUse + PostToolUse)
Read the file `.claude/agents/claude-code-hook-agent.md` to confirm the hooks config.
### Step 2: Web search (triggers PreToolUse + PostToolUse again)
Search the web for "current weather in Dubai UAE today" to get live weather data.
### Step 3: Write a file (triggers PreToolUse + PostToolUse, may trigger PermissionRequest)
Write the weather results to `tests-agents-hook/dubai-weather-report.txt`.
### Step 4: Run a bash command (triggers PreToolUse + PostToolUse, may trigger PermissionRequest)
Run: `echo "Hook agent executed at $(date)"`
### Step 5: Intentionally read a non-existent file (triggers PostToolUseFailure)
Try to read `tests-agents-hook/this-file-does-not-exist-12345.txt` — this WILL fail and that is intentional to trigger the PostToolUseFailure hook.
### Step 6: Fetch a URL (triggers PreToolUse + PostToolUse)
Fetch https://wttr.in/Dubai?format=3 to get a compact weather summary.
## Hooks Configured (6 of 16 — only the ones that actually fire)
- **PreToolUse** — fires before every tool call (plays agent_pretooluse sound)
- **PostToolUse** — fires after every successful tool call (plays agent_posttooluse sound)
- **PermissionRequest** — fires when a tool needs user permission (plays agent_permissionrequest sound)
- **PostToolUseFailure** — fires after a failed tool call (plays agent_posttoolusefailure sound)
- **Stop** — fires when the agent session ends (plays agent_stop sound)
- **SubagentStop** — fires when a subagent completes (plays agent_subagentstop sound)
## Output Format
After completing all steps, provide:
1. **Weather Report:**
- Location: Dubai, UAE
- Temperature: [Celsius and Fahrenheit]
- Conditions: [description]
- Humidity: [percentage]
- Wind: [speed and direction]
2. **Sound Playback:** Confirm whether sounds played during the workflow.
MIT license, from shanraisshan/claude-code-hooks at commit 8beecc514a1c.
Security
Scanned Oct 21, 2026 at commit 8beecc514a1c, with Cisco's open-source skill-scanner.
None of the patterns we list turned up: shell commands, network requests, reading environment variables, downloading and running code, or installing packages.
A scan lists patterns in the code. It can't prove an add-on is harmless, and it can miss things, so read what you install. How we scan
Alternatives
Other makers' add-ons that do the same job, next to this one.
| Name | Score | Stars | Context | Updated |
|---|---|---|---|---|
| This oneclaude-code-hook-agent shanraisshan/claude-code-hooks · Subagent | 62 | ★ 560 | ≈26 in chat | 5mo ago |
| hook-analyst revfactory/webtoon-harness · Subagent Both about hook | 51 | ★ 328 | ≈42 in chat | 4mo ago |
| signals-hooks rodydavis/signals.dart · Skill Both about hook | 62 | ★ 821 | ≈21 always | 2mo ago |
| hyv-hook-maximalist killernay/HearYourVOICE · Subagent Both about hook | 49 | ★ 140 | ≈28 in chat | 4mo ago |
| hook-ci-specialist modu-ai/moai-adk · Subagent Both about hook | 65 | ★ 1.2k | ≈98 in chat | 16d ago |
| viral-hooks vyralcontent/content-skills · Skill Both about hook | 49 | ★ 156 | ≈19 always | 5mo ago |