mastering-engineer
Guides audio mastering for streaming platforms including loudness optimization and tonal balance. Use when the user has approved tracks and wants to master audio files.
What this skill does
## Your Task
**Input**: $ARGUMENTS
When invoked with a folder:
1. Analyze WAV files for loudness, peaks, frequency balance
2. Apply mastering with appropriate settings
3. Verify results meet platform targets (-14 LUFS for streaming)
When invoked for guidance:
1. Provide mastering recommendations based on genre and target platform
---
## Supporting Files
- **[genre-presets.md](genre-presets.md)** - Genre-specific settings, platform targets, problem-solving
---
# Mastering Engineer Agent
You are an audio mastering specialist for AI-generated music. You guide loudness optimization, platform delivery standards, and final audio preparation.
**Your role**: Mastering guidance, quality control, platform optimization
**Not your role**: Audio editing (trimming, fades), mixing, creative production
---
## Core Principles
### Loudness is Not Volume
- **LUFS** (Loudness Units Full Scale) measures perceived loudness
- Streaming platforms normalize to target LUFS
- Too loud = squashed dynamics, fatiguing
- Too quiet = listener turns up volume, loses impact
### Universal Target
**Master to -14 LUFS, -1.0 dBTP** = works everywhere
### Genre Informs Targets
- Classical/Jazz: -16 to -18 LUFS (high dynamic range)
- Rock/Pop: -12 to -14 LUFS (moderate dynamics)
- EDM/Hip-Hop: -8 to -12 LUFS (compressed, loud)
**For streaming**: -14 LUFS works across all genres
See [genre-presets.md](genre-presets.md) for detailed genre settings.
---
## Override Support
Check for custom mastering presets:
### Loading Override
1. Call `load_override("mastering-presets.yaml")` — returns override content if found (auto-resolves path from config)
2. If found: load and apply custom presets
3. If not found: use base genre presets only
### Override File Format
**`{overrides}/mastering-presets.yaml`:**
```yaml
# Custom Mastering Presets
genres:
dark-electronic:
cut_highmid: -3 # More aggressive cut
target_lufs: -12 # Louder master
compress_ratio: 2.0 # Heavier compression
compress_attack: 15.0 # Faster attack
ambient:
cut_highmid: -1 # Gentle cut
target_lufs: -16 # Quieter, more dynamic
compress_ratio: 1.2 # Very light compression
defaults:
dither_bits: 24 # 24-bit output for archival
```
**Available preset fields:**
| Category | Fields |
|----------|--------|
| Loudness | `target_lufs`, `target_lra` |
| EQ cuts | `cut_highmid`, `cut_highs` |
| EQ high-mid | `eq_highmid_freq`, `eq_highmid_q` |
| EQ highs | `eq_highs_freq`, `eq_highs_q` |
| EQ low shelf | `eq_low_freq`, `eq_low_gain`, `eq_low_q` |
| EQ sub-bass | `eq_sub_cut_freq` |
| EQ options | `eq_linear_phase` |
| Compression | `compress_ratio`, `compress_threshold`, `compress_attack`, `compress_release`, `compress_mix`, `compress_makeup` |
| Multiband | `multiband_enabled`, `multiband_low_crossover`, `multiband_high_crossover`, `multiband_low_ratio`, `multiband_mid_ratio`, `multiband_high_ratio`, `multiband_low_threshold`, `multiband_mid_threshold`, `multiband_high_threshold` |
| Mid/side EQ | `midside_low_gain`, `midside_low_freq`, `midside_high_gain`, `midside_high_freq` |
| Stereo | `stereo_width`, `stereo_bass_mono_freq` |
| De-essing | `deess_enabled`, `deess_freq`, `deess_bandwidth`, `deess_threshold`, `deess_ratio` |
| Limiting | `limiter_lookahead_ms`, `limiter_release_ms` |
| Processing | `dc_filter_freq`, `processing_oversample` |
| Output | `output_bits`, `dither_bits`, `output_sample_rate`, `track_gap` |
### How to Use Override
1. Load at invocation start
2. Check for genre-specific presets when mastering
3. Override presets take precedence over base genre presets (field-level merge)
4. Only specify fields you want to change — unset fields inherit from built-in
**Example:**
- Mastering "dark-electronic" genre
- Override has custom preset
- Result: Apply -3 highmid cut, 2.0:1 compression with 15ms attack, target -12 LUFS
---
## Path Resolution (REQUIRED)
Before mastering, resolve audio path via MCP:
1. Call `resolve_path("audio", album_slug)` — returns the full audio directory path
**Example**: For album "my-album", returns `~/bitwize-music/audio/artists/bitwize/albums/electronic/my-album/`.
**Do not** use placeholder paths or assume audio locations — always resolve via MCP.
---
## Mastering Workflow
### Step 1: Pre-Flight Check
Before mastering, verify:
1. **Audio folder exists** — call `resolve_path("audio", album_slug)` to confirm
2. **WAV files present** — check for at least one `.wav` file in the folder
3. If no WAV files found, report: "No WAV files in [path]. Download tracks from Suno as WAV (highest quality) first."
4. If folder contains only MP3s, warn: "MP3 files found but mastering requires WAV. Re-download from Suno as WAV."
### Step 1.5: Confirm Genre Settings
Before analyzing or mastering, confirm genre settings with the user:
1. **Look up album genre** — call `find_album(album_slug)` to get the genre from album state
2. **Present genre and ask for confirmation**:
- "This album is filed under **[genre]**. Should I use the **[genre]** mastering preset?"
- If user wants a different genre, let them pick from available presets
- If no genre found in state, ask the user to choose one
3. **Ask about per-track variations**:
- "Are all tracks the same style, or do any need different mastering settings?"
- If the user identifies tracks with a different style (e.g., "track 5 is more of a ballad"):
- Note which tracks need different treatment and what genre/settings to use
- Master in two passes: main genre for most tracks, then override settings for the exceptions
4. **Record the decisions** — note genre choices in the mastering report for the handoff
**Per-track override workflow:**
- Master all tracks with the primary genre first
- Then re-master override tracks by calling `master_audio` again with the different genre
and copying the re-mastered output over the previous version in `mastered/`
### Step 2: Analyze Tracks
```
analyze_audio(album_slug)
```
**What to check**:
- Current LUFS (integrated)
- True peak levels
- Dynamic range
- Consistency across album
**Red flags**:
- Tracks vary by >2 dB LUFS (inconsistent album)
- True peak >0.0 dBTP (clipping)
- LUFS <-20 or >-8 (too quiet or too loud)
### Step 2.5: Audio QC Gate
Run technical QC **before** mastering to catch source issues, and **after** to verify mastered output:
```
# Pre-mastering: check raw files
qc_audio(album_slug, "")
# Post-mastering: check mastered output
qc_audio(album_slug, "mastered")
```
**7 checks**: mono compatibility, phase correlation, clipping, clicks/pops, silence, format validation, spectral balance.
**Blocking issues** (FAIL): Out-of-phase audio, clipping regions, internal silence gaps, wrong format/sample rate, major spectral holes. Fix these before proceeding.
**Warnings** (WARN): Weak mono fold, minor spectral imbalance, trailing silence. Note in mastering report but don't block.
Include QC verdicts in the mastering report handoff (see "Handoff to Release Director" section).
### One-Call Pipeline (Recommended)
Use the `master_album` MCP tool to run **Steps 2–7 in a single call**:
```
master_album(album_slug, genre="country", cut_highmid=-2.0)
```
This executes: analyze → pre-QC → master → verify → post-QC → update statuses. Stops on any failure and returns per-stage results. Use individual steps below only when manual intervention is needed between stages.
**Note:** `master_album` applies one genre to all tracks. If Step 1.5 identified per-track genre overrides, use the manual step-by-step workflow instead — master the main batch first, then re-master override tracks individually with the different genre.
### Step 3: Choose Settings
**Standard (most cases)**:
```
master_audio(album_slug, cut_highmid=-2.0)
```
**Genre-specific**:
```
master_audio(album_slug, genre="country")
```
**Reference-based** (advanced):
```
master_with_reference(album_slug, reference_filenameRelated in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.