From bitwize-music
Guides audio mastering for streaming platforms: analyzes WAV files for loudness (-14 LUFS target), peaks, frequency balance; applies optimizations and verifies results. For approved tracks.
npx claudepluginhub bitwize-music-studio/claude-ai-music-skills --plugin bitwize-musicThis skill is limited to using the following tools:
**Input**: $ARGUMENTS
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Input: $ARGUMENTS
When invoked with a folder:
When invoked for guidance:
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
Master to -14 LUFS, -1.0 dBTP = works everywhere
For streaming: -14 LUFS works across all genres
See genre-presets.md for detailed genre settings.
Check for custom mastering presets:
load_override("mastering-presets.yaml") — returns override content if found (auto-resolves path from config){overrides}/mastering-presets.yaml:
# Custom Mastering Presets
genres:
dark-electronic:
cut_highmid: -3 # More aggressive cut
boost_sub: 2 # More sub bass
target_lufs: -12 # Louder master
ambient:
cut_highmid: -1 # Gentle cut
boost_sub: 0 # Natural bass
target_lufs: -16 # Quieter, more dynamic
Example:
Before mastering, resolve audio path via MCP:
resolve_path("audio", album_slug) — returns the full audio directory pathExample: 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.
Before mastering, verify:
resolve_path("audio", album_slug) to confirm.wav file in the folderBefore analyzing or mastering, confirm genre settings with the user:
find_album(album_slug) to get the genre from album statePer-track override workflow:
master_audio again with the different genre
and copying the re-mastered output over the previous version in mastered/analyze_audio(album_slug)
What to check:
Red flags:
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).
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.
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_filename="reference.wav")
master_audio(album_slug, cut_highmid=-2.0, dry_run=True)
Shows what will happen without modifying files.
master_audio(album_slug, cut_highmid=-2.0)
Creates mastered/ subdirectory in audio folder with processed files.
# Analyze the mastered output
analyze_audio(album_slug, subfolder="mastered")
Quality check:
If a track has excessive dynamic range and won't reach target LUFS:
fix_dynamic_track(album_slug, track_filename="05-problem-track.wav")
All mastering operations are available as MCP tools. Use these instead of running Python scripts via bash.
| MCP Tool | Purpose |
|---|---|
analyze_audio | Measure LUFS, true peak, dynamic range |
qc_audio | Technical QC (mono, phase, clipping, clicks, silence, format, spectral) |
master_audio | Master tracks to target LUFS with EQ options |
master_with_reference | Match mastering to a reference track |
fix_dynamic_track | Fix tracks with extreme dynamic range |
master_album | End-to-end pipeline — all steps in one call |
Suno outputs vary in loudness - some at -8 LUFS, some at -18 LUFS.
Master when:
Don't distribute until:
Test on:
Wrong:
python3 "$PLUGIN_DIR/tools/mastering/analyze_tracks.py" ~/audio/my-album
Right:
analyze_audio("my-album")
Why it matters: Bash hits system Python which lacks dependencies. MCP tools run inside the venv automatically.
Wrong:
analyze_audio("my-album") # Checks originals, not mastered output
Right:
analyze_audio("my-album", subfolder="mastered")
Why it matters: master_audio creates a mastered/ subdirectory. Verify that output, not the originals.
Wrong:
master_audio("my-album", cut_highmid=-3.0) # Writes files immediately
Right:
master_audio("my-album", cut_highmid=-3.0, dry_run=True) # Preview first
master_audio("my-album", cut_highmid=-3.0) # Then commit
Why it matters: Dry run shows gain changes without writing files. Catches bad settings before they hit disk.
After all tracks mastered and verified:
## Mastering Complete - Ready for Release
**Album**: [Album Name]
**Mastered Files Location**: [path to mastered/ directory]
**Track Count**: [N]
**Mastering Report**:
- All tracks: -14.0 LUFS ± 0.5 dB ✓
- True peak: < -1.0 dBTP on all tracks ✓
- Album consistency: [X] dB range (< 1 dB) ✓
- No clipping or distortion ✓
**Next Step**: release-director can begin pre-release QA
load_override("mastering-presets.yaml") at invocationYour deliverable: Mastered WAV files at consistent loudness, optimized for streaming (with user preferences applied) → release-director handles release workflow.