Skip to content

Instantly share code, notes, and snippets.

@cb341
Last active April 7, 2026 17:05
Show Gist options
  • Select an option

  • Save cb341/5192af31c66852cbccae45aca129b896 to your computer and use it in GitHub Desktop.

Select an option

Save cb341/5192af31c66852cbccae45aca129b896 to your computer and use it in GitHub Desktop.
Minecraft sound effects as Claude Code hooks - every hook event plays a thematic Minecraft .ogg sound with random variation picking. Sounds sourced from Minecraft wiki. Requires macOS (afplay) and .ogg files in ~/Documents/minecraft-claude-code-sounds/ organized by hook name.

Minecraft Sound Effects for Claude Code Hooks

Every Claude Code hook event plays a thematic Minecraft sound. Random variation each time.

Sound Mapping

Hook Minecraft Sound Vibe
SessionStart Chest open Opening a session
SessionEnd Chest close Packing up
UserPromptSubmit Note block bell Ding! You rang?
PreToolUse Door open Stepping through
PostToolUse Levelup / click / pop XP gained
PostToolUseFailure Creeper fuse + explosion Ssss... boom
PermissionRequest Villager "hmm?" Waiting for your call
PermissionDenied Villager "no" Hrmph!
SubagentStart Enderman teleport Vwoop! Agent in
SubagentStop Enderman teleport Vwoop! Agent out
TaskCompleted Levelup fanfare Task done!
Stop Villager "yes" Done talking
StopFailure Explosion Boom
PreCompact Piston extend + Composter fill Squishing context down
PostCompact Piston contract + Composter ready Compaction done
Notification Note block harp Gentle chime
WorktreeCreate Grass place Planting a tree
WorktreeRemove Wood break Chopping it down
FileChanged Snare / hi-hat Percussive alert
CwdChanged Fox sniff Sniffing around a new dir
InstructionsLoaded Page turn Opening the instruction book

Setup

  1. Download the .ogg sound files from the Minecraft Wiki into ~/Documents/minecraft-claude-code-sounds/ with one subfolder per hook name (e.g. SessionStart/, Stop/, etc.). Multiple files per folder = random variation each trigger.
  2. Copy the hooks block from minecraft-claude-code-hooks.jsonc into your ~/.claude/settings.json.
  3. macOS only (uses afplay). For Linux, swap afplay for paplay or ogg123.

Tip: PreToolUse and PostToolUse fire a lot. Remove them if it gets noisy.

All sounds are property of Mojang Studios. For personal use only.

// Minecraft Sound Effects for Claude Code Hooks (macOS)
//
// Each Claude Code hook event plays a thematic Minecraft sound.
// Sounds are .ogg files in ~/Documents/minecraft-claude-code-sounds/<HookName>/
// A random variation is picked each time via `sort -R | head -1`.
//
// Hook -> Sound mapping:
// SessionStart -> Chest open (opening a session)
// SessionEnd -> Chest close (closing up)
// UserPromptSubmit -> Note block bell (ding! you rang?)
// PreToolUse -> Door open (stepping through)
// PostToolUse -> Levelup/click/pop (XP gained)
// PostToolUseFailure -> Creeper fuse + boom (ssss... that failed)
// PermissionRequest -> Villager "hmm?" (waiting for your decision)
// PermissionDenied -> Villager "no" (hrmph!)
// SubagentStart -> Enderman teleport (vwoop! agent in)
// SubagentStop -> Enderman teleport (vwoop! agent out)
// TaskCompleted -> Levelup fanfare (task done!)
// Stop -> Villager "yes" (done talking)
// StopFailure -> Explosion (boom)
// PreCompact -> Piston extend + composter fill (squishing context)
// PostCompact -> Piston contract + composter ready (compaction done)
// Notification -> Note block harp (gentle chime)
// WorktreeCreate -> Grass place (planting a tree)
// WorktreeRemove -> Wood break (chopping it down)
// FileChanged -> Snare/hat (percussive alert)
// CwdChanged -> Fox sniff (sniffing around new dir)
// InstructionsLoaded -> Page turn (opening the book)
//
// To use: download Minecraft .ogg sounds from the wiki into the folder structure,
// then paste the "hooks" block below into ~/.claude/settings.json.
//
// Tip: PreToolUse fires A LOT. Remove it if it gets noisy.
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/SessionStart/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/SessionEnd/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/UserPromptSubmit/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/PreToolUse/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/PostToolUse/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"PostToolUseFailure": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/PostToolUseFailure/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"PermissionRequest": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/PermissionRequest/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"PermissionDenied": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/PermissionDenied/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"SubagentStart": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/SubagentStart/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"SubagentStop": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/SubagentStop/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"TaskCompleted": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/TaskCompleted/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/Stop/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"StopFailure": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/StopFailure/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"PreCompact": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/PreCompact/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"PostCompact": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/PostCompact/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/Notification/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"WorktreeCreate": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/WorktreeCreate/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"WorktreeRemove": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/WorktreeRemove/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"FileChanged": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/FileChanged/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"CwdChanged": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/CwdChanged/*.ogg | sort -R | head -1)\" &"
}
]
}
],
"InstructionsLoaded": [
{
"hooks": [
{
"type": "command",
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/InstructionsLoaded/*.ogg | sort -R | head -1)\" &"
}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment