in-app-audio
In-App Audio Generation (ElevenLabs)
This skill provides guidelines and a generalized Python script to generate high-quality sound effects for game development and UI interactions (clicks, hovers, win states, errors, notifications, etc.) using the ElevenLabs Sound Effects API.
Best Practices for UI / Game Prompt Engineering
When crafting prompts for ElevenLabs, keep the following rules in mind:
- Describe the Physical World: Give context (e.g., "digital", "mechanical", "8-bit", "natural", "abstract"). This shapes the texture.
- Utilize Audio Descriptive Adjectives: Use audio terminology like "warm", "crisp but gentle transient", "clean attack", "no harsh highs", "low-mid pitch".
- Set the Emotional/Functional Context: Tell the AI what the sound is for (e.g., "playful game aesthetic", "functional UI error rejection", "bouncy confirm sound").
- Target Short Durations: For UI sounds, a duration of
0.5to2.0seconds is ideal. Let it generate just enough to hit cleanly without a massive tail. - Prompt Influence: Use a lower prompt influence (
0.3to0.5) for Sound Effects rather than voices. This allows the model creative leeway to synthesize rather than overly strictly failing to map the prompt to real physics.
Examples of Great UI Prompts
- Menu Confirmation:
"bright, bouncy confirm sound with a soft plucky transient, cheerful upward tone, light cartoon-like sparkle, playful game aesthetic, clean attack, no harsh highs" - Error / Invalid:
"short beep with low-mid pitch, muted mechanical tone, crisp but gentle transient, slight downward interval to signal rejection, no reverb, functional UI aesthetic" - Notification / Hover:
"gentle two-tone chime with warm digital bell texture, smooth attack, ideal for menu transitions" - Win / Achievement:
"triumphant ascending fanfare, bright brass stab with sparkle, short celebratory jingle, clean and punchy" - Countdown Tick:
"clean digital metronome tick, sharp transient, no reverb, minimal decay, neutral pitch"
Short Musical Accompaniment & Loops
The ElevenLabs Sound Effects API (specifically the V2 model) is also highly capable of generating short instrumental loops and musical snippets to serve as background ambience or menu themes. You do not need the full Music API for this.
- Specify Genre and Tempo: Begin your prompt with clear musical direction. (e.g.,
"90s hip-hop drum loop, 90 BPM"or"Ambient synth pad"). - Detail the Instrumentation: List the key instruments and their tone. (e.g.,
"Vintage brass stabs in F minor"or"subtle modulation"). - Looping: The API supports generating seamless loops. When requesting a loop, explicitly use the word "loop" in your prompt to encourage a cyclical structure (e.g.,
"Playful, upbeat, slightly jazzy carnival instrumental loop, lighthearted"). - Duration: Background loops are typically longer than UI sounds. Target
10.0to30.0seconds to give the track enough room to breathe before it repeats. - No Vocals: Always specify "instrumental" or "no vocals" in the prompt for accompaniment. Ensure there are absolutely no vocal tracks generated unless explicitly requested by the design specification.
Batch Generation: Full UI Sound Kit
When building a complete set of UI sounds for an app, generate them in a single session using a consistent prompt template. This ensures tonal consistency across all sounds.
Template: "[ADJECTIVE] [SOUND TYPE], [TEXTURE/MATERIAL], [DURATION HINT], [AESTHETIC], clean attack, no reverb"
Example batch:
ui_click: "crisp, short tap click, wooden texture, snappy transient, minimal UI aesthetic"
ui_hover: "soft, gentle hover whoosh, airy digital texture, subtle and brief, minimal UI aesthetic"
ui_confirm: "bright, bouncy confirm chime, plucky transient, cheerful upward tone, minimal UI aesthetic"
ui_cancel: "muted, short cancel tone, low-mid pitch, slight downward interval, minimal UI aesthetic"
ui_error: "dull, brief error buzz, muted mechanical tone, crisp rejection, minimal UI aesthetic"
ui_success: "warm, ascending success chime, bell-like texture, two notes upward, minimal UI aesthetic"
ui_notify: "gentle, two-tone notification, warm digital bell, smooth attack, minimal UI aesthetic"
ui_toggle: "quick, subtle toggle switch, light mechanical snap, clean and dry, minimal UI aesthetic"
Using the Generation Script
This skill includes a generalized Python script that interacts with the API automatically.
Script Path: <path-to-skill>/scripts/generate_audio.py
Usage Instructions
python <path-to-skill>/scripts/generate_audio.py \
--prompt "crisp ui click, short, wooden texture" \
--name "ui_click" \
--out_dir "./public/audio" \
--format mp3
Arguments:
--prompt(Required): The vivid description of the sound effect.--name(Required): The output filename without extension (e.g.,ui_click).--out_dir(Optional): The directory to save to. Defaults to./public/audio.--format(Optional): Output format —mp3,wav, orogg. Defaults tomp3.--duration(Optional): Exact duration in seconds. Defaults to1.5.--influence(Optional): Prompt influence scale between 0.0 and 1.0. Defaults to0.4.--api-key(Optional): Directly pass the ElevenLabs API Key. If omitted, the script reads from.env.localor environment variableELEVENLABS_API_KEY.
More from horace4444/extend-my-claude-code
watermark-removal
Universal watermark removal with ML-based inpainting and automatic detection. Works on ANY watermark type (Google SynthID, Midjourney, DALL-E, stock photos, logos). Four methods: inpaint (ML, best quality), aggressive (fast), crop (fastest), paint (basic). Auto-detects watermark location in any corner. Use when: (1) Removing ANY type of watermark, (2) Google AI/Imagen/Gemini watermarks, (3) Stock photo watermarks, (4) Logo overlays, (5) Cleaning images for production, (6) Batch processing, or (7) User mentions 'watermark', 'remove watermark', 'clean image', 'SynthID'
114image-converter
Convert, resize, compress, and optimize images across formats (HEIC, PNG, JPEG, WebP, AVIF, GIF, TIFF, BMP). Use when working with image files for format conversion, resizing/downscaling, compression/optimization, batch processing, watermarking, metadata stripping, or any image manipulation task. Triggers on requests involving image files, photo processing, or web image optimization.
8ai-api-integrations
Connect applications, scripts, and backend services to AI model APIs (OpenAI, Anthropic Claude, Google Gemini/Vertex AI, xAI Grok), Supabase (PostgreSQL database with vector search), and Clerk (authentication). Use when building AI-powered features that require (1) AI model integration for text generation, translation, embeddings, or image generation, (2) Supabase database operations with pgvector semantic search, (3) Clerk user authentication and session management, (4) Combining AI outputs with database storage, (5) Cost-optimized model selection and prompt engineering, (6) Best practices for production deployments avoiding common anti-patterns.
7skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
4web-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
4google-image-creator
Generate images using Google AI models (Imagen 4 and Gemini). Presents top 3 model options with pricing, generates images via API, tracks token usage and costs. Use when user needs to: (1) Generate images with Google AI, (2) Choose between Google image models, (3) See pricing for Google image generation, (4) Track image generation costs, or (5) Compare Imagen vs Gemini image models. Self-updating with current pricing from https://ai.google.dev/pricing
4