๐ŸŽฏ Useful Claude Customizations

October 1, 2025 ยท View on GitHub

A collection of powerful hooks and customizations for Claude Code to enhance your AI-assisted development workflow.

โœจ Features

๐Ÿ”Š ElevenLabs Voice Summaries

Automatically hear natural voice summaries of completed tasks using ElevenLabs' text-to-speech API.

  • Smart Summarization: Intelligently extracts key actions from Claude's responses
  • Session Detection: Automatically detects and announces which terminal session completed the task
  • Voice Mapping: Each Terminal Keeper session gets its own unique voice for instant identification
  • Natural Voice: High-quality voice synthesis with 9 different voice options
  • Cross-Platform: Works on macOS, Windows, and Linux/WSL
  • Audio Archive: Saves all generated summaries for later playback

๐Ÿ“‹ Prerequisites

  • Claude Code installed and configured
  • Node.js 18+ and npm
  • tsx installed globally: npm install -g tsx
  • ElevenLabs account (free tier available)

๐Ÿš€ Quick Start

The installer provides detailed explanations for each step and supports both global and project-specific installations.

  1. Get Your ElevenLabs API Key

  2. Set Environment Variable

    # Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
    export ELEVENLABS_API_KEY="your-api-key-here"
    
  3. Run the Installer

    # Clone the repo
    git clone https://github.com/paulpreibisch/UsefulClaudeCustomizations.git
    cd UsefulClaudeCustomizations
    
    # Run the install script
    ./install.sh
    
  4. Choose Installation Type

    • Global: Press Enter when prompted - affects all Claude Code sessions
    • Project-specific: Enter your project path - only affects that project

    The installer will:

    • Explain what tsx is and why it's needed
    • Show what each step does and why
    • Ask for confirmation before making changes
    • Preserve your existing settings (creates backup)
    • Install hooks in either ~/.claude/ or <project>/.claude/
  5. Restart Claude Code

    • The installer handles everything: hooks, settings, and directory setup
    • Just restart Claude Code and you're ready to go!

Manual Installation

If you prefer to install manually, follow these steps:

1. Get Your ElevenLabs API Key

  1. Sign up for a free account at ElevenLabs
  2. Go to your API Keys page
  3. Copy your API key

2. Set Environment Variable

# Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
export ELEVENLABS_API_KEY="your-api-key-here"

3. Install the Hook

# Create Claude hooks directory
mkdir -p ~/.claude/hooks

# Copy the ElevenLabs hook
cp hooks/stop-elevenlabs.ts ~/.claude/hooks/

# Make it executable
chmod +x ~/.claude/hooks/stop-elevenlabs.ts

4. Configure Claude Settings

Create or update ~/.claude/settings.json:

{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "ELEVENLABS_API_KEY=${ELEVENLABS_API_KEY} npx tsx ~/.claude/hooks/stop-elevenlabs.ts"
          }
        ]
      }
    ]
  }
}

5. Restart Claude Code

Important: Restart Claude Code for the hooks to take effect.

6. Activate the Output Style

After restarting, activate the marker-based TTS system:

/output-style voice-summaries-enhanced

This enables automatic TTS markers in Claude's responses. Claude will now add invisible markers that trigger voice summaries for acknowledgements and task completions.

๐ŸŽญ Customization

Change Voice

Edit the voiceId in the hook file. You can use either the default professional voices or video game character voices:

Professional Voices (Original)

const CONFIG = {
  voiceId: 'EXAVITQu4vr4xnSDxMaL', // Rachel - Professional newsreader (default)
  // voiceId: 'MF3mGyEYCl7XYWbV9V6O', // Emily - Bubbly teenager
  // voiceId: 'TxGEqnHWrfWFTfGW9XjX', // Josh - Energetic young adult (male)
  // voiceId: 'JBFqnCBsd6RMkjVDRZzb', // George - Calm narrator (male)
  // voiceId: 'onwK4e9ZLuTAKqWW03F9', // Daniel - British accent (male)
  // voiceId: 'pNInz6obpgDQGcFmaJgB', // Adam - Friendly guy next door (male)
  // voiceId: 'ErXwobaYiN019PkySvjV', // Antoni - Well-rounded (male)
  // voiceId: 'oWAxZDx7w5VEj9dCyTzz', // Grace - Soft spoken (female)
  // voiceId: 'flq6f7yk4E4fJM5XTYuZ', // Michael (male)
};

Character Voices Collection

Voice NameVoice IDShare LinkDescription
Northern Terrywo6udizrrtpIxWGp2qJk๐Ÿ”— ShareEccentric & husky character from the North of England
Grandpa Spuds OxleyNOpBlnGInO9m6vDvFkFC๐Ÿ”— ShareA friendly grandpa who knows how to enthrall his audience
Ms. WalkerDLsHlh26Ugcm6ELvS0qi๐Ÿ”— ShareWarm & caring Southern mom
Ralf EisendA9evEp8yGjv4c3WsIKuY๐Ÿ”— ShareInternational audiobook speaker with clear and deep voice
AmybhJUNIXWQQ94l8eI2VUf๐Ÿ”— ShareYoung and natural, relaxed and friendly tone
MichaelU1Vk2oyatMdYs096Ety7๐Ÿ”— ShareDeep and controlled British urban voice
Jessica Anne BogartflHkNRp1BlvT73UL6gyz๐Ÿ”— ShareThe Villain! Wickedly eloquent, calculating, cruel and calm
AriaTC0Zp7WVFzhA8zpTlRqV๐Ÿ”— ShareSexy female villain voice like dark velvet
Lutz Laugh9yzdeviXkFddZ4Oz8Mok๐Ÿ”— ShareChuckling and giggly character voice
Dr. Von FusionyjJ45q8TVCrtMhEKurxY๐Ÿ”— ShareEnergetic, quirky voice ideal for eccentric characters
Matthew Schmitz0SpgpJ4D3MpHCiWdyTg3๐Ÿ”— ShareElitist, arrogant tyrant voiced by professional narrator
Demon MonstervfaqCOvlrKi4Zp7C2IAm๐Ÿ”— ShareDeep demon voice perfect for horror and fantasy
Cowboy BobKTPVrSVAEUSJRClDzBw7๐Ÿ”— ShareRich voice with rugged warmth, perfect for tales
Drill SergeantDGzg6RaUqxGRTHSBjfgF๐Ÿ”— ShareHarsh, barking tone with relentless authority

Browse more voices at ElevenLabs Voice Library.

Adjust Voice Settings

voiceSettings: {
  stability: 0.5,        // 0-1: Higher = more consistent
  similarity_boost: 0.75, // 0-1: Higher = more expressive
  style: 0.0,            // 0-1: Higher = more emotional
  use_speaker_boost: true // Enhance voice quality
}

Summary Length

maxSummaryLength: 150  // Adjust character limit

๐Ÿ–ฅ๏ธ Terminal Session Detection

The hook automatically detects which terminal session is completing tasks, perfect for multi-session workflows:

Automatic Detection

  • VS Code Terminal Keeper: Reads .vscode/sessions.json to identify the current session
  • Multiple Methods: Uses CWD matching, environment variables, and smart fallbacks
  • Session Announcements: Voice says "Session [Name]: [Summary]"

Manual Session Override

Set the session name manually:

export CLAUDE_SESSION_NAME="My Custom Session"

Example Output

Instead of: "Created test file successfully" You'll hear: "Session MyProject: Created test file successfully" (in Rachel's professional voice)

๐ŸŽญ Voice Mapping & User-Specified Voices

Automatic Session-Based Voice Mapping

Each session can be mapped to its own unique voice automatically:

  • Session 1: yOsUZuYik0dKCynjfgaE - Your custom voice
  • Session 2: EXAVITQu4vr4xnSDxMaL - Rachel (professional newsreader)
  • Session 3: JBFqnCBsd6RMkjVDRZzb - George (calm narrator)
  • Session 4: MF3mGyEYCl7XYWbV9V6O - Emily (bubbly teenager)
  • Session 5: TxGEqnHWrfWFTfGW9XjX - Josh (energetic young adult)
  • TypeScript: onwK4e9ZLuTAKqWW03F9 - Daniel (British accent)
  • Frontend: pNInz6obpgDQGcFmaJgB - Adam (friendly guy next door)
  • Backend: ErXwobaYiN019PkySvjV - Antoni (well-rounded)
  • Testing: oWAxZDx7w5VEj9dCyTzz - Grace (soft-spoken)

See Voice Mapping Guide for complete details.

This helps you instantly identify which Claude instance completed the task just by the voice!

User-Specified Voice Override (New!)

You can now specify a voice for individual commands using markers in your output style:

Example with voice override:

User: "Fix the bug using Aria voice"
Claude response: I'll fix the bug.<!-- ACKNOWLEDGE: Fixing bug [VOICE: Aria] -->
...work completed...
Claude response: Fixed successfully.<!-- TASK_COMPLETE: Fixed bug [VOICE: Aria] -->

Supported voice names (from ElevenLabs Character Voices):

  • Northern Terry, Grandpa Spuds Oxley, Ms. Walker, Ralf Eisend, Amy, Michael
  • Jessica Anne Bogart, Aria, Lutz Laugh, Dr. Von Fusion, Matthew Schmitz
  • Demon Monster, Cowboy Bob, Drill Sergeant

See the voice-summaries-enhanced.md output style and Voice Override Feature Guide for full documentation.

๐Ÿ’ฐ Pricing & Usage

Free Tier

  • 10,000 characters/month
  • ~130-200 task summaries
  • Perfect for testing
  • Starter ($5/month): 30,000 characters (~400-600 summaries)
  • Creator ($11/month): 100,000 characters (~1,300-2,000 summaries)
  • Pro ($82.50/month): 500,000 characters (~6,500-10,000 summaries)

๐Ÿ”ง Project-Specific Setup

The installer now supports project-specific installations! When you run ./install.sh, you'll be prompted:

Enter project directory path (or press Enter for global installation):

Global Installation (press Enter):

  • Installs to ~/.claude/
  • Affects all Claude Code sessions
  • Use when you want voice announcements everywhere

Project-Specific Installation (enter path):

  • Installs to <your-project>/.claude/
  • Only affects that specific project
  • Use when you want different voices per project
  • Perfect for team projects with shared configurations

The installer handles everything automatically:

  • Creates .claude/hooks/ directory in your project
  • Copies the voice hook to your project
  • Creates/updates .claude/settings.json in your project
  • Creates .claude/audio/ for audio files
  • Preserves any existing project settings

๐Ÿ“ File Structure

UsefulClaudeCustomizations/
โ”œโ”€โ”€ hooks/
โ”‚   โ””โ”€โ”€ stop-elevenlabs.ts    # Main ElevenLabs voice hook
โ”œโ”€โ”€ examples/
โ”‚   โ”œโ”€โ”€ settings.json          # Example Claude settings
โ”‚   โ””โ”€โ”€ .mcp.json             # Example MCP configuration
โ”œโ”€โ”€ docs/
โ”‚   โ””โ”€โ”€ SETUP.md              # Detailed setup guide
โ””โ”€โ”€ README.md                 # This file

๐Ÿงช Testing

Test the hook directly:

echo '{"response":"Created test file successfully"}' | \
  ELEVENLABS_API_KEY=your-key npx tsx ~/.claude/hooks/stop-elevenlabs.ts

You should hear "Created test file successfully" spoken aloud.

๐Ÿ” Troubleshooting

No Audio Playing

  1. Check API Key: Ensure ELEVENLABS_API_KEY is set
  2. Verify Credits: Check remaining credits at ElevenLabs Dashboard
  3. Test Speakers:
    # Linux/WSL
    paplay /usr/share/sounds/ubuntu/stereo/bell.ogg
    
    # macOS
    afplay /System/Library/Sounds/Glass.aiff
    

View Generated Audio

ls -la ~/.claude/audio/

Check Logs

The hook outputs status messages in Claude Code's console:

  • โœ… Success messages
  • โŒ Error messages
  • ๐Ÿ“ Task summaries
  • ๐Ÿ” Extracted summaries

๐Ÿšซ Disable Temporarily

To disable without removing:

  1. Comment out the Stop hook in settings.json
  2. Restart Claude Code

๐Ÿค Contributing

Contributions are welcome! Feel free to:

  • Add new hooks
  • Improve summarization logic
  • Add support for other TTS services
  • Share your customizations

๐Ÿ“„ License

MIT License - See LICENSE file for details.

๐Ÿ™ Credits

๐Ÿ”— Resources


Made with โค๏ธ for the Claude Code community