skills/tts-elevenlabs/SKILL.md
Text-to-speech via ElevenLabs API. Converts text or a script file to high-quality MP3. Standalone utility — also called by generate-podcast and generate-video for voiceover.
npx skillsauth add RonanCodes/ronan-skills tts-elevenlabsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Convert text to studio-quality speech via the ElevenLabs API. Outputs an MP3 file. Can be used standalone or called by generate-podcast and generate-video as their TTS backend.
/tts-elevenlabs "Text to speak" [--voice <name|id>] [--output <path>] [--model <id>]
/tts-elevenlabs --file script.md [--voice <name|id>] [--output <path>]
--voice — ElevenLabs voice name or ID. Default: Rachel. Common voices: Rachel, Adam, Antoni, Bella, Domi, Elli, Josh.--output — output file path. Default: /tmp/tts-elevenlabs-<timestamp>.mp3.--model — ElevenLabs model ID. Default: eleven_multilingual_v2. Options: eleven_monolingual_v1, eleven_multilingual_v2, eleven_turbo_v2_5.--file — read text from a file instead of inline argument. Strips markdown formatting before sending.if [ -z "$ELEVENLABS_API_KEY" ]; then
echo "❌ ELEVENLABS_API_KEY not set."
echo ""
echo "Get your key at: https://elevenlabs.io/app/settings/api-keys"
echo "Then set it: export ELEVENLABS_API_KEY=sk_..."
echo "Or add to: ~/.claude/.env"
exit 1
fi
The key should be in the environment or in ~/.claude/.env (which Claude Code loads automatically).
ElevenLabs uses voice IDs internally. Map common names to IDs:
VOICE_NAME="${VOICE:-Rachel}"
# Resolve name → ID via the voices endpoint (cached for the session)
VOICES_CACHE="/tmp/elevenlabs-voices-cache.json"
if [ ! -f "$VOICES_CACHE" ] || [ "$(find "$VOICES_CACHE" -mmin +60 2>/dev/null)" ]; then
curl -s "https://api.elevenlabs.io/v1/voices" \
-H "xi-api-key: $ELEVENLABS_API_KEY" > "$VOICES_CACHE"
fi
VOICE_ID=$(jq -r --arg name "$VOICE_NAME" \
'.voices[] | select(.name == $name) | .voice_id' "$VOICES_CACHE" | head -1)
# If no match, assume the user passed a raw voice ID
[ -z "$VOICE_ID" ] && VOICE_ID="$VOICE_NAME"
if [ -n "$FILE_INPUT" ]; then
# Strip markdown formatting for cleaner speech
TEXT=$(sed -E '
s/^#{1,6} // # strip heading markers
s/\*\*([^*]+)\*\*/\1/g # bold → plain
s/\*([^*]+)\*/\1/g # italic → plain
s/`([^`]+)`/\1/g # code → plain
s/\[([^\]]+)\]\([^)]+\)/\1/g # links → text only
s/^[-*] // # strip list markers
/^---$/d # remove horizontal rules
/^```/,/^```/d # remove code blocks
' "$FILE_INPUT")
else
TEXT="$INLINE_TEXT"
fi
# ElevenLabs has a 5000 char limit per request. Split if needed.
CHAR_COUNT=$(echo "$TEXT" | wc -c | tr -d ' ')
MODEL="${MODEL_ID:-eleven_multilingual_v2}"
OUTPUT="${OUTPUT_PATH:-/tmp/tts-elevenlabs-$(date +%s).mp3}"
if [ "$CHAR_COUNT" -le 5000 ]; then
# Single request
curl -s "https://api.elevenlabs.io/v1/text-to-speech/$VOICE_ID" \
-H "xi-api-key: $ELEVENLABS_API_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg text "$TEXT" --arg model "$MODEL" \
'{text: $text, model_id: $model, voice_settings: {stability: 0.5, similarity_boost: 0.75}}')" \
--output "$OUTPUT"
else
# Split into chunks at sentence boundaries, render each, concatenate
# Split on `. ` or `\n\n`, keeping chunks under 4500 chars
CHUNK_DIR="/tmp/tts-elevenlabs-chunks-$$"
mkdir -p "$CHUNK_DIR"
# Python one-liner to split text into chunks
python3 -c "
import sys, textwrap
text = sys.stdin.read()
chunks = []
current = ''
for sentence in text.replace('\n\n', '. ').split('. '):
if len(current) + len(sentence) > 4500:
chunks.append(current)
current = sentence
else:
current += ('. ' if current else '') + sentence
if current:
chunks.append(current)
for i, chunk in enumerate(chunks):
with open(f'$CHUNK_DIR/chunk_{i:03d}.txt', 'w') as f:
f.write(chunk)
" <<< "$TEXT"
# Render each chunk
for chunk_file in "$CHUNK_DIR"/chunk_*.txt; do
chunk_text=$(cat "$chunk_file")
chunk_mp3="${chunk_file%.txt}.mp3"
curl -s "https://api.elevenlabs.io/v1/text-to-speech/$VOICE_ID" \
-H "xi-api-key: $ELEVENLABS_API_KEY" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg text "$chunk_text" --arg model "$MODEL" \
'{text: $text, model_id: $model, voice_settings: {stability: 0.5, similarity_boost: 0.75}}')" \
--output "$chunk_mp3"
done
# Concatenate with ffmpeg
ls "$CHUNK_DIR"/chunk_*.mp3 | sed 's/^/file /' > "$CHUNK_DIR/concat.txt"
ffmpeg -f concat -safe 0 -i "$CHUNK_DIR/concat.txt" -codec:a copy "$OUTPUT" -y 2>/dev/null
rm -rf "$CHUNK_DIR"
fi
if [ ! -f "$OUTPUT" ] || [ "$(wc -c < "$OUTPUT")" -lt 100 ]; then
echo "❌ TTS failed. Response may contain an error message:"
cat "$OUTPUT" 2>/dev/null
exit 1
fi
DURATION=$(ffprobe -v quiet -show_entries format=duration -of csv=p=0 "$OUTPUT" 2>/dev/null | cut -d. -f1)
✅ TTS complete
Voice: <voice name> (<voice id>)
Model: <model id>
Input: <char count> characters
Duration: <seconds>s
Output: <output path>
Play: afplay <output path>
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| ELEVENLABS_API_KEY | yes | — | API key from elevenlabs.io/app/settings/api-keys |
| ELEVENLABS_VOICE_A | no | Rachel | Default voice for single-host / host A |
| ELEVENLABS_VOICE_B | no | Adam | Default voice for host B (two-voice mode) |
ElevenLabs charges per character:
A typical 6-minute podcast script is ~5,000 characters ≈ $0.30 on pay-as-you-go.
generate-podcast already checks for ELEVENLABS_API_KEY and uses it as the top-priority TTS backend. This skill provides the same capability as a standalone tool.
generate-video --voiceover chains through generate-podcast, which in turn uses this backend when available.
.claude/skills/generate-podcast/SKILL.md — uses ElevenLabs as Tier 1 TTS backend.claude/skills/generate-video/SKILL.md — optional voiceover via podcast pipelinetesting
--- name: linear-pipeline description: The Fable orchestrator for a single dispatched Linear ticket. Holds almost no context itself; it receives `--issue <ID> --detached`, decides the stage sequence, and fans out a sub-agent per stage, passing forward only each stage's artifact (never re-derived, never inlined into its own context). Step zero, before any planning or stage routing, is a boundary triage against `canon/security-boundary.md` (#199): a match tags Ronan Connolly and stops the run, no
development
--- name: in-your-face description: Capture a chat-only answer into a durable artifact (markdown + HTML, PDF when cheap) and launch it automatically so the user cannot miss it. Use when user says "in your face", "don't let me lose this", "save that answer", "make that durable", or right after answering a substantive side question (a recipe, comparison, how-to, or generated prompt) that would otherwise die with the context. category: workflow argument-hint: [--no-open] [--vault <short>] [hint of
tools
One-shot headless OpenAI Codex CLI calls for background/admin AI tasks — summaries, classification, extraction, admin glue. The default engine for anything that runs AI constantly in the background (daemon-driven, per-event), because it bills the flat ChatGPT subscription instead of Claude usage or per-token API spend, and it keeps working while Claude is rate-limited. NEVER for coding — coding stays Claude. Use when a skill or daemon needs a cheap always-on AI call, when the user says "use codex", "ask codex", "codex as backup", or when building a background summarizer/classifier into a listener or loop. Reads auth from ~/.codex/auth.json (ChatGPT account, no API key).
research
Turn a warranty rejection, repair quote, or RMA email into a cited decision brief — legal read (NL/EU consumer law), is the part user-serviceable, live part and new-unit prices, repair-vs-DIY-vs-new economics, before-you-send-it checklist, deadlines. Use when the user pastes or screenshots a repair quote, warranty rejection, "not covered" email, onderzoekskosten fee, or asks "should I repair or replace this".